by gateway: 支付应用的代码优化

This commit is contained in:
zhijiantianya@gmail.com
2023-07-12 12:52:48 +08:00
parent f1c4c7964a
commit 052e4689ee
22 changed files with 142 additions and 184 deletions

View File

@ -1,18 +1,3 @@
CREATE TABLE IF NOT EXISTS "pay_merchant" (
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"no" varchar(32) NOT NULL,
"name" varchar(64) NOT NULL,
"short_name" varchar(64) NOT NULL,
"status" tinyint NOT NULL,
"remark" varchar(255) DEFAULT NULL,
"creator" varchar(64) DEFAULT '',
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" varchar(64) DEFAULT '',
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit(1) NOT NULL DEFAULT FALSE,
PRIMARY KEY ("id")
) COMMENT '支付商户信息';
CREATE TABLE IF NOT EXISTS "pay_app" (
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"name" varchar(64) NOT NULL,
@ -20,14 +5,13 @@ CREATE TABLE IF NOT EXISTS "pay_app" (
"remark" varchar(255) DEFAULT NULL,
`pay_notify_url` varchar(1024) NOT NULL,
`refund_notify_url` varchar(1024) NOT NULL,
`merchant_id` bigint(20) NOT NULL,
"creator" varchar(64) DEFAULT '',
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" varchar(64) DEFAULT '',
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit(1) NOT NULL DEFAULT FALSE,
PRIMARY KEY ("id")
) COMMENT = '支付应用信息';
) COMMENT = '支付应用';
CREATE TABLE IF NOT EXISTS "pay_channel" (
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
@ -35,7 +19,6 @@ CREATE TABLE IF NOT EXISTS "pay_channel" (
"status" tinyint(4) NOT NULL,
"remark" varchar(255) DEFAULT NULL,
"fee_rate" double NOT NULL DEFAULT 0,
"merchant_id" bigint(20) NOT NULL,
"app_id" bigint(20) NOT NULL,
"config" varchar(10240) NOT NULL,
"creator" varchar(64) NULL DEFAULT '',
@ -49,7 +32,6 @@ CREATE TABLE IF NOT EXISTS "pay_channel" (
CREATE TABLE IF NOT EXISTS `pay_order` (
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
`merchant_id` bigint(20) NOT NULL,
`app_id` bigint(20) NOT NULL,
`channel_id` bigint(20) DEFAULT NULL,
`channel_code` varchar(32) DEFAULT NULL,
@ -82,7 +64,6 @@ CREATE TABLE IF NOT EXISTS `pay_order` (
CREATE TABLE IF NOT EXISTS `pay_refund` (
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
`merchant_id` bigint(20) NOT NULL,
`app_id` bigint(20) NOT NULL,
`channel_id` bigint(20) NOT NULL,
`channel_code` varchar(32) NOT NULL,