Merge branch 'dev' into release

This commit is contained in:
Xu Chang 2025-12-16 13:57:34 +08:00
commit f51387b21b
48 changed files with 227 additions and 248 deletions

View File

@ -18,11 +18,16 @@ declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<Enti
data: RowWithActions<EntityDict, T>[];
loading: boolean;
tablePagination?: React.ReactNode;
rowSelection?: any;
rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<EntityDict, T>> | undefined;
hideHeader?: boolean | undefined;
disableSerialNumber?: boolean | undefined;
size?: "small" | "large" | "middle" | undefined;
scroll?: any;
size?: "small" | "middle" | "large" | undefined;
scroll?: ({
x?: string | number | true | undefined;
y?: string | number | undefined;
} & {
scrollToFirstRowOnChange?: boolean | undefined;
}) | undefined;
empty?: React.ReactNode;
opWidth?: number | undefined;
ellipsis?: boolean | undefined;
@ -41,29 +46,34 @@ declare const ListPro: <T extends keyof EntityDict>(props: {
data: RowWithActions<EntityDict, T>[];
loading?: boolean | undefined;
tablePagination?: any;
rowSelection?: any;
rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<EntityDict, T>> | undefined;
disableSerialNumber?: boolean | undefined;
size?: "small" | "large" | "middle" | undefined;
scroll?: any;
size?: "small" | "middle" | "large" | undefined;
scroll?: ({
x?: string | number | true | undefined;
y?: string | number | undefined;
} & {
scrollToFirstRowOnChange?: boolean | undefined;
}) | undefined;
empty?: any;
opWidth?: number | undefined;
oakPath?: string | undefined;
}) => React.ReactElement;
declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
column?: number | Record<Breakpoint, number> | undefined;
column?: number | Record<import("antd").Breakpoint, number> | undefined;
entity: T;
attributes: OakAbsAttrDef[];
data: Partial<EntityDict[T]["Schema"]>;
title?: string | undefined;
bordered?: boolean | undefined;
layout?: "horizontal" | "vertical" | undefined;
layout?: "vertical" | "horizontal" | undefined;
}>) => React.ReactElement;
declare const Upsert: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
helps: Record<string, string>;
entity: T;
attributes: OakAbsAttrUpsertDef<EntityDict, T, string | number>[];
data: EntityDict[T]["Schema"];
layout: "horizontal" | "vertical";
layout: "vertical" | "horizontal";
mode: "default" | "card";
}>) => React.ReactElement;
export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };

View File

@ -9,7 +9,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
goBackable: boolean;
disableAutoPay: boolean;
closeWhenFailure: boolean;
mode: "backend" | "frontend";
mode: "frontend" | "backend";
autoSuccessAt: boolean;
disableClose: boolean;
}>) => React.ReactElement;

View File

@ -73,10 +73,10 @@ export declare const actionDefDict: {
refund: {
iState: import("oak-domain/lib/types").ActionDef<string, string>;
};
settlement: {
settlePlan: {
iState: import("oak-domain/lib/types").ActionDef<string, string>;
};
settlePlan: {
settlement: {
iState: import("oak-domain/lib/types").ActionDef<string, string>;
};
ship: {

View File

@ -27,8 +27,8 @@ import { actionDefDict as offlineAccount } from "./OfflineAccount/Action";
import { actionDefDict as order } from "./Order/Action";
import { actionDefDict as pay } from "./Pay/Action";
import { actionDefDict as refund } from "./Refund/Action";
import { actionDefDict as settlement } from "./Settlement/Action";
import { actionDefDict as settlePlan } from "./SettlePlan/Action";
import { actionDefDict as settlement } from "./Settlement/Action";
import { actionDefDict as ship } from "./Ship/Action";
import { actionDefDict as user } from "./User/Action";
import { actionDefDict as withdraw } from "./Withdraw/Action";
@ -66,8 +66,8 @@ export const actionDefDict = {
order,
pay,
refund,
settlement,
settlePlan,
settlement,
ship,
user,
withdraw,

View File

@ -6,6 +6,12 @@ import { String, Text } from "oak-domain/lib/types/DataType";
import { Style } from "oak-general-business/lib/types/Style";
export type CosOrigin = "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown" | "s3";
export type AppType = "web" | "wechatMp" | "wechatPublic" | "native";
export type Location = {
protocol: "http:" | "https:";
hostname: string;
port: string;
scanPage?: string | "wechatQrCode/scan";
};
export type WechatMpConfig = {
type: "wechatMp";
appId: string;
@ -20,6 +26,7 @@ export type WechatMpConfig = {
mode: "clear" | "compatible" | "safe";
dataFormat: "json" | "xml";
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};
@ -36,11 +43,7 @@ export type WebConfig = {
appId: string;
appSecret: string;
};
location: {
protocol: "http:" | "https:";
hostname: string;
port: string;
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};
@ -61,11 +64,7 @@ export type WechatPublicConfig = {
appId: string;
originalId: string;
};
location: {
protocol: "http:" | "https:";
hostname: string;
port: string;
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};
@ -77,11 +76,7 @@ export type NativeConfig = {
appSecret: string;
domain?: string;
};
location: {
protocol: "http:" | "https:";
hostname: string;
port: string;
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};

View File

@ -78,8 +78,8 @@ import * as BaseOfflineAccount from "./OfflineAccount/_baseSchema";
import * as BaseOrder from "./Order/_baseSchema";
import * as BasePay from "./Pay/_baseSchema";
import * as BaseRefund from "./Refund/_baseSchema";
import * as BaseSettlement from "./Settlement/_baseSchema";
import * as BaseSettlePlan from "./SettlePlan/_baseSchema";
import * as BaseSettlement from "./Settlement/_baseSchema";
import * as BaseShip from "./Ship/_baseSchema";
import * as BaseShipCompany from "./ShipCompany/_baseSchema";
import * as BaseShipOrder from "./ShipOrder/_baseSchema";
@ -5249,6 +5249,54 @@ export type Refund = {
Remove: OakOperation<"remove", Refund["RemoveOperationData"], Refund["Filter"], Refund["Sorter"]>;
Operation: Refund["Create"] | Refund["Update"] | Refund["Remove"];
};
export type SettlePlan = {
OpSchema: BaseSettlePlan.OpSchema;
Action: BaseSettlePlan.OpAction;
Schema: BaseSettlePlan.OpSchema & {
order: Order["Schema"];
settlement$plan?: Array<Omit<Settlement["Schema"], "plan">>;
settlement$plan$$aggr?: AggregationResult<Omit<Settlement["Schema"], "plan">>;
};
Projection: BaseSettlePlan.OpProjection & {
order?: Order["Projection"];
settlement$plan?: OakSelection<"select", Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
settlement$plan$$aggr?: DeduceAggregation<Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
};
FilterUnit: BaseSettlePlan.OpFilter & {
order: MakeFilter<Order["FilterUnit"]>;
settlement$plan: MakeFilter<Omit<Settlement["FilterUnit"], "plan">> & SubQueryPredicateMetadata;
};
Filter: MakeFilter<SettlePlan["FilterUnit"]>;
SortAttr: Partial<BaseSettlePlan.OpSortAttr | {
order: Order["SortAttr"];
}>;
SortNode: {
$attr: SettlePlan["SortAttr"];
$direction?: "asc" | "desc";
};
Sorter: SettlePlan["SortNode"][];
Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Aggregation: DeduceAggregation<SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
CreateOperationData: FormCreateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]>)[];
}>;
CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<SettlePlan["CreateOperationData"]>>;
Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]> | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[];
}>;
Update: OakOperation<BaseSettlePlan.OpUpdateAction, SettlePlan["UpdateOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
RemoveOperationData: {};
Remove: OakOperation<"remove", SettlePlan["RemoveOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Operation: SettlePlan["Create"] | SettlePlan["Update"] | SettlePlan["Remove"];
};
export type Settlement = {
OpSchema: BaseSettlement.OpSchema;
Action: BaseSettlement.OpAction;
@ -5303,54 +5351,6 @@ export type Settlement = {
Remove: OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"], Settlement["Sorter"]>;
Operation: Settlement["Create"] | Settlement["Update"] | Settlement["Remove"];
};
export type SettlePlan = {
OpSchema: BaseSettlePlan.OpSchema;
Action: BaseSettlePlan.OpAction;
Schema: BaseSettlePlan.OpSchema & {
order: Order["Schema"];
settlement$plan?: Array<Omit<Settlement["Schema"], "plan">>;
settlement$plan$$aggr?: AggregationResult<Omit<Settlement["Schema"], "plan">>;
};
Projection: BaseSettlePlan.OpProjection & {
order?: Order["Projection"];
settlement$plan?: OakSelection<"select", Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
settlement$plan$$aggr?: DeduceAggregation<Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
};
FilterUnit: BaseSettlePlan.OpFilter & {
order: MakeFilter<Order["FilterUnit"]>;
settlement$plan: MakeFilter<Omit<Settlement["FilterUnit"], "plan">> & SubQueryPredicateMetadata;
};
Filter: MakeFilter<SettlePlan["FilterUnit"]>;
SortAttr: Partial<BaseSettlePlan.OpSortAttr | {
order: Order["SortAttr"];
}>;
SortNode: {
$attr: SettlePlan["SortAttr"];
$direction?: "asc" | "desc";
};
Sorter: SettlePlan["SortNode"][];
Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Aggregation: DeduceAggregation<SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
CreateOperationData: FormCreateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]>)[];
}>;
CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<SettlePlan["CreateOperationData"]>>;
Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]> | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[];
}>;
Update: OakOperation<BaseSettlePlan.OpUpdateAction, SettlePlan["UpdateOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
RemoveOperationData: {};
Remove: OakOperation<"remove", SettlePlan["RemoveOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Operation: SettlePlan["Create"] | SettlePlan["Update"] | SettlePlan["Remove"];
};
export type Ship = {
OpSchema: BaseShip.OpSchema;
Action: BaseShip.OpAction;
@ -6343,8 +6343,8 @@ export type EntityDict = {
order: Order;
pay: Pay;
refund: Refund;
settlement: Settlement;
settlePlan: SettlePlan;
settlement: Settlement;
ship: Ship;
shipCompany: ShipCompany;
shipOrder: ShipOrder;

View File

@ -3,8 +3,10 @@ export const desc = {
attributes: {
channel: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "jPush", "jim", "wechatMp", "sms", "email"]
type: "varchar",
params: {
length: 32
}
},
applicationId: {
type: "ref",

View File

@ -9,13 +9,13 @@ export const style = {
success: '#008000',
failure: '#9A9A9A',
},
channel: {
wechatMp: '#008000',
jPush: '#0000FF',
jim: '#0000FF',
wechatPublic: '#008000',
sms: '#000000',
email: '#000000',
},
// channel: {
// wechatMp: '#008000',
// jPush: '#0000FF',
// jim: '#0000FF',
// wechatPublic: '#008000',
// sms: '#000000',
// email: '#000000',
// },
}
};

View File

@ -2,10 +2,9 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
import { Channel } from "oak-general-business/lib/types/Message";
import { String } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
channel: Channel;
channel: String<32>;
applicationId?: ForeignKey<"application"> | null;
data?: Object | null;
messageSystemId: ForeignKey<"messageSystem">;
@ -22,7 +21,7 @@ export type OpFilter = {
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
channel: Q_EnumValue<Channel>;
channel: Q_StringValue;
applicationId: Q_StringValue;
data: Object;
messageSystemId: Q_StringValue;

View File

@ -19,14 +19,6 @@
"sending": "发送中",
"success": "发送成功",
"failure": "发送失败"
},
"channel": {
"wechatPublic": "公众号",
"jPush": "极光推送",
"jim": "极光消息",
"wechatMp": "小程序",
"sms": "短信",
"email": "邮箱"
}
}
}

View File

@ -76,8 +76,8 @@ import { desc as offlineAccountDesc } from "./OfflineAccount/Storage";
import { desc as orderDesc } from "./Order/Storage";
import { desc as payDesc } from "./Pay/Storage";
import { desc as refundDesc } from "./Refund/Storage";
import { desc as settlementDesc } from "./Settlement/Storage";
import { desc as settlePlanDesc } from "./SettlePlan/Storage";
import { desc as settlementDesc } from "./Settlement/Storage";
import { desc as shipDesc } from "./Ship/Storage";
import { desc as shipCompanyDesc } from "./ShipCompany/Storage";
import { desc as shipOrderDesc } from "./ShipOrder/Storage";
@ -172,8 +172,8 @@ export const storageSchema = {
order: orderDesc,
pay: payDesc,
refund: refundDesc,
settlement: settlementDesc,
settlePlan: settlePlanDesc,
settlement: settlementDesc,
ship: shipDesc,
shipCompany: shipCompanyDesc,
shipOrder: shipOrderDesc,

View File

@ -39,8 +39,8 @@ import { style as offlineAccount } from "./OfflineAccount/Style";
import { style as order } from "./Order/Style";
import { style as pay } from "./Pay/Style";
import { style as refund } from "./Refund/Style";
import { style as settlement } from "./Settlement/Style";
import { style as settlePlan } from "./SettlePlan/Style";
import { style as settlement } from "./Settlement/Style";
import { style as ship } from "./Ship/Style";
import { style as sysAccountOper } from "./SysAccountOper/Style";
import { style as user } from "./User/Style";
@ -92,8 +92,8 @@ export const styleDict = {
order,
pay,
refund,
settlement,
settlePlan,
settlement,
ship,
sysAccountOper,
user,

View File

@ -3,8 +3,8 @@ import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, Expr
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import { String, Text, Boolean } from "oak-domain/lib/types/DataType";
import { Config } from "oak-general-business/lib/types/Config";
import { Style } from "oak-general-business/lib/types/Style";
import { Config } from "../../../../oak-general-business/lib/types/Config";
import { Style } from "../../../../oak-general-business/lib/types/Style";
type PayConfig = {
withdrawLoss: {
conservative: boolean;

View File

@ -59,7 +59,7 @@ export const desc = {
qrCodeType: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"]
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
},
expiresAt: {
type: "datetime"

View File

@ -20,7 +20,7 @@ export const desc = {
qrCodeType: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"]
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
},
expiresAt: {
type: "datetime"

View File

@ -19,7 +19,7 @@ export const desc = {
type: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"]
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
},
allowShare: {
notNull: true,

View File

@ -1,4 +1,4 @@
import WechatPay from './WechatPay';
import WechatPayDebug from './WechatPay.debug';
declare const _default: typeof WechatPayDebug | typeof WechatPay;
declare const _default: typeof WechatPay | typeof WechatPayDebug;
export default _default;

View File

@ -82,7 +82,7 @@ const PayClazzEntityDict = {
switch (type) {
case 'web': {
const { wechatPay } = config;
assert(wechatPay);
assert(wechatPay, 'web类型的application未配置wechatPay');
const appId = wechatPay.appId;
return new WechatPay(wpProduct, appId);
}

View File

@ -1,3 +1,3 @@
import WechatMpShipDebug from './WechatMpShip.debug';
declare const _default: typeof WechatMpShipDebug;
import WechatMpShip from './WechatMpShip';
declare const _default: typeof WechatMpShip;
export default _default;

View File

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWithdrawCreateData = void 0;
exports.getWithdrawCreateData = getWithdrawCreateData;
const tslib_1 = require("tslib");
const types_1 = require("oak-domain/lib/types");
const uuid_1 = require("oak-domain/lib/utils/uuid");
@ -211,4 +211,3 @@ async function getWithdrawCreateData(params, context) {
data.loss = totalLoss;
return data;
}
exports.getWithdrawCreateData = getWithdrawCreateData;

View File

@ -1,12 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.accountEntities = exports.registerAccountEntity = void 0;
exports.accountEntities = void 0;
exports.registerAccountEntity = registerAccountEntity;
const uuid_1 = require("oak-domain/lib/utils/uuid");
// 当注入一个新的account entity时将withdrawChannel的删除与之相关联
function registerAccountEntity(entity) {
exports.accountEntities.push(entity);
}
exports.registerAccountEntity = registerAccountEntity;
exports.accountEntities = ['offlineAccount'];
const triggers = [
...exports.accountEntities.filter(ele => !!ele).map((entity) => [

View File

@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = useFeatures;
const web_1 = require("oak-frontend-base/es/platforms/web");
// react 独有
// 这里因为开发时要引用src而AFD定义中引用lib所以有编译的warning. by Xc
@ -7,5 +8,4 @@ function useFeatures() {
// @ts-ignore
return (0, web_1.useFeatures)();
}
exports.default = useFeatures;
;

View File

@ -73,10 +73,10 @@ export declare const actionDefDict: {
refund: {
iState: import("oak-domain/lib/types").ActionDef<string, string>;
};
settlement: {
settlePlan: {
iState: import("oak-domain/lib/types").ActionDef<string, string>;
};
settlePlan: {
settlement: {
iState: import("oak-domain/lib/types").ActionDef<string, string>;
};
ship: {

View File

@ -6,6 +6,12 @@ import { String, Text } from "oak-domain/lib/types/DataType";
import { Style } from "oak-general-business/lib/types/Style";
export type CosOrigin = "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown" | "s3";
export type AppType = "web" | "wechatMp" | "wechatPublic" | "native";
export type Location = {
protocol: "http:" | "https:";
hostname: string;
port: string;
scanPage?: string | "wechatQrCode/scan";
};
export type WechatMpConfig = {
type: "wechatMp";
appId: string;
@ -20,6 +26,7 @@ export type WechatMpConfig = {
mode: "clear" | "compatible" | "safe";
dataFormat: "json" | "xml";
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};
@ -36,11 +43,7 @@ export type WebConfig = {
appId: string;
appSecret: string;
};
location: {
protocol: "http:" | "https:";
hostname: string;
port: string;
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};
@ -61,11 +64,7 @@ export type WechatPublicConfig = {
appId: string;
originalId: string;
};
location: {
protocol: "http:" | "https:";
hostname: string;
port: string;
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};
@ -77,11 +76,7 @@ export type NativeConfig = {
appSecret: string;
domain?: string;
};
location: {
protocol: "http:" | "https:";
hostname: string;
port: string;
};
location: Location;
cos?: {
defaultOrigin: CosOrigin;
};

View File

@ -78,8 +78,8 @@ import * as BaseOfflineAccount from "./OfflineAccount/_baseSchema";
import * as BaseOrder from "./Order/_baseSchema";
import * as BasePay from "./Pay/_baseSchema";
import * as BaseRefund from "./Refund/_baseSchema";
import * as BaseSettlement from "./Settlement/_baseSchema";
import * as BaseSettlePlan from "./SettlePlan/_baseSchema";
import * as BaseSettlement from "./Settlement/_baseSchema";
import * as BaseShip from "./Ship/_baseSchema";
import * as BaseShipCompany from "./ShipCompany/_baseSchema";
import * as BaseShipOrder from "./ShipOrder/_baseSchema";
@ -5249,6 +5249,54 @@ export type Refund = {
Remove: OakOperation<"remove", Refund["RemoveOperationData"], Refund["Filter"], Refund["Sorter"]>;
Operation: Refund["Create"] | Refund["Update"] | Refund["Remove"];
};
export type SettlePlan = {
OpSchema: BaseSettlePlan.OpSchema;
Action: BaseSettlePlan.OpAction;
Schema: BaseSettlePlan.OpSchema & {
order: Order["Schema"];
settlement$plan?: Array<Omit<Settlement["Schema"], "plan">>;
settlement$plan$$aggr?: AggregationResult<Omit<Settlement["Schema"], "plan">>;
};
Projection: BaseSettlePlan.OpProjection & {
order?: Order["Projection"];
settlement$plan?: OakSelection<"select", Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
settlement$plan$$aggr?: DeduceAggregation<Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
};
FilterUnit: BaseSettlePlan.OpFilter & {
order: MakeFilter<Order["FilterUnit"]>;
settlement$plan: MakeFilter<Omit<Settlement["FilterUnit"], "plan">> & SubQueryPredicateMetadata;
};
Filter: MakeFilter<SettlePlan["FilterUnit"]>;
SortAttr: Partial<BaseSettlePlan.OpSortAttr | {
order: Order["SortAttr"];
}>;
SortNode: {
$attr: SettlePlan["SortAttr"];
$direction?: "asc" | "desc";
};
Sorter: SettlePlan["SortNode"][];
Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Aggregation: DeduceAggregation<SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
CreateOperationData: FormCreateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]>)[];
}>;
CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<SettlePlan["CreateOperationData"]>>;
Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]> | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[];
}>;
Update: OakOperation<BaseSettlePlan.OpUpdateAction, SettlePlan["UpdateOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
RemoveOperationData: {};
Remove: OakOperation<"remove", SettlePlan["RemoveOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Operation: SettlePlan["Create"] | SettlePlan["Update"] | SettlePlan["Remove"];
};
export type Settlement = {
OpSchema: BaseSettlement.OpSchema;
Action: BaseSettlement.OpAction;
@ -5303,54 +5351,6 @@ export type Settlement = {
Remove: OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"], Settlement["Sorter"]>;
Operation: Settlement["Create"] | Settlement["Update"] | Settlement["Remove"];
};
export type SettlePlan = {
OpSchema: BaseSettlePlan.OpSchema;
Action: BaseSettlePlan.OpAction;
Schema: BaseSettlePlan.OpSchema & {
order: Order["Schema"];
settlement$plan?: Array<Omit<Settlement["Schema"], "plan">>;
settlement$plan$$aggr?: AggregationResult<Omit<Settlement["Schema"], "plan">>;
};
Projection: BaseSettlePlan.OpProjection & {
order?: Order["Projection"];
settlement$plan?: OakSelection<"select", Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
settlement$plan$$aggr?: DeduceAggregation<Omit<Settlement["Projection"], "settlePlan">, Omit<Settlement["Filter"], "settlePlan">, Settlement["Sorter"]> & {
$entity: "settlement";
};
};
FilterUnit: BaseSettlePlan.OpFilter & {
order: MakeFilter<Order["FilterUnit"]>;
settlement$plan: MakeFilter<Omit<Settlement["FilterUnit"], "plan">> & SubQueryPredicateMetadata;
};
Filter: MakeFilter<SettlePlan["FilterUnit"]>;
SortAttr: Partial<BaseSettlePlan.OpSortAttr | {
order: Order["SortAttr"];
}>;
SortNode: {
$attr: SettlePlan["SortAttr"];
$direction?: "asc" | "desc";
};
Sorter: SettlePlan["SortNode"][];
Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Aggregation: DeduceAggregation<SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
CreateOperationData: FormCreateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]>)[];
}>;
CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<SettlePlan["CreateOperationData"]>>;
Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseSettlePlan.OpSchema & {
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]> | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>;
settlement$plan?: (OakOperation<"create", Omit<Settlement["CreateOperationData"], "plan"> | Omit<Settlement["CreateOperationData"], "plan">[]> | OakOperation<BaseSettlement.OpUpdateAction, Omit<Settlement["UpdateOperationData"], "plan">, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[];
}>;
Update: OakOperation<BaseSettlePlan.OpUpdateAction, SettlePlan["UpdateOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
RemoveOperationData: {};
Remove: OakOperation<"remove", SettlePlan["RemoveOperationData"], SettlePlan["Filter"], SettlePlan["Sorter"]>;
Operation: SettlePlan["Create"] | SettlePlan["Update"] | SettlePlan["Remove"];
};
export type Ship = {
OpSchema: BaseShip.OpSchema;
Action: BaseShip.OpAction;
@ -6343,8 +6343,8 @@ export type EntityDict = {
order: Order;
pay: Pay;
refund: Refund;
settlement: Settlement;
settlePlan: SettlePlan;
settlement: Settlement;
ship: Ship;
shipCompany: ShipCompany;
shipOrder: ShipOrder;

View File

@ -6,8 +6,10 @@ exports.desc = {
attributes: {
channel: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "jPush", "jim", "wechatMp", "sms", "email"]
type: "varchar",
params: {
length: 32
}
},
applicationId: {
type: "ref",

View File

@ -12,13 +12,13 @@ exports.style = {
success: '#008000',
failure: '#9A9A9A',
},
channel: {
wechatMp: '#008000',
jPush: '#0000FF',
jim: '#0000FF',
wechatPublic: '#008000',
sms: '#000000',
email: '#000000',
},
// channel: {
// wechatMp: '#008000',
// jPush: '#0000FF',
// jim: '#0000FF',
// wechatPublic: '#008000',
// sms: '#000000',
// email: '#000000',
// },
}
};

View File

@ -2,10 +2,9 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
import { Channel } from "oak-general-business/lib/types/Message";
import { String } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
channel: Channel;
channel: String<32>;
applicationId?: ForeignKey<"application"> | null;
data?: Object | null;
messageSystemId: ForeignKey<"messageSystem">;
@ -22,7 +21,7 @@ export type OpFilter = {
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
channel: Q_EnumValue<Channel>;
channel: Q_StringValue;
applicationId: Q_StringValue;
data: Object;
messageSystemId: Q_StringValue;

View File

@ -19,14 +19,6 @@
"sending": "发送中",
"success": "发送成功",
"failure": "发送失败"
},
"channel": {
"wechatPublic": "公众号",
"jPush": "极光推送",
"jim": "极光消息",
"wechatMp": "小程序",
"sms": "短信",
"email": "邮箱"
}
}
}

View File

@ -22,7 +22,8 @@ exports.desc = {
type: "ref",
ref: "platform"
},
folder: {
folder // 提现的loss在用户提现时计算
: {
type: "varchar",
params: {
length: 16

View File

@ -3,8 +3,8 @@ import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, Expr
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import { String, Text, Boolean } from "oak-domain/lib/types/DataType";
import { Config } from "oak-general-business/lib/types/Config";
import { Style } from "oak-general-business/lib/types/Style";
import { Config } from "../../../../oak-general-business/lib/types/Config";
import { Style } from "../../../../oak-general-business/lib/types/Style";
type PayConfig = {
withdrawLoss: {
conservative: boolean;

View File

@ -62,7 +62,7 @@ exports.desc = {
qrCodeType: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"]
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
},
expiresAt: {
type: "datetime"

View File

@ -23,7 +23,7 @@ exports.desc = {
qrCodeType: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"]
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
},
expiresAt: {
type: "datetime"

View File

@ -22,7 +22,7 @@ exports.desc = {
type: {
notNull: true,
type: "enum",
enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"]
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
},
allowShare: {
notNull: true,

View File

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateWithdrawState = void 0;
exports.updateWithdrawState = updateWithdrawState;
const tslib_1 = require("tslib");
const uuid_1 = require("oak-domain/lib/utils/uuid");
const assert_1 = tslib_1.__importDefault(require("assert"));
@ -98,7 +98,6 @@ async function updateWithdrawState(context, id) {
}, {});
return 1;
}
exports.updateWithdrawState = updateWithdrawState;
const triggers = [
{
name: '当withdraw创建时如果是走退款渠道则创建出相应的refunds同时更改account中的数值',

View File

@ -1,9 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = makeException;
const Exception_1 = require("oak-domain/lib/types/Exception");
const oak_general_business_1 = require("oak-general-business");
function makeException(data) {
const e = (0, Exception_1.makeException)(data) || (0, oak_general_business_1.makeException)(data);
return e;
}
exports.default = makeException;

View File

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAppTypeFromProductType = void 0;
exports.getAppTypeFromProductType = getAppTypeFromProductType;
function getAppTypeFromProductType(type) {
switch (type) {
case 'app': {
@ -26,4 +26,3 @@ function getAppTypeFromProductType(type) {
}
}
}
exports.getAppTypeFromProductType = getAppTypeFromProductType;

View File

@ -1,12 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergedProjection = exports.applicationProjection = exports.registerApplicationProjection = void 0;
exports.mergedProjection = exports.applicationProjection = void 0;
exports.registerApplicationProjection = registerApplicationProjection;
const Projection_1 = require("oak-general-business/lib/types/Projection");
const lodash_1 = require("oak-domain/lib/utils/lodash");
function registerApplicationProjection(projection) {
(0, lodash_1.merge)(exports.applicationProjection, projection);
}
exports.registerApplicationProjection = registerApplicationProjection;
exports.applicationProjection = {
wpProduct$application: {
$entity: 'wpProduct',

View File

@ -1,6 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.refreshPayState = exports.refundNotify = exports.payNotify = exports.fullPayProjection = void 0;
exports.fullPayProjection = void 0;
exports.payNotify = payNotify;
exports.refundNotify = refundNotify;
exports.refreshPayState = refreshPayState;
const tslib_1 = require("tslib");
const payClazz_1 = require("./payClazz");
const assert_1 = tslib_1.__importDefault(require("assert"));
@ -90,7 +93,6 @@ async function payNotify(context, body, payId, headers) {
}
return;
}
exports.payNotify = payNotify;
async function refundNotify(context, body, refundId, headers) {
const [refund] = await context.select('refund', {
data: {
@ -143,7 +145,6 @@ async function refundNotify(context, body, refundId, headers) {
}, {});
}
}
exports.refundNotify = refundNotify;
/**
* 刷新paying状态的pay的真实支付状态
* @param pay
@ -213,4 +214,3 @@ async function refreshPayState(pay, context) {
}, {});
}
}
exports.refreshPayState = refreshPayState;

View File

@ -1,13 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerGetPayStateResult = void 0;
exports.registerGetPayStateResult = registerGetPayStateResult;
const tslib_1 = require("tslib");
const assert_1 = tslib_1.__importDefault(require("assert"));
let _PAY_STATE = '';
function registerGetPayStateResult(payState) {
_PAY_STATE = payState;
}
exports.registerGetPayStateResult = registerGetPayStateResult;
class AliPay {
apProduct;
constructor(apProduct) {

View File

@ -1,13 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerGetPayStateResult = void 0;
exports.registerGetPayStateResult = registerGetPayStateResult;
const tslib_1 = require("tslib");
const assert_1 = tslib_1.__importDefault(require("assert"));
let _PAY_STATE = '';
function registerGetPayStateResult(payState) {
_PAY_STATE = payState;
}
exports.registerGetPayStateResult = registerGetPayStateResult;
class WechatPay {
wpProduct;
constructor(wpProduct) {

View File

@ -86,7 +86,7 @@ const PayClazzEntityDict = {
switch (type) {
case 'web': {
const { wechatPay } = config;
(0, assert_1.default)(wechatPay);
(0, assert_1.default)(wechatPay, 'web类型的application未配置wechatPay');
const appId = wechatPay.appId;
return new WechatPay_1.default(wpProduct, appId);
}

View File

@ -1,12 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shipProjection = void 0;
exports.maskPhone = maskPhone;
exports.uploadShippingInfo = uploadShippingInfo;
exports.getOrderShipState = getOrderShipState;
exports.refreshMpOrderShipState = refreshMpOrderShipState;
exports.refreshShipState = refreshShipState;
exports.notifyConfirmReceive = notifyConfirmReceive;
exports.notifyConfirmReceive = exports.refreshShipState = exports.refreshMpOrderShipState = exports.getOrderShipState = exports.uploadShippingInfo = exports.maskPhone = exports.shipProjection = void 0;
const oak_app_domain_1 = require("../oak-app-domain");
const oak_external_sdk_1 = require("oak-external-sdk");
const assert_1 = require("oak-domain/lib/utils/assert");
@ -138,6 +132,7 @@ function maskPhone(phone) {
const end = phone.slice(-4);
return start + '****' + end;
}
exports.maskPhone = maskPhone;
/**
* 小程序发货信息录入
* @param shipInfo
@ -258,6 +253,7 @@ async function uploadShippingInfo(shipId, context) {
}
}
}
exports.uploadShippingInfo = uploadShippingInfo;
/**
* 获取小程序订单状态
* @param context
@ -338,6 +334,7 @@ async function getOrderShipState(context, shipId) {
}
}
}
exports.getOrderShipState = getOrderShipState;
/**
* 刷新小程序订单状态(自动确认收货)
* @param context
@ -382,6 +379,7 @@ async function refreshMpOrderShipState(shipId, context) {
}
}
}
exports.refreshMpOrderShipState = refreshMpOrderShipState;
/**
* 刷新ship的物流状态
* @param ship
@ -452,6 +450,7 @@ async function refreshShipState(shipId, context) {
}
}
}
exports.refreshShipState = refreshShipState;
/**
* 小程序确认收货提醒
*/
@ -518,3 +517,4 @@ async function notifyConfirmReceive(shipId, context) {
}
}
}
exports.notifyConfirmReceive = notifyConfirmReceive;

View File

@ -1,6 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getShipEntity = exports.getShipClazz = exports.registerShipClazzEntity = void 0;
exports.registerShipClazzEntity = registerShipClazzEntity;
exports.getShipClazz = getShipClazz;
exports.getShipEntity = getShipEntity;
const tslib_1 = require("tslib");
const assert_1 = tslib_1.__importDefault(require("assert"));
let MODULE_USED = false;
@ -15,7 +17,6 @@ function registerShipClazzEntity(entity, clazzConstructor, schema) {
(0, assert_1.default)(attributes.disabled && attributes.disabled.type === 'boolean');
ShipClazzEntityDict[entity] = clazzConstructor;
}
exports.registerShipClazzEntity = registerShipClazzEntity;
async function getShipClazz(entity, entityId, context) {
if (!MODULE_USED) {
MODULE_USED = true;
@ -28,7 +29,6 @@ async function getShipClazz(entity, entityId, context) {
ShipClazzDict[key] = clazz;
return clazz;
}
exports.getShipClazz = getShipClazz;
/**
* 创建ship时根据系统物流的配置去对接对应的物流系统
* @param shipId
@ -82,4 +82,3 @@ async function getShipEntity(shipServiceId, orderIds, context) {
return [entity, entityId];
}
}
exports.getShipEntity = getShipEntity;

View File

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAppTypeFromProductType = void 0;
exports.getAppTypeFromProductType = getAppTypeFromProductType;
function getAppTypeFromProductType(type) {
switch (type) {
case 'app': {
@ -20,4 +20,3 @@ function getAppTypeFromProductType(type) {
}
}
}
exports.getAppTypeFromProductType = getAppTypeFromProductType;

View File

@ -1,6 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.canStartPay = exports.getWpProductTypeFromEnv = void 0;
exports.getWpProductTypeFromEnv = getWpProductTypeFromEnv;
exports.canStartPay = canStartPay;
const utils_1 = require("oak-frontend-base/es/utils/utils");
function getWpProductTypeFromEnv() {
switch (process.env.OAK_PLATFORM) {
@ -23,7 +24,6 @@ function getWpProductTypeFromEnv() {
}
return [];
}
exports.getWpProductTypeFromEnv = getWpProductTypeFromEnv;
function canStartPay(pay, features) {
const { applicationId, wpProduct } = pay;
if (features.application.getApplicationId() !== applicationId) {
@ -32,4 +32,3 @@ function canStartPay(pay, features) {
const types = getWpProductTypeFromEnv();
return types.includes(wpProduct.type) && wpProduct.type !== 'native';
}
exports.canStartPay = canStartPay;

View File

@ -1,6 +1,6 @@
{
"name": "oak-pay-business",
"version": "3.4.2",
"version": "3.4.3",
"description": "",
"files": [
"lib/**/*",
@ -31,10 +31,10 @@
"alipay-sdk": "^4.14.0",
"classnames": "^2.3.1",
"dayjs": "^1.11.5",
"oak-domain": "^5.1.30",
"oak-domain": "^5.1.32",
"oak-external-sdk": "^2.3.11",
"oak-frontend-base": "^5.3.43",
"oak-general-business": "~5.10.4",
"oak-general-business": "~5.10.8",
"react-markdown": "^9.0.3",
"wechat-pay-nodejs": "^0.2.3"
},

View File

@ -95,7 +95,7 @@ const PayClazzEntityDict: Record<string, {
switch (type) {
case 'web': {
const { wechatPay } = config as WebConfig;
assert(wechatPay);
assert(wechatPay, 'web类型的application未配置wechatPay');
const appId = wechatPay.appId;
return new WechatPay(wpProduct as EntityDict['wpProduct']['Schema'], appId);
}