From d3ba00901f7910b68518e286b8f49e0dd8a1f26b Mon Sep 17 00:00:00 2001 From: wkj <278599135@.com> Date: Wed, 7 May 2025 10:05:07 +0800 Subject: [PATCH] =?UTF-8?q?passport=20=E9=82=AE=E7=AE=B1=E5=90=8E=E7=BC=80?= =?UTF-8?q?=E5=8F=8Abuild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/components/AbstractComponents.d.ts | 73 +++---------------- es/components/accountOper/pure/List.pc.d.ts | 1 - .../offlineAccount/upsert/index.d.ts | 1 - es/components/order/list/index.d.ts | 1 - es/components/order/pay/index.d.ts | 2 +- es/components/order/pay/index.js | 6 +- es/components/order/pay/info.d.ts | 1 - es/components/pay/channelPicker2/web.d.ts | 1 - es/components/pay/channelPicker2/web.pc.d.ts | 1 - es/components/pay/list/index.d.ts | 1 - es/components/payConfig/system/index.d.ts | 1 - es/components/refund/list/index.d.ts | 1 - es/components/ship/system/index.d.ts | 1 - .../ship/wechatMpShip/upsert/index.d.ts | 1 - .../sysAccount/transferList/index.d.ts | 1 - es/components/withdraw/detail/index.d.ts | 1 - es/components/withdraw/display/web.d.ts | 1 - es/components/withdraw/display/web.pc.d.ts | 1 - .../withdrawTransfer/list/index.d.ts | 1 - es/oak-app-domain/Passport/_baseSchema.d.ts | 1 + es/timers/index.d.ts | 2 +- es/types/Exception.d.ts | 1 + es/utils/pay.d.ts | 1 - .../WechatMpShip/WechatMpShip.debug.js | 6 +- lib/aspects/ship.js | 5 +- lib/aspects/withdraw.js | 3 +- lib/features/index.js | 5 +- lib/oak-app-domain/Passport/_baseSchema.d.ts | 1 + lib/timers/index.d.ts | 2 +- lib/triggers/withdraw.js | 3 +- lib/types/DependentExceptions.js | 2 +- lib/types/Exception.d.ts | 1 + lib/types/Exception.js | 4 +- lib/utils/application.js | 4 +- lib/utils/pay.d.ts | 1 - lib/utils/pay.js | 8 +- .../payClazz/WechatPay/WechatPay.debug.js | 3 +- lib/utils/payClazz/index.js | 7 +- lib/utils/ship.js | 14 ++-- .../WechatMpShip/WechatMpShip.debug.js | 6 +- lib/utils/shipClazz/index.js | 7 +- lib/utils/wpProductFrontend.js | 5 +- src/components/withdraw/display/index.ts | 2 +- 43 files changed, 59 insertions(+), 132 deletions(-) diff --git a/es/components/AbstractComponents.d.ts b/es/components/AbstractComponents.d.ts index 18b3c16d..76f28a91 100644 --- a/es/components/AbstractComponents.d.ts +++ b/es/components/AbstractComponents.d.ts @@ -4,66 +4,15 @@ */ import React from 'react'; import { EntityDict } from '../oak-app-domain'; -import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, ListButtonProps, OakAbsAttrUpsertDef } from 'oak-frontend-base'; -declare const FilterPanel: (props: ReactComponentProps[]; -}>) => React.ReactElement; -declare const List: (props: ReactComponentProps) => OakExtraActionProps[]); - onAction: onActionFnDef; - disabledOp: boolean; - attributes: OakAbsAttrDef[]; - data: RowWithActions[]; - loading: boolean; - tablePagination?: React.ReactNode; - rowSelection?: any; - hideHeader?: boolean | undefined; - disableSerialNumber?: boolean | undefined; - size?: "small" | "middle" | "large" | undefined; - scroll?: any; - empty?: React.ReactNode; - opWidth?: number | undefined; - ellipsis?: boolean | undefined; -}>) => React.ReactElement; -declare const ListPro: (props: { - title?: any; - extraContent?: any; - hideDefaultButtons?: boolean | undefined; - buttonGroup?: ListButtonProps[] | undefined; - onReload?: (() => void) | undefined; - entity: T; - extraActions?: OakExtraActionProps[] | ((row: RowWithActions) => OakExtraActionProps[]) | undefined; - onAction?: onActionFnDef | undefined; - disabledOp?: boolean | undefined; - attributes: OakAbsAttrDef[]; - data: RowWithActions[]; - loading?: boolean | undefined; - tablePagination?: any; - rowSelection?: any; - disableSerialNumber?: boolean | undefined; - size?: "small" | "middle" | "large" | undefined; - scroll?: any; - empty?: any; - opWidth?: number | undefined; - oakPath?: string | undefined; -}) => React.ReactElement; -declare const Detail: (props: ReactComponentProps | undefined; - entity: T; - attributes: OakAbsAttrDef[]; - data: Partial; - title?: string | undefined; - bordered?: boolean | undefined; - layout?: "horizontal" | "vertical" | undefined; -}>) => React.ReactElement; -declare const Upsert: (props: ReactComponentProps; - entity: T; - attributes: OakAbsAttrUpsertDef[]; - data: EntityDict[T]["Schema"]; - layout: "horizontal" | "vertical"; - mode: "default" | "card"; -}>) => React.ReactElement; +import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef } from 'oak-frontend-base'; +import AbsFilterPanel from 'oak-frontend-base/es/components/filterPanel'; +import AbsList from 'oak-frontend-base/es/components/list'; +import AbsListPro from 'oak-frontend-base/es/components/listPro'; +import AbsDetail from 'oak-frontend-base/es/components/detail'; +import AbsUpsert from 'oak-frontend-base/es/components/upsert'; +declare const FilterPanel: (...props: Parameters>) => React.ReactElement; +declare const List: (...props: Parameters>) => React.ReactElement; +declare const ListPro: (...props: Parameters>) => React.ReactElement; +declare const Detail: (...props: Parameters>) => React.ReactElement; +declare const Upsert: (...props: Parameters>) => React.ReactElement; export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, }; diff --git a/es/components/accountOper/pure/List.pc.d.ts b/es/components/accountOper/pure/List.pc.d.ts index ec3cb8e6..20b9ca3a 100644 --- a/es/components/accountOper/pure/List.pc.d.ts +++ b/es/components/accountOper/pure/List.pc.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from "../../../oak-app-domain"; export default function Render(props: { accountOpers: EntityDict['accountOper']['OpSchema'][]; diff --git a/es/components/offlineAccount/upsert/index.d.ts b/es/components/offlineAccount/upsert/index.d.ts index 0a3a3df2..820af037 100644 --- a/es/components/offlineAccount/upsert/index.d.ts +++ b/es/components/offlineAccount/upsert/index.d.ts @@ -1,3 +1,2 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/order/list/index.d.ts b/es/components/order/list/index.d.ts index 06718f76..9979ad3b 100644 --- a/es/components/order/list/index.d.ts +++ b/es/components/order/list/index.d.ts @@ -1,3 +1,2 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/order/pay/index.d.ts b/es/components/order/pay/index.d.ts index 881abbc7..ab33dc37 100644 --- a/es/components/order/pay/index.d.ts +++ b/es/components/order/pay/index.d.ts @@ -2,7 +2,7 @@ import { EntityDict } from "../../../oak-app-domain"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps[]) => void; + onSetPays: (pays: Partial[]) => void; accountTips: string; autoStartPay: boolean; }>) => React.ReactElement; diff --git a/es/components/order/pay/index.js b/es/components/order/pay/index.js index 721793a8..26bd7a1c 100644 --- a/es/components/order/pay/index.js +++ b/es/components/order/pay/index.js @@ -24,10 +24,10 @@ export default OakComponent({ }, isList: false, properties: { - accountId: '', - accountAvailMax: 0, + accountId: '', // 是否可以使用帐户中的余额抵扣 + accountAvailMax: 0, // 本次交易可以使用的帐户中的Avail max值,调用者自己保证此数值的一致性,不要扣成负数 onSetPays: (pays) => undefined, - accountTips: '', + accountTips: '', // 使用余额支付的提示说明 autoStartPay: false, }, formData({ data }) { diff --git a/es/components/order/pay/info.d.ts b/es/components/order/pay/info.d.ts index a9d666e3..2b27220f 100644 --- a/es/components/order/pay/info.d.ts +++ b/es/components/order/pay/info.d.ts @@ -1,4 +1,3 @@ -/// export default function Info(props: { price: number; t: (k: string) => string; diff --git a/es/components/pay/channelPicker2/web.d.ts b/es/components/pay/channelPicker2/web.d.ts index c765a8e6..3c004b40 100644 --- a/es/components/pay/channelPicker2/web.d.ts +++ b/es/components/pay/channelPicker2/web.d.ts @@ -1,4 +1,3 @@ -/// import { PayChannelOption } from "../../../types/Pay"; export default function Render(props: { data: { diff --git a/es/components/pay/channelPicker2/web.pc.d.ts b/es/components/pay/channelPicker2/web.pc.d.ts index f055c0fe..a9fe9ad6 100644 --- a/es/components/pay/channelPicker2/web.pc.d.ts +++ b/es/components/pay/channelPicker2/web.pc.d.ts @@ -1,4 +1,3 @@ -/// import { PayChannelOption } from "../../../types/Pay"; export default function Render(props: { data: { diff --git a/es/components/pay/list/index.d.ts b/es/components/pay/list/index.d.ts index 531cb72f..e0d6dbb4 100644 --- a/es/components/pay/list/index.d.ts +++ b/es/components/pay/list/index.d.ts @@ -1,3 +1,2 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/payConfig/system/index.d.ts b/es/components/payConfig/system/index.d.ts index 8bf853bb..aaf164c3 100644 --- a/es/components/payConfig/system/index.d.ts +++ b/es/components/payConfig/system/index.d.ts @@ -1,3 +1,2 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/refund/list/index.d.ts b/es/components/refund/list/index.d.ts index 7b1e4b44..21feb937 100644 --- a/es/components/refund/list/index.d.ts +++ b/es/components/refund/list/index.d.ts @@ -1,3 +1,2 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/ship/system/index.d.ts b/es/components/ship/system/index.d.ts index 8bf853bb..aaf164c3 100644 --- a/es/components/ship/system/index.d.ts +++ b/es/components/ship/system/index.d.ts @@ -1,3 +1,2 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/ship/wechatMpShip/upsert/index.d.ts b/es/components/ship/wechatMpShip/upsert/index.d.ts index 399a2ec5..977c45a9 100644 --- a/es/components/ship/wechatMpShip/upsert/index.d.ts +++ b/es/components/ship/wechatMpShip/upsert/index.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from "../../../../oak-app-domain"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/sysAccount/transferList/index.d.ts b/es/components/sysAccount/transferList/index.d.ts index a0335de1..23b90f55 100644 --- a/es/components/sysAccount/transferList/index.d.ts +++ b/es/components/sysAccount/transferList/index.d.ts @@ -1,3 +1,2 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/withdraw/detail/index.d.ts b/es/components/withdraw/detail/index.d.ts index 12ac1495..c8a6fb07 100644 --- a/es/components/withdraw/detail/index.d.ts +++ b/es/components/withdraw/detail/index.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from "../../../oak-app-domain"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/withdraw/display/web.d.ts b/es/components/withdraw/display/web.d.ts index 34878cbd..8c747ada 100644 --- a/es/components/withdraw/display/web.d.ts +++ b/es/components/withdraw/display/web.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from '../../../oak-app-domain'; export default function render(props: { data: { diff --git a/es/components/withdraw/display/web.pc.d.ts b/es/components/withdraw/display/web.pc.d.ts index 34878cbd..8c747ada 100644 --- a/es/components/withdraw/display/web.pc.d.ts +++ b/es/components/withdraw/display/web.pc.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from '../../../oak-app-domain'; export default function render(props: { data: { diff --git a/es/components/withdrawTransfer/list/index.d.ts b/es/components/withdrawTransfer/list/index.d.ts index 875a3696..92a82977 100644 --- a/es/components/withdrawTransfer/list/index.d.ts +++ b/es/components/withdrawTransfer/list/index.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from '../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/oak-app-domain/Passport/_baseSchema.d.ts b/es/oak-app-domain/Passport/_baseSchema.d.ts index ab68caad..a63db40d 100644 --- a/es/oak-app-domain/Passport/_baseSchema.d.ts +++ b/es/oak-app-domain/Passport/_baseSchema.d.ts @@ -19,6 +19,7 @@ export type EmailConfig = { html?: string; codeDuration?: number; digit?: number; + emailSuffixes?: string[]; }; export type PfwConfig = { appId: string; diff --git a/es/timers/index.d.ts b/es/timers/index.d.ts index 586d92cd..22952f45 100644 --- a/es/timers/index.d.ts +++ b/es/timers/index.d.ts @@ -1,5 +1,5 @@ import { Timer } from 'oak-domain/lib/types/Timer'; import { EntityDict } from '../oak-app-domain/index'; import { BRC } from '../types/RuntimeCxt'; -declare const _default: Timer[]; +declare const _default: Array>; export default _default; diff --git a/es/types/Exception.d.ts b/es/types/Exception.d.ts index 166fe587..f6220325 100644 --- a/es/types/Exception.d.ts +++ b/es/types/Exception.d.ts @@ -11,6 +11,7 @@ export declare class ExternalPayUtilException extends Oak name: string; message: string; _module: string | undefined; + params: Record | undefined; opRecords: OpRecord[]; tag1: string | undefined; tag2: boolean | undefined; diff --git a/es/utils/pay.d.ts b/es/utils/pay.d.ts index b92e3bdb..82a96b29 100644 --- a/es/utils/pay.d.ts +++ b/es/utils/pay.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from '../oak-app-domain'; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; import BackendRuntimeContext from '../context/BackendRuntimeContext'; diff --git a/es/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js b/es/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js index bf82b7d9..92207a0b 100644 --- a/es/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js +++ b/es/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js @@ -157,9 +157,9 @@ export default class WechatMpShipDebug { name: from.name, mobile: from.phone, // country: from!.area!.parent!.parent!.name!, //国家 - province: from.area.parent.parent.name, - city: from.area.parent.name, - area: from.area.name, + province: from.area.parent.parent.name, //省份 + city: from.area.parent.name, //市 + area: from.area.name, // 区 address: from.detail, //详细地址 }, receiver: { diff --git a/lib/aspects/ship.js b/lib/aspects/ship.js index 1db56038..553f9fc1 100644 --- a/lib/aspects/ship.js +++ b/lib/aspects/ship.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getExpressPrintInfo = exports.getMpShipState = void 0; +exports.getMpShipState = getMpShipState; +exports.getExpressPrintInfo = getExpressPrintInfo; const types_1 = require("oak-domain/lib/types"); const ship_1 = require("../utils/ship"); const shipClazz_1 = require("../utils/shipClazz"); @@ -18,7 +19,6 @@ async function getMpShipState(params, context) { return shipState; } } -exports.getMpShipState = getMpShipState; /** * 获取打印面单 */ @@ -43,4 +43,3 @@ async function getExpressPrintInfo(params, context) { const clazz = await (0, shipClazz_1.getShipClazz)(entity, entityId, context); return await clazz.getPrintInfo(shipId, context); } -exports.getExpressPrintInfo = getExpressPrintInfo; 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/features/index.js b/lib/features/index.js index 07640e74..eceecbc9 100644 --- a/lib/features/index.js +++ b/lib/features/index.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.initialize = exports.create = void 0; +exports.create = create; +exports.initialize = initialize; const tslib_1 = require("tslib"); const lodash_1 = require("oak-domain/lib/utils/lodash"); const features_1 = require("oak-general-business/es/features"); @@ -12,7 +13,6 @@ function create(features) { pay, }; } -exports.create = create; async function initialize(features, access, config, clazzes) { await (0, features_1.initialize)(features, access, config ? { dontAutoLoginInWechatmp: config.dontAutoLoginInWechatmp, @@ -21,4 +21,3 @@ async function initialize(features, access, config, clazzes) { applicationExtraProjection: application_1.applicationProjection, }, clazzes); } -exports.initialize = initialize; diff --git a/lib/oak-app-domain/Passport/_baseSchema.d.ts b/lib/oak-app-domain/Passport/_baseSchema.d.ts index ab68caad..a63db40d 100644 --- a/lib/oak-app-domain/Passport/_baseSchema.d.ts +++ b/lib/oak-app-domain/Passport/_baseSchema.d.ts @@ -19,6 +19,7 @@ export type EmailConfig = { html?: string; codeDuration?: number; digit?: number; + emailSuffixes?: string[]; }; export type PfwConfig = { appId: string; diff --git a/lib/timers/index.d.ts b/lib/timers/index.d.ts index 586d92cd..22952f45 100644 --- a/lib/timers/index.d.ts +++ b/lib/timers/index.d.ts @@ -1,5 +1,5 @@ import { Timer } from 'oak-domain/lib/types/Timer'; import { EntityDict } from '../oak-app-domain/index'; import { BRC } from '../types/RuntimeCxt'; -declare const _default: Timer[]; +declare const _default: Array>; export default _default; 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/types/Exception.d.ts b/lib/types/Exception.d.ts index 166fe587..f6220325 100644 --- a/lib/types/Exception.d.ts +++ b/lib/types/Exception.d.ts @@ -11,6 +11,7 @@ export declare class ExternalPayUtilException extends Oak name: string; message: string; _module: string | undefined; + params: Record | undefined; opRecords: OpRecord[]; tag1: string | undefined; tag2: boolean | undefined; diff --git a/lib/types/Exception.js b/lib/types/Exception.js index 0ac88a1b..d6b6767e 100644 --- a/lib/types/Exception.js +++ b/lib/types/Exception.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeException = exports.StartPayFailure = exports.PayUnRefundable = exports.RefundExceedMax = exports.ExternalPayUtilException = exports.UploadShipException = void 0; +exports.StartPayFailure = exports.PayUnRefundable = exports.RefundExceedMax = exports.ExternalPayUtilException = exports.UploadShipException = void 0; +exports.makeException = makeException; const tslib_1 = require("tslib"); const types_1 = require("oak-domain/lib/types"); const DependentExceptions_1 = tslib_1.__importDefault(require("./DependentExceptions")); @@ -68,4 +69,3 @@ function makeException(msg) { } return exception; } -exports.makeException = makeException; 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.d.ts b/lib/utils/pay.d.ts index b92e3bdb..82a96b29 100644 --- a/lib/utils/pay.d.ts +++ b/lib/utils/pay.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from '../oak-app-domain'; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; import BackendRuntimeContext from '../context/BackendRuntimeContext'; diff --git a/lib/utils/pay.js b/lib/utils/pay.js index 4e56ab62..b2e702fd 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")); @@ -87,7 +90,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: { @@ -140,7 +142,6 @@ async function refundNotify(context, body, refundId, headers) { }, {}); } } -exports.refundNotify = refundNotify; /** * 刷新paying状态的pay的真实支付状态 * @param pay @@ -208,4 +209,3 @@ async function refreshPayState(pay, context) { }, {}); } } -exports.refreshPayState = refreshPayState; 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 40429f5a..f1ce7ca7 100644 --- a/lib/utils/payClazz/index.js +++ b/lib/utils/payClazz/index.js @@ -1,6 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getPayClazz = exports.registerPayClazz = exports.getAccountEntity = void 0; +exports.getAccountEntity = getAccountEntity; +exports.registerPayClazz = registerPayClazz; +exports.getPayClazz = getPayClazz; const tslib_1 = require("tslib"); const assert_1 = tslib_1.__importDefault(require("assert")); const Offline_1 = tslib_1.__importDefault(require("./Offline")); @@ -108,7 +110,6 @@ const PayClazzEntityDict = { function getAccountEntity(entity) { return PayClazzEntityDict[entity].accountEntity; } -exports.getAccountEntity = getAccountEntity; // 这里用一个flag来表达先后顺序,如果有registerPayClazz,框架应保证register在get之前 // 目前因为没有registerPayClazz,所以没测,可能不对。by Xc 20240608 let MODULE_USED = false; @@ -142,7 +143,6 @@ function registerPayClazz(entity, def, schema) { } (0, abstractChecker_1.registerAccountEntity)(def.accountEntity); } -exports.registerPayClazz = registerPayClazz; async function getPayClazz(entity, entityId, context) { if (!MODULE_USED) { MODULE_USED = true; @@ -155,4 +155,3 @@ async function getPayClazz(entity, entityId, context) { PayChannelDict[key] = PayClazz; return PayClazz; } -exports.getPayClazz = getPayClazz; diff --git a/lib/utils/ship.js b/lib/utils/ship.js index 3eb6f7fa..2417c227 100644 --- a/lib/utils/ship.js +++ b/lib/utils/ship.js @@ -1,6 +1,12 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.notifyConfirmReceive = exports.refreshShipState = exports.refreshMpOrderShipState = exports.getOrderShipState = exports.uploadShippingInfo = exports.maskPhone = exports.shipProjection = void 0; +exports.shipProjection = void 0; +exports.maskPhone = maskPhone; +exports.uploadShippingInfo = uploadShippingInfo; +exports.getOrderShipState = getOrderShipState; +exports.refreshMpOrderShipState = refreshMpOrderShipState; +exports.refreshShipState = refreshShipState; +exports.notifyConfirmReceive = notifyConfirmReceive; const oak_external_sdk_1 = require("oak-external-sdk"); const assert_1 = require("oak-domain/lib/utils/assert"); const uuid_1 = require("oak-domain/lib/utils/uuid"); @@ -130,7 +136,6 @@ function maskPhone(phone) { const end = phone.slice(-4); return start + '****' + end; } -exports.maskPhone = maskPhone; /** * 小程序发货信息录入 * @param shipInfo @@ -251,7 +256,6 @@ async function uploadShippingInfo(shipId, context) { } } } -exports.uploadShippingInfo = uploadShippingInfo; /** * 获取小程序订单状态 * @param context @@ -332,7 +336,6 @@ async function getOrderShipState(context, shipId) { } } } -exports.getOrderShipState = getOrderShipState; /** * 刷新小程序订单状态(自动确认收货) * @param context @@ -383,7 +386,6 @@ async function refreshMpOrderShipState(shipId, context) { }, {}); } } -exports.refreshMpOrderShipState = refreshMpOrderShipState; /** * 刷新ship的物流状态 * @param ship @@ -454,7 +456,6 @@ async function refreshShipState(shipId, context) { } } } -exports.refreshShipState = refreshShipState; /** * 小程序确认收货提醒 */ @@ -521,4 +522,3 @@ async function notifyConfirmReceive(shipId, context) { } } } -exports.notifyConfirmReceive = notifyConfirmReceive; diff --git a/lib/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js b/lib/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js index e6634291..f947ad45 100644 --- a/lib/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js +++ b/lib/utils/shipClazz/WechatMpShip/WechatMpShip.debug.js @@ -160,9 +160,9 @@ class WechatMpShipDebug { name: from.name, mobile: from.phone, // country: from!.area!.parent!.parent!.name!, //国家 - province: from.area.parent.parent.name, - city: from.area.parent.name, - area: from.area.name, + province: from.area.parent.parent.name, //省份 + city: from.area.parent.name, //市 + area: from.area.name, // 区 address: from.detail, //详细地址 }, receiver: { 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/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/src/components/withdraw/display/index.ts b/src/components/withdraw/display/index.ts index 1aedc0bb..1afd41cc 100644 --- a/src/components/withdraw/display/index.ts +++ b/src/components/withdraw/display/index.ts @@ -31,7 +31,7 @@ export default OakComponent({ } ) || []; const transferData2 = transferData?.map( - (transfer) => { + (transfer: EntityDict['withdrawTransfer']['Schema']) => { const { price, loss, iState, meta, withdrawAccountId, withdrawAccount, $$updateAt$$, reason } = transfer; let withdrawChannel = withdrawAccount?.channel; if (!withdrawChannel && withdrawAccountId) {