Compare commits
17 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
f8439663fa | |
|
|
25ca4fdd0c | |
|
|
2a4f94b62f | |
|
|
eb194867a8 | |
|
|
d30667a145 | |
|
|
4160d0b305 | |
|
|
22ccb83a46 | |
|
|
fc80c876cd | |
|
|
a5d940c97b | |
|
|
0f2e6171bd | |
|
|
ad91ff2832 | |
|
|
b5a70cb5f1 | |
|
|
e9e2833398 | |
|
|
68240be0d9 | |
|
|
c3f9ec3296 | |
|
|
376d1c4231 | |
|
|
cdb470c9c2 |
|
|
@ -6,7 +6,7 @@ import { BRC } from '../types/RuntimeCxt';
|
|||
*/
|
||||
export declare function getMpShipState(params: {
|
||||
shipId: string;
|
||||
}, context: BRC): Promise<string | null | undefined>;
|
||||
}, context: BRC): Promise<string | undefined>;
|
||||
/**
|
||||
* 获取打印面单
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const checkers = [
|
|||
const { orderId, price } = data;
|
||||
data.refundable = false;
|
||||
if (orderId) {
|
||||
// 所有已经支付和正在支付的pay之和不能超过订单总和
|
||||
// @oak-ignore 所有已经支付和正在支付的pay之和不能超过订单总和
|
||||
const order = context.select('order', {
|
||||
data: {
|
||||
id: 1,
|
||||
|
|
|
|||
|
|
@ -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: <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?: any;
|
||||
hideHeader?: boolean | undefined;
|
||||
disableSerialNumber?: boolean | undefined;
|
||||
size?: "small" | "large" | "middle" | undefined;
|
||||
scroll?: any;
|
||||
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?: any;
|
||||
disableSerialNumber?: boolean | undefined;
|
||||
size?: "small" | "large" | "middle" | undefined;
|
||||
scroll?: any;
|
||||
empty?: any;
|
||||
opWidth?: number | undefined;
|
||||
oakPath?: string | undefined;
|
||||
}) => React.ReactElement;
|
||||
declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
||||
column?: number | Record<Breakpoint, number> | undefined;
|
||||
entity: T;
|
||||
attributes: OakAbsAttrDef[];
|
||||
data: Partial<EntityDict[T]["Schema"]>;
|
||||
title?: string | undefined;
|
||||
bordered?: boolean | undefined;
|
||||
layout?: "horizontal" | "vertical" | undefined;
|
||||
}>) => React.ReactElement;
|
||||
declare const Upsert: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
||||
helps: Record<string, string>;
|
||||
entity: T;
|
||||
attributes: OakAbsAttrUpsertDef<EntityDict, T, string | number>[];
|
||||
data: EntityDict[T]["Schema"];
|
||||
layout: "horizontal" | "vertical";
|
||||
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: <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;
|
||||
export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from "../../../oak-app-domain";
|
||||
export default function Render(props: {
|
||||
accountOpers: EntityDict['accountOper']['OpSchema'][];
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ 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));
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ 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}/>}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,12 @@ 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 && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
|
||||
const errMsg = oakExecutable instanceof OakException && (
|
||||
// @oak-ignore
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ 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) => {
|
||||
|
|
|
|||
|
|
@ -41,11 +41,15 @@ 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 && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
|
||||
const errMsg = oakExecutable instanceof OakException && (
|
||||
// @oak-ignore
|
||||
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('');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -7,17 +7,22 @@ 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 label={t(`offlineAccount::label.channel.${offlineAccount.type}`)} required>
|
||||
{['bank', 'others'].includes(offlineAccount.type) && <Form.Item
|
||||
// @oak-ignore
|
||||
label={t(`offlineAccount::label.channel.${offlineAccount.type}`)} required>
|
||||
<Input value={offlineAccount.channel || ''} onChange={({ currentTarget }) => {
|
||||
const { value } = currentTarget;
|
||||
update({
|
||||
channel: value,
|
||||
});
|
||||
}} placeholder={t(`placeholder.channel.${offlineAccount.type}`)}/>
|
||||
}}
|
||||
// @oak-ignore
|
||||
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 }) => {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
export default function Info(props: {
|
||||
price: number;
|
||||
t: (k: string) => string;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ export default function Render(props) {
|
|||
return (<ErrorBlock status="default" title={t('paying')}/>);
|
||||
}
|
||||
if (!legal) {
|
||||
return (<ErrorBlock status="default" title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
|
||||
return (<ErrorBlock status="default"
|
||||
// @oak-ignore
|
||||
title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
|
||||
}
|
||||
return (<div className={Styles.container}>
|
||||
<Info t={t} price={ToYuan(order.price)}/>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ export default function Render(props) {
|
|||
return (<Result status="warning" title={t('paying')}/>);
|
||||
}
|
||||
if (!legal) {
|
||||
return (<Result status="warning" title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
|
||||
return (<Result status="warning"
|
||||
// @oak-ignore
|
||||
title={t('illegalState', { state: t(`order:v.iState.${order.iState}`) })}/>);
|
||||
}
|
||||
return (<div className={Styles.container}>
|
||||
<Info t={t} price={ToYuan(order.price)}/>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { PayChannelOption } from "../../../types/Pay";
|
||||
export default function Render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { PayChannelOption } from "../../../types/Pay";
|
||||
export default function Render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ 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>
|
||||
|
|
|
|||
|
|
@ -211,7 +211,9 @@ export default function Render(props) {
|
|||
</Space>}>
|
||||
<div className={Styles.container}>
|
||||
<div className={Styles.detail}>
|
||||
<Descriptions column={1} bordered items={[
|
||||
<Descriptions column={1} bordered
|
||||
// @oak-ignore
|
||||
items={[
|
||||
{
|
||||
key: '0',
|
||||
label: t('type.label'),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ 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}>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ 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>),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ 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>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ export default function render(props) {
|
|||
<Space style={{
|
||||
marginTop: 22
|
||||
}}>
|
||||
{ships.map((ele, idx) => (<Card title={ele.application.name} extra={<Button size="small" icon={<EditOutlined />} type="text" onClick={() => {
|
||||
{ships.map((ele, idx) => (<Card key={idx} title={ele.application.name} extra={<Button size="small" icon={<EditOutlined />} type="text" onClick={() => {
|
||||
setUpsertId(ele.id);
|
||||
}}/>}>
|
||||
<Detail key={idx} column={1} bordered entity="wechatMpShip" attributes={[
|
||||
<Detail column={1} bordered entity="wechatMpShip" attributes={[
|
||||
"disabled",
|
||||
"sort",
|
||||
]} data={ele}/>
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ 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() { },
|
||||
|
|
@ -151,8 +152,12 @@ 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')}`
|
||||
: `${t(`${showHistoryAcc.entity}:v.type.${showHistoryAcc.data.type}`)}-${showHistoryAcc.data.name}-${t('history')}`) : `${t(`${showHistoryAcc.entity}:name`)}-${t('history')}`} footer={null}>
|
||||
// @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}>
|
||||
<div style={{ height: '65vh' }}>
|
||||
<SysAccountOperList entity={showHistoryAcc.entity} entityId={showHistoryAcc.data.id} oakPath="$opb-sysAccount-survery-operList"/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
export default function render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
export default function render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export default function render(props) {
|
|||
const { t, goBack } = props.methods;
|
||||
if (withdraws?.length) {
|
||||
return (<List>
|
||||
{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)}>
|
||||
{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)}>
|
||||
<>
|
||||
<span style={{ marginRight: 3 }}>{t('common::pay.symbol')}</span>
|
||||
{ele.price}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -50,9 +50,12 @@ 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));
|
||||
const errMsg = oakExecutable instanceof OakException && (
|
||||
// @oak-ignore
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -9,9 +9,12 @@ 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 && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
|
||||
const errMsg = oakExecutable instanceof OakException && (
|
||||
// @oak-ignore
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ 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(ele => ({
|
||||
<Select value={wpProduct.type} options={['native', 'mp', 'jsapi', 'h5', 'app'].map(
|
||||
// @oak-ignore
|
||||
ele => ({
|
||||
label: t(`wpProduct:v.type.${ele}`),
|
||||
value: ele,
|
||||
}))} onSelect={(type) => {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ export const desc = {
|
|||
isDefault: {
|
||||
notNull: true,
|
||||
type: "boolean"
|
||||
},
|
||||
allowPwd: {
|
||||
type: "boolean"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export type OpSchema = EntityShape & {
|
|||
applicationId: ForeignKey<"application">;
|
||||
passportId: ForeignKey<"passport">;
|
||||
isDefault: Boolean;
|
||||
allowPwd?: Boolean | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -19,6 +20,7 @@ export type OpFilter = {
|
|||
applicationId: Q_StringValue;
|
||||
passportId: Q_StringValue;
|
||||
isDefault: Q_BooleanValue;
|
||||
allowPwd: Q_BooleanValue;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
"#id"?: NodeId;
|
||||
|
|
@ -30,6 +32,7 @@ export type OpProjection = {
|
|||
applicationId?: number;
|
||||
passportId?: number;
|
||||
isDefault?: number;
|
||||
allowPwd?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
id: number;
|
||||
|
|
@ -39,6 +42,7 @@ export type OpSortAttr = Partial<{
|
|||
applicationId: number;
|
||||
passportId: number;
|
||||
isDefault: number;
|
||||
allowPwd: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"attr": {
|
||||
"application": "应用",
|
||||
"passport": "登录方式",
|
||||
"isDefault": "是否默认"
|
||||
"isDefault": "是否默认",
|
||||
"allowPwd": "是否支持密码登录"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ export const desc = {
|
|||
ref: "application"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unsent", "sending", "sent", "failure"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
|
|||
expiresAt: Datetime;
|
||||
type: "login" | "changePassword" | "confirm";
|
||||
applicationId?: ForeignKey<"application"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export const desc = {
|
|||
ref: "ship"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["depositing", "successful", "failed", "shipped"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
accountId: ForeignKey<"account">;
|
||||
creatorId: ForeignKey<"user">;
|
||||
shipId?: ForeignKey<"ship"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -107,6 +107,13 @@ export const desc = {
|
|||
notNull: true,
|
||||
type: "ref",
|
||||
ref: "application"
|
||||
},
|
||||
// 分片续传配置
|
||||
enableChunkedUpload: {
|
||||
type: "boolean"
|
||||
},
|
||||
chunkInfo: {
|
||||
type: "object"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
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 { 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 { 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";
|
||||
|
|
@ -25,6 +32,8 @@ export type OpSchema = EntityShape & {
|
|||
uploadState: "success" | "failed" | "uploading";
|
||||
uploadMeta?: Object | null;
|
||||
applicationId: ForeignKey<"application">;
|
||||
enableChunkedUpload?: Boolean | null;
|
||||
chunkInfo?: ChunkInfo | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -54,6 +63,8 @@ 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;
|
||||
|
|
@ -82,6 +93,8 @@ 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;
|
||||
|
|
@ -106,7 +119,10 @@ 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 {};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
"isBridge": "是否桥接访问",
|
||||
"uploadState": "上传状态",
|
||||
"uploadMeta": "上传需要的metadata",
|
||||
"application": "来源应用"
|
||||
"application": "来源应用",
|
||||
"enableChunkedUpload": "是否启用分片续传",
|
||||
"chunkInfo": "分片续传信息"
|
||||
},
|
||||
"v": {
|
||||
"origin": {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ export const desc = {
|
|||
enumeration: ["sending", "success", "failure"]
|
||||
},
|
||||
visitState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unvisited", "visited"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ export type Router = {
|
|||
type MessageRestriction = {
|
||||
systemIds?: string[];
|
||||
channels?: Array<Channel>;
|
||||
disableRouter?: {
|
||||
[key: Channel]: boolean;
|
||||
};
|
||||
};
|
||||
type Channels = Channel[];
|
||||
export type OpSchema = EntityShape & {
|
||||
|
|
@ -29,7 +32,7 @@ export type OpSchema = EntityShape & {
|
|||
platformId?: ForeignKey<"platform"> | null;
|
||||
channels?: Channels | null;
|
||||
iState?: IState | null;
|
||||
visitState?: VisitState | null;
|
||||
visitState: VisitState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export const desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["active", "applied", "abandoned"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export type OpSchema = EntityShape & {
|
|||
data: Object;
|
||||
filter?: Object | null;
|
||||
extra?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
@ -31,6 +33,7 @@ export const desc = {
|
|||
}
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["sending", "success", "failure"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
// },
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@ 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">;
|
||||
data1?: Object | null;
|
||||
data2?: Object | null;
|
||||
templateId?: String<128> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -22,7 +21,7 @@ export type OpFilter = {
|
|||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_NumberValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
channel: Q_EnumValue<Channel>;
|
||||
channel: Q_StringValue;
|
||||
applicationId: Q_StringValue;
|
||||
data: Object;
|
||||
messageSystemId: Q_StringValue;
|
||||
|
|
|
|||
|
|
@ -19,14 +19,6 @@
|
|||
"sending": "发送中",
|
||||
"success": "发送成功",
|
||||
"failure": "发送失败"
|
||||
},
|
||||
"channel": {
|
||||
"wechatPublic": "公众号",
|
||||
"jPush": "极光推送",
|
||||
"jim": "极光消息",
|
||||
"wechatMp": "小程序",
|
||||
"sms": "短信",
|
||||
"email": "邮箱"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,5 +58,18 @@ export const desc = {
|
|||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
actions
|
||||
actions,
|
||||
indexes: [
|
||||
{
|
||||
// 业务上可能涉及的间接授权查询,建立索引以避免全表扫描
|
||||
name: 'idx_oauthUser_composite',
|
||||
attributes: [{
|
||||
name: "userId",
|
||||
}, {
|
||||
name: 'providerUserId',
|
||||
}, {
|
||||
name: "providerConfigId",
|
||||
}]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export const desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["normal", "rollbacked"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export type OpSchema = EntityShape & {
|
|||
bornAt?: Datetime | null;
|
||||
logId?: ForeignKey<"log"> | null;
|
||||
undoData?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unpaid", "timeout", "cancelled", "paying", "partiallyPaid", "paid", "refunding", "partiallyRefunded", "refunded"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export type OpSchema = EntityShape & {
|
|||
systemId: ForeignKey<"system">;
|
||||
addressId?: ForeignKey<"address"> | null;
|
||||
payAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export const desc = {
|
|||
type: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["password", "sms", "email", "wechatWeb", "wechatMp", "wechatPublic", "wechatPublicForWeb", "wechatMpForWeb", "wechatNative"]
|
||||
enumeration: ["password", "sms", "email", "wechatWeb", "wechatMp", "wechatPublic", "wechatPublicForWeb", "wechatMpForWeb", "wechatNative", "loginName", "oauth"]
|
||||
},
|
||||
config: {
|
||||
type: "object"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ export const style = {
|
|||
wechatMp: '#ADDCCA',
|
||||
wechatMpForWeb: '#FDC454',
|
||||
wechatPublicForWeb: '#C0A27C',
|
||||
wechatNative: '#C0A27C'
|
||||
wechatNative: '#C0A27C',
|
||||
loginName: '#456B3C',
|
||||
oauth: '#3C4655',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
export type Type = "password" | "sms" | "email" | "wechatWeb" | "wechatMp" | "wechatPublic" | "wechatPublicForWeb" | "wechatMpForWeb" | "wechatNative" | "loginName" | "oauth";
|
||||
export type SmsConfig = {
|
||||
mockSend?: boolean;
|
||||
defaultOrigin?: "ali" | "tencent" | "ctyun";
|
||||
|
|
@ -35,10 +35,21 @@ 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) | null;
|
||||
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig) | null;
|
||||
enabled: Boolean;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
@ -51,7 +62,7 @@ export type OpFilter = {
|
|||
$$updateAt$$: Q_DateValue;
|
||||
systemId: Q_StringValue;
|
||||
type: Q_EnumValue<Type>;
|
||||
config: JsonFilter<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig>;
|
||||
config: JsonFilter<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig>;
|
||||
enabled: Q_BooleanValue;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
|
|
@ -63,7 +74,7 @@ export type OpProjection = {
|
|||
$$seq$$?: number;
|
||||
systemId?: number;
|
||||
type?: number;
|
||||
config?: number | JsonProjection<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig>;
|
||||
config?: number | JsonProjection<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig>;
|
||||
enabled?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@
|
|||
"v": {
|
||||
"type": {
|
||||
"email": "邮箱",
|
||||
"sms": "短信",
|
||||
"sms": "手机号",
|
||||
"password": "密码",
|
||||
"wechatMp": "小程序",
|
||||
"wechatPublic": "公众号",
|
||||
"wechatWeb": "微信网站",
|
||||
"wechatMpForWeb": "小程序授权网页",
|
||||
"wechatPublicForWeb": "公众号授权网页",
|
||||
"wechatNative": "微信APP授权"
|
||||
"wechatNative": "微信APP授权",
|
||||
"loginName": "账号",
|
||||
"oauth": "OAuth授权"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ export const desc = {
|
|||
type: "boolean"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unpaid", "paying", "paid", "closed", "refunding", "partiallyRefunded", "refunded"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export type OpSchema = EntityShape & {
|
|||
phantom4?: Int<8> | null;
|
||||
phantom5?: Object | null;
|
||||
autoStart?: Boolean | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["refunding", "successful", "failed"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
|
|||
creatorId: ForeignKey<"user">;
|
||||
reason?: Text | null;
|
||||
successAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unsettled", "settled", "closed"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
price: Price;
|
||||
settledAt?: Datetime | null;
|
||||
closedAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unsettled", "settled", "closed"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
price: Price;
|
||||
settledAt?: Datetime | null;
|
||||
closedAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unshipped", "shipping", "cancelled", "received", "rejected", "unknown", "receiving"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export type OpSchema = EntityShape & {
|
|||
extraShipId?: String<128> | null;
|
||||
extraPaths?: Paths | null;
|
||||
receiveAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ export const desc = {
|
|||
type: "ref",
|
||||
ref: "platform"
|
||||
},
|
||||
folder: {
|
||||
folder // 提现的loss在用户提现时计算
|
||||
: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 16
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
idState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unverified", "verified", "verifying"]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export type OpSchema = EntityShape & {
|
|||
isRoot?: Boolean | null;
|
||||
hasPassword?: Boolean | null;
|
||||
verifyPasswordAt?: Datetime | null;
|
||||
idState?: IdState | null;
|
||||
idState: IdState;
|
||||
userState?: UserState | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["wait", "success", "fail"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export type OpSchema = EntityShape & {
|
|||
wechatUserId: ForeignKey<"wechatUser">;
|
||||
sync: Boolean;
|
||||
syncAt: Datetime;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -31,6 +31,9 @@ export const desc = {
|
|||
wechatUserId: {
|
||||
type: "ref",
|
||||
ref: "wechatUser"
|
||||
},
|
||||
router: {
|
||||
type: "object"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
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 { 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 { 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";
|
||||
|
|
@ -13,6 +18,7 @@ export type OpSchema = EntityShape & {
|
|||
expiresAt?: Datetime | null;
|
||||
expired?: Boolean | null;
|
||||
wechatUserId?: ForeignKey<"wechatUser"> | null;
|
||||
router?: Router | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -30,6 +36,7 @@ export type OpFilter = {
|
|||
expiresAt: Q_DateValue;
|
||||
expired: Q_BooleanValue;
|
||||
wechatUserId: Q_StringValue;
|
||||
router: JsonFilter<Router>;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
"#id"?: NodeId;
|
||||
|
|
@ -46,6 +53,7 @@ export type OpProjection = {
|
|||
expiresAt?: number;
|
||||
expired?: number;
|
||||
wechatUserId?: number;
|
||||
router?: number | JsonProjection<Router>;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
id: number;
|
||||
|
|
@ -60,7 +68,9 @@ 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 {};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
"expiresAt": "过期时间",
|
||||
"qrCodeType": "二维码类型",
|
||||
"tokens": "相关令牌",
|
||||
"wechatUser": "微信用户"
|
||||
"wechatUser": "微信用户",
|
||||
"router": "目标路由"
|
||||
},
|
||||
"action": {
|
||||
"success": "成功"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const desc = {
|
|||
ref: "wechatPublicTag"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["wait", "success", "fail"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
|
|||
menuConfig: Config;
|
||||
applicationId: ForeignKey<"application">;
|
||||
wechatPublicTagId?: ForeignKey<"wechatPublicTag"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["wait", "success", "fail"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
wechatId?: Uint<4> | null;
|
||||
sync?: Boolean | null;
|
||||
syncAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export const desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["withdrawing", "successful", "partiallySuccessful", "failed", "applying"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export type OpSchema = EntityShape & {
|
|||
creatorId: ForeignKey<"user">;
|
||||
reason?: Text | null;
|
||||
meta?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { actions } from "./Action";
|
|||
export const desc = {
|
||||
attributes: {
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["transferring", "successful", "failed"]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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 | null;
|
||||
iState: IState;
|
||||
withdrawId: ForeignKey<"withdraw">;
|
||||
withdrawAccountId: ForeignKey<"withdrawAccount">;
|
||||
price: Price;
|
||||
|
|
|
|||
|
|
@ -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<EntityDict, keyof EntityDict, BRC>[];
|
||||
declare const _default: Array<Timer<EntityDict, keyof EntityDict, BRC>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ import { BRC } from '../types/RuntimeCxt';
|
|||
* @param context
|
||||
* @param refunds
|
||||
*/
|
||||
export declare function updateWithdrawState(context: BRC, id: string): Promise<1 | 0>;
|
||||
export declare function updateWithdrawState(context: BRC, id: string): Promise<0 | 1>;
|
||||
declare const triggers: Trigger<EntityDict, 'withdraw', BRC>[];
|
||||
export default triggers;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { EntityDict } from '../oak-app-domain';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import BackendRuntimeContext from '../context/BackendRuntimeContext';
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue