调整了shipAccount相关的数据结构,增加了wechatMpShip对象的配置组件

This commit is contained in:
Xu Chang 2025-02-21 21:41:48 +08:00
parent f3d4abb911
commit 9195d6353d
163 changed files with 2035 additions and 1245 deletions

View File

@ -164,11 +164,41 @@ const checkers = [
// 订单根据receivingMethod决定货品发送动作
entity: 'order',
type: 'row',
action: ['store', 'take'],
action: ['store', 'take', 'startTaking', 'cancelTaking', 'completeTaking'],
filter: {
receivingMethod: 'pickup',
},
},
{
// 走直接take的order一定不能有物流限制的小程序支付
entity: 'order',
type: 'row',
action: 'take',
filter: {
shipOrder$order: {
ship: {
entity: {
$exists: false,
},
},
},
}
},
{
// 走异步take的order一定要有物流限制的小程序支付
entity: 'order',
type: 'row',
action: 'take',
filter: {
shipOrder$order: {
ship: {
entity: {
$exists: true,
},
},
},
}
},
{
entity: 'order',
type: 'logicalData',

View File

@ -1,10 +0,0 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, boolean, {
depositMinCent: number;
depositMaxCent: number;
onSetPrice: (price: null | number) => void;
onSetChannel: (channel: string) => void;
onSetMeta: (meta: any) => void;
channel: string;
meta: any;
}>) => React.ReactElement;
export default _default;

View File

@ -1,117 +0,0 @@
import { ToCent, ToYuan } from 'oak-domain/lib/utils/money';
import { PAY_CHANNEL_ACCOUNT_NAME, PAY_CHANNEL_OFFLINE_NAME, PAY_ORG_CHANNELS } from '../../../types/PayConfig';
import assert from 'assert';
export default OakComponent({
properties: {
depositMinCent: 0,
depositMaxCent: 1000000,
onSetPrice: (price) => undefined,
onSetChannel: (channel) => undefined,
onSetMeta: (meta) => undefined,
channel: '',
meta: {},
},
formData({ data }) {
const payConfig2 = this.features.pay.getPayConfigs();
let accountConfig;
const payConfig = [];
for (const config of payConfig2) {
if (config.channel === PAY_CHANNEL_ACCOUNT_NAME) {
accountConfig = config;
}
else if (config.channel !== PAY_CHANNEL_OFFLINE_NAME || config.allowUser) {
payConfig.push(config);
}
}
const { depositMaxCent, depositMinCent } = this.props;
const depositLoss = accountConfig?.depositLoss;
const depositLossRatio = accountConfig?.depositLossRatio;
const tips = depositLoss ? depositLossRatio ? this.t('tips.depositLossRatio', { ratio: depositLossRatio }) : this.t('tips.depositLoss') : '';
return {
depositMax: ToYuan(depositMaxCent),
depositMin: ToYuan(depositMinCent),
account: data,
payConfig,
tips,
};
},
features: ['application'],
listeners: {
price() {
this.reRender();
},
channel(prev, next) {
// 如果是自动充值传了depositMinCent这里切换渠道的时候自动计算一下损耗
const { price, priceChanged, ratioDelta } = this.state;
if (!priceChanged) {
if (PAY_ORG_CHANNELS.includes(prev.channel) && !PAY_ORG_CHANNELS.includes(next.channel)) {
// 计算损耗
if (ratioDelta > 0) {
this.onPriceChange(ToYuan(price - ratioDelta), true);
}
}
else if (PAY_ORG_CHANNELS.includes(next.channel) && (!prev.channel || !PAY_ORG_CHANNELS.includes(prev.channel))) {
// 计算损耗
const ratio = this.features.pay.getDepositRatio(next.channel);
if (ratio > 0) {
const ratioDelta = Math.floor(price * ratio / 100);
this.onPriceChange(ToYuan(price + ratioDelta), true, ratioDelta);
}
}
}
}
},
methods: {
onPriceChange(price2, strict, ratioDelta) {
if (price2 === null) {
assert(!ratioDelta);
this.props.onSetPrice(price2);
this.setState({
price: price2,
priceStr: '',
});
}
else {
let price = ToCent(price2);
this.props.onSetPrice(price);
if (this.props.depositMaxCent && price > this.props.depositMaxCent && !strict) {
price = this.props.depositMaxCent;
}
this.setState({
price,
priceStr: ToYuan(price),
priceChanged: !strict,
ratioDelta,
});
}
},
onDepPriceChangeMp(event) {
const { value } = event.detail;
if (value === null) {
this.onPriceChange(value);
}
else {
const price2 = parseInt(value);
if (!isNaN(price2)) {
this.onPriceChange(price2);
}
}
},
},
data: {
onChannelPickMp(channel) { this.props.onSetChannel(channel); },
onMetaSetMp(meta) { this.props.onSetMeta(meta); },
price: 0,
priceStr: '',
priceChanged: false,
ratioDelta: 0,
},
lifetimes: {
ready() {
const { depositMinCent } = this.props;
if (depositMinCent) {
this.onPriceChange(ToYuan(depositMinCent), true);
}
}
}
});

View File

@ -1,10 +0,0 @@
{
"usingComponents": {
"l-form": "@oak-frontend-base/miniprogram_npm/lin-ui/form/index",
"l-form-item": "@oak-frontend-base/miniprogram_npm/lin-ui/form-item/index",
"l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index",
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
"l-notice-bar": "@oak-frontend-base/miniprogram_npm/lin-ui/notice-bar/index",
"pay-channel-picker": "../../pay/channelPicker2/index"
}
}

View File

@ -1,10 +0,0 @@
@import '../../../config/styles/mp/mixins.less';
@import '../../../config/styles/mp/index.less';
.container {
background-color: @oak-bg-color-container;
.form-label {
align-self: flex-start;
}
}

View File

@ -1,27 +0,0 @@
<view class="container">
<l-form>
<block wx:if="{{tips}}">
<l-notice-bar type="roll" show="{{true}}">{{tips}}</l-notice-bar>
</block>
<l-form-item label="{{t('label.depPrice')}}">
<l-input
hide-label
value="{{priceStr || ''}}"
type="number"
bind:lininput="onDepPriceChangeMp"
placeholder="一次最大充值{{depositMax}}元"
/>
</l-form-item>
<view wx:if="{{price > 0}}">
<l-form-item label="{{t('label.channel')}}" l-form-label-class="form-label">
<pay-channel-picker
payConfig="{{payConfig}}"
onPick="{{onChannelPickMp}}"
channel="{{channel}}"
meta="{{meta}}"
onSetMeta="{{onMetaSetMp}}"
/>
</l-form-item>
</view>
</l-form>
</view>

View File

@ -1,11 +0,0 @@
{
"placeholder": "一次最大充值%{max}元",
"label": {
"depPrice": "充值金额",
"channel": "充值渠道"
},
"tips": {
"depositLoss": "线上充值将按照充值渠道的扣款比例扣除相应费用一般是0.6%),敬请知晓",
"depositLossRatio": "线上充值将按照%{ratio}%的比例扣除相应费用,敬请知晓"
}
}

View File

@ -1,19 +0,0 @@
import React from 'react';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../oak-app-domain';
import { AccountPayConfig, PayConfig } from '../../../types/PayConfig';
export default function Render(props: WebComponentProps<EntityDict, 'account', false, {
depositMax: number;
payConfig: PayConfig;
accountConfig?: AccountPayConfig;
onSetChannel: (channel: string) => void;
onSetMeta: (meta: any) => void;
price: number;
priceStr: string | undefined;
channel: string;
meta: any;
depositMin: number;
tips: string;
}, {
onPriceChange: (price: null | number) => void;
}>): React.JSX.Element | null;

View File

@ -1,37 +0,0 @@
import React from 'react';
import { Form, Input, NoticeBar } from 'antd-mobile';
export default function Render(props) {
const { depositMax, payConfig, tips, price, channel, meta, priceStr, onSetChannel, onSetMeta } = props.data;
const { t, onPriceChange } = props.methods;
if (payConfig) {
return (<Form layout="horizontal">
{tips && <NoticeBar content={tips} color='info'/>}
<Form.Item label={<span>{t("label.depPrice")}:</span>} extra={t('common::pay.symbol')}>
<Input autoFocus type='number' placeholder={t('placeholder', { max: depositMax })} value={priceStr} onChange={(value) => {
if (value === '' || value === null) {
onPriceChange(null);
return;
}
const v = parseInt(value);
if (!isNaN(v)) {
onPriceChange(v);
}
}}/>
</Form.Item>
{price > 0 && <Form.Item label={<span>
{t('label.channel')}:
</span>}>
{/* <ChannelPicker
payConfig={payConfig}
onPick={(channel) => {
onSetChannel(channel);
}}
channel={channel}
meta={meta}
onSetMeta={(meta) => onSetMeta(meta)}
/> */}
</Form.Item>}
</Form>);
}
return null;
}

View File

@ -1,18 +0,0 @@
import React from 'react';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../oak-app-domain';
import { AccountPayConfig, PayConfig } from '../../../types/PayConfig';
export default function Render(props: WebComponentProps<EntityDict, 'account', false, {
depositMax: number;
payConfig: PayConfig;
accountConfig?: AccountPayConfig;
onSetChannel: (channel: string) => void;
onSetMeta: (meta: any) => void;
price: number;
channel: string;
meta: any;
depositMin: number;
tips: string;
}, {
onPriceChange: (price: null | number) => void;
}>): React.JSX.Element | null;

View File

@ -1,32 +0,0 @@
import React from 'react';
import { Form, InputNumber, Alert } from 'antd';
import { ToYuan } from 'oak-domain/lib/utils/money';
import Styles from './web.pc.module.less';
export default function Render(props) {
const { depositMax, payConfig, price, channel, meta, tips, onSetChannel, onSetMeta } = props.data;
const { t, onPriceChange } = props.methods;
if (payConfig) {
return (<Form labelCol={{ span: 4 }} wrapperCol={{ span: 14 }} layout="horizontal" style={{ width: '100%' }} colon={false}>
{tips && <Alert className={Styles.tips} type="info" message={tips}/>}
<Form.Item label={<span>{t("label.depPrice")}:</span>}>
<InputNumber autoFocus placeholder={t('placeholder', { max: depositMax })} value={typeof price == 'number' ? ToYuan(price) : null} addonAfter={t('common::pay.symbol')} onChange={(value) => {
onPriceChange(value);
}}/>
</Form.Item>
{price > 0 ? <Form.Item label={<span style={{ marginTop: 10 }}>
{t('label.channel')}:
</span>}>
{/* <ChannelPicker
payConfig={payConfig}
onPick={(channel) => {
onSetChannel(channel);
}}
channel={channel}
meta={meta}
onSetMeta={(meta) => onSetMeta(meta)}
/> */}
</Form.Item> : <div style={{ height: 120 }}/>}
</Form>);
}
return null;
}

View File

@ -1,3 +0,0 @@
.tips {
margin-bottom: 4px;
}

View File

@ -1,14 +1,12 @@
import React from 'react';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../oak-app-domain';
import { AccountPayConfig } from '../../../types/PayConfig';
import { PayChannel, PayChannels } from '../../../types/Pay';
export default function Render(props: WebComponentProps<EntityDict, 'order', false, {
accountId?: string;
accountAvailMax: number;
order: EntityDict['order']['OpSchema'];
activePay?: EntityDict['pay']['OpSchema'];
accountConfig?: AccountPayConfig;
payChannels?: PayChannels;
channel?: PayChannel;
accountPrice: number;

View File

@ -1,14 +1,12 @@
import React from 'react';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../oak-app-domain';
import { AccountPayConfig } from '../../../types/PayConfig';
import { PayChannel, PayChannels } from '../../../types/Pay';
export default function Render(props: WebComponentProps<EntityDict, 'order', false, {
accountId?: string;
accountAvailMax: number;
order: EntityDict['order']['OpSchema'];
activePay?: EntityDict['pay']['OpSchema'];
accountConfig?: AccountPayConfig;
payChannels?: PayChannels;
channel?: PayChannel;
accountPrice: number;

View File

@ -1,7 +0,0 @@
import { AccountPayConfig } from '../../../../types/PayConfig';
import React from 'react';
export default function Account(props: {
config: AccountPayConfig;
update: (config: AccountPayConfig) => void;
t: (k: string) => string;
}): React.JSX.Element;

View File

@ -1,24 +0,0 @@
import React from 'react';
import { Alert, Form, Switch, InputNumber } from 'antd';
export default function Account(props) {
const { t, config, update } = props;
return (<Form labelCol={{ span: 6 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 600 }}>
<Alert type='info' message={t('tips')}/>
<Form.Item label={t('label.depositLoss')} help={t('placeholder.depositLoss')}>
<Switch value={config.depositLoss} onChange={(value) => {
config.depositLoss = value;
if (value === false) {
config.depositLossRatio = undefined;
}
update(config);
}}/>
</Form.Item>
{config.depositLoss &&
<Form.Item label={t('label.depositLossRatio')} help={t('placeholder.depositLossRatio')}>
<InputNumber value={config.depositLossRatio} max={5} min={0.01} addonAfter={"%"} step={0.01} precision={2} onChange={(value) => {
config.depositLossRatio = value;
update(config);
}}/>
</Form.Item>}
</Form>);
}

View File

@ -1,11 +0,0 @@
{
"tips": "开启后支持向系统帐户内充值,并使用帐户余额进行抵扣、支付、提现等操作,请了解功能后再使用",
"label": {
"depositLossRatio": "充值损耗比例",
"depositLoss": "充值损耗"
},
"placeholder": {
"depositLossRatio": "若为空,则默认按收费途径的损耗扣除",
"depositLoss": "开启后用户充值有损耗"
}
}

View File

@ -1,17 +0,0 @@
import React from 'react';
import { PayConfig, ConfigBase } from '../../../types/PayConfig';
type FC<T extends ConfigBase> = React.FC<{
config: T;
update: (config: Omit<T, 'channel'>) => void;
t: (k: string) => string;
extra: any;
}>;
export declare function registerPayConfigComponent<T extends ConfigBase>(channel: string, C: FC<T>): void;
export default function Upsert(props: {
config?: PayConfig | null;
channels: [string, string][];
serverUrl?: string;
update: (config: PayConfig) => void;
t: (k: string) => string;
}): React.JSX.Element;
export {};

View File

@ -1,86 +0,0 @@
import React, { useState } from 'react';
import { Button, Alert, Modal, Space, Select, Card } from 'antd';
import { CloseOutlined } from '@ant-design/icons';
import classnames from 'classnames';
import WechatPayConfigUpsert from './wechatPay';
import AccountConfigUpsert from './account';
import OfflineConfigUpsert from './offline';
import assert from 'assert';
import Styles from './web.pc.module.less';
const PayConfigComponentsDict = {
WECHAT_APP: WechatPayConfigUpsert,
WECHAT_H5: WechatPayConfigUpsert,
WECHAT_JS: WechatPayConfigUpsert,
WECHAT_MP: WechatPayConfigUpsert,
WECHAT_NATIVE: WechatPayConfigUpsert,
ACCOUNT: AccountConfigUpsert,
OFFLINE: OfflineConfigUpsert,
};
export function registerPayConfigComponent(channel, C) {
PayConfigComponentsDict[channel] = C;
}
export default function Upsert(props) {
const { serverUrl, config, channels, update, t } = props;
const [open, setOpen] = useState(false);
const AddButton = (<Button onClick={() => setOpen(true)} disabled={open}>
{t('common::action.add')}
</Button>);
let C = (<>
<Alert message={t('tips')} type="warning"/>
<div className={classnames(Styles.empty, Styles.container)}>
{AddButton}
</div>
</>);
const availableChannels = channels.filter((ele) => !config?.find(ele2 => ele2.channel === ele[1]));
if (config && config.length > 0) {
C = (<div className={Styles.container}>
<Space direction="vertical" size={16} style={{ width: '100%' }}>
{config.map((cf, idx) => {
const { channel } = cf;
const C = PayConfigComponentsDict[channel];
assert(C);
return (<Card title={channels.find(ele => ele[1] === channel)[0]} style={{
minWidth: 380,
}} key={idx} extra={<Button icon={<CloseOutlined />} type="text" onClick={() => {
config.splice(idx, 1);
update(config);
}}/>}>
<C extra={{ serverUrl }} config={cf} update={(cf2) => {
config.splice(idx, 1, {
channel,
...cf2,
});
update(config);
}} t={t}/>
</Card>);
})}
</Space>
{availableChannels.length > 0 && <div style={{ marginTop: 24, alignSelf: 'flex-end' }}>
{AddButton}
</div>}
</div>);
}
// 还没有配置config
return (<>
{C}
<Modal open={open} onCancel={() => setOpen(false)} title={t('pickChannel')} onOk={() => { }} footer={null} destroyOnClose={true}>
<Select style={{ width: 240 }} options={availableChannels.map(ele => ({
label: ele[0],
value: ele[1],
}))} onSelect={(value) => {
if (config) {
config.push({
channel: value,
});
update(config);
}
else {
update([{
channel: value,
}]);
}
setOpen(false);
}}/>
</Modal>
</>);
}

View File

@ -1,4 +0,0 @@
{
"tips": "在此创建的支付设置将对所有app有效",
"pickChannel": "选择支付通道"
}

View File

@ -1,7 +0,0 @@
import React from 'react';
import { OfflinePayConfig } from '../../../../types/PayConfig';
export default function Offline(props: {
config: OfflinePayConfig;
update: (config: Omit<OfflinePayConfig, 'channel'>) => void;
t: (k: string) => string;
}): React.JSX.Element;

View File

@ -1,76 +0,0 @@
import React, { useEffect, useRef, useState } from 'react';
import { Alert, Flex, Input, Tag, Form, Switch, theme } from 'antd';
import Styles from './web.pc.module.less';
import { PlusOutlined } from '@ant-design/icons';
const tagInputStyle = {
width: 64,
height: 22,
marginInlineEnd: 8,
verticalAlign: 'top',
};
export default function Offline(props) {
const { config, update, t } = props;
const { options = [], allowUser = false, tips } = config;
const { token } = theme.useToken();
const tagPlusStyle = {
height: 22,
background: token.colorBgContainer,
borderStyle: 'dashed',
};
const [inputVisible, setInputVisible] = useState(false);
const [option, setOption] = useState('');
const inputRef = useRef(null);
useEffect(() => {
if (inputVisible) {
inputRef.current?.focus();
}
}, [inputVisible]);
const handleOptionCreated = () => {
if (option) {
options.push(option);
update({
...config,
options,
});
}
setOption('');
setInputVisible(false);
};
return (<div className={Styles.container}>
<Alert type='info' message={t('tips')}/>
<Form labelCol={{ span: 6 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 600, marginTop: 22 }}>
<Form.Item label={t('tips2')}>
<Input.TextArea rows={4} value={tips} placeholder={t('tipsHolder')} onChange={({ currentTarget }) => {
update({
...config,
tips: currentTarget.value,
});
}}/>
</Form.Item>
<Form.Item label={t('options')}>
<Flex gap="4px 0" wrap="wrap">
{options.map((option, idx) => <Tag bordered={false} closable key={idx} onClose={() => {
options.splice(idx, 1);
update({
...config,
options,
});
}}>
{option}
</Tag>)}
{inputVisible ? (<Input ref={inputRef} type="text" size="small" style={tagInputStyle} value={option} onChange={({ currentTarget }) => setOption(currentTarget.value)} onBlur={handleOptionCreated} onPressEnter={handleOptionCreated}/>) : (<Tag style={tagPlusStyle} icon={<PlusOutlined />} onClick={() => setInputVisible(true)}>
{t('newOption')}
</Tag>)}
</Flex>
</Form.Item>
<Form.Item label={t('allowUser')}>
<Switch value={allowUser} onChange={(v) => {
update({
...config,
allowUser: v,
});
}}/>
</Form.Item>
</Form>
</div>);
}

View File

@ -1,8 +0,0 @@
{
"tips": "配置后系统允许手动同步来自系统以外的支付",
"newOption": "添加途径",
"tips2": "线下支付说明",
"tipsHolder": "描述用户如何进行线下支付(例如往哪个银行帐号汇款)",
"options": "收银途径",
"allowUser": "用户主动发起"
}

View File

@ -1,5 +0,0 @@
.container {
display: flex;
flex-direction: column;
width: 100%;
}

View File

@ -1,10 +0,0 @@
import { WechatPayConfig } from '../../../../types/PayConfig';
import React from 'react';
export default function WechatPay(props: {
config: WechatPayConfig;
update: (config: Omit<WechatPayConfig, 'channel'>) => void;
t: (k: string) => string;
extra: {
serverUrl: string;
};
}): React.JSX.Element;

View File

@ -1,72 +0,0 @@
import React from 'react';
import { Form, Input, InputNumber, Radio } from 'antd';
export default function WechatPay(props) {
const { config, update, t, extra: { serverUrl } } = props;
return (<Form labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} layout="horizontal" style={{ minWidth: 600 }}>
<Form.Item label="mchId">
<Input value={config.mchId} onChange={({ currentTarget }) => {
config.mchId = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.privateKeyFilePath')}>
<Input value={config.privateKeyFilePath} placeholder={t('placeholder.privateKeyFilePath')} onChange={({ currentTarget }) => {
config.privateKeyFilePath = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.publicKeyFilePath')}>
<Input value={config.publicKeyFilePath} placeholder={t('placeholder.publicKeyFilePath')} onChange={({ currentTarget }) => {
config.publicKeyFilePath = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.payNotifyUrl')}>
<Input prefix={`${serverUrl}/endpoint`} suffix='/${payId}' value={config.payNotifyUrl} placeholder={t('placeholder.payNotifyUrl')} onChange={({ currentTarget }) => {
config.payNotifyUrl = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.refundNotifyUrl')}>
<Input prefix={`${serverUrl}/endpoint`} suffix='/${refundId}' value={config.refundNotifyUrl} placeholder={t('placeholder.refundNotifyUrl')} onChange={({ currentTarget }) => {
config.refundNotifyUrl = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.apiV3Key')}>
<Input value={config.apiV3Key} placeholder={t('placeholder.apiV3Key')} onChange={({ currentTarget }) => {
config.apiV3Key = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.lossRatio')} help={t('placeholder.lossRatio')}>
<InputNumber value={config.lossRatio} max={5} min={0.01} addonAfter={"%"} step={0.01} precision={2} onChange={(value) => {
config.lossRatio = value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.refundGapDays')} help={t('placeholder.refundGapDays')}>
<InputNumber value={config.refundGapDays} max={365} min={7} addonAfter={"天"} step={1} onChange={(value) => {
config.refundGapDays = value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.refundLossRatio')} help={t('placeholder.refundLossRatio')}>
<InputNumber value={config.refundLossRatio} max={5} min={0.01} addonAfter={"%"} step={0.01} precision={2} onChange={(value) => {
config.refundLossRatio = value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.refundLossFloor')} help={t('placeholder.refundLossFloor')}>
<Radio.Group onChange={({ target }) => {
const { value } = target;
config.refundLossFloor = value;
update(config);
}} value={config.refundLossFloor}>
<Radio value={1}></Radio>
<Radio value={2}></Radio>
<Radio value={3}></Radio>
</Radio.Group>
</Form.Item>
</Form>);
}

View File

@ -1,24 +0,0 @@
{
"label": {
"privateKeyFilePath": "私钥文件路径",
"publicKeyFilePath": "公钥文件路径",
"payNotifyUrl": "支付回调URL",
"refundNotifyUrl": "退款回调URL",
"lossRatio": "手续费比例",
"apiV3Key": "apiV3Key",
"refundGapDays": "退款限制天数",
"refundLossRatio": "退款损耗百分比",
"refundLossFloor": "退款取整位数"
},
"placeholder": {
"privateKeyFilePath": "服务器上存放apiclient_key.pem的路径注意访问权限",
"publicKeyFilePath": "服务器上存放apiclient_cert.pem的路径注意访问权限",
"lossRatio": "填百分比(0.6就代表千分之六)",
"payNotifyUrl": "endpoint",
"refundNotifyUrl": "endpoint",
"apiV3Key": "需要登录商户后台获取",
"refundGapDays": "超过这个天数后无法退款",
"refundLossRatio": "退款时将按这个百分比扣除损耗0.6就代表千分之六)",
"refundLossFloor": "退款时按位向下取整(如按元取整,则忽略角位和分位)"
}
}

3
es/components/ship/system/index.d.ts vendored Normal file
View File

@ -0,0 +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

@ -0,0 +1,15 @@
export default OakComponent({
entity: 'system',
isList: false,
projection: {
id: 1,
name: 1,
},
formData({ data }) {
const executable = this.tryExecute();
return {
system: data,
executable,
};
}
});

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,5 @@
{
"tips": {
"header": "Ship模块需要在代码端进行注入"
}
}

10
es/components/ship/system/web.pc.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
/// <reference types="react" />
import { EntityDict } from "../../../oak-app-domain";
import { WebComponentProps } from "oak-frontend-base";
export declare function registerShipSettingComponent(entity: string, component: (props: {
oakPath: string;
systemId: string;
}) => React.ReactElement): void;
export default function render(props: WebComponentProps<EntityDict, 'system', false, {
executable: boolean;
}>): import("react").JSX.Element;

View File

@ -0,0 +1,38 @@
import assert from "assert";
import { Tabs, Flex, Button, Alert } from 'antd';
import Styles from './web.pc.module.less';
const ShipSettingComponentDict = {};
export function registerShipSettingComponent(entity, component) {
assert(!ShipSettingComponentDict[entity]);
ShipSettingComponentDict[entity] = component;
}
export default function render(props) {
const { oakId, oakFullpath, oakDirty, executable } = props.data;
const { t, execute, clean } = props.methods;
const entities = Object.keys(ShipSettingComponentDict);
if (oakId && oakFullpath && entities.length) {
return (<Tabs className={Styles.container} tabPosition="left" items={entities.map((entity) => {
const Comp = ShipSettingComponentDict[entity];
return {
label: (<div className={Styles.systemLabel}>
{t(`${entity}:name`)}
</div>),
key: entity,
children: (<Flex vertical>
<Comp systemId={oakId} oakPath={`${oakFullpath}.${entity}$system`}/>
<Flex gap="middle" justify='end'>
<Button type="primary" disabled={!executable} onClick={() => execute()}>
{t('common::confirm')}
</Button>
<Button disabled={!oakDirty} onClick={() => clean()}>
{t('common::reset')}
</Button>
</Flex>
</Flex>)
};
})}/>);
}
return (<Flex className={Styles.tips} vertical align="stretch">
<Alert type="info" message={t("help.header")}/>
</Flex>);
}

View File

@ -0,0 +1,9 @@
.container {
width: 100%;
height: 100%;
}
.tips {
width: 100%;
height: 100%;
}

View File

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

View File

@ -0,0 +1,21 @@
export default OakComponent({
entity: 'wechatMpShip',
projection: {
id: 1,
wpProduct: {
application: {
name: 1,
},
},
disabled: 1,
},
isList: false,
formData({ data }) {
const appName = data.wpProduct?.application.name;
const disabled = data.disabled;
return {
appName,
disabled,
};
}
});

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,9 @@
{
"appName": "关联小程序",
"help": {
"disabled": "小程序支付的物流能力默认必须开启,如果您申请的小程序是特殊行业,已向微信申请取消物流能力,在此可以关闭"
},
"warning": {
"disabled": "注意,小程序要求大部分支付必须与物流进行绑定,若是关闭,可能会造成资金无法正常结转"
}
}

View File

@ -0,0 +1,7 @@
/// <reference types="react" />
import { EntityDict } from "../../../oak-app-domain";
import { WebComponentProps } from "oak-frontend-base";
export default function render(props: WebComponentProps<EntityDict, 'wechatMpShip', false, {
appName?: string;
disabled?: boolean;
}>): import("react").JSX.Element | undefined;

View File

@ -0,0 +1,19 @@
import { Form, Switch, Input } from 'antd';
export default function render(props) {
const { appName, disabled } = props.data;
const { t, update } = props.methods;
if (appName) {
return (<Form labelCol={{ span: 4 }} wrapperCol={{ span: 14 }} layout="horizontal" style={{ width: '100%' }} colon={false}>
<Form.Item label={<span>{t("appName")}:</span>}>
<Input disabled value={appName}/>
</Form.Item>
<Form.Item label={<span>{t('wechatMpShip:attr.disabled')}</span>} help={t('help.disabled')}>
<Switch value={disabled} onChange={(value) => {
update({
disabled: value,
});
}}/>
</Form.Item>
</Form>);
}
}

View File

@ -51,7 +51,6 @@ export default OakComponent({
this.update({
wpAccountId,
enabled: true,
shipping: false, //默认不受发货限制
});
}
}

View File

@ -22,13 +22,6 @@ export default function render(props) {
update({ enabled });
}}/>
</Form.Item>
{wpProduct.type && wpProduct.type === 'mp' && (
//仅小程序会受发货限制
<Form.Item label={t('wpProduct:attr.shipping')} required tooltip={'开启后将接入小程序发货管理'}>
<Switch value={wpProduct.shipping} onChange={(checked) => {
update({ shipping: checked });
}}/>
</Form.Item>)}
<Form.Item label={t('wpAccount:attr.taxLossRatio')} help={t('placeholder.taxLossRatio')}>
<InputNumber value={wpProduct.taxLossRatio} max={5} min={0.01} addonAfter={"%"} step={0.01} precision={2} onChange={(value) => {
const taxLossRatio = value;

View File

@ -1,23 +1,5 @@
// 本文件为自动编译产生,请勿直接修改
const i18ns = [
{
id: "a7dab1e9edd21024ad094a553064102d",
namespace: "oak-pay-business-c-account-deposit",
language: "zh-CN",
module: "oak-pay-business",
position: "src/components/account/deposit",
data: {
"placeholder": "一次最大充值%{max}元",
"label": {
"depPrice": "充值金额",
"channel": "充值渠道"
},
"tips": {
"depositLoss": "线上充值将按照充值渠道的扣款比例扣除相应费用一般是0.6%),敬请知晓",
"depositLossRatio": "线上充值将按照%{ratio}%的比例扣除相应费用,敬请知晓"
}
}
},
{
id: "f86292a7fab630dee76783fe38c35381",
namespace: "oak-pay-business-c-account-detail",
@ -294,81 +276,6 @@ const i18ns = [
}
}
},
{
id: "b498c969e467aad958efb0c900eb6d27",
namespace: "oak-pay-business-c-payConfig-upsert-account",
language: "zh-CN",
module: "oak-pay-business",
position: "src/components/payConfig/upsert/account",
data: {
"tips": "开启后支持向系统帐户内充值,并使用帐户余额进行抵扣、支付、提现等操作,请了解功能后再使用",
"label": {
"depositLossRatio": "充值损耗比例",
"depositLoss": "充值损耗"
},
"placeholder": {
"depositLossRatio": "若为空,则默认按收费途径的损耗扣除",
"depositLoss": "开启后用户充值有损耗"
}
}
},
{
id: "13dd1040fa574f095005854ea31fa913",
namespace: "oak-pay-business-c-payConfig-upsert",
language: "zh-CN",
module: "oak-pay-business",
position: "src/components/payConfig/upsert",
data: {
"tips": "在此创建的支付设置将对所有app有效",
"pickChannel": "选择支付通道"
}
},
{
id: "4ceac38d67e35b7e9c76f0d2c1ad1e9a",
namespace: "oak-pay-business-c-payConfig-upsert-offline",
language: "zh-CN",
module: "oak-pay-business",
position: "src/components/payConfig/upsert/offline",
data: {
"tips": "配置后系统允许手动同步来自系统以外的支付",
"newOption": "添加途径",
"tips2": "线下支付说明",
"tipsHolder": "描述用户如何进行线下支付(例如往哪个银行帐号汇款)",
"options": "收银途径",
"allowUser": "用户主动发起"
}
},
{
id: "6fcb5b3689d3f682af148af94b385ae3",
namespace: "oak-pay-business-c-payConfig-upsert-wechatPay",
language: "zh-CN",
module: "oak-pay-business",
position: "src/components/payConfig/upsert/wechatPay",
data: {
"label": {
"privateKeyFilePath": "私钥文件路径",
"publicKeyFilePath": "公钥文件路径",
"payNotifyUrl": "支付回调URL",
"refundNotifyUrl": "退款回调URL",
"lossRatio": "手续费比例",
"apiV3Key": "apiV3Key",
"refundGapDays": "退款限制天数",
"refundLossRatio": "退款损耗百分比",
"refundLossFloor": "退款取整位数"
},
"placeholder": {
"privateKeyFilePath": "服务器上存放apiclient_key.pem的路径注意访问权限",
"publicKeyFilePath": "服务器上存放apiclient_cert.pem的路径注意访问权限",
"lossRatio": "填百分比(0.6就代表千分之六)",
"payNotifyUrl": "endpoint",
"refundNotifyUrl": "endpoint",
"apiV3Key": "需要登录商户后台获取",
"refundGapDays": "超过这个天数后无法退款",
"refundLossRatio": "退款时将按这个百分比扣除损耗0.6就代表千分之六)",
"refundLossFloor": "退款时按位向下取整(如按元取整,则忽略角位和分位)"
}
}
},
{
id: "22243a7fe04843821e798c1a670cb8c9",
namespace: "oak-pay-business-c-refund-list",
@ -387,6 +294,34 @@ const i18ns = [
"chargePlz": "请向对应的系统账号中充值,系统会自动调用渠道的退款接口"
}
},
{
id: "6259d9c9fa4e09edc7899903219b59e4",
namespace: "oak-pay-business-c-ship-system",
language: "zh-CN",
module: "oak-pay-business",
position: "src/components/ship/system",
data: {
"tips": {
"header": "Ship模块需要在代码端进行注入"
}
}
},
{
id: "bca82eb1392f291564a68c8ab138feec",
namespace: "oak-pay-business-c-ship-wechatMpShip",
language: "zh-CN",
module: "oak-pay-business",
position: "src/components/ship/wechatMpShip",
data: {
"appName": "关联小程序",
"help": {
"disabled": "小程序支付的物流能力默认必须开启,如果您申请的小程序是特殊行业,已向微信申请取消物流能力,在此可以关闭"
},
"warning": {
"disabled": "注意,小程序要求大部分支付必须与物流进行绑定,若是关闭,可能会造成资金无法正常结转"
}
}
},
{
id: "297eb88cf8a759b3bd882e8bd2eeae5a",
namespace: "oak-pay-business-c-shipCompanySystem-list",

13
es/entities/AbstractPayAccount.d.ts vendored Normal file
View File

@ -0,0 +1,13 @@
import { Price, Boolean, Int, Decimal } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { EntityDesc } from 'oak-domain/lib/types';
export interface Schema extends EntityShape {
taxLossRatio: Decimal<4, 2>;
refundGapDays?: Int<4>;
refundCompensateRatio?: Int<4>;
allowWithdrawTransfer: Boolean;
withdrawTransferLossRatio?: Decimal<4, 2>;
price: Price;
}
export type Action = 'pay' | 'refund' | 'deposit' | 'withdraw' | 'tax';
export declare const entityDesc: EntityDesc<Schema, Action>;

View File

@ -0,0 +1,32 @@
;
export const entityDesc = {
locales: {
zh_CN: {
name: '抽象支付帐号',
attr: {
taxLossRatio: '渠道手续费(百分比)',
refundGapDays: '(支付后)允许退款的天数',
refundCompensateRatio: '退款补偿百分比',
allowWithdrawTransfer: '允许提现转账',
withdrawTransferLossRatio: '提现转账费率(百分数)',
price: '余额',
},
action: {
pay: '支付',
refund: '退款',
deposit: '充值',
withdraw: '提现',
tax: '渠道费',
}
},
},
style: {
icon: {
pay: '',
refund: '',
deposit: '',
withdraw: '',
tax: '',
}
}
};

10
es/entities/AbstractShipAccount.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
import { String, Int, Decimal } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { EntityDesc } from 'oak-domain/lib/types';
export interface Schema extends EntityShape {
bizId?: String<128>;
sort: Decimal<4, 10>;
phatom1?: Int<8>;
phatom2?: String<64>;
}
export declare const entityDesc: EntityDesc<Schema>;

View File

@ -0,0 +1,14 @@
;
export const entityDesc = {
locales: {
zh_CN: {
name: '抽象快递帐号',
attr: {
phatom1: '备用属性一',
phatom2: '备用属性二',
bizId: '面单Id',
sort: '排序',
},
},
},
};

View File

@ -3,9 +3,9 @@ import { EntityDesc } from 'oak-domain/lib/types';
import { Schema as System } from './System';
import { Schema as Pay } from './Pay';
import { Schema as SysAccountOper } from './SysAccountOper';
import { Schema as AbstractAccount } from './AbstractAccount';
import { Schema as AbstractPayAccount } from './AbstractPayAccount';
import { Schema as WithdrawChannel } from './WithdrawChannel';
export interface Schema extends AbstractAccount {
export interface Schema extends AbstractPayAccount {
type: 'bank' | 'alipay' | 'wechat' | 'shouqianba' | 'others';
channel?: String<32>;
name?: String<64>;

View File

@ -28,8 +28,8 @@ export interface Schema extends EntityShape {
export type IAction = 'startPaying' | 'payAll' | 'payPartially' | 'payNone' | 'timeout' | 'cancel' | 'startRefunding' | 'refundAll' | 'refundPartially' | 'refundNone';
export type IState = 'unpaid' | 'timeout' | 'cancelled' | 'paying' | 'partiallyPaid' | 'paid' | 'refunding' | 'partiallyRefunded' | 'refunded';
export declare const IActionDef: ActionDef<IAction, IState>;
export type GState = 'staging' | 'shipped' | 'unshipped' | 'received' | 'taken';
export type GAction = 'send' | 'receive' | 'store' | 'take' | 'turnBack' | 'unship';
export type GState = 'staging' | 'shipped' | 'unshipped' | 'received' | 'taken' | 'taking';
export type GAction = 'send' | 'receive' | 'store' | 'take' | 'startTaking' | 'cancelTaking' | 'completeTaking' | 'turnBack' | 'unship';
export declare const GActionDef: ActionDef<GAction, GState>;
export type Action = IAction | GAction | 'settle';
export declare const entityDesc: EntityDesc<Schema, Action, '', {

View File

@ -22,6 +22,9 @@ export const GActionDef = {
unship: [['shipped', 'staging'], 'unshipped'],
turnBack: ['shipped', 'unshipped'],
take: [['staging'], 'taken'],
startTaking: ['staging', 'taking'],
cancelTaking: ['taking', 'staging'],
completeTaking: ['taking', 'taken'],
},
is: 'unshipped',
};
@ -97,7 +100,10 @@ export const entityDesc = {
receive: '收货',
settle: '结算',
turnBack: '退还',
unship: '入库'
unship: '入库',
startTaking: '开始提货流程',
completeTaking: '完成提货流程',
cancelTaking: '取消提货流程',
},
v: {
iState: {
@ -116,7 +122,8 @@ export const entityDesc = {
shipped: '已发货',
received: '已收货',
staging: '寄存中',
taken: '已取货',
taken: '已提货',
taking: '提货流程中',
},
receivingMethod: {
express: '配送',
@ -137,6 +144,16 @@ export const entityDesc = {
refundAll: '',
refundNone: '',
refundPartially: '',
send: '',
store: '',
take: '',
receive: '',
settle: '',
turnBack: '',
unship: '',
startTaking: '',
completeTaking: '',
cancelTaking: '',
},
color: {
iState: {
@ -156,6 +173,7 @@ export const entityDesc = {
received: '#1E8449',
staging: '#283747',
taken: '#117A65',
taking: '#FFC107',
},
receivingMethod: {
express: '#5DADE2',

View File

@ -9,6 +9,8 @@ export interface Schema extends EntityShape {
serial?: String<64>;
to?: Address;
from?: Address;
entity?: String<32>;
entityId?: String<64>;
phantom1?: String<32>;
phantom2?: String<32>;
phantom3?: Int<4>;

View File

@ -48,6 +48,8 @@ export const entityDesc = {
to: '收件地址',
from: '寄件地址',
iState: '状态',
entity: '关联对象',
entityId: '关联对象id',
phantom1: '索引项一',
phantom2: '索引项二',
phantom3: '索引项三',

13
es/entities/WechatMpShip.d.ts vendored Normal file
View File

@ -0,0 +1,13 @@
import { Boolean } from 'oak-domain/lib/types/DataType';
import { EntityDesc } from 'oak-domain/lib/types';
import { Schema as System } from './System';
import { Schema as AbstractShipAccount } from './AbstractShipAccount';
import { Schema as WpProduct } from './WpProduct';
import { Schema as Ship } from './Ship';
export interface Schema extends AbstractShipAccount {
wpProduct: WpProduct;
ships: Ship[];
disabled: Boolean;
system: System;
}
export declare const entityDesc: EntityDesc<Schema>;

View File

@ -0,0 +1,18 @@
;
export const entityDesc = {
locales: {
zh_CN: {
name: '微信小程序快递帐号',
attr: {
bizId: '面单Id',
sort: '排序',
phatom1: '备用属性一',
phatom2: '备用属性二',
wpProduct: '关联小程序支付',
disabled: '是否禁用',
ships: '关联快递',
system: '所属系统'
},
},
},
};

View File

@ -3,9 +3,9 @@ import { EntityDesc } from 'oak-domain/lib/types';
import { Schema as WechatPay } from './WechatPay';
import { Schema as System } from './System';
import { Schema as SysAccountOper } from './SysAccountOper';
import { Schema as AbstractAccount } from './AbstractAccount';
import { Schema as AbstractPayAccount } from './AbstractPayAccount';
import { Schema as WithdrawChannel } from './WithdrawChannel';
export interface Schema extends AbstractAccount {
export interface Schema extends AbstractPayAccount {
wechatPay: WechatPay;
mchId: String<128>;
publicKeyFilePath: Text;

View File

@ -10,7 +10,6 @@ export interface Schema extends EntityShape {
taxLossRatio?: Decimal<4, 2>;
application: Application;
enabled: Boolean;
shipping: Boolean;
pays: Pay[];
}
export declare const entityDesc: EntityDesc<Schema, '', '', {

View File

@ -9,7 +9,6 @@ export const entityDesc = {
application: '关联应用',
enabled: '有效中',
taxLossRatio: '产品手续费(百分比)',
shipping: '受发货限制',
pays: '支付',
},
v: {

View File

@ -2,13 +2,11 @@ import { Feature, BasicFeatures } from "oak-frontend-base";
import { FeatureDict as GeneralFeatures } from 'oak-general-business';
import { EntityDict } from '../oak-app-domain';
import { PayChannel, PayChannels } from '../types/Pay';
import { PayConfig } from "../types/PayConfig";
export default class Pay extends Feature {
private application;
private locales;
constructor(application: GeneralFeatures<EntityDict>['application'], locales: BasicFeatures<EntityDict>['locales']);
getPayChannels(type?: 'deposit' | 'pay', accountId?: string): PayChannels;
getPayConfigs(): PayConfig;
calcDepositLoss(price: number, channel: PayChannel): [number, string, any];
getDepositRatio(channel: string): number;
}

View File

@ -63,9 +63,6 @@ export default class Pay extends Feature {
}
return channels;
}
getPayConfigs() {
throw new Error('method not support anymore');
}
calcDepositLoss(price, channel) {
const { entity, entityId } = channel;
return getDepositLoss(price, this.application.getApplication());

View File

@ -0,0 +1,5 @@
import { GenericAction } from "oak-domain/lib/actions/action";
export type ParticularAction = 'pay' | 'refund' | 'deposit' | 'withdraw' | 'tax';
export declare const actions: string[];
export type Action = GenericAction | ParticularAction | string;
export declare const actionDefDict: {};

View File

@ -0,0 +1,2 @@
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "pay", "refund", "deposit", "withdraw", "tax"];
export const actionDefDict = {};

View File

@ -0,0 +1,19 @@
export * from "./_baseSchema";
import { AbstractPayAccount } from "../EntityDict";
export type Schema = AbstractPayAccount["Schema"];
export type Action = AbstractPayAccount["Action"];
export type Projection = AbstractPayAccount["Projection"];
export type Filter = AbstractPayAccount["Filter"];
export type SortNode = AbstractPayAccount["SortNode"];
export type Sorter = AbstractPayAccount["Sorter"];
export type Selection = AbstractPayAccount["Selection"];
export type Aggregation = AbstractPayAccount["Aggregation"];
export type CreateOperationData = AbstractPayAccount["CreateOperationData"];
export type CreateSingle = AbstractPayAccount["CreateSingle"];
export type CreateMulti = AbstractPayAccount["CreateMulti"];
export type Create = AbstractPayAccount["Create"];
export type UpdateOperationData = AbstractPayAccount["UpdateOperationData"];
export type Update = AbstractPayAccount["Update"];
export type RemoveOperationData = AbstractPayAccount["RemoveOperationData"];
export type Remove = AbstractPayAccount["Remove"];
export type Operation = AbstractPayAccount["Operation"];

View File

@ -0,0 +1 @@
export * from "./_baseSchema";

View File

@ -0,0 +1,3 @@
import { StorageDesc } from "oak-domain/lib/types/Storage";
import { OpSchema } from "./Schema";
export declare const desc: StorageDesc<OpSchema>;

View File

@ -0,0 +1,44 @@
import { actions } from "./Action";
export const desc = {
attributes: {
taxLossRatio: {
notNull: true,
type: "decimal",
params: {
precision: 4,
scale: 2
}
},
refundGapDays: {
type: "int",
params: {
width: 4,
signed: true
}
},
refundCompensateRatio: {
type: "int",
params: {
width: 4,
signed: true
}
},
allowWithdrawTransfer: {
notNull: true,
type: "boolean"
},
withdrawTransferLossRatio: {
type: "decimal",
params: {
precision: 4,
scale: 2
}
},
price: {
notNull: true,
type: "money"
}
},
actionType: "crud",
actions
};

View File

@ -0,0 +1,3 @@
import { Action, OpSchema } from "./Schema";
import { StyleDef } from "oak-domain/lib/types/Style";
export declare const style: StyleDef<OpSchema, Action>;

View File

@ -0,0 +1,9 @@
export const style = {
icon: {
pay: '',
refund: '',
deposit: '',
withdraw: '',
tax: '',
}
};

View File

@ -0,0 +1,56 @@
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, 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 { Decimal, Int, Boolean, Price } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
taxLossRatio: Decimal<4, 2>;
refundGapDays?: Int<4> | null;
refundCompensateRatio?: Int<4> | null;
allowWithdrawTransfer: Boolean;
withdrawTransferLossRatio?: Decimal<4, 2> | null;
price: Price;
} & {
[A in ExpressionKey]?: any;
};
export type OpAttr = keyof OpSchema;
export type OpFilter = {
id: Q_StringValue;
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
taxLossRatio: Q_NumberValue;
refundGapDays: Q_NumberValue;
refundCompensateRatio: Q_NumberValue;
allowWithdrawTransfer: Q_BooleanValue;
withdrawTransferLossRatio: Q_NumberValue;
price: Q_NumberValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
taxLossRatio?: number;
refundGapDays?: number;
refundCompensateRatio?: number;
allowWithdrawTransfer?: number;
withdrawTransferLossRatio?: number;
price?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
taxLossRatio: number;
refundGapDays: number;
refundCompensateRatio: number;
allowWithdrawTransfer: number;
withdrawTransferLossRatio: number;
price: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,18 @@
{
"name": "抽象支付帐号",
"attr": {
"taxLossRatio": "渠道手续费(百分比)",
"refundGapDays": "(支付后)允许退款的天数",
"refundCompensateRatio": "退款补偿百分比",
"allowWithdrawTransfer": "允许提现转账",
"withdrawTransferLossRatio": "提现转账费率(百分数)",
"price": "余额"
},
"action": {
"pay": "支付",
"refund": "退款",
"deposit": "充值",
"withdraw": "提现",
"tax": "渠道费"
}
}

View File

@ -0,0 +1,19 @@
export * from "./_baseSchema";
import { AbstractShipAccount } from "../EntityDict";
export type Schema = AbstractShipAccount["Schema"];
export type Action = AbstractShipAccount["Action"];
export type Projection = AbstractShipAccount["Projection"];
export type Filter = AbstractShipAccount["Filter"];
export type SortNode = AbstractShipAccount["SortNode"];
export type Sorter = AbstractShipAccount["Sorter"];
export type Selection = AbstractShipAccount["Selection"];
export type Aggregation = AbstractShipAccount["Aggregation"];
export type CreateOperationData = AbstractShipAccount["CreateOperationData"];
export type CreateSingle = AbstractShipAccount["CreateSingle"];
export type CreateMulti = AbstractShipAccount["CreateMulti"];
export type Create = AbstractShipAccount["Create"];
export type UpdateOperationData = AbstractShipAccount["UpdateOperationData"];
export type Update = AbstractShipAccount["Update"];
export type RemoveOperationData = AbstractShipAccount["RemoveOperationData"];
export type Remove = AbstractShipAccount["Remove"];
export type Operation = AbstractShipAccount["Operation"];

View File

@ -0,0 +1 @@
export * from "./_baseSchema";

View File

@ -0,0 +1,3 @@
import { StorageDesc } from "oak-domain/lib/types/Storage";
import { OpSchema } from "./Schema";
export declare const desc: StorageDesc<OpSchema>;

View File

@ -0,0 +1,34 @@
import { genericActions as actions } from "oak-domain/lib/actions/action";
export const desc = {
attributes: {
bizId: {
type: "varchar",
params: {
length: 128
}
},
sort: {
notNull: true,
type: "decimal",
params: {
precision: 4,
scale: 10
}
},
phatom1: {
type: "int",
params: {
width: 8,
signed: true
}
},
phatom2: {
type: "varchar",
params: {
length: 64
}
}
},
actionType: "crud",
actions
};

View File

@ -0,0 +1,48 @@
import { Q_DateValue, Q_NumberValue, Q_StringValue, 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 { String, Decimal, Int } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
bizId?: String<128> | null;
sort: Decimal<4, 10>;
phatom1?: Int<8> | null;
phatom2?: String<64> | null;
} & {
[A in ExpressionKey]?: any;
};
export type OpAttr = keyof OpSchema;
export type OpFilter = {
id: Q_StringValue;
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
bizId: Q_StringValue;
sort: Q_NumberValue;
phatom1: Q_NumberValue;
phatom2: Q_StringValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
bizId?: number;
sort?: number;
phatom1?: number;
phatom2?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
bizId: number;
sort: number;
phatom1: number;
phatom2: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;
export type OpUpdateAction = "update" | string;

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,9 @@
{
"name": "抽象快递帐号",
"attr": {
"phatom1": "备用属性一",
"phatom2": "备用属性二",
"bizId": "面单Id",
"sort": "排序"
}
}

View File

@ -43,7 +43,7 @@ export declare const actionDefDict: {
wechatPublicTag: {
iState: import("oak-domain/lib/types").ActionDef<string, string>;
};
abstractAccount: {};
abstractPayAccount: {};
account: {
ableState: import("oak-domain/lib/types").ActionDef<import("oak-domain/lib/actions/action").AbleAction, import("oak-domain/lib/actions/action").AbleState>;
};

View File

@ -15,7 +15,7 @@ import { actionDefDict as userWechatPublicTag } from "./UserWechatPublicTag/Acti
import { actionDefDict as wechatLogin } from "./WechatLogin/Action";
import { actionDefDict as wechatMenu } from "./WechatMenu/Action";
import { actionDefDict as wechatPublicTag } from "./WechatPublicTag/Action";
import { actionDefDict as abstractAccount } from "./AbstractAccount/Action";
import { actionDefDict as abstractPayAccount } from "./AbstractPayAccount/Action";
import { actionDefDict as account } from "./Account/Action";
import { actionDefDict as deposit } from "./Deposit/Action";
import { actionDefDict as offlineAccount } from "./OfflineAccount/Action";
@ -48,7 +48,7 @@ export const actionDefDict = {
wechatLogin,
wechatMenu,
wechatPublicTag,
abstractAccount,
abstractPayAccount,
account,
deposit,
offlineAccount,

View File

@ -58,7 +58,8 @@ import * as BaseWechatPublicTag from "./WechatPublicTag/_baseSchema";
import * as BaseWechatQrCode from "./WechatQrCode/_baseSchema";
import * as BaseWechatTemplate from "./WechatTemplate/_baseSchema";
import * as BaseWechatUser from "./WechatUser/_baseSchema";
import * as BaseAbstractAccount from "./AbstractAccount/_baseSchema";
import * as BaseAbstractPayAccount from "./AbstractPayAccount/_baseSchema";
import * as BaseAbstractShipAccount from "./AbstractShipAccount/_baseSchema";
import * as BaseAccount from "./Account/_baseSchema";
import * as BaseAccountOper from "./AccountOper/_baseSchema";
import * as BaseDeposit from "./Deposit/_baseSchema";
@ -73,6 +74,7 @@ import * as BaseShipCompanySystem from "./ShipCompanySystem/_baseSchema";
import * as BaseShipOrder from "./ShipOrder/_baseSchema";
import * as BaseSysAccountMove from "./SysAccountMove/_baseSchema";
import * as BaseSysAccountOper from "./SysAccountOper/_baseSchema";
import * as BaseWechatMpShip from "./WechatMpShip/_baseSchema";
import * as BaseWechatPay from "./WechatPay/_baseSchema";
import * as BaseWithdraw from "./Withdraw/_baseSchema";
import * as BaseWithdrawAccount from "./WithdrawAccount/_baseSchema";
@ -2823,6 +2825,7 @@ export type System = {
order$system?: Array<Omit<Order["Schema"], "system">>;
shipCompanySystem$system?: Array<Omit<ShipCompanySystem["Schema"], "system">>;
sysAccountMove$system?: Array<Omit<SysAccountMove["Schema"], "system">>;
wechatMpShip$system?: Array<Omit<WechatMpShip["Schema"], "system">>;
wechatPay$system?: Array<Omit<WechatPay["Schema"], "system">>;
withdrawAccount$ofSystem?: Array<Omit<WithdrawAccount["Schema"], "ofSystem">>;
withdrawAccount$entity?: Array<Omit<WithdrawAccount["Schema"], "entity">>;
@ -2840,6 +2843,7 @@ export type System = {
order$system$$aggr?: AggregationResult<Omit<Order["Schema"], "system">>;
shipCompanySystem$system$$aggr?: AggregationResult<Omit<ShipCompanySystem["Schema"], "system">>;
sysAccountMove$system$$aggr?: AggregationResult<Omit<SysAccountMove["Schema"], "system">>;
wechatMpShip$system$$aggr?: AggregationResult<Omit<WechatMpShip["Schema"], "system">>;
wechatPay$system$$aggr?: AggregationResult<Omit<WechatPay["Schema"], "system">>;
withdrawAccount$ofSystem$$aggr?: AggregationResult<Omit<WithdrawAccount["Schema"], "ofSystem">>;
withdrawAccount$entity$$aggr?: AggregationResult<Omit<WithdrawAccount["Schema"], "entity">>;
@ -2920,6 +2924,12 @@ export type System = {
sysAccountMove$system$$aggr?: DeduceAggregation<Omit<SysAccountMove["Projection"], "system">, Omit<SysAccountMove["Filter"], "system">, SysAccountMove["Sorter"]> & {
$entity: "sysAccountMove";
};
wechatMpShip$system?: OakSelection<"select", Omit<WechatMpShip["Projection"], "system">, Omit<WechatMpShip["Filter"], "system">, WechatMpShip["Sorter"]> & {
$entity: "wechatMpShip";
};
wechatMpShip$system$$aggr?: DeduceAggregation<Omit<WechatMpShip["Projection"], "system">, Omit<WechatMpShip["Filter"], "system">, WechatMpShip["Sorter"]> & {
$entity: "wechatMpShip";
};
wechatPay$system?: OakSelection<"select", Omit<WechatPay["Projection"], "system">, Omit<WechatPay["Filter"], "system">, WechatPay["Sorter"]> & {
$entity: "wechatPay";
};
@ -2965,6 +2975,7 @@ export type System = {
order$system: MakeFilter<Omit<Order["FilterUnit"], "system">> & SubQueryPredicateMetadata;
shipCompanySystem$system: MakeFilter<Omit<ShipCompanySystem["FilterUnit"], "system">> & SubQueryPredicateMetadata;
sysAccountMove$system: MakeFilter<Omit<SysAccountMove["FilterUnit"], "system">> & SubQueryPredicateMetadata;
wechatMpShip$system: MakeFilter<Omit<WechatMpShip["FilterUnit"], "system">> & SubQueryPredicateMetadata;
wechatPay$system: MakeFilter<Omit<WechatPay["FilterUnit"], "system">> & SubQueryPredicateMetadata;
withdrawAccount$ofSystem: MakeFilter<Omit<WithdrawAccount["FilterUnit"], "ofSystem">> & SubQueryPredicateMetadata;
withdrawAccount$entity: MakeFilter<Omit<WithdrawAccount["FilterUnit"], "entity">> & SubQueryPredicateMetadata;
@ -2996,6 +3007,7 @@ export type System = {
order$system?: (OakOperation<"create", Omit<Order["CreateOperationData"], "system"> | Omit<Order["CreateOperationData"], "system">[]> | OakOperation<BaseOrder.OpUpdateAction, Omit<Order["UpdateOperationData"], "system">, Order["Filter"]>)[];
shipCompanySystem$system?: (OakOperation<"create", Omit<ShipCompanySystem["CreateOperationData"], "system"> | Omit<ShipCompanySystem["CreateOperationData"], "system">[]> | OakOperation<BaseShipCompanySystem.OpUpdateAction, Omit<ShipCompanySystem["UpdateOperationData"], "system">, ShipCompanySystem["Filter"]>)[];
sysAccountMove$system?: OakOperation<"create", Omit<SysAccountMove["CreateOperationData"], "system"> | Omit<SysAccountMove["CreateOperationData"], "system">[]>[];
wechatMpShip$system?: (OakOperation<"create", Omit<WechatMpShip["CreateOperationData"], "system"> | Omit<WechatMpShip["CreateOperationData"], "system">[]> | OakOperation<BaseWechatMpShip.OpUpdateAction, Omit<WechatMpShip["UpdateOperationData"], "system">, WechatMpShip["Filter"]>)[];
wechatPay$system?: (OakOperation<"create", Omit<WechatPay["CreateOperationData"], "system"> | Omit<WechatPay["CreateOperationData"], "system">[]> | OakOperation<BaseWechatPay.OpUpdateAction, Omit<WechatPay["UpdateOperationData"], "system">, WechatPay["Filter"]>)[];
withdrawAccount$ofSystem?: (OakOperation<"create", Omit<WithdrawAccount["CreateOperationData"], "ofSystem"> | Omit<WithdrawAccount["CreateOperationData"], "ofSystem">[]> | OakOperation<BaseWithdrawAccount.OpUpdateAction, Omit<WithdrawAccount["UpdateOperationData"], "ofSystem">, WithdrawAccount["Filter"]>)[];
withdrawAccount$entity?: (OakOperation<"create", Omit<WithdrawAccount["CreateOperationData"], "system"> | Omit<WithdrawAccount["CreateOperationData"], "system">[]> | OakOperation<BaseWithdrawAccount.OpUpdateAction, Omit<WithdrawAccount["UpdateOperationData"], "system">, WithdrawAccount["Filter"]>)[];
@ -3019,6 +3031,7 @@ export type System = {
order$system?: (OakOperation<"create", Omit<Order["CreateOperationData"], "system"> | Omit<Order["CreateOperationData"], "system">[]> | OakOperation<BaseOrder.OpUpdateAction, Omit<Order["UpdateOperationData"], "system">, Order["Filter"]> | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>)[];
shipCompanySystem$system?: (OakOperation<"create", Omit<ShipCompanySystem["CreateOperationData"], "system"> | Omit<ShipCompanySystem["CreateOperationData"], "system">[]> | OakOperation<BaseShipCompanySystem.OpUpdateAction, Omit<ShipCompanySystem["UpdateOperationData"], "system">, ShipCompanySystem["Filter"]> | OakOperation<"remove", ShipCompanySystem["RemoveOperationData"], ShipCompanySystem["Filter"]>)[];
sysAccountMove$system?: OakOperation<"create", Omit<SysAccountMove["CreateOperationData"], "system"> | Omit<SysAccountMove["CreateOperationData"], "system">[]>[];
wechatMpShip$system?: (OakOperation<"create", Omit<WechatMpShip["CreateOperationData"], "system"> | Omit<WechatMpShip["CreateOperationData"], "system">[]> | OakOperation<BaseWechatMpShip.OpUpdateAction, Omit<WechatMpShip["UpdateOperationData"], "system">, WechatMpShip["Filter"]> | OakOperation<"remove", WechatMpShip["RemoveOperationData"], WechatMpShip["Filter"]>)[];
wechatPay$system?: (OakOperation<"create", Omit<WechatPay["CreateOperationData"], "system"> | Omit<WechatPay["CreateOperationData"], "system">[]> | OakOperation<BaseWechatPay.OpUpdateAction, Omit<WechatPay["UpdateOperationData"], "system">, WechatPay["Filter"]> | OakOperation<"remove", WechatPay["RemoveOperationData"], WechatPay["Filter"]>)[];
withdrawAccount$ofSystem?: (OakOperation<"create", Omit<WithdrawAccount["CreateOperationData"], "ofSystem"> | Omit<WithdrawAccount["CreateOperationData"], "ofSystem">[]> | OakOperation<BaseWithdrawAccount.OpUpdateAction, Omit<WithdrawAccount["UpdateOperationData"], "ofSystem">, WithdrawAccount["Filter"]> | OakOperation<"remove", WithdrawAccount["RemoveOperationData"], WithdrawAccount["Filter"]>)[];
withdrawAccount$entity?: (OakOperation<"create", Omit<WithdrawAccount["CreateOperationData"], "system"> | Omit<WithdrawAccount["CreateOperationData"], "system">[]> | OakOperation<BaseWithdrawAccount.OpUpdateAction, Omit<WithdrawAccount["UpdateOperationData"], "system">, WithdrawAccount["Filter"]> | OakOperation<"remove", WithdrawAccount["RemoveOperationData"], WithdrawAccount["Filter"]>)[];
@ -3684,30 +3697,55 @@ export type WechatUser = {
Remove: OakOperation<"remove", WechatUser["RemoveOperationData"], WechatUser["Filter"], WechatUser["Sorter"]>;
Operation: WechatUser["Create"] | WechatUser["Update"] | WechatUser["Remove"];
};
export type AbstractAccount = {
OpSchema: BaseAbstractAccount.OpSchema;
Action: BaseAbstractAccount.OpAction;
Schema: BaseAbstractAccount.OpSchema & {};
Projection: BaseAbstractAccount.OpProjection & {};
FilterUnit: BaseAbstractAccount.OpFilter & {};
Filter: MakeFilter<AbstractAccount["FilterUnit"]>;
SortAttr: Partial<BaseAbstractAccount.OpSortAttr | {}>;
export type AbstractPayAccount = {
OpSchema: BaseAbstractPayAccount.OpSchema;
Action: BaseAbstractPayAccount.OpAction;
Schema: BaseAbstractPayAccount.OpSchema & {};
Projection: BaseAbstractPayAccount.OpProjection & {};
FilterUnit: BaseAbstractPayAccount.OpFilter & {};
Filter: MakeFilter<AbstractPayAccount["FilterUnit"]>;
SortAttr: Partial<BaseAbstractPayAccount.OpSortAttr | {}>;
SortNode: {
$attr: AbstractAccount["SortAttr"];
$attr: AbstractPayAccount["SortAttr"];
$direction?: "asc" | "desc";
};
Sorter: AbstractAccount["SortNode"][];
Selection: OakSelection<"select", AbstractAccount["Projection"], AbstractAccount["Filter"], AbstractAccount["Sorter"]>;
Aggregation: DeduceAggregation<AbstractAccount["Projection"], AbstractAccount["Filter"], AbstractAccount["Sorter"]>;
CreateOperationData: FormCreateData<BaseAbstractAccount.OpSchema>;
CreateSingle: OakOperation<"create", AbstractAccount["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<AbstractAccount["CreateOperationData"]>>;
Create: AbstractAccount["CreateSingle"] | AbstractAccount["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseAbstractAccount.OpSchema>;
Update: OakOperation<BaseAbstractAccount.OpUpdateAction, AbstractAccount["UpdateOperationData"], AbstractAccount["Filter"], AbstractAccount["Sorter"]>;
Sorter: AbstractPayAccount["SortNode"][];
Selection: OakSelection<"select", AbstractPayAccount["Projection"], AbstractPayAccount["Filter"], AbstractPayAccount["Sorter"]>;
Aggregation: DeduceAggregation<AbstractPayAccount["Projection"], AbstractPayAccount["Filter"], AbstractPayAccount["Sorter"]>;
CreateOperationData: FormCreateData<BaseAbstractPayAccount.OpSchema>;
CreateSingle: OakOperation<"create", AbstractPayAccount["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<AbstractPayAccount["CreateOperationData"]>>;
Create: AbstractPayAccount["CreateSingle"] | AbstractPayAccount["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseAbstractPayAccount.OpSchema>;
Update: OakOperation<BaseAbstractPayAccount.OpUpdateAction, AbstractPayAccount["UpdateOperationData"], AbstractPayAccount["Filter"], AbstractPayAccount["Sorter"]>;
RemoveOperationData: {};
Remove: OakOperation<"remove", AbstractAccount["RemoveOperationData"], AbstractAccount["Filter"], AbstractAccount["Sorter"]>;
Operation: AbstractAccount["Create"] | AbstractAccount["Update"] | AbstractAccount["Remove"];
Remove: OakOperation<"remove", AbstractPayAccount["RemoveOperationData"], AbstractPayAccount["Filter"], AbstractPayAccount["Sorter"]>;
Operation: AbstractPayAccount["Create"] | AbstractPayAccount["Update"] | AbstractPayAccount["Remove"];
};
export type AbstractShipAccount = {
OpSchema: BaseAbstractShipAccount.OpSchema;
Action: BaseAbstractShipAccount.OpAction;
Schema: BaseAbstractShipAccount.OpSchema & {};
Projection: BaseAbstractShipAccount.OpProjection & {};
FilterUnit: BaseAbstractShipAccount.OpFilter & {};
Filter: MakeFilter<AbstractShipAccount["FilterUnit"]>;
SortAttr: Partial<BaseAbstractShipAccount.OpSortAttr | {}>;
SortNode: {
$attr: AbstractShipAccount["SortAttr"];
$direction?: "asc" | "desc";
};
Sorter: AbstractShipAccount["SortNode"][];
Selection: OakSelection<"select", AbstractShipAccount["Projection"], AbstractShipAccount["Filter"], AbstractShipAccount["Sorter"]>;
Aggregation: DeduceAggregation<AbstractShipAccount["Projection"], AbstractShipAccount["Filter"], AbstractShipAccount["Sorter"]>;
CreateOperationData: FormCreateData<BaseAbstractShipAccount.OpSchema>;
CreateSingle: OakOperation<"create", AbstractShipAccount["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<AbstractShipAccount["CreateOperationData"]>>;
Create: AbstractShipAccount["CreateSingle"] | AbstractShipAccount["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseAbstractShipAccount.OpSchema>;
Update: OakOperation<BaseAbstractShipAccount.OpUpdateAction, AbstractShipAccount["UpdateOperationData"], AbstractShipAccount["Filter"], AbstractShipAccount["Sorter"]>;
RemoveOperationData: {};
Remove: OakOperation<"remove", AbstractShipAccount["RemoveOperationData"], AbstractShipAccount["Filter"], AbstractShipAccount["Sorter"]>;
Operation: AbstractShipAccount["Create"] | AbstractShipAccount["Update"] | AbstractShipAccount["Remove"];
};
export type Account = {
OpSchema: BaseAccount.OpSchema;
@ -4347,6 +4385,7 @@ export type Ship = {
shipCompany?: ShipCompany["Schema"];
to?: Address["Schema"];
from?: Address["Schema"];
wechatMpShip?: WechatMpShip["Schema"];
deposit$ship?: Array<Omit<Deposit["Schema"], "ship">>;
shipOrder$ship?: Array<Omit<ShipOrder["Schema"], "ship">>;
deposit$ship$$aggr?: AggregationResult<Omit<Deposit["Schema"], "ship">>;
@ -4356,6 +4395,7 @@ export type Ship = {
shipCompany?: ShipCompany["Projection"];
to?: Address["Projection"];
from?: Address["Projection"];
wechatMpShip?: WechatMpShip["Projection"];
deposit$ship?: OakSelection<"select", Omit<Deposit["Projection"], "ship">, Omit<Deposit["Filter"], "ship">, Deposit["Sorter"]> & {
$entity: "deposit";
};
@ -4373,6 +4413,7 @@ export type Ship = {
shipCompany: MakeFilter<ShipCompany["FilterUnit"]>;
to: MakeFilter<Address["FilterUnit"]>;
from: MakeFilter<Address["FilterUnit"]>;
wechatMpShip: MakeFilter<WechatMpShip["FilterUnit"]>;
deposit$ship: MakeFilter<Omit<Deposit["FilterUnit"], "ship">> & SubQueryPredicateMetadata;
shipOrder$ship: MakeFilter<Omit<ShipOrder["FilterUnit"], "ship">> & SubQueryPredicateMetadata;
};
@ -4381,6 +4422,7 @@ export type Ship = {
shipCompany: ShipCompany["SortAttr"];
to: Address["SortAttr"];
from: Address["SortAttr"];
wechatMpShip: WechatMpShip["SortAttr"];
}>;
SortNode: {
$attr: Ship["SortAttr"];
@ -4393,6 +4435,7 @@ export type Ship = {
shipCompany?: OakOperation<"create", ShipCompany["CreateOperationData"]> | OakOperation<BaseShipCompany.OpUpdateAction, ShipCompany["UpdateOperationData"], ShipCompany["Filter"]>;
to?: OakOperation<"create", Address["CreateOperationData"]> | OakOperation<BaseAddress.OpUpdateAction, Address["UpdateOperationData"], Address["Filter"]>;
from?: OakOperation<"create", Address["CreateOperationData"]> | OakOperation<BaseAddress.OpUpdateAction, Address["UpdateOperationData"], Address["Filter"]>;
wechatMpShip?: OakOperation<"create", WechatMpShip["CreateOperationData"]> | OakOperation<BaseWechatMpShip.OpUpdateAction, WechatMpShip["UpdateOperationData"], WechatMpShip["Filter"]>;
deposit$ship?: (OakOperation<"create", Omit<Deposit["CreateOperationData"], "ship"> | Omit<Deposit["CreateOperationData"], "ship">[]> | OakOperation<BaseDeposit.OpUpdateAction, Omit<Deposit["UpdateOperationData"], "ship">, Deposit["Filter"]>)[];
shipOrder$ship?: (OakOperation<"create", Omit<ShipOrder["CreateOperationData"], "ship"> | Omit<ShipOrder["CreateOperationData"], "ship">[]> | OakOperation<BaseShipOrder.OpUpdateAction, Omit<ShipOrder["UpdateOperationData"], "ship">, ShipOrder["Filter"]>)[];
}>;
@ -4403,6 +4446,7 @@ export type Ship = {
shipCompany?: OakOperation<"create", ShipCompany["CreateOperationData"]> | OakOperation<BaseShipCompany.OpUpdateAction, ShipCompany["UpdateOperationData"], ShipCompany["Filter"]> | OakOperation<"remove", ShipCompany["RemoveOperationData"], ShipCompany["Filter"]>;
to?: OakOperation<"create", Address["CreateOperationData"]> | OakOperation<BaseAddress.OpUpdateAction, Address["UpdateOperationData"], Address["Filter"]> | OakOperation<"remove", Address["RemoveOperationData"], Address["Filter"]>;
from?: OakOperation<"create", Address["CreateOperationData"]> | OakOperation<BaseAddress.OpUpdateAction, Address["UpdateOperationData"], Address["Filter"]> | OakOperation<"remove", Address["RemoveOperationData"], Address["Filter"]>;
wechatMpShip?: OakOperation<"create", WechatMpShip["CreateOperationData"]> | OakOperation<BaseWechatMpShip.OpUpdateAction, WechatMpShip["UpdateOperationData"], WechatMpShip["Filter"]> | OakOperation<"remove", WechatMpShip["RemoveOperationData"], WechatMpShip["Filter"]>;
deposit$ship?: (OakOperation<"create", Omit<Deposit["CreateOperationData"], "ship"> | Omit<Deposit["CreateOperationData"], "ship">[]> | OakOperation<BaseDeposit.OpUpdateAction, Omit<Deposit["UpdateOperationData"], "ship">, Deposit["Filter"]> | OakOperation<"remove", Deposit["RemoveOperationData"], Deposit["Filter"]>)[];
shipOrder$ship?: (OakOperation<"create", Omit<ShipOrder["CreateOperationData"], "ship"> | Omit<ShipOrder["CreateOperationData"], "ship">[]> | OakOperation<BaseShipOrder.OpUpdateAction, Omit<ShipOrder["UpdateOperationData"], "ship">, ShipOrder["Filter"]> | OakOperation<"remove", ShipOrder["RemoveOperationData"], ShipOrder["Filter"]>)[];
}>;
@ -4670,6 +4714,60 @@ export type SysAccountOper = {
Remove: OakOperation<"remove", SysAccountOper["RemoveOperationData"], SysAccountOper["Filter"], SysAccountOper["Sorter"]>;
Operation: SysAccountOper["Create"] | SysAccountOper["Update"] | SysAccountOper["Remove"];
};
export type WechatMpShip = {
OpSchema: BaseWechatMpShip.OpSchema;
Action: BaseWechatMpShip.OpAction;
Schema: BaseWechatMpShip.OpSchema & {
wpProduct: WpProduct["Schema"];
system: System["Schema"];
ship$entity?: Array<Omit<Ship["Schema"], "entity">>;
ship$entity$$aggr?: AggregationResult<Omit<Ship["Schema"], "entity">>;
};
Projection: BaseWechatMpShip.OpProjection & {
wpProduct?: WpProduct["Projection"];
system?: System["Projection"];
ship$entity?: OakSelection<"select", Omit<Ship["Projection"], "wechatMpShip">, Omit<Ship["Filter"], "wechatMpShip">, Ship["Sorter"]> & {
$entity: "ship";
};
ship$entity$$aggr?: DeduceAggregation<Omit<Ship["Projection"], "wechatMpShip">, Omit<Ship["Filter"], "wechatMpShip">, Ship["Sorter"]> & {
$entity: "ship";
};
};
FilterUnit: BaseWechatMpShip.OpFilter & {
wpProduct: MakeFilter<WpProduct["FilterUnit"]>;
system: MakeFilter<System["FilterUnit"]>;
ship$entity: MakeFilter<Omit<Ship["FilterUnit"], "entity">> & SubQueryPredicateMetadata;
};
Filter: MakeFilter<WechatMpShip["FilterUnit"]>;
SortAttr: Partial<BaseWechatMpShip.OpSortAttr | {
wpProduct: WpProduct["SortAttr"];
system: System["SortAttr"];
}>;
SortNode: {
$attr: WechatMpShip["SortAttr"];
$direction?: "asc" | "desc";
};
Sorter: WechatMpShip["SortNode"][];
Selection: OakSelection<"select", WechatMpShip["Projection"], WechatMpShip["Filter"], WechatMpShip["Sorter"]>;
Aggregation: DeduceAggregation<WechatMpShip["Projection"], WechatMpShip["Filter"], WechatMpShip["Sorter"]>;
CreateOperationData: FormCreateData<BaseWechatMpShip.OpSchema & {
wpProduct?: OakOperation<"create", WpProduct["CreateOperationData"]> | OakOperation<BaseWpProduct.OpUpdateAction, WpProduct["UpdateOperationData"], WpProduct["Filter"]>;
system?: OakOperation<"create", System["CreateOperationData"]> | OakOperation<BaseSystem.OpUpdateAction, System["UpdateOperationData"], System["Filter"]>;
ship$entity?: (OakOperation<"create", Omit<Ship["CreateOperationData"], "wechatMpShip"> | Omit<Ship["CreateOperationData"], "wechatMpShip">[]> | OakOperation<BaseShip.OpUpdateAction, Omit<Ship["UpdateOperationData"], "wechatMpShip">, Ship["Filter"]>)[];
}>;
CreateSingle: OakOperation<"create", WechatMpShip["CreateOperationData"]>;
CreateMulti: OakOperation<"create", Array<WechatMpShip["CreateOperationData"]>>;
Create: WechatMpShip["CreateSingle"] | WechatMpShip["CreateMulti"];
UpdateOperationData: FormUpdateData<BaseWechatMpShip.OpSchema & {
wpProduct?: OakOperation<"create", WpProduct["CreateOperationData"]> | OakOperation<BaseWpProduct.OpUpdateAction, WpProduct["UpdateOperationData"], WpProduct["Filter"]> | OakOperation<"remove", WpProduct["RemoveOperationData"], WpProduct["Filter"]>;
system?: OakOperation<"create", System["CreateOperationData"]> | OakOperation<BaseSystem.OpUpdateAction, System["UpdateOperationData"], System["Filter"]> | OakOperation<"remove", System["RemoveOperationData"], System["Filter"]>;
ship$entity?: (OakOperation<"create", Omit<Ship["CreateOperationData"], "wechatMpShip"> | Omit<Ship["CreateOperationData"], "wechatMpShip">[]> | OakOperation<BaseShip.OpUpdateAction, Omit<Ship["UpdateOperationData"], "wechatMpShip">, Ship["Filter"]> | OakOperation<"remove", Ship["RemoveOperationData"], Ship["Filter"]>)[];
}>;
Update: OakOperation<BaseWechatMpShip.OpUpdateAction, WechatMpShip["UpdateOperationData"], WechatMpShip["Filter"], WechatMpShip["Sorter"]>;
RemoveOperationData: {};
Remove: OakOperation<"remove", WechatMpShip["RemoveOperationData"], WechatMpShip["Filter"], WechatMpShip["Sorter"]>;
Operation: WechatMpShip["Create"] | WechatMpShip["Update"] | WechatMpShip["Remove"];
};
export type WechatPay = {
OpSchema: BaseWechatPay.OpSchema;
Action: BaseWechatPay.OpAction;
@ -5079,12 +5177,20 @@ export type WpProduct = {
Schema: BaseWpProduct.OpSchema & {
wpAccount: WpAccount["Schema"];
application: Application["Schema"];
wechatMpShip$wpProduct?: Array<Omit<WechatMpShip["Schema"], "wpProduct">>;
pay$entity?: Array<Omit<Pay["Schema"], "entity">>;
wechatMpShip$wpProduct$$aggr?: AggregationResult<Omit<WechatMpShip["Schema"], "wpProduct">>;
pay$entity$$aggr?: AggregationResult<Omit<Pay["Schema"], "entity">>;
};
Projection: BaseWpProduct.OpProjection & {
wpAccount?: WpAccount["Projection"];
application?: Application["Projection"];
wechatMpShip$wpProduct?: OakSelection<"select", Omit<WechatMpShip["Projection"], "wpProduct">, Omit<WechatMpShip["Filter"], "wpProduct">, WechatMpShip["Sorter"]> & {
$entity: "wechatMpShip";
};
wechatMpShip$wpProduct$$aggr?: DeduceAggregation<Omit<WechatMpShip["Projection"], "wpProduct">, Omit<WechatMpShip["Filter"], "wpProduct">, WechatMpShip["Sorter"]> & {
$entity: "wechatMpShip";
};
pay$entity?: OakSelection<"select", Omit<Pay["Projection"], "wpProduct">, Omit<Pay["Filter"], "wpProduct">, Pay["Sorter"]> & {
$entity: "pay";
};
@ -5095,6 +5201,7 @@ export type WpProduct = {
FilterUnit: BaseWpProduct.OpFilter & {
wpAccount: MakeFilter<WpAccount["FilterUnit"]>;
application: MakeFilter<Application["FilterUnit"]>;
wechatMpShip$wpProduct: MakeFilter<Omit<WechatMpShip["FilterUnit"], "wpProduct">> & SubQueryPredicateMetadata;
pay$entity: MakeFilter<Omit<Pay["FilterUnit"], "entity">> & SubQueryPredicateMetadata;
};
Filter: MakeFilter<WpProduct["FilterUnit"]>;
@ -5112,6 +5219,7 @@ export type WpProduct = {
CreateOperationData: FormCreateData<BaseWpProduct.OpSchema & {
wpAccount?: OakOperation<"create", WpAccount["CreateOperationData"]> | OakOperation<BaseWpAccount.OpUpdateAction, WpAccount["UpdateOperationData"], WpAccount["Filter"]>;
application?: OakOperation<"create", Application["CreateOperationData"]> | OakOperation<BaseApplication.OpUpdateAction, Application["UpdateOperationData"], Application["Filter"]>;
wechatMpShip$wpProduct?: (OakOperation<"create", Omit<WechatMpShip["CreateOperationData"], "wpProduct"> | Omit<WechatMpShip["CreateOperationData"], "wpProduct">[]> | OakOperation<BaseWechatMpShip.OpUpdateAction, Omit<WechatMpShip["UpdateOperationData"], "wpProduct">, WechatMpShip["Filter"]>)[];
pay$entity?: (OakOperation<"create", Omit<Pay["CreateOperationData"], "wpProduct"> | Omit<Pay["CreateOperationData"], "wpProduct">[]> | OakOperation<BasePay.OpUpdateAction, Omit<Pay["UpdateOperationData"], "wpProduct">, Pay["Filter"]>)[];
}>;
CreateSingle: OakOperation<"create", WpProduct["CreateOperationData"]>;
@ -5120,6 +5228,7 @@ export type WpProduct = {
UpdateOperationData: FormUpdateData<BaseWpProduct.OpSchema & {
wpAccount?: OakOperation<"create", WpAccount["CreateOperationData"]> | OakOperation<BaseWpAccount.OpUpdateAction, WpAccount["UpdateOperationData"], WpAccount["Filter"]> | OakOperation<"remove", WpAccount["RemoveOperationData"], WpAccount["Filter"]>;
application?: OakOperation<"create", Application["CreateOperationData"]> | OakOperation<BaseApplication.OpUpdateAction, Application["UpdateOperationData"], Application["Filter"]> | OakOperation<"remove", Application["RemoveOperationData"], Application["Filter"]>;
wechatMpShip$wpProduct?: (OakOperation<"create", Omit<WechatMpShip["CreateOperationData"], "wpProduct"> | Omit<WechatMpShip["CreateOperationData"], "wpProduct">[]> | OakOperation<BaseWechatMpShip.OpUpdateAction, Omit<WechatMpShip["UpdateOperationData"], "wpProduct">, WechatMpShip["Filter"]> | OakOperation<"remove", WechatMpShip["RemoveOperationData"], WechatMpShip["Filter"]>)[];
pay$entity?: (OakOperation<"create", Omit<Pay["CreateOperationData"], "wpProduct"> | Omit<Pay["CreateOperationData"], "wpProduct">[]> | OakOperation<BasePay.OpUpdateAction, Omit<Pay["UpdateOperationData"], "wpProduct">, Pay["Filter"]> | OakOperation<"remove", Pay["RemoveOperationData"], Pay["Filter"]>)[];
}>;
Update: OakOperation<BaseWpProduct.OpUpdateAction, WpProduct["UpdateOperationData"], WpProduct["Filter"], WpProduct["Sorter"]>;
@ -5186,7 +5295,8 @@ export type EntityDict = {
wechatQrCode: WechatQrCode;
wechatTemplate: WechatTemplate;
wechatUser: WechatUser;
abstractAccount: AbstractAccount;
abstractPayAccount: AbstractPayAccount;
abstractShipAccount: AbstractShipAccount;
account: Account;
accountOper: AccountOper;
deposit: Deposit;
@ -5201,6 +5311,7 @@ export type EntityDict = {
shipOrder: ShipOrder;
sysAccountMove: SysAccountMove;
sysAccountOper: SysAccountOper;
wechatMpShip: WechatMpShip;
wechatPay: WechatPay;
withdraw: Withdraw;
withdrawAccount: WithdrawAccount;

View File

@ -3,8 +3,8 @@ import { GenericAction } from "oak-domain/lib/actions/action";
export type IAction = 'startPaying' | 'payAll' | 'payPartially' | 'payNone' | 'timeout' | 'cancel' | 'startRefunding' | 'refundAll' | 'refundPartially' | 'refundNone' | string;
export type IState = 'unpaid' | 'timeout' | 'cancelled' | 'paying' | 'partiallyPaid' | 'paid' | 'refunding' | 'partiallyRefunded' | 'refunded' | string;
export declare const IActionDef: ActionDef<IAction, IState>;
export type GState = 'staging' | 'shipped' | 'unshipped' | 'received' | 'taken' | string;
export type GAction = 'send' | 'receive' | 'store' | 'take' | 'turnBack' | 'unship' | string;
export type GState = 'staging' | 'shipped' | 'unshipped' | 'received' | 'taken' | 'taking' | string;
export type GAction = 'send' | 'receive' | 'store' | 'take' | 'startTaking' | 'cancelTaking' | 'completeTaking' | 'turnBack' | 'unship' | string;
export declare const GActionDef: ActionDef<GAction, GState>;
export type ParticularAction = IAction | GAction | 'settle';
export declare const actions: string[];

View File

@ -21,10 +21,13 @@ export const GActionDef = {
unship: [['shipped', 'staging'], 'unshipped'],
turnBack: ['shipped', 'unshipped'],
take: [['staging'], 'taken'],
startTaking: ['staging', 'taking'],
cancelTaking: ['taking', 'staging'],
completeTaking: ['taking', 'taken'],
},
is: 'unshipped',
};
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "startPaying", "payAll", "payPartially", "payNone", "timeout", "cancel", "startRefunding", "refundAll", "refundPartially", "refundNone", "send", "receive", "store", "take", "turnBack", "unship", "settle"];
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "startPaying", "payAll", "payPartially", "payNone", "timeout", "cancel", "startRefunding", "refundAll", "refundPartially", "refundNone", "send", "receive", "store", "take", "startTaking", "cancelTaking", "completeTaking", "turnBack", "unship", "settle"];
export const actionDefDict = {
iState: IActionDef,
gState: GActionDef

View File

@ -82,7 +82,7 @@ export const desc = {
},
gState: {
type: "enum",
enumeration: ["staging", "shipped", "unshipped", "received", "taken"]
enumeration: ["staging", "shipped", "unshipped", "received", "taken", "taking"]
}
},
actionType: "crud",

View File

@ -10,6 +10,16 @@ export const style = {
refundAll: '',
refundNone: '',
refundPartially: '',
send: '',
store: '',
take: '',
receive: '',
settle: '',
turnBack: '',
unship: '',
startTaking: '',
completeTaking: '',
cancelTaking: '',
},
color: {
iState: {
@ -29,6 +39,7 @@ export const style = {
received: '#1E8449',
staging: '#283747',
taken: '#117A65',
taking: '#FFC107',
},
receivingMethod: {
express: '#5DADE2',

View File

@ -39,7 +39,10 @@
"receive": "收货",
"settle": "结算",
"turnBack": "退还",
"unship": "入库"
"unship": "入库",
"startTaking": "开始提货流程",
"completeTaking": "完成提货流程",
"cancelTaking": "取消提货流程"
},
"v": {
"iState": {
@ -58,7 +61,8 @@
"shipped": "已发货",
"received": "已收货",
"staging": "寄存中",
"taken": "已取货"
"taken": "已提货",
"taking": "提货流程中"
},
"receivingMethod": {
"express": "配送",

View File

@ -24,6 +24,19 @@ export const desc = {
type: "ref",
ref: "address"
},
entity: {
type: "varchar",
params: {
length: 32
},
ref: ["wechatMpShip"]
},
entityId: {
type: "varchar",
params: {
length: 64
}
},
phantom1: {
type: "varchar",
params: {

View File

@ -9,6 +9,8 @@ export type OpSchema = EntityShape & {
serial?: String<64> | null;
toId?: ForeignKey<"address"> | null;
fromId?: ForeignKey<"address"> | null;
entity?: ("wechatMpShip" | string) | null;
entityId?: String<64> | null;
phantom1?: String<32> | null;
phantom2?: String<32> | null;
phantom3?: Int<4> | null;
@ -28,6 +30,8 @@ export type OpFilter = {
serial: Q_StringValue;
toId: Q_StringValue;
fromId: Q_StringValue;
entity: Q_EnumValue<"wechatMpShip" | string>;
entityId: Q_StringValue;
phantom1: Q_StringValue;
phantom2: Q_StringValue;
phantom3: Q_NumberValue;
@ -46,6 +50,8 @@ export type OpProjection = {
serial?: number;
toId?: number;
fromId?: number;
entity?: number;
entityId?: number;
phantom1?: number;
phantom2?: number;
phantom3?: number;
@ -59,6 +65,8 @@ export type OpSortAttr = Partial<{
$$updateAt$$: number;
type: number;
serial: number;
entity: number;
entityId: number;
phantom1: number;
phantom2: number;
phantom3: number;

View File

@ -7,6 +7,8 @@
"to": "收件地址",
"from": "寄件地址",
"iState": "状态",
"entity": "关联对象",
"entityId": "关联对象id",
"phantom1": "索引项一",
"phantom2": "索引项二",
"phantom3": "索引项三",

View File

@ -56,7 +56,8 @@ import { desc as wechatPublicTagDesc } from "./WechatPublicTag/Storage";
import { desc as wechatQrCodeDesc } from "./WechatQrCode/Storage";
import { desc as wechatTemplateDesc } from "./WechatTemplate/Storage";
import { desc as wechatUserDesc } from "./WechatUser/Storage";
import { desc as abstractAccountDesc } from "./AbstractAccount/Storage";
import { desc as abstractPayAccountDesc } from "./AbstractPayAccount/Storage";
import { desc as abstractShipAccountDesc } from "./AbstractShipAccount/Storage";
import { desc as accountDesc } from "./Account/Storage";
import { desc as accountOperDesc } from "./AccountOper/Storage";
import { desc as depositDesc } from "./Deposit/Storage";
@ -71,6 +72,7 @@ import { desc as shipCompanySystemDesc } from "./ShipCompanySystem/Storage";
import { desc as shipOrderDesc } from "./ShipOrder/Storage";
import { desc as sysAccountMoveDesc } from "./SysAccountMove/Storage";
import { desc as sysAccountOperDesc } from "./SysAccountOper/Storage";
import { desc as wechatMpShipDesc } from "./WechatMpShip/Storage";
import { desc as wechatPayDesc } from "./WechatPay/Storage";
import { desc as withdrawDesc } from "./Withdraw/Storage";
import { desc as withdrawAccountDesc } from "./WithdrawAccount/Storage";
@ -137,7 +139,8 @@ export const storageSchema = {
wechatQrCode: wechatQrCodeDesc,
wechatTemplate: wechatTemplateDesc,
wechatUser: wechatUserDesc,
abstractAccount: abstractAccountDesc,
abstractPayAccount: abstractPayAccountDesc,
abstractShipAccount: abstractShipAccountDesc,
account: accountDesc,
accountOper: accountOperDesc,
deposit: depositDesc,
@ -152,6 +155,7 @@ export const storageSchema = {
shipOrder: shipOrderDesc,
sysAccountMove: sysAccountMoveDesc,
sysAccountOper: sysAccountOperDesc,
wechatMpShip: wechatMpShipDesc,
wechatPay: wechatPayDesc,
withdraw: withdrawDesc,
withdrawAccount: withdrawAccountDesc,

View File

@ -25,7 +25,7 @@ import { style as wechatMenu } from "./WechatMenu/Style";
import { style as wechatPublicTag } from "./WechatPublicTag/Style";
import { style as wechatQrCode } from "./WechatQrCode/Style";
import { style as wechatUser } from "./WechatUser/Style";
import { style as abstractAccount } from "./AbstractAccount/Style";
import { style as abstractPayAccount } from "./AbstractPayAccount/Style";
import { style as account } from "./Account/Style";
import { style as accountOper } from "./AccountOper/Style";
import { style as deposit } from "./Deposit/Style";
@ -71,7 +71,7 @@ export const styleDict = {
wechatPublicTag,
wechatQrCode,
wechatUser,
abstractAccount,
abstractPayAccount,
account,
accountOper,
deposit,

View File

@ -0,0 +1,19 @@
export * from "./_baseSchema";
import { WechatMpShip } from "../EntityDict";
export type Schema = WechatMpShip["Schema"];
export type Action = WechatMpShip["Action"];
export type Projection = WechatMpShip["Projection"];
export type Filter = WechatMpShip["Filter"];
export type SortNode = WechatMpShip["SortNode"];
export type Sorter = WechatMpShip["Sorter"];
export type Selection = WechatMpShip["Selection"];
export type Aggregation = WechatMpShip["Aggregation"];
export type CreateOperationData = WechatMpShip["CreateOperationData"];
export type CreateSingle = WechatMpShip["CreateSingle"];
export type CreateMulti = WechatMpShip["CreateMulti"];
export type Create = WechatMpShip["Create"];
export type UpdateOperationData = WechatMpShip["UpdateOperationData"];
export type Update = WechatMpShip["Update"];
export type RemoveOperationData = WechatMpShip["RemoveOperationData"];
export type Remove = WechatMpShip["Remove"];
export type Operation = WechatMpShip["Operation"];

View File

@ -0,0 +1 @@
export * from "./_baseSchema";

View File

@ -0,0 +1,3 @@
import { StorageDesc } from "oak-domain/lib/types/Storage";
import { OpSchema } from "./Schema";
export declare const desc: StorageDesc<OpSchema>;

View File

@ -0,0 +1,48 @@
import { genericActions as actions } from "oak-domain/lib/actions/action";
export const desc = {
attributes: {
bizId: {
type: "varchar",
params: {
length: 128
}
},
sort: {
notNull: true,
type: "decimal",
params: {
precision: 4,
scale: 10
}
},
phatom1: {
type: "int",
params: {
width: 8,
signed: true
}
},
phatom2: {
type: "varchar",
params: {
length: 64
}
},
wpProductId: {
notNull: true,
type: "ref",
ref: "wpProduct"
},
disabled: {
notNull: true,
type: "boolean"
},
systemId: {
notNull: true,
type: "ref",
ref: "system"
}
},
actionType: "crud",
actions
};

View File

@ -0,0 +1,59 @@
import { ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, 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 { String, Decimal, Int, Boolean } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
bizId?: String<128> | null;
sort: Decimal<4, 10>;
phatom1?: Int<8> | null;
phatom2?: String<64> | null;
wpProductId: ForeignKey<"wpProduct">;
disabled: Boolean;
systemId: ForeignKey<"system">;
} & {
[A in ExpressionKey]?: any;
};
export type OpAttr = keyof OpSchema;
export type OpFilter = {
id: Q_StringValue;
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
bizId: Q_StringValue;
sort: Q_NumberValue;
phatom1: Q_NumberValue;
phatom2: Q_StringValue;
wpProductId: Q_StringValue;
disabled: Q_BooleanValue;
systemId: Q_StringValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
bizId?: number;
sort?: number;
phatom1?: number;
phatom2?: number;
wpProductId?: number;
disabled?: number;
systemId?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
bizId: number;
sort: number;
phatom1: number;
phatom2: number;
disabled: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;
export type OpUpdateAction = "update" | string;

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,13 @@
{
"name": "微信小程序快递帐号",
"attr": {
"bizId": "面单Id",
"sort": "排序",
"phatom1": "备用属性一",
"phatom2": "备用属性二",
"wpProduct": "关联小程序支付",
"disabled": "是否禁用",
"ships": "关联快递",
"system": "所属系统"
}
}

View File

@ -26,10 +26,6 @@ export const desc = {
enabled: {
notNull: true,
type: "boolean"
},
shipping: {
notNull: true,
type: "boolean"
}
},
actionType: "crud",

View File

@ -9,7 +9,6 @@ export type OpSchema = EntityShape & {
taxLossRatio?: Decimal<4, 2> | null;
applicationId: ForeignKey<"application">;
enabled: Boolean;
shipping: Boolean;
} & {
[A in ExpressionKey]?: any;
};
@ -24,7 +23,6 @@ export type OpFilter = {
taxLossRatio: Q_NumberValue;
applicationId: Q_StringValue;
enabled: Q_BooleanValue;
shipping: Q_BooleanValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
@ -38,7 +36,6 @@ export type OpProjection = {
taxLossRatio?: number;
applicationId?: number;
enabled?: number;
shipping?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
@ -48,7 +45,6 @@ export type OpSortAttr = Partial<{
type: number;
taxLossRatio: number;
enabled: number;
shipping: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;

View File

@ -6,7 +6,6 @@
"application": "关联应用",
"enabled": "有效中",
"taxLossRatio": "产品手续费(百分比)",
"shipping": "受发货限制",
"pays": "支付"
},
"v": {

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