From 6a45e2411b402c3cec84b0081995bd8515a8c30e Mon Sep 17 00:00:00 2001 From: Xc Date: Thu, 18 Jul 2024 20:50:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86smsTemplate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/aspects/withdraw.d.ts | 8 +- es/components/AbstractComponents.d.ts | 4 +- es/oak-app-domain/Application/Schema.d.ts | 4 +- es/oak-app-domain/Application/Storage.js | 1 - es/oak-app-domain/Article/locales/zh_CN.json | 2 +- .../ArticleMenu/locales/zh_CN.json | 2 +- es/oak-app-domain/Platform/Schema.d.ts | 4 +- es/oak-app-domain/Platform/Storage.js | 1 - es/oak-app-domain/SmsTemplate/Schema.d.ts | 11 +- es/oak-app-domain/SmsTemplate/Storage.js | 6 +- es/oak-app-domain/SmsTemplate/Style.d.ts | 3 + es/oak-app-domain/SmsTemplate/Style.js | 10 ++ .../SmsTemplate/locales/zh_CN.json | 2 +- es/oak-app-domain/StyleDict.js | 2 + es/oak-app-domain/System/Schema.d.ts | 8 +- es/oak-app-domain/System/Storage.js | 2 - .../WechatTemplate/locales/zh_CN.json | 2 +- es/utils/payClazz/WechatPay/index.d.ts | 2 +- lib/aspects/withdraw.d.ts | 8 +- lib/context/BackendRuntimeContext.d.ts | 2 +- lib/oak-app-domain/Application/Schema.d.ts | 4 +- lib/oak-app-domain/Application/Storage.js | 1 - lib/oak-app-domain/Article/locales/zh_CN.json | 2 +- .../ArticleMenu/locales/zh_CN.json | 2 +- lib/oak-app-domain/Platform/Schema.d.ts | 4 +- lib/oak-app-domain/Platform/Storage.js | 1 - lib/oak-app-domain/SmsTemplate/Schema.d.ts | 11 +- lib/oak-app-domain/SmsTemplate/Storage.js | 6 +- lib/oak-app-domain/SmsTemplate/Style.d.ts | 3 + lib/oak-app-domain/SmsTemplate/Style.js | 13 +++ .../SmsTemplate/locales/zh_CN.json | 2 +- lib/oak-app-domain/StyleDict.js | 102 +++++++++--------- lib/oak-app-domain/System/Schema.d.ts | 8 +- lib/oak-app-domain/System/Storage.js | 2 - .../WechatTemplate/locales/zh_CN.json | 2 +- lib/utils/application.d.ts | 2 +- lib/utils/payClazz/WechatPay/index.d.ts | 2 +- package.json | 8 +- 38 files changed, 141 insertions(+), 118 deletions(-) create mode 100644 es/oak-app-domain/SmsTemplate/Style.d.ts create mode 100644 es/oak-app-domain/SmsTemplate/Style.js create mode 100644 lib/oak-app-domain/SmsTemplate/Style.d.ts create mode 100644 lib/oak-app-domain/SmsTemplate/Style.js diff --git a/es/aspects/withdraw.d.ts b/es/aspects/withdraw.d.ts index 2ea225ee..5d27ce2e 100644 --- a/es/aspects/withdraw.d.ts +++ b/es/aspects/withdraw.d.ts @@ -3,7 +3,7 @@ export declare function getWithdrawCreateData(params: { accountId: string; price: number; withdrawAccountId?: string; -}, context: BRC): Promise<(Partial> & { +}, context: BRC): Promise<(Partial> & { id: string; } & { accountId: string; @@ -17,7 +17,7 @@ export declare function getWithdrawCreateData(params: { modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; -}) | (Partial> & { +}) | (Partial> & { id: string; } & { accountId: string; @@ -31,7 +31,7 @@ export declare function getWithdrawCreateData(params: { modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; -}) | (Partial> & { +}) | (Partial> & { id: string; } & { account?: undefined; @@ -45,7 +45,7 @@ export declare function getWithdrawCreateData(params: { modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; -}) | (Partial> & { +}) | (Partial> & { id: string; } & { account?: undefined; diff --git a/es/components/AbstractComponents.d.ts b/es/components/AbstractComponents.d.ts index 9251d752..18b3c16d 100644 --- a/es/components/AbstractComponents.d.ts +++ b/es/components/AbstractComponents.d.ts @@ -21,7 +21,7 @@ declare const List: (props: ReactComponentProps(props: { tablePagination?: any; rowSelection?: any; disableSerialNumber?: boolean | undefined; - size?: "large" | "middle" | "small" | undefined; + size?: "small" | "middle" | "large" | undefined; scroll?: any; empty?: any; opWidth?: number | undefined; diff --git a/es/oak-app-domain/Application/Schema.d.ts b/es/oak-app-domain/Application/Schema.d.ts index 428a7e3a..d0d68472 100644 --- a/es/oak-app-domain/Application/Schema.d.ts +++ b/es/oak-app-domain/Application/Schema.d.ts @@ -74,7 +74,7 @@ export type NativeConfig = { }; export type OpSchema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; type: AppType; systemId: ForeignKey<"system">; config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig; @@ -84,7 +84,7 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; type: AppType; systemId: ForeignKey<"system">; config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig; diff --git a/es/oak-app-domain/Application/Storage.js b/es/oak-app-domain/Application/Storage.js index ea7a505a..192d9c20 100644 --- a/es/oak-app-domain/Application/Storage.js +++ b/es/oak-app-domain/Application/Storage.js @@ -9,7 +9,6 @@ export const desc = { } }, description: { - notNull: true, type: "text" }, type: { diff --git a/es/oak-app-domain/Article/locales/zh_CN.json b/es/oak-app-domain/Article/locales/zh_CN.json index 7c853637..1e92d705 100644 --- a/es/oak-app-domain/Article/locales/zh_CN.json +++ b/es/oak-app-domain/Article/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "文章", "attr": { "name": "文章标题", "content": "请输入正文内容", "articleMenu": "文章菜单", "files": "文件" } } +{ "name": "文章", "attr": { "name": "标题", "content": "正文内容", "articleMenu": "菜单", "files": "文件" } } diff --git a/es/oak-app-domain/ArticleMenu/locales/zh_CN.json b/es/oak-app-domain/ArticleMenu/locales/zh_CN.json index 30c14756..47f4e0c5 100644 --- a/es/oak-app-domain/ArticleMenu/locales/zh_CN.json +++ b/es/oak-app-domain/ArticleMenu/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "图片" } } +{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "文件" } } diff --git a/es/oak-app-domain/Platform/Schema.d.ts b/es/oak-app-domain/Platform/Schema.d.ts index c8f77c8d..25c135b8 100644 --- a/es/oak-app-domain/Platform/Schema.d.ts +++ b/es/oak-app-domain/Platform/Schema.d.ts @@ -10,7 +10,7 @@ import * as Message from "../Message/Schema"; import * as System from "../System/Schema"; export type OpSchema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; style?: Style | null; entity?: String<32> | null; @@ -19,7 +19,7 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; style?: Style | null; entity?: String<32> | null; diff --git a/es/oak-app-domain/Platform/Storage.js b/es/oak-app-domain/Platform/Storage.js index 3006f963..4ac558a7 100644 --- a/es/oak-app-domain/Platform/Storage.js +++ b/es/oak-app-domain/Platform/Storage.js @@ -9,7 +9,6 @@ export const desc = { } }, description: { - notNull: true, type: "text" }, config: { diff --git a/es/oak-app-domain/SmsTemplate/Schema.d.ts b/es/oak-app-domain/SmsTemplate/Schema.d.ts index f7a7d9ff..fe0487d5 100644 --- a/es/oak-app-domain/SmsTemplate/Schema.d.ts +++ b/es/oak-app-domain/SmsTemplate/Schema.d.ts @@ -1,14 +1,15 @@ import { ForeignKey } from "oak-domain/lib/types/DataType"; -import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand"; +import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand"; import { OneOf } from "oak-domain/lib/types/Polyfill"; import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity"; import { GenericAction } from "oak-domain/lib/actions/action"; -import { String, Text, Datetime } from "oak-domain/lib/types/DataType"; +import { Text, String, Datetime } from "oak-domain/lib/types/DataType"; import * as System from "../System/Schema"; import * as MessageTypeSmsTemplate from "../MessageTypeSmsTemplate/Schema"; +export type Origin = "ali" | "tencent" | "ctyun" | "qiniu"; export type OpSchema = EntityShape & { systemId: ForeignKey<"system">; - origin: String<64>; + origin: Origin; templateName: Text; templateCode: String<64>; templateContent: Text; @@ -17,7 +18,7 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { systemId: ForeignKey<"system">; - origin: String<64>; + origin: Origin; templateName: Text; templateCode: String<64>; templateContent: Text; @@ -35,7 +36,7 @@ type AttrFilter = { $$updateAt$$: Q_DateValue; systemId: Q_StringValue; system: System.Filter; - origin: Q_StringValue; + origin: Q_EnumValue; templateName: Q_StringValue; templateCode: Q_StringValue; templateContent: Q_StringValue; diff --git a/es/oak-app-domain/SmsTemplate/Storage.js b/es/oak-app-domain/SmsTemplate/Storage.js index 3a11c58d..b49fe1e3 100644 --- a/es/oak-app-domain/SmsTemplate/Storage.js +++ b/es/oak-app-domain/SmsTemplate/Storage.js @@ -8,10 +8,8 @@ export const desc = { }, origin: { notNull: true, - type: "varchar", - params: { - length: 64 - } + type: "enum", + enumeration: ["ali", "tencent", "ctyun", "qiniu"] }, templateName: { notNull: true, diff --git a/es/oak-app-domain/SmsTemplate/Style.d.ts b/es/oak-app-domain/SmsTemplate/Style.d.ts new file mode 100644 index 00000000..a0bf8206 --- /dev/null +++ b/es/oak-app-domain/SmsTemplate/Style.d.ts @@ -0,0 +1,3 @@ +import { EntityDef } from "./Schema"; +import { StyleDef } from "oak-domain/lib/types/Style"; +export declare const style: StyleDef; diff --git a/es/oak-app-domain/SmsTemplate/Style.js b/es/oak-app-domain/SmsTemplate/Style.js new file mode 100644 index 00000000..93a7cf4a --- /dev/null +++ b/es/oak-app-domain/SmsTemplate/Style.js @@ -0,0 +1,10 @@ +export const style = { + color: { + origin: { + ali: '#1677ff', + tencent: '#0052d9', + ctyun: '#ff0000', + qiniu: '#37caff', + }, + }, +}; diff --git a/es/oak-app-domain/SmsTemplate/locales/zh_CN.json b/es/oak-app-domain/SmsTemplate/locales/zh_CN.json index f21e9b5d..ebd506d6 100644 --- a/es/oak-app-domain/SmsTemplate/locales/zh_CN.json +++ b/es/oak-app-domain/SmsTemplate/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "微信模板", "attr": { "system": "系统", "origin": "源", "templateName": "模板名称", "templateCode": "模板Code", "templateContent": "模板内容", "syncAt": "同步时间" } } +{ "name": "短信模板", "attr": { "system": "系统", "origin": "源", "templateName": "模板名称", "templateCode": "模板Code", "templateContent": "模板内容", "syncAt": "同步时间" }, "v": { "origin": { "ali": "阿里云", "tencent": "腾讯云", "ctyun": "天翼云", "qiniu": "七牛云" } } } diff --git a/es/oak-app-domain/StyleDict.js b/es/oak-app-domain/StyleDict.js index 35c670df..d0258ba0 100644 --- a/es/oak-app-domain/StyleDict.js +++ b/es/oak-app-domain/StyleDict.js @@ -11,6 +11,7 @@ import { style as message } from "./Message/Style"; import { style as mobile } from "./Mobile/Style"; import { style as notification } from "./Notification/Style"; import { style as parasite } from "./Parasite/Style"; +import { style as smsTemplate } from "./SmsTemplate/Style"; import { style as toDo } from "./ToDo/Style"; import { style as token } from "./Token/Style"; import { style as userEntityGrant } from "./UserEntityGrant/Style"; @@ -50,6 +51,7 @@ export const styleDict = { mobile, notification, parasite, + smsTemplate, toDo, token, userEntityGrant, diff --git a/es/oak-app-domain/System/Schema.d.ts b/es/oak-app-domain/System/Schema.d.ts index b7a1194e..4f7847e8 100644 --- a/es/oak-app-domain/System/Schema.d.ts +++ b/es/oak-app-domain/System/Schema.d.ts @@ -36,10 +36,10 @@ type PayConfig = { }; export type OpSchema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; platformId?: ForeignKey<"platform"> | null; - folder: String<16>; + folder?: String<16> | null; super?: Boolean | null; style?: Style | null; entity?: String<32> | null; @@ -49,10 +49,10 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; platformId?: ForeignKey<"platform"> | null; - folder: String<16>; + folder?: String<16> | null; super?: Boolean | null; style?: Style | null; entity?: String<32> | null; diff --git a/es/oak-app-domain/System/Storage.js b/es/oak-app-domain/System/Storage.js index c61a6659..8140dbf8 100644 --- a/es/oak-app-domain/System/Storage.js +++ b/es/oak-app-domain/System/Storage.js @@ -9,7 +9,6 @@ export const desc = { } }, description: { - notNull: true, type: "text" }, config: { @@ -21,7 +20,6 @@ export const desc = { ref: "platform" }, folder: { - notNull: true, type: "varchar", params: { length: 16 diff --git a/es/oak-app-domain/WechatTemplate/locales/zh_CN.json b/es/oak-app-domain/WechatTemplate/locales/zh_CN.json index 28d55174..f79a27af 100644 --- a/es/oak-app-domain/WechatTemplate/locales/zh_CN.json +++ b/es/oak-app-domain/WechatTemplate/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "公众号标签", "attr": { "type": "类型", "application": "关联应用", "wechatId": "微信端id", "title": "标题", "primaryIndustry": "所属一级行业", "deputyIndustry": "所属二级行业", "content": "内容", "example": "示例", "param": "选填参数", "keywordEnumValueList": "枚举参数值范围", "syncAt": "同步时间" }, "v": { "type": { "2": "一次性订阅", "3": "长期订阅" } } } +{ "name": "微信消息模板", "attr": { "type": "类型", "application": "关联应用", "wechatId": "微信端id", "title": "标题", "primaryIndustry": "所属一级行业", "deputyIndustry": "所属二级行业", "content": "内容", "example": "示例", "param": "选填参数", "keywordEnumValueList": "枚举参数值范围", "syncAt": "同步时间" }, "v": { "type": { "2": "一次性订阅", "3": "长期订阅" } } } diff --git a/es/utils/payClazz/WechatPay/index.d.ts b/es/utils/payClazz/WechatPay/index.d.ts index eeba2b4b..ce1d041a 100644 --- a/es/utils/payClazz/WechatPay/index.d.ts +++ b/es/utils/payClazz/WechatPay/index.d.ts @@ -1,4 +1,4 @@ import WechatPay from './WechatPay'; import WechatPayDebug from './WechatPay.debug'; -declare const _default: typeof WechatPayDebug | typeof WechatPay; +declare const _default: typeof WechatPay | typeof WechatPayDebug; export default _default; diff --git a/lib/aspects/withdraw.d.ts b/lib/aspects/withdraw.d.ts index 2ea225ee..5d27ce2e 100644 --- a/lib/aspects/withdraw.d.ts +++ b/lib/aspects/withdraw.d.ts @@ -3,7 +3,7 @@ export declare function getWithdrawCreateData(params: { accountId: string; price: number; withdrawAccountId?: string; -}, context: BRC): Promise<(Partial> & { +}, context: BRC): Promise<(Partial> & { id: string; } & { accountId: string; @@ -17,7 +17,7 @@ export declare function getWithdrawCreateData(params: { modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; -}) | (Partial> & { +}) | (Partial> & { id: string; } & { accountId: string; @@ -31,7 +31,7 @@ export declare function getWithdrawCreateData(params: { modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; -}) | (Partial> & { +}) | (Partial> & { id: string; } & { account?: undefined; @@ -45,7 +45,7 @@ export declare function getWithdrawCreateData(params: { modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit[]> | import("oak-domain/lib/types").Operation<"create", Omit>[] | undefined; -}) | (Partial> & { +}) | (Partial> & { id: string; } & { account?: undefined; diff --git a/lib/context/BackendRuntimeContext.d.ts b/lib/context/BackendRuntimeContext.d.ts index e8536354..11c2072c 100644 --- a/lib/context/BackendRuntimeContext.d.ts +++ b/lib/context/BackendRuntimeContext.d.ts @@ -15,7 +15,7 @@ export declare class BackendRuntimeContext | undefined; + config?: number | import("oak-domain/lib/types").JsonProjection | undefined; style?: number | import("oak-domain/lib/types").JsonProjection | undefined; domainId?: number | undefined; domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined; diff --git a/lib/oak-app-domain/Application/Schema.d.ts b/lib/oak-app-domain/Application/Schema.d.ts index 428a7e3a..d0d68472 100644 --- a/lib/oak-app-domain/Application/Schema.d.ts +++ b/lib/oak-app-domain/Application/Schema.d.ts @@ -74,7 +74,7 @@ export type NativeConfig = { }; export type OpSchema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; type: AppType; systemId: ForeignKey<"system">; config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig; @@ -84,7 +84,7 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; type: AppType; systemId: ForeignKey<"system">; config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig; diff --git a/lib/oak-app-domain/Application/Storage.js b/lib/oak-app-domain/Application/Storage.js index dd408b6b..e4bc49ee 100644 --- a/lib/oak-app-domain/Application/Storage.js +++ b/lib/oak-app-domain/Application/Storage.js @@ -12,7 +12,6 @@ exports.desc = { } }, description: { - notNull: true, type: "text" }, type: { diff --git a/lib/oak-app-domain/Article/locales/zh_CN.json b/lib/oak-app-domain/Article/locales/zh_CN.json index 7c853637..1e92d705 100644 --- a/lib/oak-app-domain/Article/locales/zh_CN.json +++ b/lib/oak-app-domain/Article/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "文章", "attr": { "name": "文章标题", "content": "请输入正文内容", "articleMenu": "文章菜单", "files": "文件" } } +{ "name": "文章", "attr": { "name": "标题", "content": "正文内容", "articleMenu": "菜单", "files": "文件" } } diff --git a/lib/oak-app-domain/ArticleMenu/locales/zh_CN.json b/lib/oak-app-domain/ArticleMenu/locales/zh_CN.json index 30c14756..47f4e0c5 100644 --- a/lib/oak-app-domain/ArticleMenu/locales/zh_CN.json +++ b/lib/oak-app-domain/ArticleMenu/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "图片" } } +{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "文件" } } diff --git a/lib/oak-app-domain/Platform/Schema.d.ts b/lib/oak-app-domain/Platform/Schema.d.ts index c8f77c8d..25c135b8 100644 --- a/lib/oak-app-domain/Platform/Schema.d.ts +++ b/lib/oak-app-domain/Platform/Schema.d.ts @@ -10,7 +10,7 @@ import * as Message from "../Message/Schema"; import * as System from "../System/Schema"; export type OpSchema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; style?: Style | null; entity?: String<32> | null; @@ -19,7 +19,7 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; style?: Style | null; entity?: String<32> | null; diff --git a/lib/oak-app-domain/Platform/Storage.js b/lib/oak-app-domain/Platform/Storage.js index 1488e067..32c48822 100644 --- a/lib/oak-app-domain/Platform/Storage.js +++ b/lib/oak-app-domain/Platform/Storage.js @@ -12,7 +12,6 @@ exports.desc = { } }, description: { - notNull: true, type: "text" }, config: { diff --git a/lib/oak-app-domain/SmsTemplate/Schema.d.ts b/lib/oak-app-domain/SmsTemplate/Schema.d.ts index f7a7d9ff..fe0487d5 100644 --- a/lib/oak-app-domain/SmsTemplate/Schema.d.ts +++ b/lib/oak-app-domain/SmsTemplate/Schema.d.ts @@ -1,14 +1,15 @@ import { ForeignKey } from "oak-domain/lib/types/DataType"; -import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand"; +import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand"; import { OneOf } from "oak-domain/lib/types/Polyfill"; import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity"; import { GenericAction } from "oak-domain/lib/actions/action"; -import { String, Text, Datetime } from "oak-domain/lib/types/DataType"; +import { Text, String, Datetime } from "oak-domain/lib/types/DataType"; import * as System from "../System/Schema"; import * as MessageTypeSmsTemplate from "../MessageTypeSmsTemplate/Schema"; +export type Origin = "ali" | "tencent" | "ctyun" | "qiniu"; export type OpSchema = EntityShape & { systemId: ForeignKey<"system">; - origin: String<64>; + origin: Origin; templateName: Text; templateCode: String<64>; templateContent: Text; @@ -17,7 +18,7 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { systemId: ForeignKey<"system">; - origin: String<64>; + origin: Origin; templateName: Text; templateCode: String<64>; templateContent: Text; @@ -35,7 +36,7 @@ type AttrFilter = { $$updateAt$$: Q_DateValue; systemId: Q_StringValue; system: System.Filter; - origin: Q_StringValue; + origin: Q_EnumValue; templateName: Q_StringValue; templateCode: Q_StringValue; templateContent: Q_StringValue; diff --git a/lib/oak-app-domain/SmsTemplate/Storage.js b/lib/oak-app-domain/SmsTemplate/Storage.js index 764ad1e2..340b2eba 100644 --- a/lib/oak-app-domain/SmsTemplate/Storage.js +++ b/lib/oak-app-domain/SmsTemplate/Storage.js @@ -11,10 +11,8 @@ exports.desc = { }, origin: { notNull: true, - type: "varchar", - params: { - length: 64 - } + type: "enum", + enumeration: ["ali", "tencent", "ctyun", "qiniu"] }, templateName: { notNull: true, diff --git a/lib/oak-app-domain/SmsTemplate/Style.d.ts b/lib/oak-app-domain/SmsTemplate/Style.d.ts new file mode 100644 index 00000000..a0bf8206 --- /dev/null +++ b/lib/oak-app-domain/SmsTemplate/Style.d.ts @@ -0,0 +1,3 @@ +import { EntityDef } from "./Schema"; +import { StyleDef } from "oak-domain/lib/types/Style"; +export declare const style: StyleDef; diff --git a/lib/oak-app-domain/SmsTemplate/Style.js b/lib/oak-app-domain/SmsTemplate/Style.js new file mode 100644 index 00000000..88eceb38 --- /dev/null +++ b/lib/oak-app-domain/SmsTemplate/Style.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.style = void 0; +exports.style = { + color: { + origin: { + ali: '#1677ff', + tencent: '#0052d9', + ctyun: '#ff0000', + qiniu: '#37caff', + }, + }, +}; diff --git a/lib/oak-app-domain/SmsTemplate/locales/zh_CN.json b/lib/oak-app-domain/SmsTemplate/locales/zh_CN.json index f21e9b5d..ebd506d6 100644 --- a/lib/oak-app-domain/SmsTemplate/locales/zh_CN.json +++ b/lib/oak-app-domain/SmsTemplate/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "微信模板", "attr": { "system": "系统", "origin": "源", "templateName": "模板名称", "templateCode": "模板Code", "templateContent": "模板内容", "syncAt": "同步时间" } } +{ "name": "短信模板", "attr": { "system": "系统", "origin": "源", "templateName": "模板名称", "templateCode": "模板Code", "templateContent": "模板内容", "syncAt": "同步时间" }, "v": { "origin": { "ali": "阿里云", "tencent": "腾讯云", "ctyun": "天翼云", "qiniu": "七牛云" } } } diff --git a/lib/oak-app-domain/StyleDict.js b/lib/oak-app-domain/StyleDict.js index 4240e170..506c65e8 100644 --- a/lib/oak-app-domain/StyleDict.js +++ b/lib/oak-app-domain/StyleDict.js @@ -14,31 +14,32 @@ const Style_10 = require("./Message/Style"); const Style_11 = require("./Mobile/Style"); const Style_12 = require("./Notification/Style"); const Style_13 = require("./Parasite/Style"); -const Style_14 = require("./ToDo/Style"); -const Style_15 = require("./Token/Style"); -const Style_16 = require("./UserEntityGrant/Style"); -const Style_17 = require("./UserWechatPublicTag/Style"); -const Style_18 = require("./WechatLogin/Style"); -const Style_19 = require("./WechatMenu/Style"); -const Style_20 = require("./WechatPublicTag/Style"); -const Style_21 = require("./WechatQrCode/Style"); -const Style_22 = require("./WechatUser/Style"); -const Style_23 = require("./AbstractAccount/Style"); -const Style_24 = require("./Account/Style"); -const Style_25 = require("./AccountOper/Style"); -const Style_26 = require("./Deposit/Style"); -const Style_27 = require("./OfflineAccount/Style"); -const Style_28 = require("./Order/Style"); -const Style_29 = require("./Pay/Style"); -const Style_30 = require("./Refund/Style"); -const Style_31 = require("./SysAccountOper/Style"); -const Style_32 = require("./User/Style"); -const Style_33 = require("./Withdraw/Style"); -const Style_34 = require("./WithdrawAccount/Style"); -const Style_35 = require("./WithdrawChannel/Style"); -const Style_36 = require("./WithdrawTransfer/Style"); -const Style_37 = require("./WpAccount/Style"); -const Style_38 = require("./WpProduct/Style"); +const Style_14 = require("./SmsTemplate/Style"); +const Style_15 = require("./ToDo/Style"); +const Style_16 = require("./Token/Style"); +const Style_17 = require("./UserEntityGrant/Style"); +const Style_18 = require("./UserWechatPublicTag/Style"); +const Style_19 = require("./WechatLogin/Style"); +const Style_20 = require("./WechatMenu/Style"); +const Style_21 = require("./WechatPublicTag/Style"); +const Style_22 = require("./WechatQrCode/Style"); +const Style_23 = require("./WechatUser/Style"); +const Style_24 = require("./AbstractAccount/Style"); +const Style_25 = require("./Account/Style"); +const Style_26 = require("./AccountOper/Style"); +const Style_27 = require("./Deposit/Style"); +const Style_28 = require("./OfflineAccount/Style"); +const Style_29 = require("./Order/Style"); +const Style_30 = require("./Pay/Style"); +const Style_31 = require("./Refund/Style"); +const Style_32 = require("./SysAccountOper/Style"); +const Style_33 = require("./User/Style"); +const Style_34 = require("./Withdraw/Style"); +const Style_35 = require("./WithdrawAccount/Style"); +const Style_36 = require("./WithdrawChannel/Style"); +const Style_37 = require("./WithdrawTransfer/Style"); +const Style_38 = require("./WpAccount/Style"); +const Style_39 = require("./WpProduct/Style"); exports.styleDict = { modi: Style_1.style, application: Style_2.style, @@ -53,29 +54,30 @@ exports.styleDict = { mobile: Style_11.style, notification: Style_12.style, parasite: Style_13.style, - toDo: Style_14.style, - token: Style_15.style, - userEntityGrant: Style_16.style, - userWechatPublicTag: Style_17.style, - wechatLogin: Style_18.style, - wechatMenu: Style_19.style, - wechatPublicTag: Style_20.style, - wechatQrCode: Style_21.style, - wechatUser: Style_22.style, - abstractAccount: Style_23.style, - account: Style_24.style, - accountOper: Style_25.style, - deposit: Style_26.style, - offlineAccount: Style_27.style, - order: Style_28.style, - pay: Style_29.style, - refund: Style_30.style, - sysAccountOper: Style_31.style, - user: Style_32.style, - withdraw: Style_33.style, - withdrawAccount: Style_34.style, - withdrawChannel: Style_35.style, - withdrawTransfer: Style_36.style, - wpAccount: Style_37.style, - wpProduct: Style_38.style + smsTemplate: Style_14.style, + toDo: Style_15.style, + token: Style_16.style, + userEntityGrant: Style_17.style, + userWechatPublicTag: Style_18.style, + wechatLogin: Style_19.style, + wechatMenu: Style_20.style, + wechatPublicTag: Style_21.style, + wechatQrCode: Style_22.style, + wechatUser: Style_23.style, + abstractAccount: Style_24.style, + account: Style_25.style, + accountOper: Style_26.style, + deposit: Style_27.style, + offlineAccount: Style_28.style, + order: Style_29.style, + pay: Style_30.style, + refund: Style_31.style, + sysAccountOper: Style_32.style, + user: Style_33.style, + withdraw: Style_34.style, + withdrawAccount: Style_35.style, + withdrawChannel: Style_36.style, + withdrawTransfer: Style_37.style, + wpAccount: Style_38.style, + wpProduct: Style_39.style }; diff --git a/lib/oak-app-domain/System/Schema.d.ts b/lib/oak-app-domain/System/Schema.d.ts index b7a1194e..4f7847e8 100644 --- a/lib/oak-app-domain/System/Schema.d.ts +++ b/lib/oak-app-domain/System/Schema.d.ts @@ -36,10 +36,10 @@ type PayConfig = { }; export type OpSchema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; platformId?: ForeignKey<"platform"> | null; - folder: String<16>; + folder?: String<16> | null; super?: Boolean | null; style?: Style | null; entity?: String<32> | null; @@ -49,10 +49,10 @@ export type OpSchema = EntityShape & { export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { name: String<32>; - description: Text; + description?: Text | null; config: Config; platformId?: ForeignKey<"platform"> | null; - folder: String<16>; + folder?: String<16> | null; super?: Boolean | null; style?: Style | null; entity?: String<32> | null; diff --git a/lib/oak-app-domain/System/Storage.js b/lib/oak-app-domain/System/Storage.js index 283bc886..f80b818d 100644 --- a/lib/oak-app-domain/System/Storage.js +++ b/lib/oak-app-domain/System/Storage.js @@ -12,7 +12,6 @@ exports.desc = { } }, description: { - notNull: true, type: "text" }, config: { @@ -24,7 +23,6 @@ exports.desc = { ref: "platform" }, folder: { - notNull: true, type: "varchar", params: { length: 16 diff --git a/lib/oak-app-domain/WechatTemplate/locales/zh_CN.json b/lib/oak-app-domain/WechatTemplate/locales/zh_CN.json index 28d55174..f79a27af 100644 --- a/lib/oak-app-domain/WechatTemplate/locales/zh_CN.json +++ b/lib/oak-app-domain/WechatTemplate/locales/zh_CN.json @@ -1 +1 @@ -{ "name": "公众号标签", "attr": { "type": "类型", "application": "关联应用", "wechatId": "微信端id", "title": "标题", "primaryIndustry": "所属一级行业", "deputyIndustry": "所属二级行业", "content": "内容", "example": "示例", "param": "选填参数", "keywordEnumValueList": "枚举参数值范围", "syncAt": "同步时间" }, "v": { "type": { "2": "一次性订阅", "3": "长期订阅" } } } +{ "name": "微信消息模板", "attr": { "type": "类型", "application": "关联应用", "wechatId": "微信端id", "title": "标题", "primaryIndustry": "所属一级行业", "deputyIndustry": "所属二级行业", "content": "内容", "example": "示例", "param": "选填参数", "keywordEnumValueList": "枚举参数值范围", "syncAt": "同步时间" }, "v": { "type": { "2": "一次性订阅", "3": "长期订阅" } } } diff --git a/lib/utils/application.d.ts b/lib/utils/application.d.ts index 260f0950..e7c4620e 100644 --- a/lib/utils/application.d.ts +++ b/lib/utils/application.d.ts @@ -14,7 +14,7 @@ export declare const mergedProjection: { type?: number | undefined; systemId?: number | undefined; system?: import("../oak-app-domain/System/Schema").Projection | undefined; - config?: number | import("oak-domain/lib/types").JsonProjection | undefined; + config?: number | import("oak-domain/lib/types").JsonProjection | undefined; style?: number | import("oak-domain/lib/types").JsonProjection | undefined; domainId?: number | undefined; domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined; diff --git a/lib/utils/payClazz/WechatPay/index.d.ts b/lib/utils/payClazz/WechatPay/index.d.ts index eeba2b4b..ce1d041a 100644 --- a/lib/utils/payClazz/WechatPay/index.d.ts +++ b/lib/utils/payClazz/WechatPay/index.d.ts @@ -1,4 +1,4 @@ import WechatPay from './WechatPay'; import WechatPayDebug from './WechatPay.debug'; -declare const _default: typeof WechatPayDebug | typeof WechatPay; +declare const _default: typeof WechatPay | typeof WechatPayDebug; export default _default; diff --git a/package.json b/package.json index 4b090c26..1e543fa7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oak-pay-business", - "version": "2.3.0", + "version": "2.3.1", "description": "", "files": [ "lib/**/*", @@ -29,9 +29,9 @@ "dependencies": { "classnames": "^2.3.1", "dayjs": "^1.11.5", - "oak-domain": "~5.0.16", - "oak-frontend-base": "~5.3.0", - "oak-general-business": "~5.2.8", + "oak-domain": "file:../oak-domain", + "oak-frontend-base": "file:../oak-frontend-base", + "oak-general-business": "file:../oak-general-business", "wechat-pay-nodejs": "^0.2.3" }, "peerDependencies": { From ef78e9b633f80df8d37f1e7891c0c16715368bff Mon Sep 17 00:00:00 2001 From: Xc Date: Thu, 18 Jul 2024 20:52:07 +0800 Subject: [PATCH 2/2] 2.3.1-pub --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1e543fa7..2a3d1118 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,9 @@ "dependencies": { "classnames": "^2.3.1", "dayjs": "^1.11.5", - "oak-domain": "file:../oak-domain", - "oak-frontend-base": "file:../oak-frontend-base", - "oak-general-business": "file:../oak-general-business", + "oak-domain": "~5.0.16", + "oak-frontend-base": "~5.3.0", + "oak-general-business": "~5.2.8", "wechat-pay-nodejs": "^0.2.3" }, "peerDependencies": {