Compare commits

..

No commits in common. "dev" and "3.4.3" have entirely different histories.
dev ... 3.4.3

206 changed files with 373 additions and 560 deletions

View File

@ -6,7 +6,7 @@ import { BRC } from '../types/RuntimeCxt';
*/
export declare function getMpShipState(params: {
shipId: string;
}, context: BRC): Promise<string | undefined>;
}, context: BRC): Promise<string | null | undefined>;
/**
*
*/

View File

@ -46,7 +46,7 @@ const checkers = [
const { orderId, price } = data;
data.refundable = false;
if (orderId) {
// @oak-ignore 所有已经支付和正在支付的pay之和不能超过订单总和
// 所有已经支付和正在支付的pay之和不能超过订单总和
const order = context.select('order', {
data: {
id: 1,

View File

@ -4,15 +4,76 @@
*/
import React from 'react';
import { EntityDict } from '../oak-app-domain';
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: <T extends keyof EntityDict>(...props: Parameters<typeof AbsFilterPanel<EntityDict, T>>) => React.ReactElement;
declare const List: <T extends keyof EntityDict>(...props: Parameters<typeof AbsList<EntityDict, T>>) => React.ReactElement;
declare const ListPro: <T extends keyof EntityDict>(...props: Parameters<typeof AbsListPro<EntityDict, T>>) => React.ReactElement;
declare const Detail: <T extends keyof EntityDict>(...props: Parameters<typeof AbsDetail<EntityDict, T>>) => React.ReactElement;
declare const Upsert: <T extends keyof EntityDict>(...props: Parameters<typeof AbsUpsert<EntityDict, T>>) => React.ReactElement;
import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, ListButtonProps, OakAbsAttrUpsertDef } from 'oak-frontend-base';
declare const FilterPanel: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
entity: T;
columns: ColumnProps<EntityDict, T>[];
}>) => React.ReactElement;
declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
entity: T;
extraActions: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]);
onAction: onActionFnDef;
disabledOp: boolean;
attributes: OakAbsAttrDef[];
data: RowWithActions<EntityDict, T>[];
loading: boolean;
tablePagination?: React.ReactNode;
rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<EntityDict, T>> | undefined;
hideHeader?: boolean | undefined;
disableSerialNumber?: boolean | undefined;
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;
}>) => React.ReactElement;
declare const ListPro: <T extends keyof EntityDict>(props: {
title?: any;
extraContent?: any;
hideDefaultButtons?: boolean | undefined;
buttonGroup?: ListButtonProps[] | undefined;
onReload?: (() => void) | undefined;
entity: T;
extraActions?: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]) | undefined;
onAction?: onActionFnDef | undefined;
disabledOp?: boolean | undefined;
attributes: OakAbsAttrDef[];
data: RowWithActions<EntityDict, T>[];
loading?: boolean | undefined;
tablePagination?: any;
rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<EntityDict, T>> | undefined;
disableSerialNumber?: boolean | undefined;
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<import("antd").Breakpoint, number> | undefined;
entity: T;
attributes: OakAbsAttrDef[];
data: Partial<EntityDict[T]["Schema"]>;
title?: string | undefined;
bordered?: boolean | 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: "vertical" | "horizontal";
mode: "default" | "card";
}>) => React.ReactElement;
export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { EntityDict } from "../../../oak-app-domain";
export default function Render(props: {
accountOpers: EntityDict['accountOper']['OpSchema'][];

View File

@ -51,7 +51,6 @@ export default function render(props) {
const { accounts, oakFullpath, oakExecutable, canCreate, systemId } = props.data;
const { t, addItem, execute, clean } = props.methods;
const getNotNullMessage = (entity, attr) => {
// @oak-ignore
return t('notnull', { value: t(`${entity}:attr.${attr}`) });
};
const errMsg = oakExecutable instanceof OakException && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));

View File

@ -6,7 +6,6 @@ export default function render(props) {
const { apAccount, aliPay, oakFullpath, systemId } = props.data;
const { t, update } = props.methods;
if (apAccount) {
// @oak-ignore
return (<Form labelCol={{ span: 6 }} wrapperCol={{ span: 16 }} layout="horizontal" style={{ minWidth: 860 }}>
{(!aliPay || aliPay.$$createAt$$ === 1) && <AliPayUpsert oakPath={`${oakFullpath}.aliPay`} systemId={systemId} key="apCreate"/>}
{(apAccount.aliPayId && apAccount?.$$createAt$$ !== 1) && <AliPayUpsert oakPath={`${oakFullpath}.aliPay`} systemId={systemId} key="apUpdate" oakId={apAccount.aliPayId}/>}

View File

@ -9,12 +9,9 @@ export default function render(props) {
const { apAccountId, apProducts, oakFullpath, oakExecutable, canCreate, systemId } = props.data;
const { t, addItem, execute, clean } = props.methods;
const getNotNullMessage = (entity, attr) => {
// @oak-ignore
return t('notnull', { value: t(`${entity}:attr.${attr}`) });
};
const errMsg = oakExecutable instanceof OakException && (
// @oak-ignore
oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const errMsg = oakExecutable instanceof OakException && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const [upsertId, setUpsertId] = useState('');
const U = (<Modal width={920} destroyOnClose title={`${t('apProduct:name')}${t('common::action.update')}`} open={!!upsertId} onCancel={() => {
clean();

View File

@ -7,7 +7,6 @@ export default function render(props) {
return (<Form labelCol={{ span: 8 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 560 }}>
<Form.Item label={t('apProduct:attr.type')}>
<Select value={apProduct.type} options={['native', 'mp', 'jsapi', 'h5', 'app', 'person', 'code'].map(ele => ({
// @oak-ignore
label: t(`apProduct:v.type.${ele}`),
value: ele,
}))} onSelect={(type) => {

View File

@ -41,15 +41,11 @@ export default function render(props) {
const getNotNullMessage = (attr) => {
if (['channel', 'name', 'qrCode'].includes(attr)) {
const upsertRow = accounts?.find(ele => ele.id === upsertId);
// @oak-ignore
return t('notnull', { value: t(`offlineAccount::label.${attr}.${upsertRow.type}`) });
}
// @oak-ignore
return t('notnull', { value: t(`offlineAccount:attr.${attr}`) });
};
const errMsg = oakExecutable instanceof OakException && (
// @oak-ignore
oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const errMsg = oakExecutable instanceof OakException && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const U = (<Modal destroyOnClose width={920} title={`${t('offlineAccount:name')}${t('common::action.add')}`} open={!!upsertId} onCancel={() => {
clean();
setUpsertId('');

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "offlineAccount", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -7,22 +7,17 @@ export default function render(props) {
return (<Form labelCol={{ span: 8 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 860, maxHeight: '55vh', overflowY: 'auto' }}>
<Form.Item label={t('offlineAccount:attr.type')} required>
<Select value={offlineAccount.type} options={['bank', 'alipay', 'wechat', 'shouqianba', 'others'].map(ele => ({
// @oak-ignore
label: t(`offlineAccount:v.type.${ele}`),
value: ele,
}))} onSelect={(value) => update({ type: value })}/>
</Form.Item>
{['bank', 'others'].includes(offlineAccount.type) && <Form.Item
// @oak-ignore
label={t(`offlineAccount::label.channel.${offlineAccount.type}`)} required>
{['bank', 'others'].includes(offlineAccount.type) && <Form.Item label={t(`offlineAccount::label.channel.${offlineAccount.type}`)} required>
<Input value={offlineAccount.channel || ''} onChange={({ currentTarget }) => {
const { value } = currentTarget;
update({
channel: value,
});
}}
// @oak-ignore
placeholder={t(`placeholder.channel.${offlineAccount.type}`)}/>
}} placeholder={t(`placeholder.channel.${offlineAccount.type}`)}/>
</Form.Item>}
{!!offlineAccount.type && <Form.Item label={t(`offlineAccount::label.name.${offlineAccount.type}`)} required={['bank'].includes(offlineAccount.type)}>
<Input value={offlineAccount.name || ''} onChange={({ currentTarget }) => {

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "order", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -2,7 +2,7 @@ import { EntityDict } from "../../../oak-app-domain";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "order", false, {
accountId: string;
accountAvailMax: number;
onSetPays: (pays: Partial<EntityDict["pay"]["CreateOperationData"]>[]) => void;
onSetPays: (pays: Partial<EntityDict['pay']['CreateOperationData']>[]) => void;
accountTips: string;
autoStartPay: boolean;
}>) => React.ReactElement;

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
export default function Info(props: {
price: number;
t: (k: string) => string;

View File

@ -46,9 +46,7 @@ export default function Render(props) {
return (<ErrorBlock status="default" title={t('paying')}/>);
}
if (!legal) {
return (<ErrorBlock status="default"
// @oak-ignore
title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
return (<ErrorBlock status="default" title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
}
return (<div className={Styles.container}>
<Info t={t} price={ToYuan(order.price)}/>

View File

@ -45,9 +45,7 @@ export default function Render(props) {
return (<Result status="warning" title={t('paying')}/>);
}
if (!legal) {
return (<Result status="warning"
// @oak-ignore
title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
return (<Result status="warning" title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
}
return (<div className={Styles.container}>
<Info t={t} price={ToYuan(order.price)}/>

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { PayChannelOption } from "../../../types/Pay";
export default function Render(props: {
data: {

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { PayChannelOption } from "../../../types/Pay";
export default function Render(props: {
data: {

View File

@ -201,7 +201,6 @@ export default function Render(props) {
{t('common::back')}
</Button>);
}
// @oak-ignore
return (<div className={Styles.container}>
<Card title={t('title')} extra={<Tag color={iStateColor}>{t(`pay:v.iState.${iState}`)}</Tag>}>
<div>

View File

@ -211,9 +211,7 @@ export default function Render(props) {
</Space>}>
<div className={Styles.container}>
<div className={Styles.detail}>
<Descriptions column={1} bordered
// @oak-ignore
items={[
<Descriptions column={1} bordered items={[
{
key: '0',
label: t('type.label'),

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "pay", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -78,7 +78,6 @@ export default function Render(props) {
'offlineAccount': 'red',
'wpProduct': 'green',
};
// @oak-ignore
return (<div>
<Tag color={colorDict[entity] || 'gray'}>{t(`payChannel::${row.entity}`)}</Tag>
{entity === 'offlineAccount' && (<div className={Styles.entityDetail}>

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -154,7 +154,6 @@ export default function render(props) {
...Object.keys(PayChannelConfigDict).map((ele) => {
const C = PayChannelConfigDict[ele];
return {
// @oak-ignore
label: (<div className={Styles.systemLabel}>
{t(`${ele}:name`)}
</div>),

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "refund", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -71,7 +71,6 @@ export default function Render(props) {
'offlineAccount': 'red',
'wpProduct': 'green',
};
// @oak-ignore
return (<div>
<Tag color={colorDict[entity] || 'gray'}>{t(`payChannel::${entity}`)}</Tag>
<div className={Styles.entityDetail}>{row.payChannel}</div>

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="wechat-miniprogram" />
import { EntityDict } from "../../../../oak-app-domain";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "wechatMpShip", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -26,10 +26,10 @@ export default function render(props) {
<Space style={{
marginTop: 22
}}>
{ships.map((ele, idx) => (<Card key={idx} title={ele.application.name} extra={<Button size="small" icon={<EditOutlined />} type="text" onClick={() => {
{ships.map((ele, idx) => (<Card title={ele.application.name} extra={<Button size="small" icon={<EditOutlined />} type="text" onClick={() => {
setUpsertId(ele.id);
}}/>}>
<Detail column={1} bordered entity="wechatMpShip" attributes={[
<Detail key={idx} column={1} bordered entity="wechatMpShip" attributes={[
"disabled",
"sort",
]} data={ele}/>

View File

@ -130,7 +130,6 @@ export default function render(props) {
if (DetailRender) {
Modal.info({
width: 560,
// @oak-ignore
title: `${t(`${entity}:name`)}${t('common::action.detail')}`,
content: (<DetailRender data={data} systemId={systemId} t={t}/>),
onOk() { },
@ -152,12 +151,8 @@ export default function render(props) {
setShowHistoryList(false);
}} width={800} title={showHistoryAcc.entity === 'offlineAccount' ?
(showHistoryAcc.data.type === 'bank' ?
// @oak-ignore
`${t(`${showHistoryAcc.entity}:v.type.${showHistoryAcc.data.type}`)}-${showHistoryAcc.data.channel}-${t('history')}`
// @oak-ignore
: `${t(`${showHistoryAcc.entity}:v.type.${showHistoryAcc.data.type}`)}-${showHistoryAcc.data.name}-${t('history')}`
// @oak-ignore
) : `${t(`${showHistoryAcc.entity}:name`)}-${t('history')}`} footer={null}>
: `${t(`${showHistoryAcc.entity}:v.type.${showHistoryAcc.data.type}`)}-${showHistoryAcc.data.name}-${t('history')}`) : `${t(`${showHistoryAcc.entity}:name`)}-${t('history')}`} footer={null}>
<div style={{ height: '65vh' }}>
<SysAccountOperList entity={showHistoryAcc.entity} entityId={showHistoryAcc.data.id} oakPath="$opb-sysAccount-survery-operList"/>
</div>

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "withdrawTransfer", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="wechat-miniprogram" />
import { EntityDict } from "../../../oak-app-domain";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "withdraw", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { EntityDict } from '../../../oak-app-domain';
export default function render(props: {
data: {

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { EntityDict } from '../../../oak-app-domain';
export default function render(props: {
data: {

View File

@ -6,7 +6,7 @@ export default function render(props) {
const { t, goBack } = props.methods;
if (withdraws?.length) {
return (<List>
{withdraws.map((ele) => (<List.Item key={ele.id} prefix={<HandPayCircleOutline fontSize={38}/>} extra={<Tag color={ele.iStateColor}>{ele.iState}</Tag>} title={ele.lossDescription} description={ele.createAt} onClick={() => gotoDetail(ele.id)}>
{withdraws.map((ele) => (<List.Item prefix={<HandPayCircleOutline fontSize={38}/>} extra={<Tag color={ele.iStateColor}>{ele.iState}</Tag>} title={ele.lossDescription} description={ele.createAt} onClick={() => gotoDetail(ele.id)}>
<>
<span style={{ marginRight: 3 }}>{t('common::pay.symbol')}</span>
{ele.price}

View File

@ -1,3 +1,4 @@
/// <reference types="wechat-miniprogram" />
import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "withdrawTransfer", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -50,12 +50,9 @@ export default function render(props) {
const { accounts, oakFullpath, oakExecutable, canCreate, systemId } = props.data;
const { t, addItem, execute, clean } = props.methods;
const getNotNullMessage = (entity, attr) => {
// @oak-ignore
return t('notnull', { value: t(`${entity}:attr.${attr}`) });
};
const errMsg = oakExecutable instanceof OakException && (
// @oak-ignore
oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const errMsg = oakExecutable instanceof OakException && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const [upsertId, setUpsertId] = useState('');
const U = (<Modal width={920} destroyOnClose title={`${t('wpAccount:name')}${t('common::action.add')}`} open={!!upsertId} onCancel={() => {
clean();

View File

@ -9,12 +9,9 @@ export default function render(props) {
const { wpAccountId, wpProducts, oakFullpath, oakExecutable, canCreate, systemId } = props.data;
const { t, addItem, execute, clean } = props.methods;
const getNotNullMessage = (entity, attr) => {
// @oak-ignore
return t('notnull', { value: t(`${entity}:attr.${attr}`) });
};
const errMsg = oakExecutable instanceof OakException && (
// @oak-ignore
oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const errMsg = oakExecutable instanceof OakException && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
const [upsertId, setUpsertId] = useState('');
const U = (<Modal width={920} destroyOnClose title={`${t('wpProduct:name')}${t('common::action.update')}`} open={!!upsertId} onCancel={() => {
clean();

View File

@ -6,9 +6,7 @@ export default function render(props) {
if (wpProduct) {
return (<Form labelCol={{ span: 8 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 560 }}>
<Form.Item label={t('wpProduct:attr.type')}>
<Select value={wpProduct.type} options={['native', 'mp', 'jsapi', 'h5', 'app'].map(
// @oak-ignore
ele => ({
<Select value={wpProduct.type} options={['native', 'mp', 'jsapi', 'h5', 'app'].map(ele => ({
label: t(`wpProduct:v.type.${ele}`),
value: ele,
}))} onSelect={(type) => {

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

@ -14,9 +14,6 @@ export const desc = {
isDefault: {
notNull: true,
type: "boolean"
},
allowPwd: {
type: "boolean"
}
},
actionType: "crud",

View File

@ -7,7 +7,6 @@ export type OpSchema = EntityShape & {
applicationId: ForeignKey<"application">;
passportId: ForeignKey<"passport">;
isDefault: Boolean;
allowPwd?: Boolean | null;
} & {
[A in ExpressionKey]?: any;
};
@ -20,7 +19,6 @@ export type OpFilter = {
applicationId: Q_StringValue;
passportId: Q_StringValue;
isDefault: Q_BooleanValue;
allowPwd: Q_BooleanValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
@ -32,7 +30,6 @@ export type OpProjection = {
applicationId?: number;
passportId?: number;
isDefault?: number;
allowPwd?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
@ -42,7 +39,6 @@ export type OpSortAttr = Partial<{
applicationId: number;
passportId: number;
isDefault: number;
allowPwd: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;

View File

@ -3,7 +3,6 @@
"attr": {
"application": "应用",
"passport": "登录方式",
"isDefault": "是否默认",
"allowPwd": "是否支持密码登录"
"isDefault": "是否默认"
}
}

View File

@ -49,7 +49,6 @@ export const desc = {
ref: "application"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["unsent", "sending", "sent", "failure"]
}

View File

@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
expiresAt: Datetime;
type: "login" | "changePassword" | "confirm";
applicationId?: ForeignKey<"application"> | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -24,7 +24,6 @@ export const desc = {
ref: "ship"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["depositing", "successful", "failed", "shipped"]
}

View File

@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
accountId: ForeignKey<"account">;
creatorId: ForeignKey<"user">;
shipId?: ForeignKey<"ship"> | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

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

@ -107,13 +107,6 @@ export const desc = {
notNull: true,
type: "ref",
ref: "application"
},
// 分片续传配置
enableChunkedUpload: {
type: "boolean"
},
chunkInfo: {
type: "object"
}
},
actionType: "crud",

View File

@ -1,16 +1,9 @@
import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
import { ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, 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 { GenericAction } from "oak-domain/lib/actions/action";
import { CosOrigin } from "oak-general-business/lib/types/Config";
import { String, Text, Int, Float, Boolean } from "oak-domain/lib/types/DataType";
type ChunkInfo = {
chunkSize: number;
partCount: number;
uploadId: string;
merged: boolean;
parts: Array<string>;
};
export type OpSchema = EntityShape & {
origin: CosOrigin;
type: "image" | "video" | "audio" | "file";
@ -32,8 +25,6 @@ export type OpSchema = EntityShape & {
uploadState: "success" | "failed" | "uploading";
uploadMeta?: Object | null;
applicationId: ForeignKey<"application">;
enableChunkedUpload?: Boolean | null;
chunkInfo?: ChunkInfo | null;
} & {
[A in ExpressionKey]?: any;
};
@ -63,8 +54,6 @@ export type OpFilter = {
uploadState: Q_EnumValue<"success" | "failed" | "uploading">;
uploadMeta: Object;
applicationId: Q_StringValue;
enableChunkedUpload: Q_BooleanValue;
chunkInfo: JsonFilter<ChunkInfo>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
@ -93,8 +82,6 @@ export type OpProjection = {
uploadState?: number;
uploadMeta?: number | Object;
applicationId?: number;
enableChunkedUpload?: number;
chunkInfo?: number | JsonProjection<ChunkInfo>;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
@ -119,10 +106,7 @@ export type OpSortAttr = Partial<{
isBridge: number;
uploadState: number;
applicationId: number;
enableChunkedUpload: number;
chunkInfo: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;
export type OpUpdateAction = "update" | string;
export {};

View File

@ -20,9 +20,7 @@
"isBridge": "是否桥接访问",
"uploadState": "上传状态",
"uploadMeta": "上传需要的metadata",
"application": "来源应用",
"enableChunkedUpload": "是否启用分片续传",
"chunkInfo": "分片续传信息"
"application": "来源应用"
},
"v": {
"origin": {

View File

@ -64,7 +64,6 @@ export const desc = {
enumeration: ["sending", "success", "failure"]
},
visitState: {
notNull: true,
type: "enum",
enumeration: ["unvisited", "visited"]
}

View File

@ -13,9 +13,6 @@ export type Router = {
type MessageRestriction = {
systemIds?: string[];
channels?: Array<Channel>;
disableRouter?: {
[key: Channel]: boolean;
};
};
type Channels = Channel[];
export type OpSchema = EntityShape & {
@ -32,7 +29,7 @@ export type OpSchema = EntityShape & {
platformId?: ForeignKey<"platform"> | null;
channels?: Channels | null;
iState?: IState | null;
visitState: VisitState;
visitState?: VisitState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -40,7 +40,6 @@ export const desc = {
type: "object"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["active", "applied", "abandoned"]
}

View File

@ -10,7 +10,7 @@ export type OpSchema = EntityShape & {
data: Object;
filter?: Object | null;
extra?: Object | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -33,7 +33,6 @@ export const desc = {
}
},
iState: {
notNull: true,
type: "enum",
enumeration: ["sending", "success", "failure"]
}

View File

@ -11,7 +11,7 @@ export type OpSchema = EntityShape & {
data1?: Object | null;
data2?: Object | null;
templateId?: String<128> | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -58,18 +58,5 @@ export const desc = {
}
},
actionType: "crud",
actions,
indexes: [
{
// 业务上可能涉及的间接授权查询,建立索引以避免全表扫描
name: 'idx_oauthUser_composite',
attributes: [{
name: "userId",
}, {
name: 'providerUserId',
}, {
name: "providerConfigId",
}]
}
]
actions
};

View File

@ -40,7 +40,6 @@ export const desc = {
type: "object"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["normal", "rollbacked"]
}

View File

@ -13,7 +13,7 @@ export type OpSchema = EntityShape & {
bornAt?: Datetime | null;
logId?: ForeignKey<"log"> | null;
undoData?: Object | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -70,7 +70,6 @@ export const desc = {
type: "datetime"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["unpaid", "timeout", "cancelled", "paying", "partiallyPaid", "paid", "refunding", "partiallyRefunded", "refunded"]
}

View File

@ -19,7 +19,7 @@ export type OpSchema = EntityShape & {
systemId: ForeignKey<"system">;
addressId?: ForeignKey<"address"> | null;
payAt?: Datetime | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -9,7 +9,7 @@ export const desc = {
type: {
notNull: true,
type: "enum",
enumeration: ["password", "sms", "email", "wechatWeb", "wechatMp", "wechatPublic", "wechatPublicForWeb", "wechatMpForWeb", "wechatNative", "loginName", "oauth"]
enumeration: ["password", "sms", "email", "wechatWeb", "wechatMp", "wechatPublic", "wechatPublicForWeb", "wechatMpForWeb", "wechatNative"]
},
config: {
type: "object"

View File

@ -9,9 +9,7 @@ export const style = {
wechatMp: '#ADDCCA',
wechatMpForWeb: '#FDC454',
wechatPublicForWeb: '#C0A27C',
wechatNative: '#C0A27C',
loginName: '#456B3C',
oauth: '#3C4655',
wechatNative: '#C0A27C'
}
}
};

View File

@ -3,7 +3,7 @@ import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue,
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import { Boolean } from "oak-domain/lib/types/DataType";
export type Type = "password" | "sms" | "email" | "wechatWeb" | "wechatMp" | "wechatPublic" | "wechatPublicForWeb" | "wechatMpForWeb" | "wechatNative" | "loginName" | "oauth";
export type Type = "password" | "sms" | "email" | "wechatWeb" | "wechatMp" | "wechatPublic" | "wechatPublicForWeb" | "wechatMpForWeb" | "wechatNative";
export type SmsConfig = {
mockSend?: boolean;
defaultOrigin?: "ali" | "tencent" | "ctyun";
@ -35,21 +35,10 @@ export type PwdConfig = {
regexs?: string[];
tip?: string;
};
export type NameConfig = {
min?: number;
max?: number;
verify?: boolean;
regexs?: string[];
register?: boolean;
tip?: string;
};
export type OAuthConfig = {
oauthIds: string[];
};
export type OpSchema = EntityShape & {
systemId: ForeignKey<"system">;
type: Type;
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig) | null;
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig) | null;
enabled: Boolean;
} & {
[A in ExpressionKey]?: any;
@ -62,7 +51,7 @@ export type OpFilter = {
$$updateAt$$: Q_DateValue;
systemId: Q_StringValue;
type: Q_EnumValue<Type>;
config: JsonFilter<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig>;
config: JsonFilter<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig>;
enabled: Q_BooleanValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
@ -74,7 +63,7 @@ export type OpProjection = {
$$seq$$?: number;
systemId?: number;
type?: number;
config?: number | JsonProjection<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig>;
config?: number | JsonProjection<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig>;
enabled?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{

View File

@ -9,16 +9,14 @@
"v": {
"type": {
"email": "邮箱",
"sms": "手机号",
"sms": "短信",
"password": "密码",
"wechatMp": "小程序",
"wechatPublic": "公众号",
"wechatWeb": "微信网站",
"wechatMpForWeb": "小程序授权网页",
"wechatPublicForWeb": "公众号授权网页",
"wechatNative": "微信APP授权",
"loginName": "账号",
"oauth": "OAuth授权"
"wechatNative": "微信APP授权"
}
}
}

View File

@ -102,7 +102,6 @@ export const desc = {
type: "boolean"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["unpaid", "paying", "paid", "closed", "refunding", "partiallyRefunded", "refunded"]
}

View File

@ -25,7 +25,7 @@ export type OpSchema = EntityShape & {
phantom4?: Int<8> | null;
phantom5?: Object | null;
autoStart?: Boolean | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -42,7 +42,6 @@ export const desc = {
type: "datetime"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["refunding", "successful", "failed"]
}

View File

@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
creatorId: ForeignKey<"user">;
reason?: Text | null;
successAt?: Datetime | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -20,7 +20,6 @@ export const desc = {
type: "datetime"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["unsettled", "settled", "closed"]
}

View File

@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
price: Price;
settledAt?: Datetime | null;
closedAt?: Datetime | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -22,7 +22,6 @@ export const desc = {
type: "datetime"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["unsettled", "settled", "closed"]
}

View File

@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
price: Price;
settledAt?: Datetime | null;
closedAt?: Datetime | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -73,7 +73,6 @@ export const desc = {
type: "datetime"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["unshipped", "shipping", "cancelled", "received", "rejected", "unknown", "receiving"]
}

View File

@ -22,7 +22,7 @@ export type OpSchema = EntityShape & {
extraShipId?: String<128> | null;
extraPaths?: Paths | null;
receiveAt?: Datetime | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

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

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

View File

@ -50,7 +50,6 @@ export const desc = {
type: "datetime"
},
idState: {
notNull: true,
type: "enum",
enumeration: ["unverified", "verified", "verifying"]
},

View File

@ -18,7 +18,7 @@ export type OpSchema = EntityShape & {
isRoot?: Boolean | null;
hasPassword?: Boolean | null;
verifyPasswordAt?: Datetime | null;
idState: IdState;
idState?: IdState | null;
userState?: UserState | null;
} & {
[A in ExpressionKey]?: any;

View File

@ -20,7 +20,6 @@ export const desc = {
type: "datetime"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["wait", "success", "fail"]
}

View File

@ -8,7 +8,7 @@ export type OpSchema = EntityShape & {
wechatUserId: ForeignKey<"wechatUser">;
sync: Boolean;
syncAt: Datetime;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -31,9 +31,6 @@ export const desc = {
wechatUserId: {
type: "ref",
ref: "wechatUser"
},
router: {
type: "object"
}
},
actionType: "crud",

View File

@ -1,14 +1,9 @@
import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
import { ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, 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 } from "./Action";
import { Boolean, Text, Datetime } from "oak-domain/lib/types/DataType";
import { QrCodeType } from "oak-general-business/lib/types/Config";
type Router = {
pathname: string;
props?: Record<string, any>;
state?: Record<string, any>;
};
export type OpSchema = EntityShape & {
userId?: ForeignKey<"user"> | null;
type: "bind" | "login";
@ -18,7 +13,6 @@ export type OpSchema = EntityShape & {
expiresAt?: Datetime | null;
expired?: Boolean | null;
wechatUserId?: ForeignKey<"wechatUser"> | null;
router?: Router | null;
} & {
[A in ExpressionKey]?: any;
};
@ -36,7 +30,6 @@ export type OpFilter = {
expiresAt: Q_DateValue;
expired: Q_BooleanValue;
wechatUserId: Q_StringValue;
router: JsonFilter<Router>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
@ -53,7 +46,6 @@ export type OpProjection = {
expiresAt?: number;
expired?: number;
wechatUserId?: number;
router?: number | JsonProjection<Router>;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
@ -68,9 +60,7 @@ export type OpSortAttr = Partial<{
expiresAt: number;
expired: number;
wechatUserId: number;
router: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;
export {};

View File

@ -10,8 +10,7 @@
"expiresAt": "过期时间",
"qrCodeType": "二维码类型",
"tokens": "相关令牌",
"wechatUser": "微信用户",
"router": "目标路由"
"wechatUser": "微信用户"
},
"action": {
"success": "成功"

View File

@ -22,7 +22,6 @@ export const desc = {
ref: "wechatPublicTag"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["wait", "success", "fail"]
}

View File

@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
menuConfig: Config;
applicationId: ForeignKey<"application">;
wechatPublicTagId?: ForeignKey<"wechatPublicTag"> | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -27,7 +27,6 @@ export const desc = {
type: "datetime"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["wait", "success", "fail"]
}

View File

@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
wechatId?: Uint<4> | null;
sync?: Boolean | null;
syncAt?: Datetime | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -34,7 +34,6 @@ export const desc = {
type: "object"
},
iState: {
notNull: true,
type: "enum",
enumeration: ["withdrawing", "successful", "partiallySuccessful", "failed", "applying"]
}

View File

@ -12,7 +12,7 @@ export type OpSchema = EntityShape & {
creatorId: ForeignKey<"user">;
reason?: Text | null;
meta?: Object | null;
iState: IState;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};

View File

@ -2,7 +2,6 @@ import { actions } from "./Action";
export const desc = {
attributes: {
iState: {
notNull: true,
type: "enum",
enumeration: ["transferring", "successful", "failed"]
},

View File

@ -4,7 +4,7 @@ import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/E
import { Action, ParticularAction, IState } from "./Action";
import { Price, String, Text } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
iState: IState;
iState?: IState | null;
withdrawId: ForeignKey<"withdraw">;
withdrawAccountId: ForeignKey<"withdrawAccount">;
price: Price;

View File

@ -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: Array<Timer<EntityDict, keyof EntityDict, BRC>>;
declare const _default: Timer<EntityDict, keyof EntityDict, BRC>[];
export default _default;

View File

@ -6,6 +6,6 @@ import { BRC } from '../types/RuntimeCxt';
* @param context
* @param refunds
*/
export declare function updateWithdrawState(context: BRC, id: string): Promise<0 | 1>;
export declare function updateWithdrawState(context: BRC, id: string): Promise<1 | 0>;
declare const triggers: Trigger<EntityDict, 'withdraw', BRC>[];
export default triggers;

1
es/utils/pay.d.ts vendored
View File

@ -1,3 +1,4 @@
/// <reference types="node" />
import { EntityDict } from '../oak-app-domain';
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
import BackendRuntimeContext from '../context/BackendRuntimeContext';

View File

@ -12,12 +12,12 @@ export default class Account implements PayClazz {
getRefundState(refund: EntityDict['refund']['Schema']): Promise<[EntityDict['refund']['Schema']['iState'], undefined]>;
decodePayNotification(params: Record<string, any>, body: any): Promise<{
payId: string;
iState: EntityDict['pay']['Schema']['iState'];
iState: string | null | undefined;
extra?: EntityDict['pay']['Update']['data'] | undefined;
}>;
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
refundId: string;
iState: EntityDict['refund']['OpSchema']['iState'];
iState: string | null | undefined;
extra?: EntityDict['refund']['Update']['data'] | undefined;
price?: number | undefined;
}>;

View File

@ -28,7 +28,7 @@ export default class AliPay extends AliPayDebug implements PayClazz {
static DEFAULT_REFUND_DAYS_GAP: number;
constructor(apProduct: ApProduct);
refund(refund: Refund, context: BRC): Promise<RefundUpdateData | undefined>;
getRefundState(refund: OpRefund): Promise<[EntityDict['refund']['OpSchema']['iState'], RefundUpdateData | undefined]>;
getRefundState(refund: OpRefund): Promise<[string | null | undefined, RefundUpdateData | undefined]>;
private analyzeResult;
private caclRefundDeadline;
prepay(pay: Pay, data: PayUpdateData, context: BRC): Promise<void>;
@ -41,7 +41,7 @@ export default class AliPay extends AliPayDebug implements PayClazz {
}>;
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
refundId: string;
iState: EntityDict['refund']['OpSchema']['iState'];
iState: string | null | undefined;
extra?: RefundUpdateData | undefined;
price?: number | undefined;
}>;

Some files were not shown because too many files have changed in this diff Show More