From efadcba56ea26438f0011a01c0ead24f21095555 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Mon, 7 Sep 2026 17:49:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(store):=20=E7=A7=BB=E9=99=A4=20wms=5Fstore?= =?UTF-8?q?=20=E5=B7=B2=E5=BA=9F=E5=BC=83=E7=9A=84=20logo=5Furl=E3=80=81do?= =?UTF-8?q?main=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - app/model/store.js、app/service/systems/store.js、app/service/systems/store_warehouse.js:移除 logo_url/domain 字段定义与创建写入,app/ 下无残留引用 - database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js:删除 wms_store 的 logo_url、domain 两列(开发库已执行完成) --- app/model/store.js | 10 --------- app/service/systems/store.js | 4 ---- app/service/systems/store_warehouse.js | 4 ---- ...drop-logo-url-and-domain-from-wms-store.js | 22 +++++++++++++++++++ 4 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js diff --git a/app/model/store.js b/app/model/store.js index 274c6cd..5a0538c 100644 --- a/app/model/store.js +++ b/app/model/store.js @@ -509,21 +509,11 @@ module.exports = app => { defaultValue: app.Sequelize.literal('CURRENT_TIMESTAMP'), comment: '更新时间', }, - logo_url: { - type: STRING(255), - allowNull: true, - comment: 'logo链接', - }, project: { type: STRING(20), allowNull: true, comment: '应用', }, - domain: { - type: STRING(100), - allowNull: true, - comment: '绑定域名', - }, auth_end: { type: DATE, allowNull: true, diff --git a/app/service/systems/store.js b/app/service/systems/store.js index d43daf9..f093303 100644 --- a/app/service/systems/store.js +++ b/app/service/systems/store.js @@ -237,8 +237,6 @@ class StoreService extends Service { status: 1, // 直接启用 created_by: userId, is_warehouse: 0, // 默认不是仓库 - logo_url: data.logo_url, - domain: data.domain, auth_start: data.auth_start, auth_end: data.auth_end, subject_config: subjectConfig, @@ -374,8 +372,6 @@ class StoreService extends Service { status: 1, // 直接通过 created_by: userId, is_warehouse: 1, // 标记为仓库 - logo_url: data.logo_url, - domain: data.domain, auth_start: new Date(), // 设置当前时间为授权开始时间 auth_end: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), // 默认授权7天试用 subject_config: subjectConfig, diff --git a/app/service/systems/store_warehouse.js b/app/service/systems/store_warehouse.js index 57b04b1..59e0896 100644 --- a/app/service/systems/store_warehouse.js +++ b/app/service/systems/store_warehouse.js @@ -3279,8 +3279,6 @@ class SettingStoreWarehouseService extends Service { * @param {string} [data.contact_email] 可选,联系邮箱。 * @param {string} [data.address] 可选,公司地址。 * @param {string} [data.industry] 可选,所属行业。 - * @param {string} [data.logo_url] 可选,Logo链接。 - * @param {string} [data.domain] 可选,绑定域名。 * @param {string} [data.auth_start] 可选,授权开始日期,默认当天。 * @param {string} [data.auth_end] 可选,授权结束日期。 * @param {number} [data.print_quantity=0] 可选,初始面单余额。 @@ -3374,8 +3372,6 @@ class SettingStoreWarehouseService extends Service { status: 1, created_by: accountId, is_warehouse: 0, - logo_url: data.logo_url || null, - domain: data.domain || null, auth_end: authEnd, }; diff --git a/database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js b/database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js new file mode 100644 index 0000000..9b4e33e --- /dev/null +++ b/database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = { + async up(queryInterface) { + await queryInterface.removeColumn('wms_store', 'logo_url'); + await queryInterface.removeColumn('wms_store', 'domain'); + }, + + async down(queryInterface, Sequelize) { + const { STRING } = Sequelize; + await queryInterface.addColumn('wms_store', 'logo_url', { + type: STRING(255), + allowNull: true, + comment: 'logo链接', + }); + await queryInterface.addColumn('wms_store', 'domain', { + type: STRING(100), + allowNull: true, + comment: '绑定域名', + }); + }, +};