diff --git a/es/components/AbstractComponents.d.ts b/es/components/AbstractComponents.d.ts index f19453d9..edb15ee0 100644 --- a/es/components/AbstractComponents.d.ts +++ b/es/components/AbstractComponents.d.ts @@ -18,11 +18,16 @@ declare const List: (props: ReactComponentProps[]; loading: boolean; tablePagination?: React.ReactNode; - rowSelection?: any; + rowSelection?: import("antd/es/table/interface").TableRowSelection> | 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: (props: { data: RowWithActions[]; loading?: boolean | undefined; tablePagination?: any; - rowSelection?: any; + rowSelection?: import("antd/es/table/interface").TableRowSelection> | 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: (props: ReactComponentProps | undefined; + column?: number | Record | undefined; entity: T; attributes: OakAbsAttrDef[]; data: Partial; title?: string | undefined; bordered?: boolean | undefined; - layout?: "horizontal" | "vertical" | undefined; + layout?: "vertical" | "horizontal" | undefined; }>) => React.ReactElement; declare const Upsert: (props: ReactComponentProps; entity: T; attributes: OakAbsAttrUpsertDef[]; 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, }; diff --git a/es/components/pay/detail/index.d.ts b/es/components/pay/detail/index.d.ts index d0dfe55b..1a602cd0 100644 --- a/es/components/pay/detail/index.d.ts +++ b/es/components/pay/detail/index.d.ts @@ -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; diff --git a/es/oak-app-domain/ActionDefDict.d.ts b/es/oak-app-domain/ActionDefDict.d.ts index 254d266e..3a45883c 100644 --- a/es/oak-app-domain/ActionDefDict.d.ts +++ b/es/oak-app-domain/ActionDefDict.d.ts @@ -73,10 +73,10 @@ export declare const actionDefDict: { refund: { iState: import("oak-domain/lib/types").ActionDef; }; - settlement: { + settlePlan: { iState: import("oak-domain/lib/types").ActionDef; }; - settlePlan: { + settlement: { iState: import("oak-domain/lib/types").ActionDef; }; ship: { diff --git a/es/oak-app-domain/ActionDefDict.js b/es/oak-app-domain/ActionDefDict.js index 5e4efdc6..9850c430 100644 --- a/es/oak-app-domain/ActionDefDict.js +++ b/es/oak-app-domain/ActionDefDict.js @@ -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, diff --git a/es/oak-app-domain/Application/_baseSchema.d.ts b/es/oak-app-domain/Application/_baseSchema.d.ts index 87c2fb4e..ca9f3e0a 100644 --- a/es/oak-app-domain/Application/_baseSchema.d.ts +++ b/es/oak-app-domain/Application/_baseSchema.d.ts @@ -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; }; diff --git a/es/oak-app-domain/EntityDict.d.ts b/es/oak-app-domain/EntityDict.d.ts index d7642b1c..64acbdcd 100644 --- a/es/oak-app-domain/EntityDict.d.ts +++ b/es/oak-app-domain/EntityDict.d.ts @@ -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>; + settlement$plan$$aggr?: AggregationResult>; + }; + Projection: BaseSettlePlan.OpProjection & { + order?: Order["Projection"]; + settlement$plan?: OakSelection<"select", Omit, Omit, Settlement["Sorter"]> & { + $entity: "settlement"; + }; + settlement$plan$$aggr?: DeduceAggregation, Omit, Settlement["Sorter"]> & { + $entity: "settlement"; + }; + }; + FilterUnit: BaseSettlePlan.OpFilter & { + order: MakeFilter; + settlement$plan: MakeFilter> & SubQueryPredicateMetadata; + }; + Filter: MakeFilter; + SortAttr: Partial; + SortNode: { + $attr: SettlePlan["SortAttr"]; + $direction?: "asc" | "desc"; + }; + Sorter: SettlePlan["SortNode"][]; + Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>; + Aggregation: DeduceAggregation; + CreateOperationData: FormCreateData | OakOperation; + settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]>)[]; + }>; + CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>; + CreateMulti: OakOperation<"create", Array>; + Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"]; + UpdateOperationData: FormUpdateData | OakOperation | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>; + settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[]; + }>; + Update: OakOperation; + 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>; - settlement$plan$$aggr?: AggregationResult>; - }; - Projection: BaseSettlePlan.OpProjection & { - order?: Order["Projection"]; - settlement$plan?: OakSelection<"select", Omit, Omit, Settlement["Sorter"]> & { - $entity: "settlement"; - }; - settlement$plan$$aggr?: DeduceAggregation, Omit, Settlement["Sorter"]> & { - $entity: "settlement"; - }; - }; - FilterUnit: BaseSettlePlan.OpFilter & { - order: MakeFilter; - settlement$plan: MakeFilter> & SubQueryPredicateMetadata; - }; - Filter: MakeFilter; - SortAttr: Partial; - SortNode: { - $attr: SettlePlan["SortAttr"]; - $direction?: "asc" | "desc"; - }; - Sorter: SettlePlan["SortNode"][]; - Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>; - Aggregation: DeduceAggregation; - CreateOperationData: FormCreateData | OakOperation; - settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]>)[]; - }>; - CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>; - CreateMulti: OakOperation<"create", Array>; - Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"]; - UpdateOperationData: FormUpdateData | OakOperation | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>; - settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[]; - }>; - Update: OakOperation; - 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; diff --git a/es/oak-app-domain/Notification/Storage.js b/es/oak-app-domain/Notification/Storage.js index 8417d9dd..aa36b7ec 100644 --- a/es/oak-app-domain/Notification/Storage.js +++ b/es/oak-app-domain/Notification/Storage.js @@ -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", diff --git a/es/oak-app-domain/Notification/Style.js b/es/oak-app-domain/Notification/Style.js index 0fab04e8..4011ec01 100644 --- a/es/oak-app-domain/Notification/Style.js +++ b/es/oak-app-domain/Notification/Style.js @@ -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', + // }, } }; diff --git a/es/oak-app-domain/Notification/_baseSchema.d.ts b/es/oak-app-domain/Notification/_baseSchema.d.ts index 1b7e0e5d..b6718707 100644 --- a/es/oak-app-domain/Notification/_baseSchema.d.ts +++ b/es/oak-app-domain/Notification/_baseSchema.d.ts @@ -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: Q_StringValue; applicationId: Q_StringValue; data: Object; messageSystemId: Q_StringValue; diff --git a/es/oak-app-domain/Notification/locales/zh_CN.json b/es/oak-app-domain/Notification/locales/zh_CN.json index 29695c57..19bbb24d 100644 --- a/es/oak-app-domain/Notification/locales/zh_CN.json +++ b/es/oak-app-domain/Notification/locales/zh_CN.json @@ -19,14 +19,6 @@ "sending": "发送中", "success": "发送成功", "failure": "发送失败" - }, - "channel": { - "wechatPublic": "公众号", - "jPush": "极光推送", - "jim": "极光消息", - "wechatMp": "小程序", - "sms": "短信", - "email": "邮箱" } } } diff --git a/es/oak-app-domain/Storage.js b/es/oak-app-domain/Storage.js index fd28ec55..c69a2fbc 100644 --- a/es/oak-app-domain/Storage.js +++ b/es/oak-app-domain/Storage.js @@ -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, diff --git a/es/oak-app-domain/StyleDict.js b/es/oak-app-domain/StyleDict.js index 388e3108..10b89671 100644 --- a/es/oak-app-domain/StyleDict.js +++ b/es/oak-app-domain/StyleDict.js @@ -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, diff --git a/es/oak-app-domain/System/_baseSchema.d.ts b/es/oak-app-domain/System/_baseSchema.d.ts index cd11b84c..cabf99d5 100644 --- a/es/oak-app-domain/System/_baseSchema.d.ts +++ b/es/oak-app-domain/System/_baseSchema.d.ts @@ -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; diff --git a/es/oak-app-domain/UserEntityGrant/Storage.js b/es/oak-app-domain/UserEntityGrant/Storage.js index 80a9a33c..df524f63 100644 --- a/es/oak-app-domain/UserEntityGrant/Storage.js +++ b/es/oak-app-domain/UserEntityGrant/Storage.js @@ -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" diff --git a/es/oak-app-domain/WechatLogin/Storage.js b/es/oak-app-domain/WechatLogin/Storage.js index edbaa0c5..22576416 100644 --- a/es/oak-app-domain/WechatLogin/Storage.js +++ b/es/oak-app-domain/WechatLogin/Storage.js @@ -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" diff --git a/es/oak-app-domain/WechatQrCode/Storage.js b/es/oak-app-domain/WechatQrCode/Storage.js index 81ec43f5..e6415131 100644 --- a/es/oak-app-domain/WechatQrCode/Storage.js +++ b/es/oak-app-domain/WechatQrCode/Storage.js @@ -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, diff --git a/es/utils/payClazz/WechatPay/index.d.ts b/es/utils/payClazz/WechatPay/index.d.ts index eeba2b4b..ce1d041a 100644 --- a/es/utils/payClazz/WechatPay/index.d.ts +++ b/es/utils/payClazz/WechatPay/index.d.ts @@ -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; diff --git a/es/utils/payClazz/index.js b/es/utils/payClazz/index.js index 22ad8f79..55637331 100644 --- a/es/utils/payClazz/index.js +++ b/es/utils/payClazz/index.js @@ -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); } diff --git a/es/utils/shipClazz/WechatMpShip/index.d.ts b/es/utils/shipClazz/WechatMpShip/index.d.ts index 8c0f6aff..745c595a 100644 --- a/es/utils/shipClazz/WechatMpShip/index.d.ts +++ b/es/utils/shipClazz/WechatMpShip/index.d.ts @@ -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; diff --git a/lib/aspects/withdraw.js b/lib/aspects/withdraw.js index 242aa34d..68cd7d18 100644 --- a/lib/aspects/withdraw.js +++ b/lib/aspects/withdraw.js @@ -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; diff --git a/lib/checkers/abstractChecker.js b/lib/checkers/abstractChecker.js index 994c444a..fc3c5bfa 100644 --- a/lib/checkers/abstractChecker.js +++ b/lib/checkers/abstractChecker.js @@ -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) => [ diff --git a/lib/hooks/useFeatures.js b/lib/hooks/useFeatures.js index a6365fc1..dc8ecc61 100644 --- a/lib/hooks/useFeatures.js +++ b/lib/hooks/useFeatures.js @@ -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; ; diff --git a/lib/oak-app-domain/ActionDefDict.d.ts b/lib/oak-app-domain/ActionDefDict.d.ts index 254d266e..3a45883c 100644 --- a/lib/oak-app-domain/ActionDefDict.d.ts +++ b/lib/oak-app-domain/ActionDefDict.d.ts @@ -73,10 +73,10 @@ export declare const actionDefDict: { refund: { iState: import("oak-domain/lib/types").ActionDef; }; - settlement: { + settlePlan: { iState: import("oak-domain/lib/types").ActionDef; }; - settlePlan: { + settlement: { iState: import("oak-domain/lib/types").ActionDef; }; ship: { diff --git a/lib/oak-app-domain/Application/_baseSchema.d.ts b/lib/oak-app-domain/Application/_baseSchema.d.ts index 87c2fb4e..ca9f3e0a 100644 --- a/lib/oak-app-domain/Application/_baseSchema.d.ts +++ b/lib/oak-app-domain/Application/_baseSchema.d.ts @@ -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; }; diff --git a/lib/oak-app-domain/EntityDict.d.ts b/lib/oak-app-domain/EntityDict.d.ts index d7642b1c..64acbdcd 100644 --- a/lib/oak-app-domain/EntityDict.d.ts +++ b/lib/oak-app-domain/EntityDict.d.ts @@ -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>; + settlement$plan$$aggr?: AggregationResult>; + }; + Projection: BaseSettlePlan.OpProjection & { + order?: Order["Projection"]; + settlement$plan?: OakSelection<"select", Omit, Omit, Settlement["Sorter"]> & { + $entity: "settlement"; + }; + settlement$plan$$aggr?: DeduceAggregation, Omit, Settlement["Sorter"]> & { + $entity: "settlement"; + }; + }; + FilterUnit: BaseSettlePlan.OpFilter & { + order: MakeFilter; + settlement$plan: MakeFilter> & SubQueryPredicateMetadata; + }; + Filter: MakeFilter; + SortAttr: Partial; + SortNode: { + $attr: SettlePlan["SortAttr"]; + $direction?: "asc" | "desc"; + }; + Sorter: SettlePlan["SortNode"][]; + Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>; + Aggregation: DeduceAggregation; + CreateOperationData: FormCreateData | OakOperation; + settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]>)[]; + }>; + CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>; + CreateMulti: OakOperation<"create", Array>; + Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"]; + UpdateOperationData: FormUpdateData | OakOperation | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>; + settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[]; + }>; + Update: OakOperation; + 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>; - settlement$plan$$aggr?: AggregationResult>; - }; - Projection: BaseSettlePlan.OpProjection & { - order?: Order["Projection"]; - settlement$plan?: OakSelection<"select", Omit, Omit, Settlement["Sorter"]> & { - $entity: "settlement"; - }; - settlement$plan$$aggr?: DeduceAggregation, Omit, Settlement["Sorter"]> & { - $entity: "settlement"; - }; - }; - FilterUnit: BaseSettlePlan.OpFilter & { - order: MakeFilter; - settlement$plan: MakeFilter> & SubQueryPredicateMetadata; - }; - Filter: MakeFilter; - SortAttr: Partial; - SortNode: { - $attr: SettlePlan["SortAttr"]; - $direction?: "asc" | "desc"; - }; - Sorter: SettlePlan["SortNode"][]; - Selection: OakSelection<"select", SettlePlan["Projection"], SettlePlan["Filter"], SettlePlan["Sorter"]>; - Aggregation: DeduceAggregation; - CreateOperationData: FormCreateData | OakOperation; - settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]>)[]; - }>; - CreateSingle: OakOperation<"create", SettlePlan["CreateOperationData"]>; - CreateMulti: OakOperation<"create", Array>; - Create: SettlePlan["CreateSingle"] | SettlePlan["CreateMulti"]; - UpdateOperationData: FormUpdateData | OakOperation | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>; - settlement$plan?: (OakOperation<"create", Omit | Omit[]> | OakOperation, Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>)[]; - }>; - Update: OakOperation; - 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; diff --git a/lib/oak-app-domain/Notification/Storage.js b/lib/oak-app-domain/Notification/Storage.js index 13c550f0..938d7f31 100644 --- a/lib/oak-app-domain/Notification/Storage.js +++ b/lib/oak-app-domain/Notification/Storage.js @@ -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", diff --git a/lib/oak-app-domain/Notification/Style.js b/lib/oak-app-domain/Notification/Style.js index b09425b2..14c0002f 100644 --- a/lib/oak-app-domain/Notification/Style.js +++ b/lib/oak-app-domain/Notification/Style.js @@ -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', + // }, } }; diff --git a/lib/oak-app-domain/Notification/_baseSchema.d.ts b/lib/oak-app-domain/Notification/_baseSchema.d.ts index 1b7e0e5d..b6718707 100644 --- a/lib/oak-app-domain/Notification/_baseSchema.d.ts +++ b/lib/oak-app-domain/Notification/_baseSchema.d.ts @@ -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: Q_StringValue; applicationId: Q_StringValue; data: Object; messageSystemId: Q_StringValue; diff --git a/lib/oak-app-domain/Notification/locales/zh_CN.json b/lib/oak-app-domain/Notification/locales/zh_CN.json index 29695c57..19bbb24d 100644 --- a/lib/oak-app-domain/Notification/locales/zh_CN.json +++ b/lib/oak-app-domain/Notification/locales/zh_CN.json @@ -19,14 +19,6 @@ "sending": "发送中", "success": "发送成功", "failure": "发送失败" - }, - "channel": { - "wechatPublic": "公众号", - "jPush": "极光推送", - "jim": "极光消息", - "wechatMp": "小程序", - "sms": "短信", - "email": "邮箱" } } } diff --git a/lib/oak-app-domain/System/Storage.js b/lib/oak-app-domain/System/Storage.js index 5d309538..423f8f47 100644 --- a/lib/oak-app-domain/System/Storage.js +++ b/lib/oak-app-domain/System/Storage.js @@ -22,7 +22,8 @@ exports.desc = { type: "ref", ref: "platform" }, - folder: { + folder // 提现的loss在用户提现时计算 + : { type: "varchar", params: { length: 16 diff --git a/lib/oak-app-domain/System/_baseSchema.d.ts b/lib/oak-app-domain/System/_baseSchema.d.ts index cd11b84c..cabf99d5 100644 --- a/lib/oak-app-domain/System/_baseSchema.d.ts +++ b/lib/oak-app-domain/System/_baseSchema.d.ts @@ -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; diff --git a/lib/oak-app-domain/UserEntityGrant/Storage.js b/lib/oak-app-domain/UserEntityGrant/Storage.js index 2022de36..93b22f65 100644 --- a/lib/oak-app-domain/UserEntityGrant/Storage.js +++ b/lib/oak-app-domain/UserEntityGrant/Storage.js @@ -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" diff --git a/lib/oak-app-domain/WechatLogin/Storage.js b/lib/oak-app-domain/WechatLogin/Storage.js index d27b8ea6..678e6fa3 100644 --- a/lib/oak-app-domain/WechatLogin/Storage.js +++ b/lib/oak-app-domain/WechatLogin/Storage.js @@ -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" diff --git a/lib/oak-app-domain/WechatQrCode/Storage.js b/lib/oak-app-domain/WechatQrCode/Storage.js index 0762671f..342dd24f 100644 --- a/lib/oak-app-domain/WechatQrCode/Storage.js +++ b/lib/oak-app-domain/WechatQrCode/Storage.js @@ -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, diff --git a/lib/triggers/withdraw.js b/lib/triggers/withdraw.js index c057a7c4..cd58a7bc 100644 --- a/lib/triggers/withdraw.js +++ b/lib/triggers/withdraw.js @@ -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中的数值', diff --git a/lib/types/DependentExceptions.js b/lib/types/DependentExceptions.js index 1acc7784..9fa62f94 100644 --- a/lib/types/DependentExceptions.js +++ b/lib/types/DependentExceptions.js @@ -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; diff --git a/lib/utils/apProduct.js b/lib/utils/apProduct.js index 3e02cefe..a0dd8488 100644 --- a/lib/utils/apProduct.js +++ b/lib/utils/apProduct.js @@ -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; diff --git a/lib/utils/application.js b/lib/utils/application.js index 00e4da45..47a69192 100644 --- a/lib/utils/application.js +++ b/lib/utils/application.js @@ -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', diff --git a/lib/utils/pay.js b/lib/utils/pay.js index b54b628a..da362686 100644 --- a/lib/utils/pay.js +++ b/lib/utils/pay.js @@ -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; diff --git a/lib/utils/payClazz/AliPay/AliPay.debug.js b/lib/utils/payClazz/AliPay/AliPay.debug.js index 06308636..607cc5f3 100644 --- a/lib/utils/payClazz/AliPay/AliPay.debug.js +++ b/lib/utils/payClazz/AliPay/AliPay.debug.js @@ -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) { diff --git a/lib/utils/payClazz/WechatPay/WechatPay.debug.js b/lib/utils/payClazz/WechatPay/WechatPay.debug.js index e89bfa79..288f1fe2 100644 --- a/lib/utils/payClazz/WechatPay/WechatPay.debug.js +++ b/lib/utils/payClazz/WechatPay/WechatPay.debug.js @@ -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) { diff --git a/lib/utils/payClazz/index.js b/lib/utils/payClazz/index.js index 9c4d73d3..085db4c4 100644 --- a/lib/utils/payClazz/index.js +++ b/lib/utils/payClazz/index.js @@ -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); } diff --git a/lib/utils/ship.js b/lib/utils/ship.js index bfac6a36..9c1ec8ad 100644 --- a/lib/utils/ship.js +++ b/lib/utils/ship.js @@ -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; diff --git a/lib/utils/shipClazz/index.js b/lib/utils/shipClazz/index.js index c8d75d1c..c9aa08bb 100644 --- a/lib/utils/shipClazz/index.js +++ b/lib/utils/shipClazz/index.js @@ -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; diff --git a/lib/utils/wpProduct.js b/lib/utils/wpProduct.js index 0dee3d2c..1aa89c7c 100644 --- a/lib/utils/wpProduct.js +++ b/lib/utils/wpProduct.js @@ -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; diff --git a/lib/utils/wpProductFrontend.js b/lib/utils/wpProductFrontend.js index 03d5a251..7a40dd91 100644 --- a/lib/utils/wpProductFrontend.js +++ b/lib/utils/wpProductFrontend.js @@ -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; diff --git a/package.json b/package.json index ee105fc1..2ce05cef 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/src/utils/payClazz/index.ts b/src/utils/payClazz/index.ts index 18217a7c..35d7a70b 100644 --- a/src/utils/payClazz/index.ts +++ b/src/utils/payClazz/index.ts @@ -95,7 +95,7 @@ const PayClazzEntityDict: Record