Forráskód Böngészése

Merge branch 'dev-yhq' into develop

tsurumure 1 hónapja
szülő
commit
ca1f6d6524
81 módosított fájl, 3341 hozzáadás és 1342 törlés
  1. 1 1
      db/__b2c_goods.sql
  2. 0 0
      db/__b2c_goods_brand.sql
  3. 0 0
      db/__b2c_goods_category.sql
  4. 0 0
      db/__b2c_goods_unit.sql
  5. 41 0
      db/b2c_good.sql
  6. 39 0
      db/b2c_good_brand.sql
  7. 23 0
      db/b2c_good_category.sql
  8. 29 0
      db/b2c_good_category_i18n.sql
  9. 46 0
      db/b2c_good_i18n.sql
  10. 73 0
      db/b2c_good_unit.sql
  11. 0 41
      db/b2c_goods.sql
  12. 4 2
      db/cms_article.sql
  13. 6 6
      db/crt_drama_project_storyboard.sql
  14. 1 1
      db/crt_model.sql
  15. 10 10
      db/sys_user_role_permission.sql
  16. 60 60
      src/main/java/com/backendsys/controller/B2c/B2cGoodBrandController.java
  17. 56 56
      src/main/java/com/backendsys/controller/B2c/B2cGoodCategoryController.java
  18. 65 65
      src/main/java/com/backendsys/controller/B2c/B2cGoodController.java
  19. 56 56
      src/main/java/com/backendsys/controller/B2c/B2cGoodUnitController.java
  20. 33 33
      src/main/java/com/backendsys/entity/B2c/B2cGoodBrandDTO.java
  21. 59 59
      src/main/java/com/backendsys/entity/B2c/B2cGoodDTO.java
  22. 9 9
      src/main/java/com/backendsys/entity/B2c/B2cGoodSpecSkuDTO.java
  23. 30 30
      src/main/java/com/backendsys/entity/B2c/B2cGoodUnitDTO.java
  24. 16 16
      src/main/java/com/backendsys/mapper/B2c/B2cGoodBrandMapper.java
  25. 68 68
      src/main/java/com/backendsys/mapper/B2c/B2cGoodBrandMapper.xml
  26. 16 16
      src/main/java/com/backendsys/mapper/B2c/B2cGoodCategoryMapper.java
  27. 73 73
      src/main/java/com/backendsys/mapper/B2c/B2cGoodCategoryMapper.xml
  28. 16 16
      src/main/java/com/backendsys/mapper/B2c/B2cGoodMapper.java
  29. 157 157
      src/main/java/com/backendsys/mapper/B2c/B2cGoodMapper.xml
  30. 16 16
      src/main/java/com/backendsys/mapper/B2c/B2cGoodUnitMapper.java
  31. 52 52
      src/main/java/com/backendsys/mapper/B2c/B2cGoodUnitMapper.xml
  32. 29 0
      src/main/java/com/backendsys/modules/b2c/good/controller/GoodBrandController.java
  33. 58 0
      src/main/java/com/backendsys/modules/b2c/good/controller/GoodCategoryController.java
  34. 56 0
      src/main/java/com/backendsys/modules/b2c/good/controller/GoodController.java
  35. 28 0
      src/main/java/com/backendsys/modules/b2c/good/controller/GoodUnitController.java
  36. 14 0
      src/main/java/com/backendsys/modules/b2c/good/dao/GoodBrandDao.java
  37. 18 0
      src/main/java/com/backendsys/modules/b2c/good/dao/GoodCategoryDao.java
  38. 16 0
      src/main/java/com/backendsys/modules/b2c/good/dao/GoodCategoryI18nDao.java
  39. 18 0
      src/main/java/com/backendsys/modules/b2c/good/dao/GoodDao.java
  40. 15 0
      src/main/java/com/backendsys/modules/b2c/good/dao/GoodI18nDao.java
  41. 9 0
      src/main/java/com/backendsys/modules/b2c/good/dao/GoodUnitDao.java
  42. 105 0
      src/main/java/com/backendsys/modules/b2c/good/entity/Good.java
  43. 27 0
      src/main/java/com/backendsys/modules/b2c/good/entity/GoodBrand.java
  44. 50 0
      src/main/java/com/backendsys/modules/b2c/good/entity/GoodCategory.java
  45. 36 0
      src/main/java/com/backendsys/modules/b2c/good/entity/GoodCategoryI18n.java
  46. 38 0
      src/main/java/com/backendsys/modules/b2c/good/entity/GoodI18n.java
  47. 19 0
      src/main/java/com/backendsys/modules/b2c/good/entity/GoodUnit.java
  48. 12 0
      src/main/java/com/backendsys/modules/b2c/good/service/GoodBrandService.java
  49. 21 0
      src/main/java/com/backendsys/modules/b2c/good/service/GoodCategoryService.java
  50. 20 0
      src/main/java/com/backendsys/modules/b2c/good/service/GoodService.java
  51. 12 0
      src/main/java/com/backendsys/modules/b2c/good/service/GoodUnitService.java
  52. 51 0
      src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodBrandServiceImpl.java
  53. 115 0
      src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodCategoryServiceImpl.java
  54. 118 0
      src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodServiceImpl.java
  55. 42 0
      src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodUnitServiceImpl.java
  56. 5 0
      src/main/java/com/backendsys/modules/cms/article/entity/Article.java
  57. 9 0
      src/main/java/com/backendsys/modules/crt/dao/CrtModelDao.java
  58. 7 7
      src/main/java/com/backendsys/modules/crt/entity/CrtDramaProjectStoryboard.java
  59. 16 0
      src/main/java/com/backendsys/modules/crt/entity/CrtModel.java
  60. 11 3
      src/main/java/com/backendsys/modules/crt/enums/SamplerEnums.java
  61. 450 81
      src/main/java/com/backendsys/modules/crt/service/impl/CrtGenerateServiceImpl.java
  62. 1 1
      src/main/java/com/backendsys/modules/sdk/comfyui/controller/ComfyUIDemoController.java
  63. 3 3
      src/main/java/com/backendsys/modules/sdk/comfyui/service/impl/ComfyUIServiceImpl.java
  64. 5 9
      src/main/java/com/backendsys/modules/sdk/tencentcloud/ems/controller/TencentEmsController.java
  65. 5 0
      src/main/java/com/backendsys/modules/sdk/tencentcloud/ems/entity/TencentEmsCallbackParams.java
  66. 16 35
      src/main/java/com/backendsys/modules/sdk/tencentcloud/ems/service/impl/TencentEmsCallbackServiceImpl.java
  67. 13 13
      src/main/java/com/backendsys/service/B2c/B2cGoodBrandService.java
  68. 72 72
      src/main/java/com/backendsys/service/B2c/B2cGoodBrandServiceImpl.java
  69. 13 13
      src/main/java/com/backendsys/service/B2c/B2cGoodCategoryService.java
  70. 72 72
      src/main/java/com/backendsys/service/B2c/B2cGoodCategoryServiceImpl.java
  71. 13 13
      src/main/java/com/backendsys/service/B2c/B2cGoodService.java
  72. 72 72
      src/main/java/com/backendsys/service/B2c/B2cGoodServiceImpl.java
  73. 13 13
      src/main/java/com/backendsys/service/B2c/B2cGoodUnitService.java
  74. 72 72
      src/main/java/com/backendsys/service/B2c/B2cGoodUnitServiceImpl.java
  75. 40 0
      src/main/resources/mapper/b2c/good/GoodBrandDao.xml
  76. 124 0
      src/main/resources/mapper/b2c/good/GoodCategoryDao.xml
  77. 36 0
      src/main/resources/mapper/b2c/good/GoodCategoryI18nDao.xml
  78. 237 0
      src/main/resources/mapper/b2c/good/GoodDao.xml
  79. 44 0
      src/main/resources/mapper/b2c/good/GoodI18nDao.xml
  80. 4 14
      src/main/resources/mapper/cms/article/ArticleDao.xml
  81. 6 6
      src/main/resources/mapper/crt/drama/CrtDramaProjectStoryboardDao.xml

+ 1 - 1
db/__b2c_goods.sql

@@ -15,7 +15,7 @@ CREATE TABLE `b2c_goods` (
     `good_description` VARCHAR(200) COMMENT '商品描述',
     `good_content` TEXT COMMENT '商品内容',
     `good_thumb` VARCHAR(1000) DEFAULT NULL COMMENT '商品缩略图',
-    `good_images` TEXT DEFAULT NULL COMMENT '商品图片',
+    `good_images` TEXT DEFAULT NULL COMMENT '商品图片 (多图片以逗号间隔)',
     `meta_keyword` VARCHAR(100) COMMENT 'SEO-Keyword',
     `meta_description` VARCHAR(200) COMMENT 'SEO-Description',
     `status` TINYINT(1) DEFAULT '-1' COMMENT '商品状态 (-1下架, 1上架)',

+ 0 - 0
db/b2c_goods_brand.sql → db/__b2c_goods_brand.sql


+ 0 - 0
db/b2c_goods_category.sql → db/__b2c_goods_category.sql


+ 0 - 0
db/b2c_goods_unit.sql → db/__b2c_goods_unit.sql


+ 41 - 0
db/b2c_good.sql

@@ -0,0 +1,41 @@
+/**
+Source Server Version: 8.0.31
+Source Database: backendsys
+Date: 2023/08/18 12:51:10
+*/
+
+DROP TABLE IF EXISTS `b2c_good`;
+CREATE TABLE `b2c_good` (
+    PRIMARY KEY (`id`),
+    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
+    `uid` VARCHAR(36) NOT NULL UNIQUE COMMENT 'UID',
+    `category_id` BIGINT NOT NULL COMMENT '商品分类ID',
+    `brand_id` BIGINT COMMENT '商品品牌ID',
+    `unit_id` BIGINT COMMENT '商品单位ID',
+    `good_thumb` VARCHAR(1000) DEFAULT NULL COMMENT '商品缩略图',
+    `good_images` TEXT DEFAULT NULL COMMENT '商品图片 (多图片以逗号间隔)',
+    `is_top` TINYINT(1) DEFAULT '-1' COMMENT '是否置顶 (-1否, 1是)',
+    `status` TINYINT(1) DEFAULT '-1' COMMENT '商品状态 (-1下架, 1上架)',
+    `del_flag` TINYINT(1) DEFAULT '-1' COMMENT '删除标志 (-1未删除, 1删除)',
+    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+    UNIQUE KEY (`uid`),
+    INDEX `idx_category_id` (`category_id`),
+    INDEX `idx_brand_id` (`brand_id`),
+    INDEX `idx_unit_id` (`unit_id`)
+) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商品表';
+
+INSERT INTO b2c_good(uid, category_id, brand_id, unit_id, status) VALUES
+    ('a1b2c3d4e1', 1, 1, 1, 1),
+    ('a1b2c3d4e2', 1, 1, 1, -1),
+    ('a1b2c3d4e3', 1, 1, 1, -1),
+    ('a1b2c3d4e4', 1, 1, 1, -1),
+    ('a1b2c3d4e5', 1, 1, 1, -1),
+    ('a1b2c3d4e6', 1, 1, 1, -1),
+    ('a1b2c3d4e7', 1, 1, 1, -1),
+    ('a1b2c3d4e8', 1, 1, 1, -1),
+    ('a1b2c3d4e9', 1, 1, 1, -1),
+    ('a1b2c3d4e0', 1, 1, 1, -1),
+    ('a1b2c3d410', 1, 1, 1, -1),
+    ('a1b2c3d411', 1, 1, 1, -1)
+;

+ 39 - 0
db/b2c_good_brand.sql

@@ -0,0 +1,39 @@
+/**
+Source Server Version: 8.0.31
+Source Database: backendsys
+Date: 2025/07/17 10:01:12
+*/
+
+DROP TABLE IF EXISTS `b2c_good_brand`;
+CREATE TABLE `b2c_good_brand` (
+    PRIMARY KEY (`id`),
+    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
+    `parent_id` BIGINT DEFAULT '-1' COMMENT '父ID',
+    `brand_name` VARCHAR(100) NOT NULL COMMENT '商品品牌名称',
+    `brand_name_en` VARCHAR(100) NOT NULL COMMENT '商品品牌名称 (英文)',
+    `sort` INT DEFAULT '1' COMMENT '排序',
+    `status` TINYINT(1) DEFAULT '1' COMMENT '商品品牌状态 (-1禁用, 1启用)',
+) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商品品牌表';
+
+INSERT INTO b2c_good_brand(parent_id, brand_name, brand_name_en, sort) VALUES
+    (-1, '优衣库', 'UNIQLO', 20),
+    (-1, 'ZARA', 'ZARA', 19),
+    (-1, 'H&M', 'H&M', 18),
+    (-1, '耐克', 'Nike', 17),
+        (4, 'Air Jordan', 'Air Jordan', 16),
+        (4, 'Nike SB', 'Nike Skateboarding', 15),
+    (-1, '阿迪达斯', 'Adidas', 14),
+    (-1, '路易威登', 'Louis Vuitton', 13),
+    (-1, '古驰', 'Gucci', 12),
+    (-1, '香奈儿', 'Chanel', 11),
+    (-1, '彪马', 'Puma', 10),
+    (-1, '李宁', 'Li-Ning', 9),
+    (-1, '安踏', 'ANTA', 8),
+    (-1, '太平鸟', 'PEACEBIRD', 7),
+    (-1, '杰克琼斯', 'Jack & Jones', 6),
+    (-1, 'Only', 'Only', 5),
+    (-1, 'Vero Moda', 'Vero Moda', 4),
+    (-1, '森马', 'Semir', 3),
+    (-1, '美特斯邦威', 'Meters/bonwe', 2),
+    (-1, '海澜之家', 'HLA', 1)
+;

+ 23 - 0
db/b2c_good_category.sql

@@ -0,0 +1,23 @@
+/**
+Source Server Version: 8.0.31
+Source Database: backendsys
+Date: 2025/07/17 10:24:20
+*/
+
+DROP TABLE IF EXISTS `b2c_good_category`;
+CREATE TABLE `b2c_good_category` (
+    PRIMARY KEY (`id`),
+    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
+    `parent_id` BIGINT DEFAULT '-1' COMMENT '父ID',
+    `sort` INT DEFAULT '1' COMMENT '排序',
+    `status` TINYINT(1) DEFAULT '1' COMMENT '商品分类状态 (-1禁用, 1启用)'
+) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商品分类表';
+
+INSERT INTO b2c_good_category(parent_id, sort) VALUES
+    (-1, 5),
+    (-1, 4),
+    (-1, 3),
+    (-1, 2),
+    (-1, 1)
+;
+

+ 29 - 0
db/b2c_good_category_i18n.sql

@@ -0,0 +1,29 @@
+/**
+Source Server Version: 8.0.31
+Source Database: backendsys
+Date: 2023/08/18 12:51:10
+*/
+
+DROP TABLE IF EXISTS `b2c_good_category_i18n`;
+CREATE TABLE `b2c_good_category_i18n` (
+    PRIMARY KEY (`id`),
+    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
+    `good_category_id` BIGINT NOT NULL COMMENT '分类ID',
+    `language` VARCHAR(10) NOT NULL COMMENT '语种',
+    `category_name` VARCHAR(100) NOT NULL COMMENT '商品分类名称',
+    `category_description` VARCHAR(500) COMMENT '商品分类描述'
+) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商品分类表';
+
+INSERT INTO b2c_good_category_i18n(good_category_id, language, category_name, category_description) VALUES
+    (1, 'zh', '电子产品', '手机、电脑、平板等电子设备'),
+    (1, 'en', 'Electronics', 'Mobile phones, computers, tablets and other electronic devices'),
+    (2, 'zh', '家具', '床、沙发、餐桌等家居用品'),
+    (2, 'en', 'Furniture', 'Beds, sofas, dining tables and other household items'),
+    (3, 'zh', '食品', '食品、零食、饮料等食品类产品'),
+    (3, 'en', 'Food', 'Food, snacks, beverages and other food products'),
+    (4, 'zh', '服装', '包括衣服、鞋子、配饰等服装类产品'),
+    (4, 'en', 'Apparel', 'Clothing, shoes, accessories and other apparel products'),
+    (5, 'zh', '美容', '化妆品、护肤品、美发用品等美容类产品'),
+    (5, 'en', 'Beauty', 'Cosmetics, skincare, hair care products and other beauty items')
+;
+

+ 46 - 0
db/b2c_good_i18n.sql

@@ -0,0 +1,46 @@
+/**
+Source Server Version: 8.0.31
+Source Database: backendsys
+Date: 2023/08/18 12:51:10
+*/
+
+DROP TABLE IF EXISTS `b2c_good_i18n`;
+CREATE TABLE `b2c_good_i18n` (
+    PRIMARY KEY (`id`),
+    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
+    `good_id` BIGINT NOT NULL COMMENT '商品ID',
+    `language` VARCHAR(10) NOT NULL COMMENT '语种',
+    `good_name` VARCHAR(20) NOT NULL COMMENT '商品名称',
+    `good_description` VARCHAR(200) COMMENT '商品描述',
+    `good_content` TEXT COMMENT '商品内容',
+    `meta_keyword` VARCHAR(100) COMMENT 'SEO-Keyword',
+    `meta_description` VARCHAR(200) COMMENT 'SEO-Description',
+    INDEX `idx_good_name` (`good_name`)
+) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商品表 (翻译)';
+
+INSERT INTO b2c_good_i18n(good_id, language, good_name, good_description, good_content) VALUES
+    (1, 'zh', '测试商品-1', '测试商品描述描述-1', '测试商品详情内容内容内容内容-1'),
+    (1, 'en', 'Debug Good-1', 'Debug Good description-1', 'Debug Good content-1'),
+    (2, 'zh', '测试商品-2', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (2, 'en', 'Debug Good-2', 'Debug Good description', 'Debug Good content'),
+    (3, 'zh', '测试商品-3', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (3, 'en', 'Debug Good-3', 'Debug Good description', 'Debug Good content'),
+    (4, 'zh', '测试商品-4', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (4, 'en', 'Debug Good-4', 'Debug Good description', 'Debug Good content'),
+    (5, 'zh', '测试商品-5', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (5, 'en', 'Debug Good-5', 'Debug Good description', 'Debug Good content'),
+    (6, 'zh', '测试商品-6', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (6, 'en', 'Debug Good-6', 'Debug Good description', 'Debug Good content'),
+    (7, 'zh', '测试商品-7', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (7, 'en', 'Debug Good-7', 'Debug Good description', 'Debug Good content'),
+    (8, 'zh', '测试商品-8', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (8, 'en', 'Debug Good-8', 'Debug Good description', 'Debug Good content'),
+    (9, 'zh', '测试商品-9', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (9, 'en', 'Debug Good-9', 'Debug Good description', 'Debug Good content'),
+    (10, 'zh', '测试商品-10', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (10, 'en', 'Debug Good-10', 'Debug Good description', 'Debug Good content'),
+    (11, 'zh', '测试商品-11', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (11, 'en', 'Debug Good-11', 'Debug Good description', 'Debug Good content'),
+    (12, 'zh', '测试商品-12', '测试商品描述描述', '测试商品详情内容内容内容内容'),
+    (12, 'en', 'Debug Good-12', 'Debug Good description', 'Debug Good content')
+;

+ 73 - 0
db/b2c_good_unit.sql

@@ -0,0 +1,73 @@
+/**
+Source Server Version: 8.0.31
+Source Database: backendsys
+Date: 2025/07/17 10:01:12
+*/
+
+DROP TABLE IF EXISTS `b2c_good_unit`;
+CREATE TABLE `b2c_good_unit` (
+   PRIMARY KEY (`id`),
+   `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
+   `unit_category` VARCHAR(255) NOT NULL COMMENT '商品单位分类',
+   `unit_name` VARCHAR(255) NOT NULL COMMENT '商品单位名称',
+   `unit_name_en` VARCHAR(255) NOT NULL COMMENT '商品单位名称 (英文)',
+   `sort` INT DEFAULT '1' COMMENT '排序'
+) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商品单位表';
+
+INSERT INTO b2c_good_unit (id, unit_category, unit_name, unit_name_en, sort) VALUES
+    -- 基础单位
+    (1, 'general', '件', 'piece', 1),
+    (2, 'general', '个', 'unit', 2),
+    (3, 'general', '只', 'each', 3),
+
+    -- 包装类
+    (4, 'packaging', '箱', 'carton', 10),
+    (5, 'packaging', '盒', 'box', 11),
+    (6, 'packaging', '包', 'pack', 12),
+    (7, 'packaging', '袋', 'bag', 13),
+    (8, 'packaging', '罐', 'can', 14),
+    (9, 'packaging', '桶', 'bucket', 15),
+    (10, 'packaging', '筐', 'basket', 16),
+
+    -- 液体/容器
+    (11, 'liquid', '瓶', 'bottle', 20),
+    (12, 'liquid', '杯', 'cup', 21),
+    (13, 'liquid', '升', 'liter', 22),
+    (14, 'liquid', '毫升', 'ml', 23),
+
+    -- 成套商品
+    (15, 'set', '套', 'set', 30),
+    (16, 'set', '对', 'pair', 31),
+    (17, 'set', '打', 'dozen', 32),
+    (18, 'set', '组', 'kit', 33),
+
+    -- 服装/穿戴
+    (19, 'clothing', '条', 'piece', 40),  -- 如裤子
+    (20, 'clothing', '件', 'piece', 41),  -- 如上衣
+    (21, 'clothing', '双', 'pair', 42),  -- 鞋袜
+    (22, 'clothing', '顶', 'piece', 43),  -- 帽子
+
+    -- 电子/设备
+    (23, 'electronics', '台', 'unit', 50),
+    (24, 'electronics', '部', 'unit', 51),  -- 手机等
+    (25, 'electronics', '张', 'card', 52),  -- 如SIM卡
+
+    -- 食品类
+    (26, 'food', '克', 'gram', 60),
+    (27, 'food', '千克', 'kg', 61),
+    (28, 'food', '磅', 'lb', 62),
+    (29, 'food', '盎司', 'oz', 63),
+
+    -- 建材/五金
+    (30, 'construction', '米', 'meter', 70),
+    (31, 'construction', '卷', 'roll', 71),
+    (32, 'construction', '片', 'sheet', 72),
+    (33, 'construction', '块', 'block', 73),
+
+    -- 其他
+    (34, 'other', '本', 'book', 80),
+    (35, 'other', '张', 'sheet', 81),  -- 如纸张
+    (36, 'other', '支', 'stick', 82),  -- 如笔
+    (37, 'other', '辆', 'unit', 83),  -- 车辆
+    (38, 'other', '头', 'head', 84)  -- 牲畜
+;

+ 0 - 41
db/b2c_goods.sql

@@ -1,41 +0,0 @@
-/**
-Source Server Version: 8.0.31
-Source Database: backendsys
-Date: 2023/08/18 12:51:10
-*/
-
-DROP TABLE IF EXISTS `b2c_goods`;
-CREATE TABLE `b2c_goods` (
-    PRIMARY KEY (`id`),
-    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
-    `category_id` BIGINT NOT NULL COMMENT '商品分类ID',
-    `brand_id` BIGINT COMMENT '商品品牌ID',
-    `unit_id` BIGINT COMMENT '商品单位ID',
-    `good_name` VARCHAR(20) NOT NULL COMMENT '商品名称',
-    `good_description` VARCHAR(200) COMMENT '商品描述',
-    `good_content` TEXT COMMENT '商品内容',
-    `good_thumb` VARCHAR(1000) DEFAULT NULL COMMENT '商品缩略图',
-    `good_images` TEXT DEFAULT NULL COMMENT '商品图片',
-    `meta_keyword` VARCHAR(100) COMMENT 'SEO-Keyword',
-    `meta_description` VARCHAR(200) COMMENT 'SEO-Description',
-    `status` TINYINT(1) DEFAULT '-1' COMMENT '商品状态 (-1下架, 1上架)',
-    `del_flag` TINYINT(1) DEFAULT '-1' COMMENT '删除标志 (-1未删除, 1删除)',
-    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
-    INDEX `idx_good_name` (`good_name`)
-) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商品表';
-
-INSERT INTO b2c_goods(category_id, brand_id, unit_id, good_name, good_description, good_content, status) VALUES
-    (1, 1, 1, '测试商品-1', '测试商品描述描述-1', '测试商品详情内容内容内容内容-1', 1),
-    (1, 1, 1, '测试商品-2', '测试商品描述描述-2', '测试商品详情内容内容内容内容-2', -1),
-    (1, 1, 1, '测试商品-3', '测试商品描述描述-3', '测试商品详情内容内容内容内容-3', -1),
-    (1, 1, 1, '测试商品-4', '测试商品描述描述-4', '测试商品详情内容内容内容内容-4', -1),
-    (1, 1, 1, '测试商品-5', '测试商品描述描述-5', '测试商品详情内容内容内容内容-5', -1),
-    (1, 1, 1, '测试商品-6', '测试商品描述描述-6', '测试商品详情内容内容内容内容-6', -1),
-    (1, 1, 1, '测试商品-7', '测试商品描述描述-7', '测试商品详情内容内容内容内容-7', -1),
-    (1, 1, 1, '测试商品-8', '测试商品描述描述-8', '测试商品详情内容内容内容内容-8', -1),
-    (1, 1, 1, '测试商品-9', '测试商品描述描述-9', '测试商品详情内容内容内容内容-9', -1),
-    (1, 1, 1, '测试商品-10', '测试商品描述描述-10', '测试商品详情内容内容内容内容-10', -1),
-    (1, 1, 1, '测试商品-11', '测试商品描述描述-11', '测试商品详情内容内容内容内容-11', -1),
-    (1, 1, 1, '测试商品-12', '测试商品描述描述-12', '测试商品详情内容内容内容内容-12', -1)
-;

+ 4 - 2
db/cms_article.sql

@@ -8,16 +8,18 @@ DROP TABLE IF EXISTS `cms_article`;
 CREATE TABLE `cms_article` (
     PRIMARY KEY (`id`),
     `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
+    `uid` VARCHAR(36) NOT NULL UNIQUE COMMENT 'UID',
     `user_id` BIGINT NOT NULL COMMENT '作者/用户ID',
     `category_id` BIGINT NOT NULL COMMENT '资讯分类ID',
-    `uid` VARCHAR(36) NOT NULL UNIQUE COMMENT 'UID',
     `thumb` VARCHAR(500) COMMENT '封面图',
     `is_top` TINYINT(1) DEFAULT '-1' COMMENT '是否置顶 (-1否, 1是)',
     `status` TINYINT(1) DEFAULT '1' COMMENT '资讯状态 (-1禁用, 1启用)',
     `del_flag` TINYINT(1) DEFAULT '-1' COMMENT '删除标志 (-1未删除, 1删除)',
     `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
     `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
-    INDEX `idx_user_id` (`user_id`)
+    UNIQUE KEY (`uid`),
+    INDEX `idx_user_id` (`user_id`),
+    INDEX `idx_category_id` (`category_id`)
 ) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='资讯表';
 
 INSERT INTO cms_article(user_id, category_id, uid, is_top) VALUES

+ 6 - 6
db/crt_drama_project_storyboard.sql

@@ -20,12 +20,12 @@ CREATE TABLE `crt_drama_project_storyboard` (
     `story_weather_time` VARCHAR(1000) COMMENT '天气/时间',
     `lora_figure_ids` VARCHAR(255) COMMENT '人物LoRA ID (创建时,跟随项目的人物LoRAID)(多个人物ID以逗号分隔)',
 
-    `param_image_count` INT DEFAULT '1' COMMENT '每次生成图片数量 (默认值:1,整数范围:1~4)',
-    `param_prompt_weight` FLOAT DEFAULT '3.5' COMMENT '提示词引导系数 (默认值:3.5,小数点后一位,范围:1~30)',
-    `param_sampling_method` VARCHAR(20) DEFAULT 'Euler' COMMENT '采样方法 (枚举)(Euler: euler, DPM++2M: dpmpp_2m)',
-    `param_step_count` INT DEFAULT '20' COMMENT '步数 (默认值:20,整数范围:1~30)',
-    `param_random_seed` TINYINT DEFAULT '1' COMMENT '随机种子 (默认值:1,范围:(1:随机, 2:自定义))',
-    `param_random_seed_custom` VARCHAR(255) COMMENT '随机种子自定义值 (长度: 0~64位整数)',
+    `param_batch_size` INT DEFAULT '1' COMMENT '每次生成图片数量 (默认值:1,整数范围:1~4)',
+    `param_prompt_flux_guidance` FLOAT DEFAULT '3.5' COMMENT '提示词引导系数 (默认值:3.5,小数点后一位,范围:1~30)',
+    `param_sampler` VARCHAR(20) DEFAULT 'Euler' COMMENT '采样方法 (枚举)(Euler: euler, DPM++2M: dpmpp_2m)',
+    `param_step` INT DEFAULT '20' COMMENT '步数 (默认值:20,整数范围:1~30)',
+    `param_seed` TINYINT DEFAULT '1' COMMENT '随机种子 (默认值:1,范围:(1:随机, 2:自定义))',
+    `param_seed_custom` VARCHAR(255) COMMENT '随机种子自定义值 (长度: 0~64位整数)',
     `text_to_image_prompt` VARCHAR(2000) COMMENT '文生图提示词 (生图时必填)',
 
     `param_video_reference_type` TINYINT DEFAULT '1' COMMENT '生视频模式 (1:首尾帧模式, 2:多图参考模式)',

+ 1 - 1
db/crt_model.sql

@@ -14,5 +14,5 @@ CREATE TABLE `crt_model` (
 ) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='短剧创作-风格LoRA表';
 
 INSERT INTO crt_model(id, name, model_name, model_path) VALUES
-    (1, 'F.1-dev.safetensors', 'F.1-dev.safetensors', '/etc/ComfyUI/custom_nodes/xxx/F.1-dev.safetensors')
+    (1, 'F.1-dev.safetensors', 'FLUX1/flux1-dev-fp8.safetensors', '/etc/ComfyUI/custom_nodes/xxx/F.1-dev.safetensors')
 ;

+ 10 - 10
db/sys_user_role_permission.sql

@@ -157,16 +157,16 @@ INSERT INTO sys_user_role_permission(id, parent_id, permission_name, sort) VALUE
             ('11.2.2', '11.2', '创建商品分类', null),
             ('11.2.3', '11.2', '编辑商品分类', null),
             ('11.2.4', '11.2', '删除商品分类', null),
-        ('11.3', '11', '商品品牌列表', null),
-            ('11.3.1', '11.3', '商品品牌详情', null),
-            ('11.3.2', '11.3', '创建商品品牌', null),
-            ('11.3.3', '11.3', '编辑商品品牌', null),
-            ('11.3.4', '11.3', '删除商品品牌', null),
-        ('11.4', '11', '商品单位列表', null),
-            ('11.4.1', '11.4', '商品单位详情', null),
-            ('11.4.2', '11.4', '创建商品单位', null),
-            ('11.4.3', '11.4', '编辑商品单位', null),
-            ('11.4.4', '11.4', '删除商品单位', null),
+#         ('11.3', '11', '商品品牌列表', null),
+#             ('11.3.1', '11.3', '商品品牌详情', null),
+#             ('11.3.2', '11.3', '创建商品品牌', null),
+#             ('11.3.3', '11.3', '编辑商品品牌', null),
+#             ('11.3.4', '11.3', '删除商品品牌', null),
+#         ('11.4', '11', '商品单位列表', null),
+#             ('11.4.1', '11.4', '商品单位详情', null),
+#             ('11.4.2', '11.4', '创建商品单位', null),
+#             ('11.4.3', '11.4', '编辑商品单位', null),
+#             ('11.4.4', '11.4', '删除商品单位', null),
         ('11.5', '11', '商品规格列表', null),
             ('11.5.1', '11.5', '商品规格详情', null),
             ('11.5.2', '11.5', '创建商品规格', null),

+ 60 - 60
src/main/java/com/backendsys/controller/B2c/B2cGoodBrandController.java

@@ -1,60 +1,60 @@
-package com.backendsys.controller.B2c;
-
-import com.backendsys.aspect.QueryNullCheck;
-import com.backendsys.aspect.QueryNullCheckAspect;
-import com.backendsys.entity.B2c.B2cGoodBrandDTO;
-import com.backendsys.entity.PageDTO;
-import com.backendsys.service.B2c.B2cGoodBrandService;
-import com.backendsys.utils.response.Result;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 商品品牌
- */
-@Validated
-@RestController
-public class B2cGoodBrandController {
-
-    @Autowired
-    private B2cGoodBrandService b2cGoodBrandService;
-
-    @PreAuthorize("@sr.hasPermission('11.3')")
-    @GetMapping("/api/b2c/good/getGoodBrand")
-    public Result getGoodBrand(@Validated PageDTO pageDTO, @Validated B2cGoodBrandDTO b2cGoodBrandDTO) {
-        return Result.success(b2cGoodBrandService.queryGoodBrandList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodBrandDTO));
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.3.1')")
-    @QueryNullCheck(serviceClass = B2cGoodBrandService.class, serviceMethod = "queryGoodBrandDetail", argField = "good_brand_id", message = "商品品牌不存在")
-    @GetMapping("/api/b2c/good/getGoodBrandDetail")
-    public Result getGoodBrandDetail(@Validated(B2cGoodBrandDTO.Detail.class) B2cGoodBrandDTO b2cGoodBrandDTO) {
-        return Result.success(QueryNullCheckAspect.getQueryResult());
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.3.2')")
-    @PostMapping("/api/b2c/good/createGoodBrand")
-    public Result createGoodBrand(@Validated(B2cGoodBrandDTO.Create.class) @RequestBody B2cGoodBrandDTO b2cGoodBrandDTO) {
-        return Result.success(b2cGoodBrandService.insertGoodBrand(b2cGoodBrandDTO), "创建成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.3.3')")
-    @QueryNullCheck(serviceClass = B2cGoodBrandService.class, serviceMethod = "queryGoodBrandDetail", argField = "good_brand_id", message = "商品品牌不存在")
-    @PutMapping("/api/b2c/good/updateGoodBrand")
-    public Result updateGoodBrand(@Validated(B2cGoodBrandDTO.Update.class) @RequestBody B2cGoodBrandDTO b2cGoodBrandDTO) {
-        return Result.success(b2cGoodBrandService.updateGoodBrand(b2cGoodBrandDTO), "更新成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.3.4')")
-    @QueryNullCheck(serviceClass = B2cGoodBrandService.class, serviceMethod = "queryGoodBrandDetail", argField = "good_brand_id", message = "商品品牌不存在")
-    @DeleteMapping("/api/b2c/good/deleteGoodBrand")
-    public Result deleteGoodBrand(@Validated(B2cGoodBrandDTO.Delete.class) @RequestBody B2cGoodBrandDTO b2cGoodBrandDTO) {
-
-        // 判断是否有子ID,有则不允许删除
-
-
-        return Result.success(b2cGoodBrandService.deleteGoodBrand(b2cGoodBrandDTO), "删除成功");
-    }
-}
+//package com.backendsys.controller.B2c;
+//
+//import com.backendsys.aspect.QueryNullCheck;
+//import com.backendsys.aspect.QueryNullCheckAspect;
+//import com.backendsys.entity.B2c.B2cGoodBrandDTO;
+//import com.backendsys.entity.PageDTO;
+//import com.backendsys.service.B2c.B2cGoodBrandService;
+//import com.backendsys.utils.response.Result;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.security.access.prepost.PreAuthorize;
+//import org.springframework.validation.annotation.Validated;
+//import org.springframework.web.bind.annotation.*;
+//
+///**
+// * 商品品牌
+// */
+//@Validated
+//@RestController
+//public class B2cGoodBrandController {
+//
+//    @Autowired
+//    private B2cGoodBrandService b2cGoodBrandService;
+//
+//    @PreAuthorize("@sr.hasPermission('11.3')")
+//    @GetMapping("/api/b2c/good/getGoodBrand")
+//    public Result getGoodBrand(@Validated PageDTO pageDTO, @Validated B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        return Result.success(b2cGoodBrandService.queryGoodBrandList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodBrandDTO));
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.3.1')")
+//    @QueryNullCheck(serviceClass = B2cGoodBrandService.class, serviceMethod = "queryGoodBrandDetail", argField = "good_brand_id", message = "商品品牌不存在")
+//    @GetMapping("/api/b2c/good/getGoodBrandDetail")
+//    public Result getGoodBrandDetail(@Validated(B2cGoodBrandDTO.Detail.class) B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        return Result.success(QueryNullCheckAspect.getQueryResult());
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.3.2')")
+//    @PostMapping("/api/b2c/good/createGoodBrand")
+//    public Result createGoodBrand(@Validated(B2cGoodBrandDTO.Create.class) @RequestBody B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        return Result.success(b2cGoodBrandService.insertGoodBrand(b2cGoodBrandDTO), "创建成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.3.3')")
+//    @QueryNullCheck(serviceClass = B2cGoodBrandService.class, serviceMethod = "queryGoodBrandDetail", argField = "good_brand_id", message = "商品品牌不存在")
+//    @PutMapping("/api/b2c/good/updateGoodBrand")
+//    public Result updateGoodBrand(@Validated(B2cGoodBrandDTO.Update.class) @RequestBody B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        return Result.success(b2cGoodBrandService.updateGoodBrand(b2cGoodBrandDTO), "更新成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.3.4')")
+//    @QueryNullCheck(serviceClass = B2cGoodBrandService.class, serviceMethod = "queryGoodBrandDetail", argField = "good_brand_id", message = "商品品牌不存在")
+//    @DeleteMapping("/api/b2c/good/deleteGoodBrand")
+//    public Result deleteGoodBrand(@Validated(B2cGoodBrandDTO.Delete.class) @RequestBody B2cGoodBrandDTO b2cGoodBrandDTO) {
+//
+//        // 判断是否有子ID,有则不允许删除
+//
+//
+//        return Result.success(b2cGoodBrandService.deleteGoodBrand(b2cGoodBrandDTO), "删除成功");
+//    }
+//}

+ 56 - 56
src/main/java/com/backendsys/controller/B2c/B2cGoodCategoryController.java

@@ -1,56 +1,56 @@
-package com.backendsys.controller.B2c;
-
-import com.backendsys.aspect.QueryNullCheck;
-import com.backendsys.aspect.QueryNullCheckAspect;
-import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
-import com.backendsys.entity.PageDTO;
-import com.backendsys.service.B2c.B2cGoodCategoryService;
-import com.backendsys.utils.response.Result;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 商品分类
- */
-@Validated
-@RestController
-public class B2cGoodCategoryController {
-
-    @Autowired
-    private B2cGoodCategoryService b2cGoodCategoryService;
-
-    @PreAuthorize("@sr.hasPermission('11.2')")
-    @GetMapping("/api/b2c/good/getGoodCategory")
-    public Result getGoodCategory(@Validated PageDTO pageDTO, @Validated B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        return Result.success(b2cGoodCategoryService.queryGoodCategoryList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodCategoryDTO));
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.2.1')")
-    @QueryNullCheck(serviceClass = B2cGoodCategoryService.class, serviceMethod = "queryGoodCategoryDetail", argField = "good_category_id", message = "商品分类不存在")
-    @GetMapping("/api/b2c/good/getGoodCategoryDetail")
-    public Result getGoodCategoryDetail(@Validated(B2cGoodCategoryDTO.Detail.class) B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        return Result.success(QueryNullCheckAspect.getQueryResult());
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.2.2')")
-    @PostMapping("/api/b2c/good/createGoodCategory")
-    public Result createGoodCategory(@Validated(B2cGoodCategoryDTO.Create.class) @RequestBody B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        return Result.success(b2cGoodCategoryService.insertGoodCategory(b2cGoodCategoryDTO), "创建成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.2.3')")
-    @QueryNullCheck(serviceClass = B2cGoodCategoryService.class, serviceMethod = "queryGoodCategoryDetail", argField = "good_category_id", message = "商品分类不存在")
-    @PutMapping("/api/b2c/good/updateGoodCategory")
-    public Result updateGoodCategory(@Validated(B2cGoodCategoryDTO.Update.class) @RequestBody B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        return Result.success(b2cGoodCategoryService.updateGoodCategory(b2cGoodCategoryDTO), "更新成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.2.4')")
-    @QueryNullCheck(serviceClass = B2cGoodCategoryService.class, serviceMethod = "queryGoodCategoryDetail", argField = "good_category_id", message = "商品分类不存在")
-    @DeleteMapping("/api/b2c/good/deleteGoodCategory")
-    public Result deleteGoodCategory(@Validated(B2cGoodCategoryDTO.Delete.class) @RequestBody B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        return Result.success(b2cGoodCategoryService.deleteGoodCategory(b2cGoodCategoryDTO), "删除成功");
-    }
-}
+//package com.backendsys.controller.B2c;
+//
+//import com.backendsys.aspect.QueryNullCheck;
+//import com.backendsys.aspect.QueryNullCheckAspect;
+//import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
+//import com.backendsys.entity.PageDTO;
+//import com.backendsys.service.B2c.B2cGoodCategoryService;
+//import com.backendsys.utils.response.Result;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.security.access.prepost.PreAuthorize;
+//import org.springframework.validation.annotation.Validated;
+//import org.springframework.web.bind.annotation.*;
+//
+///**
+// * 商品分类
+// */
+//@Validated
+//@RestController
+//public class B2cGoodCategoryController {
+//
+//    @Autowired
+//    private B2cGoodCategoryService b2cGoodCategoryService;
+//
+//    @PreAuthorize("@sr.hasPermission('11.2')")
+//    @GetMapping("/api/b2c/good/getGoodCategory")
+//    public Result getGoodCategory(@Validated PageDTO pageDTO, @Validated B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        return Result.success(b2cGoodCategoryService.queryGoodCategoryList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodCategoryDTO));
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.2.1')")
+//    @QueryNullCheck(serviceClass = B2cGoodCategoryService.class, serviceMethod = "queryGoodCategoryDetail", argField = "good_category_id", message = "商品分类不存在")
+//    @GetMapping("/api/b2c/good/getGoodCategoryDetail")
+//    public Result getGoodCategoryDetail(@Validated(B2cGoodCategoryDTO.Detail.class) B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        return Result.success(QueryNullCheckAspect.getQueryResult());
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.2.2')")
+//    @PostMapping("/api/b2c/good/createGoodCategory")
+//    public Result createGoodCategory(@Validated(B2cGoodCategoryDTO.Create.class) @RequestBody B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        return Result.success(b2cGoodCategoryService.insertGoodCategory(b2cGoodCategoryDTO), "创建成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.2.3')")
+//    @QueryNullCheck(serviceClass = B2cGoodCategoryService.class, serviceMethod = "queryGoodCategoryDetail", argField = "good_category_id", message = "商品分类不存在")
+//    @PutMapping("/api/b2c/good/updateGoodCategory")
+//    public Result updateGoodCategory(@Validated(B2cGoodCategoryDTO.Update.class) @RequestBody B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        return Result.success(b2cGoodCategoryService.updateGoodCategory(b2cGoodCategoryDTO), "更新成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.2.4')")
+//    @QueryNullCheck(serviceClass = B2cGoodCategoryService.class, serviceMethod = "queryGoodCategoryDetail", argField = "good_category_id", message = "商品分类不存在")
+//    @DeleteMapping("/api/b2c/good/deleteGoodCategory")
+//    public Result deleteGoodCategory(@Validated(B2cGoodCategoryDTO.Delete.class) @RequestBody B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        return Result.success(b2cGoodCategoryService.deleteGoodCategory(b2cGoodCategoryDTO), "删除成功");
+//    }
+//}

+ 65 - 65
src/main/java/com/backendsys/controller/B2c/B2cGoodController.java

@@ -1,65 +1,65 @@
-package com.backendsys.controller.B2c;
-
-import com.backendsys.aspect.QueryNullCheck;
-import com.backendsys.aspect.QueryNullCheckAspect;
-import com.backendsys.entity.B2c.B2cGoodDTO;
-import com.backendsys.entity.PageDTO;
-import com.backendsys.modules.common.aspect.AppUserLogin;
-import com.backendsys.service.B2c.B2cGoodService;
-import com.backendsys.utils.response.Result;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 商品
- */
-@Validated
-@RestController
-public class B2cGoodController {
-
-    @Autowired
-    private B2cGoodService b2cGoodService;
-
-    @PreAuthorize("@sr.hasPermission('11.1')")
-    @GetMapping("/api/b2c/good/getGood")
-    public Result getGood(@Validated PageDTO pageDTO, @Validated B2cGoodDTO b2cGoodDTO) {
-        return Result.success(b2cGoodService.queryGoodList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodDTO));
-    }
-
-//    @PreAuthorize("@ss.isMember")
-    @AppUserLogin
-    @GetMapping("/api/front/b2c/good/getGood")
-    public Result getFrontGood(@Validated PageDTO pageDTO, @Validated B2cGoodDTO b2cGoodDTO) {
-        return Result.success(b2cGoodService.queryGoodList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodDTO));
-    }
-    // 现有一个接口路径:/api/b2c/good/getGood,是用于后台系统获取商品列表的,想另外做一个用于前台H5或小程序调用的接口,应该怎么命名比较优雅
-
-    @PreAuthorize("@sr.hasPermission('11.1.1')")
-    @QueryNullCheck(serviceClass = B2cGoodService.class, serviceMethod = "queryGoodDetail", argField = "good_id", message = "商品不存在")
-    @GetMapping("/api/b2c/good/getGoodDetail")
-    public Result getGoodDetail(@Validated(B2cGoodDTO.Detail.class) B2cGoodDTO b2cGoodDTO) {
-        return Result.success(QueryNullCheckAspect.getQueryResult());
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.1.2')")
-    @PostMapping("/api/b2c/good/createGood")
-    public Result createGood(@Validated(B2cGoodDTO.Create.class) @RequestBody B2cGoodDTO b2cGoodDTO) {
-        return Result.success(b2cGoodService.insertGood(b2cGoodDTO), "创建成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.1.3')")
-    @QueryNullCheck(serviceClass = B2cGoodService.class, serviceMethod = "queryGoodDetail", argField = "good_id", message = "商品不存在")
-    @PutMapping("/api/b2c/good/updateGood")
-    public Result updateGood(@Validated(B2cGoodDTO.Update.class) @RequestBody B2cGoodDTO b2cGoodDTO) {
-        return Result.success(b2cGoodService.updateGood(b2cGoodDTO), "更新成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.1.4')")
-    @QueryNullCheck(serviceClass = B2cGoodService.class, serviceMethod = "queryGoodDetail", argField = "good_id", message = "商品不存在")
-    @DeleteMapping("/api/b2c/good/deleteGood")
-    public Result deleteGood(@Validated(B2cGoodDTO.Delete.class) @RequestBody B2cGoodDTO b2cGoodDTO) {
-        return Result.success(b2cGoodService.deleteGood(b2cGoodDTO), "删除成功");
-    }
-}
+//package com.backendsys.controller.B2c;
+//
+//import com.backendsys.aspect.QueryNullCheck;
+//import com.backendsys.aspect.QueryNullCheckAspect;
+//import com.backendsys.entity.B2c.B2cGoodDTO;
+//import com.backendsys.entity.PageDTO;
+//import com.backendsys.modules.common.aspect.AppUserLogin;
+//import com.backendsys.service.B2c.B2cGoodService;
+//import com.backendsys.utils.response.Result;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.security.access.prepost.PreAuthorize;
+//import org.springframework.validation.annotation.Validated;
+//import org.springframework.web.bind.annotation.*;
+//
+///**
+// * 商品
+// */
+//@Validated
+//@RestController
+//public class GoodController {
+//
+//    @Autowired
+//    private B2cGoodService b2cGoodService;
+//
+//    @PreAuthorize("@sr.hasPermission('11.1')")
+//    @GetMapping("/api/b2c/good/getGood")
+//    public Result getGood(@Validated PageDTO pageDTO, @Validated B2cGoodDTO b2cGoodDTO) {
+//        return Result.success(b2cGoodService.queryGoodList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodDTO));
+//    }
+//
+////    @PreAuthorize("@ss.isMember")
+//    @AppUserLogin
+//    @GetMapping("/api/front/b2c/good/getGood")
+//    public Result getFrontGood(@Validated PageDTO pageDTO, @Validated B2cGoodDTO b2cGoodDTO) {
+//        return Result.success(b2cGoodService.queryGoodList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodDTO));
+//    }
+//    // 现有一个接口路径:/api/b2c/good/getGood,是用于后台系统获取商品列表的,想另外做一个用于前台H5或小程序调用的接口,应该怎么命名比较优雅
+//
+//    @PreAuthorize("@sr.hasPermission('11.1.1')")
+//    @QueryNullCheck(serviceClass = B2cGoodService.class, serviceMethod = "queryGoodDetail", argField = "good_id", message = "商品不存在")
+//    @GetMapping("/api/b2c/good/getGoodDetail")
+//    public Result getGoodDetail(@Validated(B2cGoodDTO.Detail.class) B2cGoodDTO b2cGoodDTO) {
+//        return Result.success(QueryNullCheckAspect.getQueryResult());
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.1.2')")
+//    @PostMapping("/api/b2c/good/createGood")
+//    public Result createGood(@Validated(B2cGoodDTO.Create.class) @RequestBody B2cGoodDTO b2cGoodDTO) {
+//        return Result.success(b2cGoodService.insertGood(b2cGoodDTO), "创建成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.1.3')")
+//    @QueryNullCheck(serviceClass = B2cGoodService.class, serviceMethod = "queryGoodDetail", argField = "good_id", message = "商品不存在")
+//    @PutMapping("/api/b2c/good/updateGood")
+//    public Result updateGood(@Validated(B2cGoodDTO.Update.class) @RequestBody B2cGoodDTO b2cGoodDTO) {
+//        return Result.success(b2cGoodService.updateGood(b2cGoodDTO), "更新成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.1.4')")
+//    @QueryNullCheck(serviceClass = B2cGoodService.class, serviceMethod = "queryGoodDetail", argField = "good_id", message = "商品不存在")
+//    @DeleteMapping("/api/b2c/good/deleteGood")
+//    public Result deleteGood(@Validated(B2cGoodDTO.Delete.class) @RequestBody B2cGoodDTO b2cGoodDTO) {
+//        return Result.success(b2cGoodService.deleteGood(b2cGoodDTO), "删除成功");
+//    }
+//}

+ 56 - 56
src/main/java/com/backendsys/controller/B2c/B2cGoodUnitController.java

@@ -1,56 +1,56 @@
-package com.backendsys.controller.B2c;
-
-import com.backendsys.aspect.QueryNullCheck;
-import com.backendsys.aspect.QueryNullCheckAspect;
-import com.backendsys.entity.B2c.B2cGoodUnitDTO;
-import com.backendsys.entity.PageDTO;
-import com.backendsys.service.B2c.B2cGoodUnitService;
-import com.backendsys.utils.response.Result;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 商品单位
- */
-@Validated
-@RestController
-public class B2cGoodUnitController {
-
-    @Autowired
-    private B2cGoodUnitService b2cGoodUnitService;
-
-    @PreAuthorize("@sr.hasPermission('11.4')")
-    @GetMapping("/api/b2c/good/getGoodUnit")
-    public Result getGoodUnit(@Validated PageDTO pageDTO, @Validated B2cGoodUnitDTO b2cGoodUnitDTO) {
-        return Result.success(b2cGoodUnitService.queryGoodUnitList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodUnitDTO));
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.4.1')")
-    @QueryNullCheck(serviceClass = B2cGoodUnitService.class, serviceMethod = "queryGoodUnitDetail", argField = "good_unit_id", message = "商品单位不存在")
-    @GetMapping("/api/b2c/good/getGoodUnitDetail")
-    public Result getGoodUnitDetail(@Validated(B2cGoodUnitDTO.Detail.class) B2cGoodUnitDTO b2cGoodUnitDTO) {
-        return Result.success(QueryNullCheckAspect.getQueryResult());
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.4.2')")
-    @PostMapping("/api/b2c/good/createGoodUnit")
-    public Result createGoodUnit(@Validated(B2cGoodUnitDTO.Create.class) @RequestBody B2cGoodUnitDTO b2cGoodUnitDTO) {
-        return Result.success(b2cGoodUnitService.insertGoodUnit(b2cGoodUnitDTO), "创建成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.4.3')")
-    @QueryNullCheck(serviceClass = B2cGoodUnitService.class, serviceMethod = "queryGoodUnitDetail", argField = "good_unit_id", message = "商品单位不存在")
-    @PutMapping("/api/b2c/good/updateGoodUnit")
-    public Result updateGoodUnit(@Validated(B2cGoodUnitDTO.Update.class) @RequestBody B2cGoodUnitDTO b2cGoodUnitDTO) {
-        return Result.success(b2cGoodUnitService.updateGoodUnit(b2cGoodUnitDTO), "更新成功");
-    }
-
-    @PreAuthorize("@sr.hasPermission('11.4.4')")
-    @QueryNullCheck(serviceClass = B2cGoodUnitService.class, serviceMethod = "queryGoodUnitDetail", argField = "good_unit_id", message = "商品单位不存在")
-    @DeleteMapping("/api/b2c/good/deleteGoodUnit")
-    public Result deleteGoodUnit(@Validated(B2cGoodUnitDTO.Delete.class) @RequestBody B2cGoodUnitDTO b2cGoodUnitDTO) {
-        return Result.success(b2cGoodUnitService.deleteGoodUnit(b2cGoodUnitDTO), "删除成功");
-    }
-}
+//package com.backendsys.controller.B2c;
+//
+//import com.backendsys.aspect.QueryNullCheck;
+//import com.backendsys.aspect.QueryNullCheckAspect;
+//import com.backendsys.entity.B2c.B2cGoodUnitDTO;
+//import com.backendsys.entity.PageDTO;
+//import com.backendsys.service.B2c.B2cGoodUnitService;
+//import com.backendsys.utils.response.Result;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.security.access.prepost.PreAuthorize;
+//import org.springframework.validation.annotation.Validated;
+//import org.springframework.web.bind.annotation.*;
+//
+///**
+// * 商品单位
+// */
+//@Validated
+//@RestController
+//public class B2cGoodUnitController {
+//
+//    @Autowired
+//    private B2cGoodUnitService b2cGoodUnitService;
+//
+//    @PreAuthorize("@sr.hasPermission('11.4')")
+//    @GetMapping("/api/b2c/good/getGoodUnit")
+//    public Result getGoodUnit(@Validated PageDTO pageDTO, @Validated B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        return Result.success(b2cGoodUnitService.queryGoodUnitList(pageDTO.getPage_num(), pageDTO.getPage_size(), b2cGoodUnitDTO));
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.4.1')")
+//    @QueryNullCheck(serviceClass = B2cGoodUnitService.class, serviceMethod = "queryGoodUnitDetail", argField = "good_unit_id", message = "商品单位不存在")
+//    @GetMapping("/api/b2c/good/getGoodUnitDetail")
+//    public Result getGoodUnitDetail(@Validated(B2cGoodUnitDTO.Detail.class) B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        return Result.success(QueryNullCheckAspect.getQueryResult());
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.4.2')")
+//    @PostMapping("/api/b2c/good/createGoodUnit")
+//    public Result createGoodUnit(@Validated(B2cGoodUnitDTO.Create.class) @RequestBody B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        return Result.success(b2cGoodUnitService.insertGoodUnit(b2cGoodUnitDTO), "创建成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.4.3')")
+//    @QueryNullCheck(serviceClass = B2cGoodUnitService.class, serviceMethod = "queryGoodUnitDetail", argField = "good_unit_id", message = "商品单位不存在")
+//    @PutMapping("/api/b2c/good/updateGoodUnit")
+//    public Result updateGoodUnit(@Validated(B2cGoodUnitDTO.Update.class) @RequestBody B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        return Result.success(b2cGoodUnitService.updateGoodUnit(b2cGoodUnitDTO), "更新成功");
+//    }
+//
+//    @PreAuthorize("@sr.hasPermission('11.4.4')")
+//    @QueryNullCheck(serviceClass = B2cGoodUnitService.class, serviceMethod = "queryGoodUnitDetail", argField = "good_unit_id", message = "商品单位不存在")
+//    @DeleteMapping("/api/b2c/good/deleteGoodUnit")
+//    public Result deleteGoodUnit(@Validated(B2cGoodUnitDTO.Delete.class) @RequestBody B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        return Result.success(b2cGoodUnitService.deleteGoodUnit(b2cGoodUnitDTO), "删除成功");
+//    }
+//}

+ 33 - 33
src/main/java/com/backendsys/entity/B2c/B2cGoodBrandDTO.java

@@ -1,33 +1,33 @@
-package com.backendsys.entity.B2c;
-
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Size;
-import lombok.Data;
-import org.hibernate.validator.constraints.Range;
-
-@Data
-public class B2cGoodBrandDTO {
-    public static interface Detail{}
-    public static interface Create{}
-    public static interface Update{}
-    public static interface Delete{}
-
-    /**
-     * b2c_goods_brand
-     */
-    private Long id;
-    @NotNull(message = "商品品牌ID不能为空", groups = { B2cGoodBrandDTO.Detail.class, B2cGoodBrandDTO.Update.class, B2cGoodBrandDTO.Delete.class })
-    private Long good_brand_id;
-
-
-    private Long parent_id;
-
-    @NotBlank(message = "商品品牌名称不能为空", groups = { B2cGoodBrandDTO.Create.class, B2cGoodBrandDTO.Update.class })
-    @Size(max = 50, message = "商品品牌名称长度不超过 {max} 个字符", groups = { B2cGoodBrandDTO.Create.class, B2cGoodBrandDTO.Update.class })
-    private String brand_name;
-
-    @Range(min = 1, max = 9999, message = "排序必须在 {min} 到 {max} 之间")
-    private Long sort;
-    private Integer status;
-}
+//package com.backendsys.entity.B2c;
+//
+//import jakarta.validation.constraints.NotBlank;
+//import jakarta.validation.constraints.NotNull;
+//import jakarta.validation.constraints.Size;
+//import lombok.Data;
+//import org.hibernate.validator.constraints.Range;
+//
+//@Data
+//public class B2cGoodBrandDTO {
+//    public static interface Detail{}
+//    public static interface Create{}
+//    public static interface Update{}
+//    public static interface Delete{}
+//
+//    /**
+//     * b2c_goods_brand
+//     */
+//    private Long id;
+//    @NotNull(message = "商品品牌ID不能为空", groups = { B2cGoodBrandDTO.Detail.class, B2cGoodBrandDTO.Update.class, B2cGoodBrandDTO.Delete.class })
+//    private Long good_brand_id;
+//
+//
+//    private Long parent_id;
+//
+//    @NotBlank(message = "商品品牌名称不能为空", groups = { B2cGoodBrandDTO.Create.class, B2cGoodBrandDTO.Update.class })
+//    @Size(max = 50, message = "商品品牌名称长度不超过 {max} 个字符", groups = { B2cGoodBrandDTO.Create.class, B2cGoodBrandDTO.Update.class })
+//    private String brand_name;
+//
+//    @Range(min = 1, max = 9999, message = "排序必须在 {min} 到 {max} 之间")
+//    private Long sort;
+//    private Integer status;
+//}

+ 59 - 59
src/main/java/com/backendsys/entity/B2c/B2cGoodDTO.java

@@ -1,59 +1,59 @@
-package com.backendsys.entity.B2c;
-
-import com.backendsys.entity.validator.RangeArray;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Size;
-import lombok.Data;
-
-@Data
-public class B2cGoodDTO {
-    public static interface Detail{}
-    public static interface Create{}
-    public static interface Update{}
-    public static interface Delete{}
-
-    /**
-     * b2c_goods
-     */
-    private Long id;
-    @NotNull(message = "商品ID不能为空", groups = { B2cGoodDTO.Detail.class, B2cGoodDTO.Update.class, B2cGoodDTO.Delete.class })
-    private Long good_id;
-
-    @NotNull(message = "商品分类ID不能为空", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private Long category_id;
-    private String category_name;
-
-    private Long brand_id;
-    private String brand_name;
-    private Long unit_id;
-    private String unit_name;
-
-    @NotBlank(message = "商品名称不能为空", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    @Size(max = 50, message = "商品名称长度不超过 {max} 字符", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private String good_name;
-
-    @Size(max = 200, message = "商品描述长度不超过 {max} 字符", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private String good_description;
-
-    @Size(max = 10000, message = "商品内容长度不超过 {max} 字符", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private String good_content;
-
-    @Size(max = 1000, message = "商品缩略图地址长度不超过 {max} 字符", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private String good_thumb;
-
-    @Size(max = 10000, message = "商品图片地址长度不超过 {max} 字符", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private String good_images;
-
-    @Size(max = 100, message = "关键词长度不超过 {max} 字符", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private String meta_keyword;
-    @Size(max = 200, message = "关键词描述长度不超过 {max} 字符", groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private String meta_description;
-
-    @RangeArray(message="商品状态取值有误,范围应是(-1禁用, 1启用)", value = {"-1", "1"}, groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class })
-    private Integer status;
-
-    private Integer del_flag;
-    private String create_time;
-    private String update_time;
-}
+//package com.backendsys.entity.B2c;
+//
+//import com.backendsys.entity.validator.RangeArray;
+//import jakarta.validation.constraints.NotBlank;
+//import jakarta.validation.constraints.NotNull;
+//import jakarta.validation.constraints.Size;
+//import lombok.Data;
+//
+//@Data
+//public class B2cGoodDTO {
+//    public static interface Detail{}
+//    public static interface Create{}
+//    public static interface Update{}
+//    public static interface Delete{}
+//
+//    /**
+//     * b2c_goods
+//     */
+//    private Long id;
+//    @NotNull(message = "商品ID不能为空", groups = { Detail.class, Update.class, Delete.class })
+//    private Long good_id;
+//
+//    @NotNull(message = "商品分类ID不能为空", groups = { Create.class, Update.class })
+//    private Long category_id;
+//    private String category_name;
+//
+//    private Long brand_id;
+//    private String brand_name;
+//    private Long unit_id;
+//    private String unit_name;
+//
+//    @NotBlank(message = "商品名称不能为空", groups = { Create.class, Update.class })
+//    @Size(max = 50, message = "商品名称长度不超过 {max} 字符", groups = { Create.class, Update.class })
+//    private String good_name;
+//
+//    @Size(max = 200, message = "商品描述长度不超过 {max} 字符", groups = { Create.class, Update.class })
+//    private String good_description;
+//
+//    @Size(max = 10000, message = "商品内容长度不超过 {max} 字符", groups = { Create.class, Update.class })
+//    private String good_content;
+//
+//    @Size(max = 1000, message = "商品缩略图地址长度不超过 {max} 字符", groups = { Create.class, Update.class })
+//    private String good_thumb;
+//
+//    @Size(max = 10000, message = "商品图片地址长度不超过 {max} 字符", groups = { Create.class, Update.class })
+//    private String good_images;
+//
+//    @Size(max = 100, message = "关键词长度不超过 {max} 字符", groups = { Create.class, Update.class })
+//    private String meta_keyword;
+//    @Size(max = 200, message = "关键词描述长度不超过 {max} 字符", groups = { Create.class, Update.class })
+//    private String meta_description;
+//
+//    @RangeArray(message="商品状态取值有误,范围应是(-1禁用, 1启用)", value = {"-1", "1"}, groups = { Create.class, Update.class })
+//    private Integer status;
+//
+//    private Integer del_flag;
+//    private String create_time;
+//    private String update_time;
+//}

+ 9 - 9
src/main/java/com/backendsys/entity/B2c/B2cGoodSpecSkuDTO.java

@@ -17,26 +17,26 @@ public class B2cGoodSpecSkuDTO {
      * b2c_goods_spec_sku
      */
     private Long id;
-    @NotNull(message = "商品SKU_ID不能为空", groups = { B2cGoodSpecSkuDTO.Detail.class, B2cGoodSpecSkuDTO.Update.class, B2cGoodSpecSkuDTO.Delete.class })
+    @NotNull(message = "商品SKU_ID不能为空", groups = { Detail.class, Update.class, Delete.class })
     private Long good_spec_sku_id;
 
     // 编辑时,商品ID 不允许修改,保证数据视图显示一致性
-    @NotNull(message = "商品ID不能为空", groups = { B2cGoodSpecSkuDTO.Create.class })
+    @NotNull(message = "商品ID不能为空", groups = { Create.class })
     private Long good_id;
 
-    @NotEmpty(message = "规格ID不能为空", groups = { B2cGoodSpecSkuDTO.Create.class, B2cGoodSpecSkuDTO.Update.class })
+    @NotEmpty(message = "规格ID不能为空", groups = { Create.class, Update.class })
     private String spec_ids;
 
-    @NotNull(message = "商品规格金额不能为空", groups = { B2cGoodSpecSkuDTO.Create.class, B2cGoodSpecSkuDTO.Update.class })
-    @Digits(integer = 9, fraction = 2, message = "商品规格金额最多支持 {integer} 位数字且小数点后最多 {fraction} 位", groups = { B2cGoodSpecSkuDTO.Create.class, B2cGoodSpecSkuDTO.Update.class })
+    @NotNull(message = "商品规格金额不能为空", groups = { Create.class, Update.class })
+    @Digits(integer = 9, fraction = 2, message = "商品规格金额最多支持 {integer} 位数字且小数点后最多 {fraction} 位", groups = { Create.class, Update.class })
     private BigDecimal price;
 
-    @NotNull(message = "商品规格库存不能为空", groups = { B2cGoodSpecSkuDTO.Create.class, B2cGoodSpecSkuDTO.Update.class })
-    @Min(value = 0, message = "商品规格库存必须大于等于0", groups = { B2cGoodSpecSkuDTO.Create.class, B2cGoodSpecSkuDTO.Update.class })
-    @Max(value = 999999999, message = "商品规格库存必须小于等于 {max} 字符", groups = { B2cGoodSpecSkuDTO.Create.class, B2cGoodSpecSkuDTO.Update.class })
+    @NotNull(message = "商品规格库存不能为空", groups = { Create.class, Update.class })
+    @Min(value = 0, message = "商品规格库存必须大于等于0", groups = { Create.class, Update.class })
+    @Max(value = 999999999, message = "商品规格库存必须小于等于 {max} 字符", groups = { Create.class, Update.class })
     private Long stock;
 
-    @RangeArray(message="是否启用商品库存取值有误,范围应是(-1无限, 1有限)", value = {"-1", "1"}, groups = { B2cGoodDTO.Create.class, B2cGoodDTO.Update.class})
+    @RangeArray(message="是否启用商品库存取值有误,范围应是(-1无限, 1有限)", value = {"-1", "1"}, groups = { Create.class, Update.class})
     private Integer is_stock;
 
 

+ 30 - 30
src/main/java/com/backendsys/entity/B2c/B2cGoodUnitDTO.java

@@ -1,30 +1,30 @@
-package com.backendsys.entity.B2c;
-
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Size;
-import lombok.Data;
-import org.hibernate.validator.constraints.Range;
-
-@Data
-public class B2cGoodUnitDTO {
-    public static interface Detail{}
-    public static interface Create{}
-    public static interface Update{}
-    public static interface Delete{}
-
-    /**
-     * b2c_goods_unit
-     */
-    private Long id;
-    @NotNull(message = "商品单位ID不能为空", groups = { B2cGoodUnitDTO.Detail.class, B2cGoodUnitDTO.Update.class, B2cGoodUnitDTO.Delete.class })
-    private Long good_unit_id;
-
-    @Size(max = 50, message = "商品单位名称长度不超过 {max} 个字符", groups = { B2cGoodUnitDTO.Create.class, B2cGoodUnitDTO.Update.class })
-    @NotBlank(message = "商品单位名称不能为空", groups = { B2cGoodUnitDTO.Create.class, B2cGoodUnitDTO.Update.class })
-    private String unit_name;
-
-    @Range(min = 1, max = 9999, message = "排序必须在 {min} 到 {max} 之间")
-    private Integer sort;
-
-}
+//package com.backendsys.entity.B2c;
+//
+//import jakarta.validation.constraints.NotBlank;
+//import jakarta.validation.constraints.NotNull;
+//import jakarta.validation.constraints.Size;
+//import lombok.Data;
+//import org.hibernate.validator.constraints.Range;
+//
+//@Data
+//public class B2cGoodUnitDTO {
+//    public static interface Detail{}
+//    public static interface Create{}
+//    public static interface Update{}
+//    public static interface Delete{}
+//
+//    /**
+//     * b2c_goods_unit
+//     */
+//    private Long id;
+//    @NotNull(message = "商品单位ID不能为空", groups = { B2cGoodUnitDTO.Detail.class, B2cGoodUnitDTO.Update.class, B2cGoodUnitDTO.Delete.class })
+//    private Long good_unit_id;
+//
+//    @Size(max = 50, message = "商品单位名称长度不超过 {max} 个字符", groups = { B2cGoodUnitDTO.Create.class, B2cGoodUnitDTO.Update.class })
+//    @NotBlank(message = "商品单位名称不能为空", groups = { B2cGoodUnitDTO.Create.class, B2cGoodUnitDTO.Update.class })
+//    private String unit_name;
+//
+//    @Range(min = 1, max = 9999, message = "排序必须在 {min} 到 {max} 之间")
+//    private Integer sort;
+//
+//}

+ 16 - 16
src/main/java/com/backendsys/mapper/B2c/B2cGoodBrandMapper.java

@@ -1,16 +1,16 @@
-package com.backendsys.mapper.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodBrandDTO;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-import java.util.Map;
-
-@Mapper
-public interface B2cGoodBrandMapper {
-    List<Map<String, Object>> queryGoodBrandList(B2cGoodBrandDTO b2cGoodBrandDTO);
-    Map<String, Object> queryGoodBrandDetail(Long good_id);
-    long insertGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
-    long deleteGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
-    long updateGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
-}
+//package com.backendsys.mapper.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodBrandDTO;
+//import org.apache.ibatis.annotations.Mapper;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Mapper
+//public interface B2cGoodBrandMapper {
+//    List<Map<String, Object>> queryGoodBrandList(B2cGoodBrandDTO b2cGoodBrandDTO);
+//    Map<String, Object> queryGoodBrandDetail(Long good_id);
+//    long insertGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
+//    long deleteGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
+//    long updateGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
+//}

+ 68 - 68
src/main/java/com/backendsys/mapper/B2c/B2cGoodBrandMapper.xml

@@ -1,75 +1,75 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.backendsys.mapper.B2c.B2cGoodBrandMapper">
+<!--<?xml version="1.0" encoding="utf-8" ?>-->
+<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >-->
+<!--<mapper namespace="com.backendsys.mapper.B2c.B2cGoodBrandMapper">-->
 
-    <sql id="includeGoodsBrand">
-        gb.id id,
-        gb.id good_brand_id,
-        gb.brand_name,
-        COALESCE(gb.parent_id, '') parent_id,
-        COALESCE(gbp.brand_name, '') parent_name,
-        gb.sort,
-        gb.status
-    </sql>
-    <resultMap id="resultMapGoodsBrand" type="java.util.LinkedHashMap">
-        <id property="id" column="id" jdbcType="BIGINT" />
-        <result property="good_brand_id" column="good_brand_id" javaType="java.lang.Long"/>
-        <result property="parent_id" column="parent_id"/>
-        <result property="brand_name" column="brand_name" />
-        <result property="sort" column="sort" javaType="java.lang.Integer" />
-        <result property="status" column="status" javaType="java.lang.Integer" />
-    </resultMap>
+<!--    <sql id="includeGoodsBrand">-->
+<!--        gb.id id,-->
+<!--        gb.id good_brand_id,-->
+<!--        gb.brand_name,-->
+<!--        COALESCE(gb.parent_id, '') parent_id,-->
+<!--        COALESCE(gbp.brand_name, '') parent_name,-->
+<!--        gb.sort,-->
+<!--        gb.status-->
+<!--    </sql>-->
+<!--    <resultMap id="resultMapGoodsBrand" type="java.util.LinkedHashMap">-->
+<!--        <id property="id" column="id" jdbcType="BIGINT" />-->
+<!--        <result property="good_brand_id" column="good_brand_id" javaType="java.lang.Long"/>-->
+<!--        <result property="parent_id" column="parent_id"/>-->
+<!--        <result property="brand_name" column="brand_name" />-->
+<!--        <result property="sort" column="sort" javaType="java.lang.Integer" />-->
+<!--        <result property="status" column="status" javaType="java.lang.Integer" />-->
+<!--    </resultMap>-->
 
-    <select id="queryGoodBrandList" resultMap="resultMapGoodsBrand">
-        SELECT
-        <include refid="includeGoodsBrand" />
-        FROM b2c_goods_brand gb
-        LEFT JOIN b2c_goods_brand gbp ON gb.parent_id = gbp.id
-        <where>
-            <if test="brand_name != null and brand_name != ''">
-                AND gb.brand_name LIKE CONCAT('%', #{brand_name}, '%')
-            </if>
-            <if test="status != null and status != ''">
-                AND gb.status = #{status}
-            </if>
-        </where>
-        ORDER BY gb.sort DESC
-    </select>
+<!--    <select id="queryGoodBrandList" resultMap="resultMapGoodsBrand">-->
+<!--        SELECT-->
+<!--        <include refid="includeGoodsBrand" />-->
+<!--        FROM b2c_goods_brand gb-->
+<!--        LEFT JOIN b2c_goods_brand gbp ON gb.parent_id = gbp.id-->
+<!--        <where>-->
+<!--            <if test="brand_name != null and brand_name != ''">-->
+<!--                AND gb.brand_name LIKE CONCAT('%', #{brand_name}, '%')-->
+<!--            </if>-->
+<!--            <if test="status != null and status != ''">-->
+<!--                AND gb.status = #{status}-->
+<!--            </if>-->
+<!--        </where>-->
+<!--        ORDER BY gb.sort DESC-->
+<!--    </select>-->
 
-    <select id="queryGoodBrandDetail" resultMap="resultMapGoodsBrand">
-        SELECT
-        <include refid="includeGoodsBrand" />
-        FROM b2c_goods_brand gb
-        LEFT JOIN b2c_goods_brand gbp ON gb.parent_id = gbp.id
-        WHERE gb.id = #{good_brand_id}
-    </select>
+<!--    <select id="queryGoodBrandDetail" resultMap="resultMapGoodsBrand">-->
+<!--        SELECT-->
+<!--        <include refid="includeGoodsBrand" />-->
+<!--        FROM b2c_goods_brand gb-->
+<!--        LEFT JOIN b2c_goods_brand gbp ON gb.parent_id = gbp.id-->
+<!--        WHERE gb.id = #{good_brand_id}-->
+<!--    </select>-->
 
-    <insert id="insertGoodBrand" parameterType="com.backendsys.entity.B2c.B2cGoodBrandDTO"
-        useGeneratedKeys="true" keyProperty="good_brand_id">
-        INSERT INTO b2c_goods_brand (brand_name
-        <if test="parent_id != null and parent_id != ''">, parent_id</if>
-        <if test="sort != null and sort != ''">, sort</if>
-        <if test="status != null and status != ''">, status</if>
-        )
-        VALUES (#{brand_name}
-        <if test="parent_id != null and parent_id != ''">, #{parent_id}</if>
-        <if test="sort != null and sort != ''">, #{sort}</if>
-        <if test="status != null and status != ''">, #{status}</if>
-        )
-    </insert>
+<!--    <insert id="insertGoodBrand" parameterType="com.backendsys.entity.B2c.B2cGoodBrandDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_brand_id">-->
+<!--        INSERT INTO b2c_goods_brand (brand_name-->
+<!--        <if test="parent_id != null and parent_id != ''">, parent_id</if>-->
+<!--        <if test="sort != null and sort != ''">, sort</if>-->
+<!--        <if test="status != null and status != ''">, status</if>-->
+<!--        )-->
+<!--        VALUES (#{brand_name}-->
+<!--        <if test="parent_id != null and parent_id != ''">, #{parent_id}</if>-->
+<!--        <if test="sort != null and sort != ''">, #{sort}</if>-->
+<!--        <if test="status != null and status != ''">, #{status}</if>-->
+<!--        )-->
+<!--    </insert>-->
 
-    <update id="updateGoodBrand" parameterType="com.backendsys.entity.B2c.B2cGoodBrandDTO"
-        useGeneratedKeys="true" keyProperty="good_brand_id">
-        UPDATE b2c_goods_brand
-        SET brand_name = #{brand_name}
-            <if test="parent_id != null and parent_id != ''">, parent_id = #{parent_id}</if>
-            <if test="sort != null and sort != ''">, sort = #{sort}</if>
-            <if test="status != null and status != ''">, status = #{status}</if>
-        WHERE id = #{good_brand_id}
-    </update>
+<!--    <update id="updateGoodBrand" parameterType="com.backendsys.entity.B2c.B2cGoodBrandDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_brand_id">-->
+<!--        UPDATE b2c_goods_brand-->
+<!--        SET brand_name = #{brand_name}-->
+<!--            <if test="parent_id != null and parent_id != ''">, parent_id = #{parent_id}</if>-->
+<!--            <if test="sort != null and sort != ''">, sort = #{sort}</if>-->
+<!--            <if test="status != null and status != ''">, status = #{status}</if>-->
+<!--        WHERE id = #{good_brand_id}-->
+<!--    </update>-->
 
-    <delete id="deleteGoodBrand">
-        DELETE FROM b2c_goods_brand WHERE id = #{good_brand_id}
-    </delete>
+<!--    <delete id="deleteGoodBrand">-->
+<!--        DELETE FROM b2c_goods_brand WHERE id = #{good_brand_id}-->
+<!--    </delete>-->
 
-</mapper>
+<!--</mapper>-->

+ 16 - 16
src/main/java/com/backendsys/mapper/B2c/B2cGoodCategoryMapper.java

@@ -1,16 +1,16 @@
-package com.backendsys.mapper.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-import java.util.Map;
-
-@Mapper
-public interface B2cGoodCategoryMapper {
-    List<Map<String, Object>> queryGoodCategoryList(B2cGoodCategoryDTO b2cGoodCategoryDTO);
-    Map<String, Object> queryGoodCategoryDetail(Long good_id);
-    long insertGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
-    long deleteGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
-    long updateGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
-}
+//package com.backendsys.mapper.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
+//import org.apache.ibatis.annotations.Mapper;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Mapper
+//public interface B2cGoodCategoryMapper {
+//    List<Map<String, Object>> queryGoodCategoryList(B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//    Map<String, Object> queryGoodCategoryDetail(Long good_id);
+//    long insertGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//    long deleteGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//    long updateGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//}

+ 73 - 73
src/main/java/com/backendsys/mapper/B2c/B2cGoodCategoryMapper.xml

@@ -1,80 +1,80 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.backendsys.mapper.B2c.B2cGoodCategoryMapper">
+<!--<?xml version="1.0" encoding="utf-8" ?>-->
+<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >-->
+<!--<mapper namespace="com.backendsys.mapper.B2c.B2cGoodCategoryMapper">-->
 
-    <sql id="includeGoodsCategory">
-        gc.id,
-        gc.id good_category_id,
-        gc.category_name category_name,
-        COALESCE(gc.category_description, '') category_description,
-        COALESCE(gc.parent_id, '') parent_id,
-        COALESCE(gcp.category_name, '') parent_name,
-        gc.sort,
-        gc.status
-    </sql>
-    <resultMap id="resultMapGoodsCategory" type="java.util.LinkedHashMap">
-        <id property="id" column="id" jdbcType="BIGINT" />
-        <result property="good_category_id" column="good_category_id" javaType="java.lang.Long"/>
-        <result property="parent_id" column="parent_id"/>
-        <result property="category_name" column="category_name"/>
-        <result property="category_description" column="category_description"/>
-        <result property="sort" column="sort" javaType="java.lang.Integer" />
-        <result property="status" column="status" javaType="java.lang.Integer" />
-    </resultMap>
+<!--    <sql id="includeGoodsCategory">-->
+<!--        gc.id,-->
+<!--        gc.id good_category_id,-->
+<!--        gc.category_name category_name,-->
+<!--        COALESCE(gc.category_description, '') category_description,-->
+<!--        COALESCE(gc.parent_id, '') parent_id,-->
+<!--        COALESCE(gcp.category_name, '') parent_name,-->
+<!--        gc.sort,-->
+<!--        gc.status-->
+<!--    </sql>-->
+<!--    <resultMap id="resultMapGoodsCategory" type="java.util.LinkedHashMap">-->
+<!--        <id property="id" column="id" jdbcType="BIGINT" />-->
+<!--        <result property="good_category_id" column="good_category_id" javaType="java.lang.Long"/>-->
+<!--        <result property="parent_id" column="parent_id"/>-->
+<!--        <result property="category_name" column="category_name"/>-->
+<!--        <result property="category_description" column="category_description"/>-->
+<!--        <result property="sort" column="sort" javaType="java.lang.Integer" />-->
+<!--        <result property="status" column="status" javaType="java.lang.Integer" />-->
+<!--    </resultMap>-->
 
-    <select id="queryGoodCategoryList" resultMap="resultMapGoodsCategory">
-        SELECT
-        <include refid="includeGoodsCategory" />
-        FROM b2c_goods_category gc
-        LEFT JOIN b2c_goods_category gcp ON gc.parent_id = gcp.id
-        <where>
-            <if test="category_name != null and category_name != ''">
-                AND gc.category_name LIKE CONCAT('%', #{category_name}, '%')
-            </if>
-            <if test="status != null and status != ''">
-                AND gc.status = #{status}
-            </if>
-        </where>
-        ORDER BY gc.sort DESC
-    </select>
+<!--    <select id="queryGoodCategoryList" resultMap="resultMapGoodsCategory">-->
+<!--        SELECT-->
+<!--        <include refid="includeGoodsCategory" />-->
+<!--        FROM b2c_goods_category gc-->
+<!--        LEFT JOIN b2c_goods_category gcp ON gc.parent_id = gcp.id-->
+<!--        <where>-->
+<!--            <if test="category_name != null and category_name != ''">-->
+<!--                AND gc.category_name LIKE CONCAT('%', #{category_name}, '%')-->
+<!--            </if>-->
+<!--            <if test="status != null and status != ''">-->
+<!--                AND gc.status = #{status}-->
+<!--            </if>-->
+<!--        </where>-->
+<!--        ORDER BY gc.sort DESC-->
+<!--    </select>-->
 
-    <select id="queryGoodCategoryDetail" resultMap="resultMapGoodsCategory">
-        SELECT
-        <include refid="includeGoodsCategory" />
-        FROM b2c_goods_category gc
-        LEFT JOIN b2c_goods_category gcp ON gc.parent_id = gcp.id
-        WHERE gc.id = #{good_category_id}
-    </select>
+<!--    <select id="queryGoodCategoryDetail" resultMap="resultMapGoodsCategory">-->
+<!--        SELECT-->
+<!--        <include refid="includeGoodsCategory" />-->
+<!--        FROM b2c_goods_category gc-->
+<!--        LEFT JOIN b2c_goods_category gcp ON gc.parent_id = gcp.id-->
+<!--        WHERE gc.id = #{good_category_id}-->
+<!--    </select>-->
 
-    <insert id="insertGoodCategory" parameterType="com.backendsys.entity.B2c.B2cGoodCategoryDTO"
-        useGeneratedKeys="true" keyProperty="good_category_id">
-        INSERT INTO b2c_goods_category (category_name
-        <if test="parent_id != null and parent_id != ''">, parent_id</if>
-        <if test="category_description != null and category_description != ''">, category_description</if>
-        <if test="sort != null and sort != ''">, sort</if>
-        <if test="status != null and status != ''">, status</if>
-        )
-        VALUES (#{category_name}
-        <if test="parent_id != null and parent_id != ''">, #{parent_id}</if>
-        <if test="category_description != null and category_description != ''">, #{category_description}</if>
-        <if test="sort != null and sort != ''">, #{sort}</if>
-        <if test="status != null and status != ''">, #{status}</if>
-        )
-    </insert>
+<!--    <insert id="insertGoodCategory" parameterType="com.backendsys.entity.B2c.B2cGoodCategoryDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_category_id">-->
+<!--        INSERT INTO b2c_goods_category (category_name-->
+<!--        <if test="parent_id != null and parent_id != ''">, parent_id</if>-->
+<!--        <if test="category_description != null and category_description != ''">, category_description</if>-->
+<!--        <if test="sort != null and sort != ''">, sort</if>-->
+<!--        <if test="status != null and status != ''">, status</if>-->
+<!--        )-->
+<!--        VALUES (#{category_name}-->
+<!--        <if test="parent_id != null and parent_id != ''">, #{parent_id}</if>-->
+<!--        <if test="category_description != null and category_description != ''">, #{category_description}</if>-->
+<!--        <if test="sort != null and sort != ''">, #{sort}</if>-->
+<!--        <if test="status != null and status != ''">, #{status}</if>-->
+<!--        )-->
+<!--    </insert>-->
 
-    <update id="updateGoodCategory" parameterType="com.backendsys.entity.B2c.B2cGoodCategoryDTO"
-        useGeneratedKeys="true" keyProperty="good_category_id">
-        UPDATE b2c_goods_category
-        SET category_name = #{category_name}
-            <if test="category_description != null and category_description != ''">, category_description = #{category_description}</if>
-            <if test="parent_id != null and parent_id != ''">, parent_id = #{parent_id}</if>
-            <if test="sort != null and sort != ''">, sort = #{sort}</if>
-            <if test="status != null and status != ''">, status = #{status}</if>
-        WHERE id = #{good_category_id}
-    </update>
+<!--    <update id="updateGoodCategory" parameterType="com.backendsys.entity.B2c.B2cGoodCategoryDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_category_id">-->
+<!--        UPDATE b2c_goods_category-->
+<!--        SET category_name = #{category_name}-->
+<!--            <if test="category_description != null and category_description != ''">, category_description = #{category_description}</if>-->
+<!--            <if test="parent_id != null and parent_id != ''">, parent_id = #{parent_id}</if>-->
+<!--            <if test="sort != null and sort != ''">, sort = #{sort}</if>-->
+<!--            <if test="status != null and status != ''">, status = #{status}</if>-->
+<!--        WHERE id = #{good_category_id}-->
+<!--    </update>-->
 
-    <delete id="deleteGoodCategory">
-        DELETE FROM b2c_goods_category WHERE id = #{good_category_id}
-    </delete>
+<!--    <delete id="deleteGoodCategory">-->
+<!--        DELETE FROM b2c_goods_category WHERE id = #{good_category_id}-->
+<!--    </delete>-->
 
-</mapper>
+<!--</mapper>-->

+ 16 - 16
src/main/java/com/backendsys/mapper/B2c/B2cGoodMapper.java

@@ -1,16 +1,16 @@
-package com.backendsys.mapper.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodDTO;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-import java.util.Map;
-
-@Mapper
-public interface B2cGoodMapper {
-    List<Map<String, Object>> queryGoodList(B2cGoodDTO b2cGoodDTO);
-    Map<String, Object> queryGoodDetail(Long good_id);
-    long insertGood(B2cGoodDTO b2cGoodDTO);
-    long deleteGood(B2cGoodDTO b2cGoodDTO);
-    long updateGood(B2cGoodDTO b2cGoodDTO);
-}
+//package com.backendsys.mapper.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodDTO;
+//import org.apache.ibatis.annotations.Mapper;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Mapper
+//public interface B2cGoodMapper {
+//    List<Map<String, Object>> queryGoodList(B2cGoodDTO b2cGoodDTO);
+//    Map<String, Object> queryGoodDetail(Long good_id);
+//    long insertGood(B2cGoodDTO b2cGoodDTO);
+//    long deleteGood(B2cGoodDTO b2cGoodDTO);
+//    long updateGood(B2cGoodDTO b2cGoodDTO);
+//}

+ 157 - 157
src/main/java/com/backendsys/mapper/B2c/B2cGoodMapper.xml

@@ -1,168 +1,168 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.backendsys.mapper.B2c.B2cGoodMapper">
+<!--<?xml version="1.0" encoding="utf-8" ?>-->
+<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >-->
+<!--<mapper namespace="com.backendsys.mapper.B2c.B2cGoodMapper">-->
 
-    <sql id="includeGoods">
-        g.id id,
-        g.id good_id,
+<!--    <sql id="includeGoods">-->
+<!--        g.id id,-->
+<!--        g.id good_id,-->
 
-        g.category_id category_id,
-        gc.category_name category_name,
-        COALESCE(g.brand_id, '') brand_id,
-        COALESCE(gb.brand_name, '') brand_name,
-        COALESCE(g.unit_id, '') unit_id,
-        COALESCE(gu.unit_name, '') unit_name,
+<!--        g.category_id category_id,-->
+<!--        gc.category_name category_name,-->
+<!--        COALESCE(g.brand_id, '') brand_id,-->
+<!--        COALESCE(gb.brand_name, '') brand_name,-->
+<!--        COALESCE(g.unit_id, '') unit_id,-->
+<!--        COALESCE(gu.unit_name, '') unit_name,-->
 
-        g.good_name good_name,
-        COALESCE(g.good_description, '') good_description,
-        g.good_content good_content,
-        COALESCE(g.good_thumb, '') good_thumb,
-        COALESCE(g.good_images, '') good_images,
-        COALESCE(g.meta_keyword, '') meta_keyword,
-        COALESCE(g.meta_description, '') meta_description,
-        g.status status,
-        g.create_time create_time,
-        g.update_time update_time
-    </sql>
-    <resultMap id="resultMapGoods" type="java.util.LinkedHashMap">
-        <id property="id" column="id" jdbcType="BIGINT" />
-        <result property="good_id" column="good_id" javaType="java.lang.Long"/>
-        <result property="category_id" column="category_id" javaType="java.lang.Long"/>
-        <result property="category_name" column="category_name"/>
-        <result property="brand_id" column="brand_id" javaType="java.lang.Long"/>
-        <result property="brand_name" column="brand_name"/>
-        <result property="unit_id" column="unit_id" javaType="java.lang.Long"/>
-        <result property="unit_name" column="unit_name"/>
-        <result property="good_name" column="good_name" />
-        <result property="good_description" column="good_description" />
-        <result property="good_thumb" column="good_thumb" />
-        <result property="meta_keyword" column="meta_keyword" />
-        <result property="meta_description" column="meta_description" />
-        <result property="status" column="status" javaType="java.lang.Integer"/>
-        <result property="create_time" column="create_time" />
-        <result property="update_time" column="update_time" />
-        <collection select="querySpecById" property="spec_sku" javaType="java.util.List" ofType="java.util.LinkedHashMap" column="{goodId=id}">
-            <id property="id" column="spec_id" />
-            <result property="good_id" column="good_id" />
-            <result property="spec_ids" column="spec_ids" />
-            <result property="stock" column="stock" />
-            <result property="price" column="price" />
-            <result property="is_stock" column="is_stock" />
-        </collection>
-    </resultMap>
+<!--        g.good_name good_name,-->
+<!--        COALESCE(g.good_description, '') good_description,-->
+<!--        g.good_content good_content,-->
+<!--        COALESCE(g.good_thumb, '') good_thumb,-->
+<!--        COALESCE(g.good_images, '') good_images,-->
+<!--        COALESCE(g.meta_keyword, '') meta_keyword,-->
+<!--        COALESCE(g.meta_description, '') meta_description,-->
+<!--        g.status status,-->
+<!--        g.create_time create_time,-->
+<!--        g.update_time update_time-->
+<!--    </sql>-->
+<!--    <resultMap id="resultMapGoods" type="java.util.LinkedHashMap">-->
+<!--        <id property="id" column="id" jdbcType="BIGINT" />-->
+<!--        <result property="good_id" column="good_id" javaType="java.lang.Long"/>-->
+<!--        <result property="category_id" column="category_id" javaType="java.lang.Long"/>-->
+<!--        <result property="category_name" column="category_name"/>-->
+<!--        <result property="brand_id" column="brand_id" javaType="java.lang.Long"/>-->
+<!--        <result property="brand_name" column="brand_name"/>-->
+<!--        <result property="unit_id" column="unit_id" javaType="java.lang.Long"/>-->
+<!--        <result property="unit_name" column="unit_name"/>-->
+<!--        <result property="good_name" column="good_name" />-->
+<!--        <result property="good_description" column="good_description" />-->
+<!--        <result property="good_thumb" column="good_thumb" />-->
+<!--        <result property="meta_keyword" column="meta_keyword" />-->
+<!--        <result property="meta_description" column="meta_description" />-->
+<!--        <result property="status" column="status" javaType="java.lang.Integer"/>-->
+<!--        <result property="create_time" column="create_time" />-->
+<!--        <result property="update_time" column="update_time" />-->
+<!--        <collection select="querySpecById" property="spec_sku" javaType="java.util.List" ofType="java.util.LinkedHashMap" column="{goodId=id}">-->
+<!--            <id property="id" column="spec_id" />-->
+<!--            <result property="good_id" column="good_id" />-->
+<!--            <result property="spec_ids" column="spec_ids" />-->
+<!--            <result property="stock" column="stock" />-->
+<!--            <result property="price" column="price" />-->
+<!--            <result property="is_stock" column="is_stock" />-->
+<!--        </collection>-->
+<!--    </resultMap>-->
 
-    <!-- [嵌套查询] 商品规格SKU -->
-    <select id="querySpecById" resultType="java.util.LinkedHashMap">
-        SELECT gss.id, gss.good_id, gss.spec_ids, gss.stock, gss.price, gss.is_stock
---          , CONCAT(gs.spec_name, ',', gs.spec_value) AS specs
-        FROM b2c_goods_spec_sku gss
---             JOIN b2c_goods_spec gs ON FIND_IN_SET(gs.id, gss.spec_ids) > 0
-        WHERE good_id = #{goodId}
-    </select>
+<!--    &lt;!&ndash; [嵌套查询] 商品规格SKU &ndash;&gt;-->
+<!--    <select id="querySpecById" resultType="java.util.LinkedHashMap">-->
+<!--        SELECT gss.id, gss.good_id, gss.spec_ids, gss.stock, gss.price, gss.is_stock-->
+<!--&#45;&#45;          , CONCAT(gs.spec_name, ',', gs.spec_value) AS specs-->
+<!--        FROM b2c_goods_spec_sku gss-->
+<!--&#45;&#45;             JOIN b2c_goods_spec gs ON FIND_IN_SET(gs.id, gss.spec_ids) > 0-->
+<!--        WHERE good_id = #{goodId}-->
+<!--    </select>-->
 
-    <resultMap id="resultMapGoodsDetail" type="java.util.LinkedHashMap">
-        <id property="id" column="id" jdbcType="BIGINT" />
-        <result property="good_id" column="good_id" javaType="java.lang.Long"/>
-        <result property="category_id" column="category_id" javaType="java.lang.Long"/>
-        <result property="category_name" column="category_name"/>
-        <result property="brand_id" column="brand_id" javaType="java.lang.Long"/>
-        <result property="brand_name" column="brand_name"/>
-        <result property="unit_id" column="unit_id" javaType="java.lang.Long"/>
-        <result property="unit_name" column="unit_name"/>
-        <result property="good_name" column="good_name" />
-        <result property="good_content" column="good_content" />
-        <result property="good_description" column="good_description" />
-        <result property="good_thumb" column="good_thumb" />
-        <result property="good_images" column="good_images" />
-        <result property="meta_keyword" column="meta_keyword" />
-        <result property="meta_description" column="meta_description" />
-        <result property="status" column="status" javaType="java.lang.Integer"/>
-        <result property="create_time" column="create_time" />
-        <result property="update_time" column="update_time" />
-    </resultMap>
+<!--    <resultMap id="resultMapGoodsDetail" type="java.util.LinkedHashMap">-->
+<!--        <id property="id" column="id" jdbcType="BIGINT" />-->
+<!--        <result property="good_id" column="good_id" javaType="java.lang.Long"/>-->
+<!--        <result property="category_id" column="category_id" javaType="java.lang.Long"/>-->
+<!--        <result property="category_name" column="category_name"/>-->
+<!--        <result property="brand_id" column="brand_id" javaType="java.lang.Long"/>-->
+<!--        <result property="brand_name" column="brand_name"/>-->
+<!--        <result property="unit_id" column="unit_id" javaType="java.lang.Long"/>-->
+<!--        <result property="unit_name" column="unit_name"/>-->
+<!--        <result property="good_name" column="good_name" />-->
+<!--        <result property="good_content" column="good_content" />-->
+<!--        <result property="good_description" column="good_description" />-->
+<!--        <result property="good_thumb" column="good_thumb" />-->
+<!--        <result property="good_images" column="good_images" />-->
+<!--        <result property="meta_keyword" column="meta_keyword" />-->
+<!--        <result property="meta_description" column="meta_description" />-->
+<!--        <result property="status" column="status" javaType="java.lang.Integer"/>-->
+<!--        <result property="create_time" column="create_time" />-->
+<!--        <result property="update_time" column="update_time" />-->
+<!--    </resultMap>-->
 
-    <select id="queryGoodList" resultMap="resultMapGoods">
-        SELECT DISTINCT
-        <include refid="includeGoods" />
-        FROM b2c_goods g
-            LEFT JOIN b2c_goods_category gc ON g.category_id = gc.id
-            LEFT JOIN b2c_goods_brand gb ON g.brand_id = gb.id
-            LEFT JOIN b2c_goods_unit gu ON g.unit_id = gu.id
-        <where>
-            <if test="good_name != null and good_name != ''">
-                AND g.good_name LIKE CONCAT('%', #{good_name}, '%')
-            </if>
-            <if test="category_id != null and category_id != ''">
-                AND g.category_id = #{category_id}
-            </if>
-            <if test="brand_id != null and brand_id != ''">
-                AND g.brand_id = #{brand_id}
-            </if>
-            <if test="status != null and status != ''">
-                AND g.status = #{status}
-            </if>
-        </where>
-        ORDER BY create_time DESC
-    </select>
+<!--    <select id="queryGoodList" resultMap="resultMapGoods">-->
+<!--        SELECT DISTINCT-->
+<!--        <include refid="includeGoods" />-->
+<!--        FROM b2c_goods g-->
+<!--            LEFT JOIN b2c_goods_category gc ON g.category_id = gc.id-->
+<!--            LEFT JOIN b2c_goods_brand gb ON g.brand_id = gb.id-->
+<!--            LEFT JOIN b2c_goods_unit gu ON g.unit_id = gu.id-->
+<!--        <where>-->
+<!--            <if test="good_name != null and good_name != ''">-->
+<!--                AND g.good_name LIKE CONCAT('%', #{good_name}, '%')-->
+<!--            </if>-->
+<!--            <if test="category_id != null and category_id != ''">-->
+<!--                AND g.category_id = #{category_id}-->
+<!--            </if>-->
+<!--            <if test="brand_id != null and brand_id != ''">-->
+<!--                AND g.brand_id = #{brand_id}-->
+<!--            </if>-->
+<!--            <if test="status != null and status != ''">-->
+<!--                AND g.status = #{status}-->
+<!--            </if>-->
+<!--        </where>-->
+<!--        ORDER BY create_time DESC-->
+<!--    </select>-->
 
-    <select id="queryGoodDetail" resultMap="resultMapGoodsDetail">
-        SELECT
-        <include refid="includeGoods" />
-        FROM b2c_goods g
-            LEFT JOIN b2c_goods_category gc ON g.category_id = gc.id
-            LEFT JOIN b2c_goods_brand gb ON g.brand_id = gb.id
-            LEFT JOIN b2c_goods_unit gu ON g.unit_id = gu.id
-        WHERE g.id = #{good_id}
-    </select>
+<!--    <select id="queryGoodDetail" resultMap="resultMapGoodsDetail">-->
+<!--        SELECT-->
+<!--        <include refid="includeGoods" />-->
+<!--        FROM b2c_goods g-->
+<!--            LEFT JOIN b2c_goods_category gc ON g.category_id = gc.id-->
+<!--            LEFT JOIN b2c_goods_brand gb ON g.brand_id = gb.id-->
+<!--            LEFT JOIN b2c_goods_unit gu ON g.unit_id = gu.id-->
+<!--        WHERE g.id = #{good_id}-->
+<!--    </select>-->
 
-    <insert id="insertGood" parameterType="com.backendsys.entity.B2c.B2cGoodDTO"
-        useGeneratedKeys="true" keyProperty="good_id">
-        INSERT INTO b2c_goods (category_id, good_name
-        <if test="brand_id != null and brand_id != ''">, brand_id</if>
-        <if test="unit_id != null and unit_id != ''">, unit_id</if>
-        <if test="good_description != null and good_description != ''">, good_description</if>
-        <if test="good_content != null and good_content != ''">, good_content</if>
-        <if test="good_thumb != null and good_thumb != ''">, good_thumb</if>
-        <if test="good_images != null and good_images != ''">, good_images</if>
-        <if test="meta_keyword != null and meta_keyword != ''">, meta_keyword</if>
-        <if test="meta_description != null and meta_description != ''">, meta_description</if>
-        <if test="status != null and status != ''">, status</if>
-        <if test="del_flag != null and del_flag != ''">, del_flag</if>
-        )
-        VALUES (#{category_id}, #{good_name}
-        <if test="brand_id != null and brand_id != ''">, #{brand_id}</if>
-        <if test="unit_id != null and unit_id != ''">, #{unit_id}</if>
-        <if test="good_description != null and good_description != ''">, #{good_description}</if>
-        <if test="good_content != null and good_content != ''">, #{good_content}</if>
-        <if test="good_thumb != null and good_thumb != ''">, #{good_thumb}</if>
-        <if test="good_images != null and good_images != ''">, #{good_images}</if>
-        <if test="meta_keyword != null and meta_keyword != ''">, #{meta_keyword}</if>
-        <if test="meta_description != null and meta_description != ''">, #{meta_description}</if>
-        <if test="status != null and status != ''">, #{status}</if>
-        <if test="del_flag != null and del_flag != ''">, #{del_flag}</if>
-        )
-    </insert>
+<!--    <insert id="insertGood" parameterType="com.backendsys.entity.B2c.B2cGoodDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_id">-->
+<!--        INSERT INTO b2c_goods (category_id, good_name-->
+<!--        <if test="brand_id != null and brand_id != ''">, brand_id</if>-->
+<!--        <if test="unit_id != null and unit_id != ''">, unit_id</if>-->
+<!--        <if test="good_description != null and good_description != ''">, good_description</if>-->
+<!--        <if test="good_content != null and good_content != ''">, good_content</if>-->
+<!--        <if test="good_thumb != null and good_thumb != ''">, good_thumb</if>-->
+<!--        <if test="good_images != null and good_images != ''">, good_images</if>-->
+<!--        <if test="meta_keyword != null and meta_keyword != ''">, meta_keyword</if>-->
+<!--        <if test="meta_description != null and meta_description != ''">, meta_description</if>-->
+<!--        <if test="status != null and status != ''">, status</if>-->
+<!--        <if test="del_flag != null and del_flag != ''">, del_flag</if>-->
+<!--        )-->
+<!--        VALUES (#{category_id}, #{good_name}-->
+<!--        <if test="brand_id != null and brand_id != ''">, #{brand_id}</if>-->
+<!--        <if test="unit_id != null and unit_id != ''">, #{unit_id}</if>-->
+<!--        <if test="good_description != null and good_description != ''">, #{good_description}</if>-->
+<!--        <if test="good_content != null and good_content != ''">, #{good_content}</if>-->
+<!--        <if test="good_thumb != null and good_thumb != ''">, #{good_thumb}</if>-->
+<!--        <if test="good_images != null and good_images != ''">, #{good_images}</if>-->
+<!--        <if test="meta_keyword != null and meta_keyword != ''">, #{meta_keyword}</if>-->
+<!--        <if test="meta_description != null and meta_description != ''">, #{meta_description}</if>-->
+<!--        <if test="status != null and status != ''">, #{status}</if>-->
+<!--        <if test="del_flag != null and del_flag != ''">, #{del_flag}</if>-->
+<!--        )-->
+<!--    </insert>-->
 
-    <update id="updateGood" parameterType="com.backendsys.entity.B2c.B2cGoodDTO"
-        useGeneratedKeys="true" keyProperty="good_id">
-        UPDATE b2c_goods
-        SET category_id = #{category_id},
-            good_name = #{good_name}
-            <if test="brand_id != null and brand_id != ''">, brand_id = #{brand_id}</if>
-            <if test="unit_id != null and unit_id != ''">, unit_id = #{unit_id}</if>
-            <if test="good_description != null and good_description != ''">, good_description = #{good_description}</if>
-            <if test="good_content != null and good_content != ''">, good_content = #{good_content}</if>
-            <if test="good_thumb != null and good_thumb != ''">, good_thumb = #{good_thumb}</if>
-            <if test="good_images != null and good_images != ''">, good_images = #{good_images}</if>
-            <if test="meta_keyword != null and meta_keyword != ''">, meta_keyword = #{meta_keyword}</if>
-            <if test="meta_description != null and meta_description != ''">, meta_description = #{meta_description}</if>
-            <if test="status != null and status != ''">, status = #{status}</if>
-            <if test="del_flag != null and del_flag != ''">, del_flag = #{del_flag}</if>
-        WHERE id = #{good_id}
-    </update>
+<!--    <update id="updateGood" parameterType="com.backendsys.entity.B2c.B2cGoodDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_id">-->
+<!--        UPDATE b2c_goods-->
+<!--        SET category_id = #{category_id},-->
+<!--            good_name = #{good_name}-->
+<!--            <if test="brand_id != null and brand_id != ''">, brand_id = #{brand_id}</if>-->
+<!--            <if test="unit_id != null and unit_id != ''">, unit_id = #{unit_id}</if>-->
+<!--            <if test="good_description != null and good_description != ''">, good_description = #{good_description}</if>-->
+<!--            <if test="good_content != null and good_content != ''">, good_content = #{good_content}</if>-->
+<!--            <if test="good_thumb != null and good_thumb != ''">, good_thumb = #{good_thumb}</if>-->
+<!--            <if test="good_images != null and good_images != ''">, good_images = #{good_images}</if>-->
+<!--            <if test="meta_keyword != null and meta_keyword != ''">, meta_keyword = #{meta_keyword}</if>-->
+<!--            <if test="meta_description != null and meta_description != ''">, meta_description = #{meta_description}</if>-->
+<!--            <if test="status != null and status != ''">, status = #{status}</if>-->
+<!--            <if test="del_flag != null and del_flag != ''">, del_flag = #{del_flag}</if>-->
+<!--        WHERE id = #{good_id}-->
+<!--    </update>-->
 
-    <delete id="deleteGood">
-        DELETE FROM b2c_goods WHERE id = #{good_id}
-    </delete>
+<!--    <delete id="deleteGood">-->
+<!--        DELETE FROM b2c_goods WHERE id = #{good_id}-->
+<!--    </delete>-->
 
-</mapper>
+<!--</mapper>-->

+ 16 - 16
src/main/java/com/backendsys/mapper/B2c/B2cGoodUnitMapper.java

@@ -1,16 +1,16 @@
-package com.backendsys.mapper.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodUnitDTO;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-import java.util.Map;
-
-@Mapper
-public interface B2cGoodUnitMapper {
-    List<Map<String, Object>> queryGoodUnitList(B2cGoodUnitDTO b2cGoodUnitDTO);
-    Map<String, Object> queryGoodUnitDetail(Long good_id);
-    long insertGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
-    long deleteGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
-    long updateGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
-}
+//package com.backendsys.mapper.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodUnitDTO;
+//import org.apache.ibatis.annotations.Mapper;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Mapper
+//public interface B2cGoodUnitMapper {
+//    List<Map<String, Object>> queryGoodUnitList(B2cGoodUnitDTO b2cGoodUnitDTO);
+//    Map<String, Object> queryGoodUnitDetail(Long good_id);
+//    long insertGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
+//    long deleteGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
+//    long updateGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
+//}

+ 52 - 52
src/main/java/com/backendsys/mapper/B2c/B2cGoodUnitMapper.xml

@@ -1,59 +1,59 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.backendsys.mapper.B2c.B2cGoodUnitMapper">
+<!--<?xml version="1.0" encoding="utf-8" ?>-->
+<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >-->
+<!--<mapper namespace="com.backendsys.mapper.B2c.B2cGoodUnitMapper">-->
 
-    <sql id="includeGoodsUnit">
-        id,
-        id good_unit_id,
-        unit_name,
-        sort
-    </sql>
-    <resultMap id="resultMapGoodsUnit" type="java.util.LinkedHashMap">
-        <id property="id" column="id" jdbcType="BIGINT" />
-        <result property="good_unit_id" column="good_unit_id" javaType="java.lang.Long"/>
-        <result property="unit_name" column="unit_name" />
-        <result property="sort" column="sort" javaType="java.lang.Integer" />
-    </resultMap>
+<!--    <sql id="includeGoodsUnit">-->
+<!--        id,-->
+<!--        id good_unit_id,-->
+<!--        unit_name,-->
+<!--        sort-->
+<!--    </sql>-->
+<!--    <resultMap id="resultMapGoodsUnit" type="java.util.LinkedHashMap">-->
+<!--        <id property="id" column="id" jdbcType="BIGINT" />-->
+<!--        <result property="good_unit_id" column="good_unit_id" javaType="java.lang.Long"/>-->
+<!--        <result property="unit_name" column="unit_name" />-->
+<!--        <result property="sort" column="sort" javaType="java.lang.Integer" />-->
+<!--    </resultMap>-->
 
-    <select id="queryGoodUnitList" resultMap="resultMapGoodsUnit">
-        SELECT
-        <include refid="includeGoodsUnit" />
-        FROM b2c_goods_unit
-        <where>
-            <if test="unit_name != null and unit_name != ''">
-                AND unit_name LIKE CONCAT('%', #{unit_name}, '%')
-            </if>
-        </where>
-        ORDER BY sort DESC
-    </select>
+<!--    <select id="queryGoodUnitList" resultMap="resultMapGoodsUnit">-->
+<!--        SELECT-->
+<!--        <include refid="includeGoodsUnit" />-->
+<!--        FROM b2c_goods_unit-->
+<!--        <where>-->
+<!--            <if test="unit_name != null and unit_name != ''">-->
+<!--                AND unit_name LIKE CONCAT('%', #{unit_name}, '%')-->
+<!--            </if>-->
+<!--        </where>-->
+<!--        ORDER BY sort DESC-->
+<!--    </select>-->
 
-    <select id="queryGoodUnitDetail" resultMap="resultMapGoodsUnit">
-        SELECT
-        <include refid="includeGoodsUnit" />
-        FROM b2c_goods_unit
-        WHERE id = #{good_unit_id}
-    </select>
+<!--    <select id="queryGoodUnitDetail" resultMap="resultMapGoodsUnit">-->
+<!--        SELECT-->
+<!--        <include refid="includeGoodsUnit" />-->
+<!--        FROM b2c_goods_unit-->
+<!--        WHERE id = #{good_unit_id}-->
+<!--    </select>-->
 
-    <insert id="insertGoodUnit" parameterType="com.backendsys.entity.B2c.B2cGoodUnitDTO"
-        useGeneratedKeys="true" keyProperty="good_unit_id">
-        INSERT INTO b2c_goods_unit (unit_name
-        <if test="sort != null and sort != ''">, sort</if>
-        )
-        VALUES (#{unit_name}
-        <if test="sort != null and sort != ''">, #{sort}</if>
-        )
-    </insert>
+<!--    <insert id="insertGoodUnit" parameterType="com.backendsys.entity.B2c.B2cGoodUnitDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_unit_id">-->
+<!--        INSERT INTO b2c_goods_unit (unit_name-->
+<!--        <if test="sort != null and sort != ''">, sort</if>-->
+<!--        )-->
+<!--        VALUES (#{unit_name}-->
+<!--        <if test="sort != null and sort != ''">, #{sort}</if>-->
+<!--        )-->
+<!--    </insert>-->
 
-    <update id="updateGoodUnit" parameterType="com.backendsys.entity.B2c.B2cGoodUnitDTO"
-        useGeneratedKeys="true" keyProperty="good_unit_id">
-        UPDATE b2c_goods_unit
-        SET unit_name = #{unit_name}
-            <if test="sort != null and sort != ''">, sort = #{sort}</if>
-        WHERE id = #{good_unit_id}
-    </update>
+<!--    <update id="updateGoodUnit" parameterType="com.backendsys.entity.B2c.B2cGoodUnitDTO"-->
+<!--        useGeneratedKeys="true" keyProperty="good_unit_id">-->
+<!--        UPDATE b2c_goods_unit-->
+<!--        SET unit_name = #{unit_name}-->
+<!--            <if test="sort != null and sort != ''">, sort = #{sort}</if>-->
+<!--        WHERE id = #{good_unit_id}-->
+<!--    </update>-->
 
-    <delete id="deleteGoodUnit">
-        DELETE FROM b2c_goods_unit WHERE id = #{good_unit_id}
-    </delete>
+<!--    <delete id="deleteGoodUnit">-->
+<!--        DELETE FROM b2c_goods_unit WHERE id = #{good_unit_id}-->
+<!--    </delete>-->
 
-</mapper>
+<!--</mapper>-->

+ 29 - 0
src/main/java/com/backendsys/modules/b2c/good/controller/GoodBrandController.java

@@ -0,0 +1,29 @@
+package com.backendsys.modules.b2c.good.controller;
+
+import com.backendsys.modules.b2c.good.entity.GoodBrand;
+import com.backendsys.modules.b2c.good.service.GoodBrandService;
+import com.backendsys.modules.common.config.security.annotations.Anonymous;
+import com.backendsys.modules.common.utils.Result;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Validated
+@RestController
+@Tag(name = "商品品牌管理")
+public class GoodBrandController {
+
+    @Autowired
+    private GoodBrandService goodBrandService;
+
+    @Anonymous
+    @Operation(summary = "获取商品品牌列表")
+    @GetMapping("/api/b2c/good/getGoodBrandList")
+    public Result selectGoodBrandList(GoodBrand goodBrand) {
+        return Result.success().put("data", goodBrandService.selectGoodBrandList(goodBrand));
+    }
+
+}

+ 58 - 0
src/main/java/com/backendsys/modules/b2c/good/controller/GoodCategoryController.java

@@ -0,0 +1,58 @@
+package com.backendsys.modules.b2c.good.controller;
+
+import com.backendsys.modules.b2c.good.entity.Good;
+import com.backendsys.modules.b2c.good.entity.GoodCategory;
+import com.backendsys.modules.b2c.good.service.GoodCategoryService;
+import com.backendsys.modules.b2c.good.service.GoodService;
+import com.backendsys.modules.common.utils.Result;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@Validated
+@RestController
+@Tag(name = "商品分类管理")
+public class GoodCategoryController {
+
+    @Autowired
+    private GoodCategoryService goodCategoryService;
+
+    @Operation(summary = "获取商品分类列表")
+    @PreAuthorize("@sr.hasPermission('11.2')")
+    @GetMapping("/api/b2c/good/getGoodCategoryList")
+    public Result getGoodCategory(@Validated GoodCategory goodCategory) {
+        return Result.success().put("data", goodCategoryService.selectGoodCategoryList(goodCategory));
+    }
+
+    @Operation(summary = "获取商品分类详情")
+    @PreAuthorize("@sr.hasPermission('11.2.1')")
+    @GetMapping("/api/b2c/good/getGoodCategoryDetail")
+    public Result getGoodCategoryDetail(@Validated(GoodCategory.Detail.class) GoodCategory goodCategory) {
+        return Result.success().put("data", goodCategoryService.selectGoodCategoryDetail(goodCategory));
+    }
+
+    @Operation(summary = "创建商品分类")
+    @PreAuthorize("@sr.hasPermission('11.2.2')")
+    @PostMapping("/api/b2c/good/createGoodCategory")
+    public Result createGoodCategory(@Validated(GoodCategory.Create.class) @RequestBody GoodCategory goodCategory) {
+        return Result.success().put("data", goodCategoryService.insertGoodCategory(goodCategory));
+    }
+
+    @Operation(summary = "编辑商品分类")
+    @PreAuthorize("@sr.hasPermission('11.2.3')")
+    @PutMapping("/api/b2c/good/updateGoodCategory")
+    public Result updateGoodCategory(@Validated(GoodCategory.Update.class) @RequestBody GoodCategory goodCategory) {
+        return Result.success().put("data", goodCategoryService.updateGoodCategory(goodCategory));
+    }
+
+    @Operation(summary = "删除商品分类")
+    @PreAuthorize("@sr.hasPermission('11.2.4')")
+    @DeleteMapping("/api/b2c/good/deleteGoodCategory")
+    public Result deleteGoodCategory(@Validated(GoodCategory.Delete.class) @RequestBody GoodCategory goodCategory) {
+        return Result.success().put("data", goodCategoryService.deleteGoodCategory(goodCategory));
+    }
+
+}

+ 56 - 0
src/main/java/com/backendsys/modules/b2c/good/controller/GoodController.java

@@ -0,0 +1,56 @@
+package com.backendsys.modules.b2c.good.controller;
+
+import com.backendsys.modules.b2c.good.entity.Good;
+import com.backendsys.modules.b2c.good.service.GoodService;
+import com.backendsys.modules.common.utils.Result;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@Validated
+@RestController
+@Tag(name = "商品管理")
+public class GoodController {
+
+    @Autowired
+    private GoodService goodService;
+
+    @Operation(summary = "获取商品列表")
+    @PreAuthorize("@sr.hasPermission('11.1')")
+    @GetMapping("/api/b2c/good/getGoodList")
+    public Result getGood(@Validated Good good) {
+        return Result.success().put("data", goodService.selectGoodList(good));
+    }
+
+    @Operation(summary = "获取商品详情")
+    @PreAuthorize("@sr.hasPermission('11.1.1')")
+    @GetMapping("/api/b2c/good/getGoodDetail")
+    public Result getGoodDetail(@Validated(Good.Detail.class) Good good) {
+        return Result.success().put("data", goodService.selectGoodDetail(good));
+    }
+
+    @Operation(summary = "创建商品")
+    @PreAuthorize("@sr.hasPermission('11.1.2')")
+    @PostMapping("/api/b2c/good/createGood")
+    public Result createGood(@Validated(Good.Create.class) @RequestBody Good good) {
+        return Result.success().put("data", goodService.insertGood(good));
+    }
+
+    @Operation(summary = "编辑商品")
+    @PreAuthorize("@sr.hasPermission('11.1.3')")
+    @PutMapping("/api/b2c/good/updateGood")
+    public Result updateGood(@Validated(Good.Update.class) @RequestBody Good good) {
+        return Result.success().put("data", goodService.updateGood(good));
+    }
+
+    @Operation(summary = "删除商品")
+    @PreAuthorize("@sr.hasPermission('11.1.4')")
+    @DeleteMapping("/api/b2c/good/deleteGood")
+    public Result deleteGood(@Validated(Good.Delete.class) @RequestBody Good good) {
+        return Result.success().put("data", goodService.deleteGood(good));
+    }
+
+}

+ 28 - 0
src/main/java/com/backendsys/modules/b2c/good/controller/GoodUnitController.java

@@ -0,0 +1,28 @@
+package com.backendsys.modules.b2c.good.controller;
+
+import com.backendsys.modules.b2c.good.service.GoodUnitService;
+import com.backendsys.modules.common.config.security.annotations.Anonymous;
+import com.backendsys.modules.common.utils.Result;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Validated
+@RestController
+@Tag(name = "商品单位管理")
+public class GoodUnitController {
+
+    @Autowired
+    private GoodUnitService goodUnitService;
+
+    @Anonymous
+    @Operation(summary = "获取商品单位列表")
+    @GetMapping("/api/b2c/good/getGoodUnitList")
+    public Result selectGoodUnitList(String unit_category) {
+        return Result.success().put("data", goodUnitService.selectGoodUnitList(unit_category));
+    }
+
+}

+ 14 - 0
src/main/java/com/backendsys/modules/b2c/good/dao/GoodBrandDao.java

@@ -0,0 +1,14 @@
+package com.backendsys.modules.b2c.good.dao;
+
+import com.backendsys.modules.b2c.good.entity.GoodBrand;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface GoodBrandDao extends BaseMapper<GoodBrand> {
+
+    List<GoodBrand> selectGoodBrandList(GoodBrand goodBrand);
+
+}

+ 18 - 0
src/main/java/com/backendsys/modules/b2c/good/dao/GoodCategoryDao.java

@@ -0,0 +1,18 @@
+package com.backendsys.modules.b2c.good.dao;
+
+import com.backendsys.modules.b2c.good.entity.GoodCategory;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface GoodCategoryDao extends BaseMapper<GoodCategory> {
+
+    // 获取商品分类列表
+    List<Map<String, Object>> selectGoodCategoryList(GoodCategory goodCategory);
+    // 获取商品分类详情
+    Map<String, Object> selectGoodCategoryDetail(GoodCategory goodCategory);
+
+}

+ 16 - 0
src/main/java/com/backendsys/modules/b2c/good/dao/GoodCategoryI18nDao.java

@@ -0,0 +1,16 @@
+package com.backendsys.modules.b2c.good.dao;
+
+import com.backendsys.modules.b2c.good.entity.GoodCategoryI18n;
+import com.backendsys.modules.b2c.good.entity.GoodI18n;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface GoodCategoryI18nDao extends BaseMapper<GoodCategoryI18n> {
+
+    int insertBatch(List<GoodCategoryI18n> translations);
+    int updateBatch(List<GoodCategoryI18n> translations);
+
+}

+ 18 - 0
src/main/java/com/backendsys/modules/b2c/good/dao/GoodDao.java

@@ -0,0 +1,18 @@
+package com.backendsys.modules.b2c.good.dao;
+
+import com.backendsys.modules.b2c.good.entity.Good;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface GoodDao extends BaseMapper<Good> {
+
+    // 获取商品列表
+    List<Map<String, Object>> selectGoodList(Good good);
+    // 获取商品详情
+    Map<String, Object> selectGoodDetail(Good good);
+
+}

+ 15 - 0
src/main/java/com/backendsys/modules/b2c/good/dao/GoodI18nDao.java

@@ -0,0 +1,15 @@
+package com.backendsys.modules.b2c.good.dao;
+
+import com.backendsys.modules.b2c.good.entity.GoodI18n;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface GoodI18nDao extends BaseMapper<GoodI18n> {
+
+    int insertBatch(List<GoodI18n> translations);
+    int updateBatch(List<GoodI18n> translations);
+
+}

+ 9 - 0
src/main/java/com/backendsys/modules/b2c/good/dao/GoodUnitDao.java

@@ -0,0 +1,9 @@
+package com.backendsys.modules.b2c.good.dao;
+
+import com.backendsys.modules.b2c.good.entity.GoodUnit;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface GoodUnitDao extends BaseMapper<GoodUnit> {
+}

+ 105 - 0
src/main/java/com/backendsys/modules/b2c/good/entity/Good.java

@@ -0,0 +1,105 @@
+package com.backendsys.modules.b2c.good.entity;
+
+import com.backendsys.config.Mybatis.handler.timezone.LocalDateTimeAdapter;
+import com.backendsys.entity.validator.RangeArray;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.google.gson.annotations.JsonAdapter;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Data
+@TableName("b2c_good")
+public class Good {
+
+    public static interface Detail{}
+    public static interface DetailByUid{}
+    public static interface Create{}
+    public static interface Update{}
+    public static interface Delete{}
+    public static interface DeleteBatch{}
+
+    @TableField(exist = false)
+    private String lang;
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    @TableField("id")
+    @NotNull(message="good_id 不能为空", groups = { Detail.class, Update.class, Delete.class })
+    private Long good_id;
+
+    @NotEmpty(message="uid 不能为空", groups = { DetailByUid.class })
+    private String uid;
+
+    @NotNull(message = "商品分类ID不能为空", groups = { Create.class, Update.class })
+    private Long category_id;
+
+    @TableField(exist = false)
+    private String category_name;
+
+    private Long brand_id;
+
+    @TableField(exist = false)
+    private String brand_name;
+    private Long unit_id;
+
+    @TableField(exist = false)
+    private String unit_name;
+
+    @TableField(exist = false)
+    private String good_name;
+
+    @TableField(exist = false)
+    private String good_description;
+
+    @TableField(exist = false)
+    private String good_content;
+
+    @Size(max = 2000, message = "商品缩略图地址长度不超过 {max} 字符", groups = { Create.class, Update.class })
+    private String good_thumb;
+
+    @Size(max = 20000, message = "商品图片地址长度不超过 {max} 字符", groups = { Create.class, Update.class })
+    private String good_images;
+
+    @TableField(exist = false)
+    private String meta_keyword;
+
+    @TableField(exist = false)
+    private String meta_description;
+
+    @TableField(exist = false)
+    @NotEmpty(message="内容不能为空", groups = { Create.class, Update.class})
+    private List<GoodI18n> translations;
+
+    @RangeArray(message="商品状态取值有误,范围应是(-1禁用, 1启用)", value = {"-1", "1"}, groups = { Create.class, Update.class })
+    private Integer status;
+
+    private Integer del_flag;
+
+    @TableField(exist = false)
+    private String create_time_begin;
+    @TableField(exist = false)
+    private String create_time_end;
+
+    @JsonAdapter(LocalDateTimeAdapter.class)
+    private LocalDateTime create_time;
+
+    @JsonAdapter(LocalDateTimeAdapter.class)
+    private LocalDateTime update_time;
+
+    @TableField(value = "create_time")
+    private String create_time_utc;
+
+    @TableField(value = "update_time")
+    private String update_time_utc;
+
+}

+ 27 - 0
src/main/java/com/backendsys/modules/b2c/good/entity/GoodBrand.java

@@ -0,0 +1,27 @@
+package com.backendsys.modules.b2c.good.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@TableName("b2c_good_brand")
+public class GoodBrand {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    private Long parent_id;
+    private String brand_name;
+    private String brand_name_en;
+
+    @TableField(exist = false)
+    private List<GoodBrand> children;
+
+    private Integer sort;
+    private Integer status;
+
+}

+ 50 - 0
src/main/java/com/backendsys/modules/b2c/good/entity/GoodCategory.java

@@ -0,0 +1,50 @@
+package com.backendsys.modules.b2c.good.entity;
+
+import com.backendsys.entity.validator.RangeArray;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import org.hibernate.validator.constraints.Range;
+
+import java.util.List;
+
+@Data
+@TableName("b2c_good_category")
+public class GoodCategory {
+    public static interface Detail{}
+    public static interface Create{}
+    public static interface Update{}
+    public static interface Delete{}
+
+    @TableField(exist = false)
+    private String lang;
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    @TableField("id")
+    @NotNull(message = "分类ID不能为空", groups = { Detail.class, Update.class, Delete.class })
+    private Long good_category_id;
+
+    private Long parent_id;
+
+    @TableField(exist = false)
+    private String category_name;
+
+    @TableField(exist = false)
+    private String category_description;
+
+    @TableField(exist = false)
+    @NotEmpty(message="内容不能为空", groups = { Create.class, Update.class})
+    private List<GoodCategoryI18n> translations;
+
+    @Range(min = 1, max = 9999, message = "排序必须在 {min} 到 {max} 之间")
+    private Integer sort;
+
+    @RangeArray(message="商品分类状态取值有误,范围应是(-1禁用, 1启用)", value = {"-1", "1"}, groups = { Create.class, Update.class })
+    private Integer status;
+}

+ 36 - 0
src/main/java/com/backendsys/modules/b2c/good/entity/GoodCategoryI18n.java

@@ -0,0 +1,36 @@
+package com.backendsys.modules.b2c.good.entity;
+
+import com.backendsys.entity.validator.RangeArray;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+import org.hibernate.validator.constraints.Range;
+
+@Data
+@TableName("b2c_good_category_i18n")
+public class GoodCategoryI18n {
+    public static interface Detail{}
+    public static interface Create{}
+    public static interface Update{}
+    public static interface Delete{}
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    private Long good_category_id;
+    @NotEmpty(message="语言不能为空", groups = { GoodI18n.Create.class, GoodI18n.Update.class })
+    private String language;
+
+    @Size(max = 50, message = "分类名称长度不超过 {max} 个字符", groups = { Create.class, Update.class })
+    @NotBlank(message = "分类名称不能为空", groups = { Create.class, Update.class })
+    private String category_name;
+
+    @Size(max = 200, message = "分类描述长度不超过 {max} 个字符", groups = { Create.class, Update.class })
+    private String category_description;
+
+}

+ 38 - 0
src/main/java/com/backendsys/modules/b2c/good/entity/GoodI18n.java

@@ -0,0 +1,38 @@
+package com.backendsys.modules.b2c.good.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+
+@Data
+@TableName("b2c_good_i18n")
+public class GoodI18n {
+
+    public static interface Detail{}
+    public static interface Create{}
+    public static interface Update{}
+    public static interface Delete{}
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    private Long good_id;
+    @NotEmpty(message="语言不能为空", groups = { Create.class, Update.class })
+    private String language;
+
+    @Size(max = 100, message = "商品名称长度不超过 {max} 字符", groups = { Create.class, Update.class })
+    @NotEmpty(message="商品名称不能为空", groups = { Create.class, Update.class })
+    private String good_name;
+    @Size(max = 200, message = "商品描述长度不超过 {max} 字符", groups = { Create.class, Update.class })
+    private String good_description;
+    @Size(max = 20000, message = "商品内容长度不超过 {max} 字符", groups = { Create.class, Update.class })
+    @NotEmpty(message="商品内容不能为空")
+    private String good_content;
+    @Size(max = 100, message = "关键词长度不超过 {max} 字符", groups = { Create.class, Update.class })
+    private String meta_keyword;
+    @Size(max = 200, message = "关键词描述长度不超过 {max} 字符", groups = { Create.class, Update.class })
+    private String meta_description;
+
+}

+ 19 - 0
src/main/java/com/backendsys/modules/b2c/good/entity/GoodUnit.java

@@ -0,0 +1,19 @@
+package com.backendsys.modules.b2c.good.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+@Data
+@TableName("b2c_good_unit")
+public class GoodUnit {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    private String unit_category;
+    private String unit_name;
+    private String unit_name_en;
+    private Integer sort;
+
+}

+ 12 - 0
src/main/java/com/backendsys/modules/b2c/good/service/GoodBrandService.java

@@ -0,0 +1,12 @@
+package com.backendsys.modules.b2c.good.service;
+
+import com.backendsys.modules.b2c.good.entity.GoodBrand;
+
+import java.util.List;
+
+public interface GoodBrandService {
+
+    // 获取商品单位
+    List<GoodBrand> selectGoodBrandList(GoodBrand goodBrand);
+
+}

+ 21 - 0
src/main/java/com/backendsys/modules/b2c/good/service/GoodCategoryService.java

@@ -0,0 +1,21 @@
+package com.backendsys.modules.b2c.good.service;
+
+import com.backendsys.modules.b2c.good.entity.GoodCategory;
+import com.backendsys.utils.response.PageEntity;
+
+import java.util.Map;
+
+public interface GoodCategoryService {
+
+    // 获取商品分类列表
+    PageEntity selectGoodCategoryList(GoodCategory goodCategory);
+    // 获取商品分类详情
+    Map<String, Object> selectGoodCategoryDetail(GoodCategory goodCategory);
+    // 创建商品分类
+    Map<String, Object> insertGoodCategory(GoodCategory goodCategory);
+    // 编辑商品分类
+    Map<String, Object> updateGoodCategory(GoodCategory goodCategory);
+    // 删除商品分类
+    Map<String, Object> deleteGoodCategory(GoodCategory goodCategory);
+    
+}

+ 20 - 0
src/main/java/com/backendsys/modules/b2c/good/service/GoodService.java

@@ -0,0 +1,20 @@
+package com.backendsys.modules.b2c.good.service;
+
+import com.backendsys.modules.b2c.good.entity.Good;
+import com.backendsys.utils.response.PageEntity;
+
+import java.util.Map;
+
+public interface GoodService {
+
+    // 获取商品列表
+    PageEntity selectGoodList(Good good);
+    // 获取商品详情
+    Map<String, Object> selectGoodDetail(Good good);
+    // 创建商品
+    Map<String, Object> insertGood(Good good);
+    // 编辑商品
+    Map<String, Object> updateGood(Good good);
+    // 删除商品
+    Map<String, Object> deleteGood(Good good);
+}

+ 12 - 0
src/main/java/com/backendsys/modules/b2c/good/service/GoodUnitService.java

@@ -0,0 +1,12 @@
+package com.backendsys.modules.b2c.good.service;
+
+import com.backendsys.modules.b2c.good.entity.GoodUnit;
+
+import java.util.List;
+
+public interface GoodUnitService {
+
+    // 获取商品单位
+    List<GoodUnit> selectGoodUnitList(String unit_category);
+
+}

+ 51 - 0
src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodBrandServiceImpl.java

@@ -0,0 +1,51 @@
+package com.backendsys.modules.b2c.good.service.impl;
+
+import cn.hutool.core.util.StrUtil;
+import com.backendsys.modules.b2c.good.dao.GoodBrandDao;
+import com.backendsys.modules.b2c.good.entity.GoodBrand;
+import com.backendsys.modules.b2c.good.entity.GoodUnit;
+import com.backendsys.modules.b2c.good.service.GoodBrandService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class GoodBrandServiceImpl implements GoodBrandService {
+
+    @Autowired
+    private GoodBrandDao goodBrandDao;
+
+    // 获取商品单位
+    @Override
+    public List<GoodBrand> selectGoodBrandList(GoodBrand goodBrand) {
+        List<GoodBrand> goodBrandList = goodBrandDao.selectGoodBrandList(goodBrand);
+        return buildTree(goodBrandList, -1L);
+    }
+
+    /**
+     * 递归构建树形结构
+     * @param all_brands 所有品牌数据
+     * @param parent_id  当前父级ID
+     * @return 树形结构列表
+     */
+    private List<GoodBrand> buildTree(List<GoodBrand> all_brands, Long parent_id) {
+        List<GoodBrand> treeList = new ArrayList<>();
+
+        for (GoodBrand brand : all_brands) {
+            if (parent_id.equals(brand.getParent_id())) {
+                // 递归查询子节点
+                List<GoodBrand> children = buildTree(all_brands, brand.getId());
+                if (!children.isEmpty()) {
+                    brand.setChildren(children);
+                }
+                treeList.add(brand);
+            }
+        }
+
+        return treeList;
+    }
+
+}

+ 115 - 0
src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodCategoryServiceImpl.java

@@ -0,0 +1,115 @@
+package com.backendsys.modules.b2c.good.service.impl;
+
+import com.backendsys.exception.CustException;
+import com.backendsys.modules.b2c.good.dao.GoodCategoryDao;
+import com.backendsys.modules.b2c.good.dao.GoodCategoryI18nDao;
+import com.backendsys.modules.b2c.good.entity.GoodCategory;
+import com.backendsys.modules.b2c.good.entity.GoodCategoryI18n;
+import com.backendsys.modules.b2c.good.service.GoodCategoryService;
+import com.backendsys.modules.common.utils.ValidationUtil;
+import com.backendsys.utils.response.PageEntity;
+import com.backendsys.utils.response.PageInfoResult;
+import com.backendsys.utils.v2.PageUtils;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class GoodCategoryServiceImpl implements GoodCategoryService {
+
+    @Autowired
+    private GoodCategoryDao goodCategoryDao;
+    @Autowired
+    private GoodCategoryI18nDao goodCategoryI18nDao;
+
+    /**
+     * 获取商品分类列表
+     */
+    @Override
+    public PageEntity selectGoodCategoryList(GoodCategory goodCategory) {
+        PageUtils.startPage();  // 分页
+        List<Map<String, Object>> list = goodCategoryDao.selectGoodCategoryList(goodCategory);
+        return new PageInfoResult(list).toEntity();
+    }
+
+    /**
+     * 获取商品分类详情
+     */
+    @Override
+    public Map<String, Object> selectGoodCategoryDetail(GoodCategory goodCategory) {
+        Map<String, Object> detail = goodCategoryDao.selectGoodCategoryDetail(goodCategory);
+        if (detail == null) throw new CustException("商品分类不存在");
+        return detail;
+    }
+
+    /**
+     * 创建商品分类
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Map<String, Object> insertGoodCategory(GoodCategory goodCategory) {
+
+        goodCategoryDao.insert(goodCategory);
+
+        // 批量插入 (翻译字段)
+        Long good_category_id = goodCategory.getId();
+        List<GoodCategoryI18n> translations = goodCategory.getTranslations().stream()
+                .peek(item -> { ValidationUtil.validateObject(item, GoodCategoryI18n.Create.class); })
+                .map(item -> { item.setGood_category_id(good_category_id); return item; })
+                .collect(Collectors.toList());
+        goodCategoryI18nDao.insertBatch(translations);
+
+        return Map.of("good_category_id", good_category_id);
+    }
+
+    /**
+     * 编辑商品分类
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Map<String, Object> updateGoodCategory(GoodCategory goodCategory) {
+
+        Long good_category_id = goodCategory.getGood_category_id();
+
+        GoodCategory goodCategoryDetail = goodCategoryDao.selectById(good_category_id);
+        if (goodCategoryDetail == null) throw new CustException("商品分类不存在");
+
+        // 更新
+        goodCategory.setId(good_category_id);
+        goodCategoryDao.updateById(goodCategory);
+
+        // 批量更新 (翻译字段)
+        List<GoodCategoryI18n> translations = goodCategory.getTranslations().stream()
+            .peek(item -> { ValidationUtil.validateObject(item, GoodCategoryI18n.Update.class); })
+            .map(item -> { item.setGood_category_id(good_category_id); return item; })
+            .collect(Collectors.toList());
+
+        goodCategoryI18nDao.updateBatch(translations);
+
+        return Map.of("good_category_id", good_category_id);
+    }
+
+    /**
+     * 删除商品分类
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Map<String, Object> deleteGoodCategory(GoodCategory goodCategory) {
+
+        Long good_category_id = goodCategory.getGood_category_id();
+
+        GoodCategory detail = goodCategoryDao.selectById(good_category_id);
+        if (detail == null) throw new CustException("商品分类不存在");
+
+        goodCategoryDao.deleteById(good_category_id);
+        goodCategoryI18nDao.delete(new QueryWrapper<GoodCategoryI18n>().eq("good_category_id", good_category_id));
+
+        return Map.of("good_category_id", good_category_id);
+    }
+
+}

+ 118 - 0
src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodServiceImpl.java

@@ -0,0 +1,118 @@
+package com.backendsys.modules.b2c.good.service.impl;
+
+import cn.hutool.core.util.IdUtil;
+import com.backendsys.exception.CustException;
+import com.backendsys.modules.b2c.good.dao.GoodDao;
+import com.backendsys.modules.b2c.good.dao.GoodI18nDao;
+import com.backendsys.modules.b2c.good.entity.Good;
+import com.backendsys.modules.b2c.good.entity.GoodI18n;
+import com.backendsys.modules.b2c.good.service.GoodService;
+import com.backendsys.modules.common.utils.ValidationUtil;
+import com.backendsys.utils.response.PageEntity;
+import com.backendsys.utils.response.PageInfoResult;
+import com.backendsys.utils.v2.PageUtils;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class GoodServiceImpl implements GoodService {
+
+    @Autowired
+    private GoodDao goodDao;
+    @Autowired
+    private GoodI18nDao goodI18nDao;
+
+    /**
+     * 获取商品列表
+     */
+    @Override
+    public PageEntity selectGoodList(Good good) {
+        PageUtils.startPage();  // 分页
+        List<Map<String, Object>> list = goodDao.selectGoodList(good);
+        return new PageInfoResult(list).toEntity();
+    }
+
+    /**
+     * 获取商品详情
+     */
+    @Override
+    public Map<String, Object> selectGoodDetail(Good good) {
+        Map<String, Object> detail = goodDao.selectGoodDetail(good);
+        if (detail == null) throw new CustException("商品不存在");
+        return detail;
+    }
+
+    /**
+     * 创建商品
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Map<String, Object> insertGood(Good good) {
+
+        // 生成随机UUID
+        good.setUid(IdUtil.simpleUUID().substring(0, 10));
+        goodDao.insert(good);
+
+        // 批量插入 (翻译字段)
+        Long good_id = good.getId();
+        List<GoodI18n> translations = good.getTranslations().stream()
+                .peek(item -> { ValidationUtil.validateObject(item, GoodI18n.Create.class); })
+                .map(item -> { item.setGood_id(good_id); return item; })
+                .collect(Collectors.toList());
+        goodI18nDao.insertBatch(translations);
+
+        return Map.of("good_id", good_id);
+    }
+
+    /**
+     * 编辑商品
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Map<String, Object> updateGood(Good good) {
+
+        Long good_id = good.getGood_id();
+
+        Good goodDetail = goodDao.selectById(good_id);
+        if (goodDetail == null) throw new CustException("商品不存在");
+
+        // 更新
+        good.setId(good_id);
+        goodDao.updateById(good);
+
+        // 批量更新 (翻译字段)
+        List<GoodI18n> translations = good.getTranslations().stream()
+            .peek(item -> { ValidationUtil.validateObject(item, GoodI18n.Update.class); })
+            .map(t -> { t.setGood_id(good_id); return t; })
+            .collect(Collectors.toList());
+
+        goodI18nDao.updateBatch(translations);
+
+        return Map.of("good_id", good_id);
+    }
+
+    /**
+     * 删除商品
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Map<String, Object> deleteGood(Good good) {
+
+        Long good_id = good.getGood_id();
+
+        Good detail = goodDao.selectById(good_id);
+        if (detail == null) throw new CustException("商品不存在");
+
+        goodDao.deleteById(good_id);
+        goodI18nDao.delete(new QueryWrapper<GoodI18n>().eq("good_id", good_id));
+
+        return Map.of("good_id", good_id);
+    }
+
+}

+ 42 - 0
src/main/java/com/backendsys/modules/b2c/good/service/impl/GoodUnitServiceImpl.java

@@ -0,0 +1,42 @@
+package com.backendsys.modules.b2c.good.service.impl;
+
+import cn.hutool.core.util.StrUtil;
+import com.backendsys.modules.b2c.good.dao.GoodUnitDao;
+import com.backendsys.modules.b2c.good.entity.GoodUnit;
+import com.backendsys.modules.b2c.good.service.GoodUnitService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class GoodUnitServiceImpl implements GoodUnitService {
+
+    @Autowired
+    private GoodUnitDao goodUnitDao;
+
+    /**
+     * 获取商品单位
+     *   分类:
+     *   - 基础单位: general
+     *   - 包装类: packaging
+     *   - 液体容器: liquid
+     *   - 成套商品: set
+     *   - 服装穿戴: clothing
+     *   - 电子设备: electronics
+     *   - 食品计量: food
+     *   - 建材五金: construction
+     *   - 其他单位: other
+     */
+    @Override
+    public List<GoodUnit> selectGoodUnitList(String unit_category) {
+        LambdaQueryWrapper<GoodUnit> wrapper = new LambdaQueryWrapper<>();
+        if (StrUtil.isNotEmpty(unit_category)) {
+            wrapper.eq(GoodUnit::getUnit_category, unit_category);
+        }
+        wrapper.orderByAsc(GoodUnit::getSort);
+        return goodUnitDao.selectList(wrapper);
+    }
+
+}

+ 5 - 0
src/main/java/com/backendsys/modules/cms/article/entity/Article.java

@@ -65,6 +65,11 @@ public class Article {
     private Integer is_top;
 
 
+    @TableField(exist = false)
+    private String create_time_begin;
+    @TableField(exist = false)
+    private String create_time_end;
+
     @JsonAdapter(LocalDateTimeAdapter.class)
     private LocalDateTime create_time;
 

+ 9 - 0
src/main/java/com/backendsys/modules/crt/dao/CrtModelDao.java

@@ -0,0 +1,9 @@
+package com.backendsys.modules.crt.dao;
+
+import com.backendsys.modules.crt.entity.CrtModel;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface CrtModelDao extends BaseMapper<CrtModel> {
+}

+ 7 - 7
src/main/java/com/backendsys/modules/crt/entity/CrtDramaProjectStoryboard.java

@@ -63,27 +63,27 @@ public class CrtDramaProjectStoryboard {
 
     // 每次生成图片数量 (默认值:1,整数范围:1~4)
     @RangeArray(message="生成图片数量取值有误,范围应是(1, 2, 3, 4)", value = { "1", "2", "3", "4" }, groups = { Update.class })
-    private Integer param_image_count;
+    private Integer param_batch_size;
 
     // 提示词引导系数 (默认值:3.5,小数点后一位,范围:1~30)
     @Range(min = 1, max = 30, message = "提示词引导系数必须在 {min} 到 {max} 之间", groups = { Update.class })
-    private Float param_prompt_weight;
+    private Float param_prompt_flux_guidance;
 
-    // 采样方法 (枚举: SamplingMethodEnums)(Euler: euler, DPM++2M: dpmpp_2m)
+    // 采样方法 (枚举: SamplerEnums)(Euler: euler, DPM++2M: dpmpp_2m)
     @RangeStringArray(message="采样方法取值有误,范围应是(Euler, DPM++2M)", value = { "Euler", "DPM++2M" }, groups = { Update.class })
-    private String param_sampling_method;
+    private String param_sampler;
 
     // 步数 (默认值:20,整数范围:1~30)
     @Range(min = 1, max = 30, message = "步数必须在 {min} 到 {max} 之间", groups = { Update.class })
-    private Integer param_step_count;
+    private Integer param_step;
 
     // 随机种子 (默认值:1,范围:(1:随机, 2:自定义))
     @RangeArray(message="随机种子取值有误,范围应是(1, 2)", value = { "1", "2" }, groups = { Update.class })
-    private Integer param_random_seed;
+    private Integer param_seed;
 
     // 随机种子自定义值 (长度: 0~64位整数)
     @Size(max = 64, message = "随机种子自定义值长度不超过 {max} 个字符", groups = { Update.class })
-    private String param_random_seed_custom;
+    private String param_seed_custom;
 
     // 文生图提示词 (生图时必填)
     @Size(max = 2000, message = "文生图提示词 长度不超过 {max} 个字符", groups = { Update.class })

+ 16 - 0
src/main/java/com/backendsys/modules/crt/entity/CrtModel.java

@@ -0,0 +1,16 @@
+package com.backendsys.modules.crt.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+@Data
+@TableName("crt_model")
+public class CrtModel {
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    private String name;
+    private String model_name;
+    private String model_path;
+}

+ 11 - 3
src/main/java/com/backendsys/modules/crt/enums/SamplingMethodEnums.java → src/main/java/com/backendsys/modules/crt/enums/SamplerEnums.java

@@ -3,16 +3,16 @@ package com.backendsys.modules.crt.enums;
 /**
  * 采样方法
  */
-public enum SamplingMethodEnums {
+public enum SamplerEnums {
 
-    EULER("Euler", "DPM++2M"),
+    EULER("Euler", "euler"),
     DPM2M("DPM++2M", "dpmpp_2m")
     ;
 
     private final String key;
     private final String value;
 
-    SamplingMethodEnums(String key, String value) {
+    SamplerEnums(String key, String value) {
         this.key = key;
         this.value = value;
     }
@@ -24,4 +24,12 @@ public enum SamplingMethodEnums {
         return this.key;
     }
 
+    public static String getValueByKey(String key) {
+        for (SamplerEnums enumValue : SamplerEnums.values()) {
+            if (enumValue.key.equals(key)) {
+                return enumValue.value;
+            }
+        }
+        return null;
+    }
 }

+ 450 - 81
src/main/java/com/backendsys/modules/crt/service/impl/CrtGenerateServiceImpl.java

@@ -1,23 +1,29 @@
 package com.backendsys.modules.crt.service.impl;
 
 import cn.hutool.core.convert.Convert;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import com.backendsys.exception.CustException;
-import com.backendsys.modules.common.utils.Result;
+import com.backendsys.modules.crt.dao.CrtDramaProjectSettingsDao;
 import com.backendsys.modules.crt.dao.CrtDramaProjectStoryboardDao;
+import com.backendsys.modules.crt.dao.CrtModelDao;
+import com.backendsys.modules.crt.entity.CrtDramaProjectSettings;
 import com.backendsys.modules.crt.entity.CrtDramaProjectStoryboard;
+import com.backendsys.modules.crt.entity.CrtModel;
+import com.backendsys.modules.crt.enums.SamplerEnums;
 import com.backendsys.modules.crt.service.CrtGenerateService;
 import com.backendsys.modules.sdk.comfyui.entity.CFPromptResponse;
 import com.backendsys.modules.sdk.comfyui.entity.CFQueue;
 import com.backendsys.modules.sdk.comfyui.service.ComfyUIService;
 import com.backendsys.modules.sdk.comfyui.service.ComfyUISocketService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import reactor.core.publisher.Mono;
 
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
@@ -28,6 +34,11 @@ public class CrtGenerateServiceImpl implements CrtGenerateService {
     private ComfyUIService comfyUIService;
     @Autowired
     private ComfyUISocketService comfyUISocketService;
+
+    @Autowired
+    private CrtModelDao crtModelDao;
+    @Autowired
+    private CrtDramaProjectSettingsDao crtDramaProjectSettingsDao;
     @Autowired
     private CrtDramaProjectStoryboardDao crtDramaProjectStoryboardDao;
 
@@ -52,93 +63,451 @@ public class CrtGenerateServiceImpl implements CrtGenerateService {
     @Override
     public Map<String, Object> generateImage(CrtDramaProjectStoryboard crtDramaProjectStoryboard) {
 
+        // 分镜ID
         Long drama_project_storyboard_id = crtDramaProjectStoryboard.getDrama_project_storyboard_id();
 
-        CrtDramaProjectStoryboard detail = crtDramaProjectStoryboardDao.selectById(drama_project_storyboard_id);
-        if (detail == null) throw new CustException("分镜不存在");
+        CrtDramaProjectStoryboard storyboardDetail = crtDramaProjectStoryboardDao.selectById(drama_project_storyboard_id);
+        if (storyboardDetail == null) throw new CustException("分镜不存在");
+        System.out.println("分镜详情: " + JSONUtil.toJsonStr(storyboardDetail));
+
+        Long drama_project_id = storyboardDetail.getDrama_project_id();
+        LambdaQueryWrapper<CrtDramaProjectSettings> wrapperSettings = new LambdaQueryWrapper<>();
+        wrapperSettings.eq(CrtDramaProjectSettings::getDrama_project_id, drama_project_id);
+        List<CrtDramaProjectSettings> settingsDetail = crtDramaProjectSettingsDao.selectList(wrapperSettings);
+        if (settingsDetail == null) throw new CustException("项目配置不存在");
+        System.out.println("项目配置: " + JSONUtil.toJsonStr(settingsDetail));
+
+        // 项目配置类型 (1:生图配置, 2:生视频配置)
+        CrtDramaProjectSettings settings_image = settingsDetail.stream().filter(item -> item.getDrama_project_setting_type() == 1).findFirst().orElse(null);
+        CrtDramaProjectSettings settings_video = settingsDetail.stream().filter(item -> item.getDrama_project_setting_type() == 2).findFirst().orElse(null);
+        System.out.println("- 生图配置: " + JSONUtil.toJsonStr(settings_image));
+        System.out.println("- 生视频配置: " + JSONUtil.toJsonStr(settings_video));
+
+
+        // 文生图提示词
+        String text_to_image_prompt = crtDramaProjectStoryboard.getText_to_image_prompt();
+
+        // == 从 storboard detail 获取参数 =============================================================================
+        Integer param_batch_size = storyboardDetail.getParam_batch_size();                        // 生成图片数量
+        Float param_prompt_flux_guidance = storyboardDetail.getParam_prompt_flux_guidance();      // 提示词引导系数
+        String param_sampler = SamplerEnums.getValueByKey(storyboardDetail.getParam_sampler());   // 采样器
+
+        // 随机种子 (默认值:1,范围:(1:随机, 2:自定义))
+        Integer param_seed = storyboardDetail.getParam_seed();
+        String param_seed_custom = storyboardDetail.getParam_seed_custom();
+        if (param_seed == 1) {
+            param_seed_custom = Convert.toStr(DateUtil.current());   // 生成一个随机值 (毫秒时间戳)
+
+            // 【随机值,要保存到数据库】
+
+        }
+
+        // [db] 获取基础模型 (从项目配置)
+        Long model_id = settings_image.getModel_id();
+        CrtModel modelDetail = crtModelDao.selectById(model_id);
+        String model_name = modelDetail.getModel_name();
+
+
+        // 风格 Lora?
+        // 风格 Lora (阙值)?
+
+
+        // ===========================================================================================================
+
+
+
 
         // -- 前端生成的UUID ---------------------------------------------
         String client_id = Convert.toStr(UUID.randomUUID());
 
-        // -- [ComfyUI] 创建 WebSocket 监听连接 ---------------------------
-        comfyUISocketService.connectToSse(client_id, 8001).subscribe();
-
-        // -- [ComfyUI] 执行任务 -----------------------------------------
-
-        // [Demo-基础生图]
-        String prompt = "{" +
-                    "\"3\": {" +
-                        "\"inputs\": {" +
-                            "\"seed\": 449753344472378," +
-                            "\"steps\": 20," +
-                            "\"cfg\": 8," +
-                            "\"sampler_name\": \"euler\"," +
-                            "\"scheduler\": \"normal\"," +
-                            "\"denoise\": 1," +
-                            "\"model\": [\"4\", 0]," +
-                            "\"positive\": [\"6\", 0]," +
-                            "\"negative\": [\"7\", 0]," +
-                            "\"latent_image\": [\"5\", 0]" +
-                        "}," +
-                        "\"class_type\": \"KSampler\"," +
-                        "\"_meta\": { \"title\": \"K采样器\" }" +
-                    "}," +
-                    "\"4\": {" +
-                        "\"inputs\": {" +
-                            "\"ckpt_name\": \"v1-5-pruned-emaonly-fp16.safetensors\"" +
-                        "}," +
-                        "\"class_type\": \"CheckpointLoaderSimple\"," +
-                        "\"_meta\": { \"title\": \"Checkpoint加载器(简易)\" }" +
-                    "}," +
-                    "\"5\": {" +
-                        "\"inputs\": {" +
-                            "\"width\": 512, \"height\": 512, \"batch_size\": 1" +
-                        "}," +
-                        "\"class_type\": \"EmptyLatentImage\"," +
-                        "\"_meta\": { \"title\": \"空Latent图像\" }" +
-                    "}," +
-                    "\"6\": {" +
-                        "\"inputs\": {" +
-                            "\"text\": \"beautiful scenery nature glass bottle landscape, , purple galaxy bottle,\"," +
-                            "\"speak_and_recognation\": {" +
-                                "\"__value__\": [false, true]" +
-                            "}," +
-                            "\"clip\": [\"4\", 1]" +
-                        "}," +
-                        "\"class_type\": \"CLIPTextEncode\"," +
-                        "\"_meta\": { \"title\": \"CLIP文本编码\" }" +
-                    "}," +
-                    "\"7\": {" +
-                        "\"inputs\": {" +
-                            "\"text\": \"text, watermark\"," +
-                            "\"speak_and_recognation\": {" +
-                                "\"__value__\": [false, true]" +
-                            "}," +
-                            "\"clip\": [\"4\", 1]" +
-                        "}," +
-                        "\"class_type\": \"CLIPTextEncode\"," +
-                        "\"_meta\": { \"title\": \"CLIP文本编码\" }" +
-                    "}," +
-                    "\"8\": {" +
-                        "\"inputs\": {" +
-                            "\"samples\": [\"3\", 0]," +
-                            "\"vae\": [\"4\", 2]," +
-                        "}," +
-                        "\"class_type\": \"VAEDecode\"," +
-                        "\"_meta\": { \"title\": \"VAE解码\" }" +
-                    "}," +
-                    "\"9\": {" +
-                        "\"inputs\": {" +
-                            "\"filename_prefix\": \"ComfyUI\"," +
-                            "\"images\": [\"8\", 0]" +
-                        "}," +
-                        "\"class_type\": \"SaveImage\"," +
-                        "\"_meta\": { \"title\": \"保存图像\" }" +
-                    "}," +
-                "}";
+        // -- [ComfyUI] 创建 WebSocket 监听连接 --------------------------
+        comfyUISocketService.connectToSse(client_id, 8000).subscribe();
 
-        JSONObject prompt_object = JSONUtil.parseObj(prompt);
+        // -------------------------------------------------------------
+        // [ComfyUI-基础生图]
+//        String prompt = "{" +
+//                    "\"3\": {" +
+//                        "\"inputs\": {" +
+//                            "\"seed\": 449753344472378," +
+//                            "\"steps\": 20," +
+//                            "\"cfg\": 8," +
+//                            "\"sampler_name\": \"euler\"," +
+//                            "\"scheduler\": \"normal\"," +
+//                            "\"denoise\": 1," +
+//                            "\"model\": [\"4\", 0]," +
+//                            "\"positive\": [\"6\", 0]," +
+//                            "\"negative\": [\"7\", 0]," +
+//                            "\"latent_image\": [\"5\", 0]" +
+//                        "}," +
+//                        "\"class_type\": \"KSampler\"," +
+//                        "\"_meta\": { \"title\": \"K采样器\" }" +
+//                    "}," +
+//                    "\"4\": {" +
+//                        "\"inputs\": {" +
+//                            "\"ckpt_name\": \"v1-5-pruned-emaonly-fp16.safetensors\"" +
+//                        "}," +
+//                        "\"class_type\": \"CheckpointLoaderSimple\"," +
+//                        "\"_meta\": { \"title\": \"Checkpoint加载器(简易)\" }" +
+//                    "}," +
+//                    "\"5\": {" +
+//                        "\"inputs\": {" +
+//                            "\"width\": 512, \"height\": 512, \"batch_size\": 1" +
+//                        "}," +
+//                        "\"class_type\": \"EmptyLatentImage\"," +
+//                        "\"_meta\": { \"title\": \"空Latent图像\" }" +
+//                    "}," +
+//                    "\"6\": {" +
+//                        "\"inputs\": {" +
+//                            "\"text\": \"beautiful scenery nature glass bottle landscape, , purple galaxy bottle,\"," +
+//                            "\"speak_and_recognation\": {" +
+//                                "\"__value__\": [false, true]" +
+//                            "}," +
+//                            "\"clip\": [\"4\", 1]" +
+//                        "}," +
+//                        "\"class_type\": \"CLIPTextEncode\"," +
+//                        "\"_meta\": { \"title\": \"CLIP文本编码\" }" +
+//                    "}," +
+//                    "\"7\": {" +
+//                        "\"inputs\": {" +
+//                            "\"text\": \"text, watermark\"," +
+//                            "\"speak_and_recognation\": {" +
+//                                "\"__value__\": [false, true]" +
+//                            "}," +
+//                            "\"clip\": [\"4\", 1]" +
+//                        "}," +
+//                        "\"class_type\": \"CLIPTextEncode\"," +
+//                        "\"_meta\": { \"title\": \"CLIP文本编码\" }" +
+//                    "}," +
+//                    "\"8\": {" +
+//                        "\"inputs\": {" +
+//                            "\"samples\": [\"3\", 0]," +
+//                            "\"vae\": [\"4\", 2]," +
+//                        "}," +
+//                        "\"class_type\": \"VAEDecode\"," +
+//                        "\"_meta\": { \"title\": \"VAE解码\" }" +
+//                    "}," +
+//                    "\"9\": {" +
+//                        "\"inputs\": {" +
+//                            "\"filename_prefix\": \"ComfyUI\"," +
+//                            "\"images\": [\"8\", 0]" +
+//                        "}," +
+//                        "\"class_type\": \"SaveImage\"," +
+//                        "\"_meta\": { \"title\": \"保存图像\" }" +
+//                    "}," +
+//                "}";
+
+        // ComfyUI - 7.4生图.json
+        String prompt = "{"+
+                "  \"3\": {"+
+                "    \"inputs\": {"+
+                "      \"text\": ["+
+                "        \"120\","+
+                "        0"+
+                "      ],"+
+                "      \"speak_and_recognation\": {"+
+                "        \"__value__\": ["+
+                "          false,"+
+                "          true"+
+                "        ]"+
+                "      },"+
+                "      \"clip\": ["+
+                "        \"151\","+
+                "        1"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"CLIPTextEncode\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"CLIP文本编码\""+
+                "    }"+
+                "  },"+
+                "  \"13\": {"+
+                "    \"inputs\": {"+
+                "      \"guidance\": " + param_prompt_flux_guidance + ","+
+                "      \"conditioning\": ["+
+                "        \"3\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"FluxGuidance\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"Flux引导\""+
+                "    }"+
+                "  },"+
+                "  \"15\": {"+
+                "    \"inputs\": {"+
+                "      \"model\": ["+
+                "        \"152\","+
+                "        0"+
+                "      ],"+
+                "      \"conditioning\": ["+
+                "        \"13\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"BasicGuider\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"基本引导器\""+
+                "    }"+
+                "  },"+
+                "  \"31\": {"+
+                "    \"inputs\": {"+
+                "      \"samples\": ["+
+                "        \"32\","+
+                "        0"+
+                "      ],"+
+                "      \"vae\": ["+
+                "        \"151\","+
+                "        2"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"VAEDecode\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"VAE解码\""+
+                "    }"+
+                "  },"+
+                "  \"32\": {"+
+                "    \"inputs\": {"+
+                "      \"noise\": ["+
+                "        \"37\","+
+                "        0"+
+                "      ],"+
+                "      \"guider\": ["+
+                "        \"15\","+
+                "        0"+
+                "      ],"+
+                "      \"sampler\": ["+
+                "        \"84\","+
+                "        0"+
+                "      ],"+
+                "      \"sigmas\": ["+
+                "        \"150\","+
+                "        0"+
+                "      ],"+
+                "      \"latent_image\": ["+
+                "        \"90\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"SamplerCustomAdvanced\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"自定义采样器(高级)\""+
+                "    }"+
+                "  },"+
+                "  \"37\": {"+
+                "    \"inputs\": {"+
+                "      \"noise_seed\": " + param_seed_custom +
+                "    },"+
+                "    \"class_type\": \"RandomNoise\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"随机噪波\""+
+                "    }"+
+                "  },"+
+                "  \"38\": {"+
+                "    \"inputs\": {"+
+                "      \"text\": \"\","+
+                "      \"speak_and_recognation\": {"+
+                "        \"__value__\": ["+
+                "          false,"+
+                "          true"+
+                "        ]"+
+                "      }"+
+                "    },"+
+                "    \"class_type\": \"TextInput_\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"触发词\""+
+                "    }"+
+                "  },"+
+                "  \"51\": {"+
+                "    \"inputs\": {"+
+                "      \"text\": \"fenjing_" + drama_project_storyboard_id + "\","+
+                "      \"speak_and_recognation\": {"+
+                "        \"__value__\": ["+
+                "          false,"+
+                "          true"+
+                "        ]"+
+                "      }"+
+                "    },"+
+                "    \"class_type\": \"TextInput_\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"分镜号\""+
+                "    }"+
+                "  },"+
+                "  \"84\": {"+
+                "    \"inputs\": {"+
+                "      \"sampler_name\": \"" + param_sampler + "\""+
+                "    },"+
+                "    \"class_type\": \"KSamplerSelect\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"K采样器选择\""+
+                "    }"+
+                "  },"+
+                "  \"90\": {"+
+                "    \"inputs\": {"+
+                "      \"width\": ["+
+                "        \"121\","+
+                "        0"+
+                "      ],"+
+                "      \"height\": ["+
+                "        \"122\","+
+                "        0"+
+                "      ],"+
+                "      \"batch_size\": " + param_batch_size +
+                "    },"+
+                "    \"class_type\": \"EmptySD3LatentImage\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"空Latent图像(SD3)\""+
+                "    }"+
+                "  },"+
+                "  \"91\": {"+
+                "    \"inputs\": {"+
+                "      \"filename_prefix\": ["+
+                "        \"51\","+
+                "        0"+
+                "      ],"+
+                "      \"images\": ["+
+                "        \"31\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"SaveImage\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"保存图像\""+
+                "    }"+
+                "  },"+
+                "  \"120\": {"+
+                "    \"inputs\": {"+
+                "      \"text_0\": \", a pig\","+
+                "      \"text\": ["+
+                "        \"148\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"PandasShowText\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"Pandas Show Text\""+
+                "    }"+
+                "  },"+
+                "  \"121\": {"+
+                "    \"inputs\": {"+
+                "      \"value\": 1280"+
+                "    },"+
+                "    \"class_type\": \"easy int\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"整数\""+
+                "    }"+
+                "  },"+
+                "  \"122\": {"+
+                "    \"inputs\": {"+
+                "      \"value\": 720"+
+                "    },"+
+                "    \"class_type\": \"easy int\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"整数\""+
+                "    }"+
+                "  },"+
+                "  \"146\": {"+
+                "    \"inputs\": {"+
+                "      \"from_translate\": \"auto\","+
+                "      \"to_translate\": \"english\","+
+                "      \"add_proxies\": false,"+
+                "      \"proxies\": \"\","+
+                "      \"auth_data\": \"\","+
+                "      \"service\": \"BaiduTranslator [appid and appkey]\","+
+                "      \"text\": ["+
+                "        \"153\","+
+                "        0"+
+                "      ],"+
+                "      \"Show proxy\": \"proxy_hide\","+
+                "      \"Show authorization\": \"authorization_hide\","+
+                "      \"speak_and_recognation\": {"+
+                "        \"__value__\": ["+
+                "          false,"+
+                "          true"+
+                "        ]"+
+                "      }"+
+                "    },"+
+                "    \"class_type\": \"DeepTranslatorTextNode\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"Deep Translator Text Node\""+
+                "    }"+
+                "  },"+
+                "  \"148\": {"+
+                "    \"inputs\": {"+
+                "      \"delimiter\": \", \","+
+                "      \"string1\": ["+
+                "        \"38\","+
+                "        0"+
+                "      ],"+
+                "      \"string2\": ["+
+                "        \"146\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"JoinStrings\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"Join Strings\""+
+                "    }"+
+                "  },"+
+                "  \"150\": {"+
+                "    \"inputs\": {"+
+                "      \"scheduler\": \"normal\","+
+                "      \"steps\": 25,"+
+                "      \"denoise\": 1,"+
+                "      \"model\": ["+
+                "        \"152\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"BasicScheduler\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"基本调度器\""+
+                "    }"+
+                "  },"+
+                "  \"151\": {"+
+                "    \"inputs\": {"+
+                "      \"ckpt_name\": \"" + model_name + "\""+
+                "    },"+
+                "    \"class_type\": \"CheckpointLoaderSimple\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"Checkpoint加载器(简易)\""+
+                "    }"+
+                "  },"+
+                "  \"152\": {"+
+                "    \"inputs\": {"+
+                "      \"lora_name\": \"【FLUX】都市高武推文 _ 异能 法术 战斗_v1.0.safetensors\","+
+                "      \"strength_model\": 0,"+
+                "      \"model\": ["+
+                "        \"151\","+
+                "        0"+
+                "      ]"+
+                "    },"+
+                "    \"class_type\": \"LoraLoaderModelOnly\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"LoRA加载器(仅模型)\""+
+                "    }"+
+                "  },"+
+                "  \"153\": {"+
+                "    \"inputs\": {"+
+                "      \"text\": \"" + text_to_image_prompt + "\","+
+                "      \"speak_and_recognation\": {"+
+                "        \"__value__\": ["+
+                "          false,"+
+                "          true"+
+                "        ]"+
+                "      }"+
+                "    },"+
+                "    \"class_type\": \"TextInput_\","+
+                "    \"_meta\": {"+
+                "      \"title\": \"Text Input ♾️Mixlab\""+
+                "    }"+
+                "  }"+
+                "}"
+        ;
 
+
+        // -------------------------------------------------------------
+
+        JSONObject prompt_object = JSONUtil.parseObj(prompt);
         System.out.println("prompt_object: " + prompt_object);
 
         // [ComfyUI] 执行任务

+ 1 - 1
src/main/java/com/backendsys/modules/sdk/comfyui/controller/ComfyUIDemoController.java

@@ -33,7 +33,7 @@ public class ComfyUIDemoController {
     @Anonymous
     @PostMapping("/api/comfyui/ws/connect")
     public String connect(String clientId) {
-        comfyUISocketService.connect(clientId, 8001).subscribe();
+        comfyUISocketService.connect(clientId, 8000).subscribe();
         return "Connection initiated for: " + clientId;
     }
 

+ 3 - 3
src/main/java/com/backendsys/modules/sdk/comfyui/service/impl/ComfyUIServiceImpl.java

@@ -32,7 +32,7 @@ public class ComfyUIServiceImpl implements ComfyUIService {
     private WebClient webClient;
     public WebClient getWebClient() {
         if (webClient == null) {
-//            webClient = WebClient.builder().baseUrl(COMFYUI_HOST + ":8001").filter(WebClientFilter.logFilter).build();
+//            webClient = WebClient.builder().baseUrl(COMFYUI_HOST + ":8000").filter(WebClientFilter.logFilter).build();
             webClient = WebClient.builder().filter(WebClientFilter.logFilter).build();
         }
         return webClient;
@@ -53,7 +53,7 @@ public class ComfyUIServiceImpl implements ComfyUIService {
      * [ComfyUI] 查询任务队列
      */
     public Mono<CFQueue> getQueue() {
-        String url = "http://" + COMFYUI_HOST + ":8001/queue";
+        String url = "http://" + COMFYUI_HOST + ":8000/queue";
         WebClient webClient = getWebClient();
         return webClient.get()
                 .uri(url)
@@ -72,7 +72,7 @@ public class ComfyUIServiceImpl implements ComfyUIService {
         bodyValue.setClient_id(client_id);
         bodyValue.setPrompt(prompt);
 
-        String url = "http://" + COMFYUI_HOST + ":8001/prompt";
+        String url = "http://" + COMFYUI_HOST + ":8000/prompt";
 
         WebClient webClient = getWebClient();
         return webClient.post()

+ 5 - 9
src/main/java/com/backendsys/modules/sdk/tencentcloud/ems/controller/TencentEmsController.java

@@ -1,19 +1,14 @@
 package com.backendsys.modules.sdk.tencentcloud.ems.controller;
 
-import cn.hutool.json.JSONObject;
 import com.backendsys.modules.common.config.security.annotations.Anonymous;
-import com.backendsys.modules.common.config.security.utils.HttpRequestUtil;
 import com.backendsys.modules.common.utils.Result;
-import com.backendsys.modules.sdk.tencentcloud.ems.entity.TencentEmsCallback;
 import com.backendsys.modules.sdk.tencentcloud.ems.entity.TencentEmsCallbackParams;
 import com.backendsys.modules.sdk.tencentcloud.ems.service.TencentEmsService;
 import com.backendsys.modules.sdk.tencentcloud.ems.service.TencentEmsCallbackService;
-import com.tencentcloudapi.common.exception.TencentCloudSDKException;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.servlet.http.HttpServletRequest;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
@@ -25,8 +20,9 @@ import java.util.Map;
 @Tag(name = "腾讯云-邮件回调")
 public class TencentEmsController {
 
-    @Autowired
-    private TencentEmsService tencentEmsService;
+//    @Autowired
+//    private TencentEmsService tencentEmsService;
+
     @Autowired
     private TencentEmsCallbackService tencentEmsCallbackService;
 
@@ -45,7 +41,7 @@ public class TencentEmsController {
     @Anonymous
     @Operation(summary = "邮件推送通知事件回调")
     @PostMapping("/api/ems/callback")
-    public Result receiveCallback(@RequestBody TencentEmsCallbackParams tencentEmsCallbackParams) {
+    public Result receiveCallback(@Validated(TencentEmsCallbackParams.Callback.class) @RequestBody TencentEmsCallbackParams tencentEmsCallbackParams) {
         //System.out.println("===============================");
         //System.out.println("邮件推送通知事件回调");
         //System.out.println("body 参数: " + tencentEmsCallbackParams);

+ 5 - 0
src/main/java/com/backendsys/modules/sdk/tencentcloud/ems/entity/TencentEmsCallbackParams.java

@@ -1,10 +1,15 @@
 package com.backendsys.modules.sdk.tencentcloud.ems.entity;
 
+import jakarta.validation.constraints.NotEmpty;
 import lombok.Data;
 
 @Data
 public class TencentEmsCallbackParams {
+
+    public static interface Callback {}
+
     private String event;
+    @NotEmpty(message = "邮件地址不能为空", groups = { Callback.class })
     private String email;
     private String bulkId;
     private Long timestamp;

+ 16 - 35
src/main/java/com/backendsys/modules/sdk/tencentcloud/ems/service/impl/TencentEmsCallbackServiceImpl.java

@@ -17,40 +17,21 @@ public class TencentEmsCallbackServiceImpl implements TencentEmsCallbackService
 
     @Override
     public void receiveCallback(TencentEmsCallbackParams tencentEmsCallbackParams) {
-        String messageId = tencentEmsCallbackParams.getMessageId();
-        try {
-
-            // 判断邮箱地址非空
-            String email = tencentEmsCallbackParams.getEmail();
-            if (!StrUtil.isBlank(email) && Validator.isEmail(email)) {
-
-                // 这里可能需要做更多的条件判断?
-
-                // 构建实体
-                TencentEmsCallback entity = new TencentEmsCallback();
-                entity.setEvent(tencentEmsCallbackParams.getEvent());
-                entity.setEmail(email);
-                entity.setBulk_id(tencentEmsCallbackParams.getBulkId());
-                entity.setTimestamp(tencentEmsCallbackParams.getTimestamp());
-                entity.setReason(tencentEmsCallbackParams.getReason());
-                entity.setBounce_type(tencentEmsCallbackParams.getBounceType());
-                entity.setUsername(tencentEmsCallbackParams.getUsername());
-                entity.setSender(tencentEmsCallbackParams.getFrom());
-                entity.setFrom_domain(tencentEmsCallbackParams.getFromDomain());
-                entity.setTemplate_id(tencentEmsCallbackParams.getTemplateId());
-                entity.setSubject(tencentEmsCallbackParams.getSubject());
-                entity.setMessage_id(messageId);
-                // 保存记录
-                tencentEmsCallbackDao.insert(entity);
-                System.out.println("邮件推送回调成功 From: " + email);
-
-            }
-
-        } catch (DuplicateKeyException e) {
-            // 数据库唯一索引冲突兜底幂等
-            System.out.println("重复插入数据:" + messageId);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+        // 构建实体
+        TencentEmsCallback entity = new TencentEmsCallback();
+        entity.setEvent(tencentEmsCallbackParams.getEvent());
+        entity.setEmail(tencentEmsCallbackParams.getEmail());
+        entity.setBulk_id(tencentEmsCallbackParams.getBulkId());
+        entity.setTimestamp(tencentEmsCallbackParams.getTimestamp());
+        entity.setReason(tencentEmsCallbackParams.getReason());
+        entity.setBounce_type(tencentEmsCallbackParams.getBounceType());
+        entity.setUsername(tencentEmsCallbackParams.getUsername());
+        entity.setSender(tencentEmsCallbackParams.getFrom());
+        entity.setFrom_domain(tencentEmsCallbackParams.getFromDomain());
+        entity.setTemplate_id(tencentEmsCallbackParams.getTemplateId());
+        entity.setSubject(tencentEmsCallbackParams.getSubject());
+        entity.setMessage_id(tencentEmsCallbackParams.getMessageId());
+        // 保存记录
+        tencentEmsCallbackDao.insert(entity);
     }
 }

+ 13 - 13
src/main/java/com/backendsys/service/B2c/B2cGoodBrandService.java

@@ -1,13 +1,13 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodBrandDTO;
-
-import java.util.Map;
-
-public interface B2cGoodBrandService {
-    Map<String, Object> queryGoodBrandList(Integer pageNum, Integer pageSize, B2cGoodBrandDTO b2cGoodBrandDTO);
-    Map<String, Object> queryGoodBrandDetail(Long good_id);
-    Map<String, Object> insertGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
-    Map<String, Object> updateGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
-    Map<String, Object> deleteGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodBrandDTO;
+//
+//import java.util.Map;
+//
+//public interface B2cGoodBrandService {
+//    Map<String, Object> queryGoodBrandList(Integer pageNum, Integer pageSize, B2cGoodBrandDTO b2cGoodBrandDTO);
+//    Map<String, Object> queryGoodBrandDetail(Long good_id);
+//    Map<String, Object> insertGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
+//    Map<String, Object> updateGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
+//    Map<String, Object> deleteGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO);
+//}

+ 72 - 72
src/main/java/com/backendsys/service/B2c/B2cGoodBrandServiceImpl.java

@@ -1,72 +1,72 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodBrandDTO;
-import com.backendsys.mapper.B2c.B2cGoodBrandMapper;
-import com.backendsys.utils.response.PageInfoResult;
-import com.github.pagehelper.PageHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class B2cGoodBrandServiceImpl implements B2cGoodBrandService {
-
-    @Autowired
-    private B2cGoodBrandMapper b2cGoodBrandMapper;
-
-    /**
-     * 查询 列表
-     */
-    public Map<String, Object> queryGoodBrandList(Integer pageNum, Integer pageSize, B2cGoodBrandDTO b2cGoodBrandDTO) {
-        // 分页查询
-        if (pageNum != null && pageSize != null) {
-            PageHelper.startPage(pageNum, pageSize);
-            PageHelper.getLocalPage().setPageSizeZero(true);
-        }
-        // 分页输出 (自定义)
-        List<Map<String, Object>> list = b2cGoodBrandMapper.queryGoodBrandList(b2cGoodBrandDTO);
-        PageInfoResult pageInfoResult = new PageInfoResult(list);
-        return pageInfoResult.toMap();
-    }
-
-    /**
-     * 查询 详情
-     */
-    @Override
-    public Map<String, Object> queryGoodBrandDetail(Long good_brand_id) {
-        return b2cGoodBrandMapper.queryGoodBrandDetail(good_brand_id);
-    }
-
-    /**
-     * 创建
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> insertGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO) {
-        b2cGoodBrandMapper.insertGoodBrand(b2cGoodBrandDTO);
-        return Map.of("good_brand_id", b2cGoodBrandDTO.getGood_brand_id());
-    }
-
-    /**
-     * 更新
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> updateGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO) {
-        b2cGoodBrandMapper.updateGoodBrand(b2cGoodBrandDTO);
-        return Map.of("good_brand_id", b2cGoodBrandDTO.getGood_brand_id());
-    }
-
-    /**
-     * 删除
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> deleteGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO) {
-        b2cGoodBrandMapper.deleteGoodBrand(b2cGoodBrandDTO);
-        return Map.of("good_brand_id", b2cGoodBrandDTO.getGood_brand_id());
-    }
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodBrandDTO;
+//import com.backendsys.mapper.B2c.B2cGoodBrandMapper;
+//import com.backendsys.utils.response.PageInfoResult;
+//import com.github.pagehelper.PageHelper;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Service
+//public class B2cGoodBrandServiceImpl implements B2cGoodBrandService {
+//
+//    @Autowired
+//    private B2cGoodBrandMapper b2cGoodBrandMapper;
+//
+//    /**
+//     * 查询 列表
+//     */
+//    public Map<String, Object> queryGoodBrandList(Integer pageNum, Integer pageSize, B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        // 分页查询
+//        if (pageNum != null && pageSize != null) {
+//            PageHelper.startPage(pageNum, pageSize);
+//            PageHelper.getLocalPage().setPageSizeZero(true);
+//        }
+//        // 分页输出 (自定义)
+//        List<Map<String, Object>> list = b2cGoodBrandMapper.queryGoodBrandList(b2cGoodBrandDTO);
+//        PageInfoResult pageInfoResult = new PageInfoResult(list);
+//        return pageInfoResult.toMap();
+//    }
+//
+//    /**
+//     * 查询 详情
+//     */
+//    @Override
+//    public Map<String, Object> queryGoodBrandDetail(Long good_brand_id) {
+//        return b2cGoodBrandMapper.queryGoodBrandDetail(good_brand_id);
+//    }
+//
+//    /**
+//     * 创建
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> insertGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        b2cGoodBrandMapper.insertGoodBrand(b2cGoodBrandDTO);
+//        return Map.of("good_brand_id", b2cGoodBrandDTO.getGood_brand_id());
+//    }
+//
+//    /**
+//     * 更新
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> updateGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        b2cGoodBrandMapper.updateGoodBrand(b2cGoodBrandDTO);
+//        return Map.of("good_brand_id", b2cGoodBrandDTO.getGood_brand_id());
+//    }
+//
+//    /**
+//     * 删除
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> deleteGoodBrand(B2cGoodBrandDTO b2cGoodBrandDTO) {
+//        b2cGoodBrandMapper.deleteGoodBrand(b2cGoodBrandDTO);
+//        return Map.of("good_brand_id", b2cGoodBrandDTO.getGood_brand_id());
+//    }
+//}

+ 13 - 13
src/main/java/com/backendsys/service/B2c/B2cGoodCategoryService.java

@@ -1,13 +1,13 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
-
-import java.util.Map;
-
-public interface B2cGoodCategoryService {
-    Map<String, Object> queryGoodCategoryList(Integer pageNum, Integer pageSize, B2cGoodCategoryDTO b2cGoodCategoryDTO);
-    Map<String, Object> queryGoodCategoryDetail(Long good_id);
-    Map<String, Object> insertGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
-    Map<String, Object> updateGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
-    Map<String, Object> deleteGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
+//
+//import java.util.Map;
+//
+//public interface B2cGoodCategoryService {
+//    Map<String, Object> queryGoodCategoryList(Integer pageNum, Integer pageSize, B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//    Map<String, Object> queryGoodCategoryDetail(Long good_id);
+//    Map<String, Object> insertGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//    Map<String, Object> updateGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//    Map<String, Object> deleteGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO);
+//}

+ 72 - 72
src/main/java/com/backendsys/service/B2c/B2cGoodCategoryServiceImpl.java

@@ -1,72 +1,72 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
-import com.backendsys.mapper.B2c.B2cGoodCategoryMapper;
-import com.backendsys.utils.response.PageInfoResult;
-import com.github.pagehelper.PageHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class B2cGoodCategoryServiceImpl implements B2cGoodCategoryService {
-
-    @Autowired
-    private B2cGoodCategoryMapper b2cGoodCategoryMapper;
-
-    /**
-     * 查询 列表
-     */
-    public Map<String, Object> queryGoodCategoryList(Integer pageNum, Integer pageSize, B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        // 分页查询
-        if (pageNum != null && pageSize != null) {
-            PageHelper.startPage(pageNum, pageSize);
-            PageHelper.getLocalPage().setPageSizeZero(true);
-        }
-        // 分页输出 (自定义)
-        List<Map<String, Object>> list = b2cGoodCategoryMapper.queryGoodCategoryList(b2cGoodCategoryDTO);
-        PageInfoResult pageInfoResult = new PageInfoResult(list);
-        return pageInfoResult.toMap();
-    }
-
-    /**
-     * 查询 详情
-     */
-    @Override
-    public Map<String, Object> queryGoodCategoryDetail(Long good_category_id) {
-        return b2cGoodCategoryMapper.queryGoodCategoryDetail(good_category_id);
-    }
-
-    /**
-     * 创建
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> insertGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        b2cGoodCategoryMapper.insertGoodCategory(b2cGoodCategoryDTO);
-        return Map.of("good_category_id", b2cGoodCategoryDTO.getGood_category_id());
-    }
-
-    /**
-     * 更新
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> updateGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        b2cGoodCategoryMapper.updateGoodCategory(b2cGoodCategoryDTO);
-        return Map.of("good_category_id", b2cGoodCategoryDTO.getGood_category_id());
-    }
-
-    /**
-     * 删除
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> deleteGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO) {
-        b2cGoodCategoryMapper.deleteGoodCategory(b2cGoodCategoryDTO);
-        return Map.of("good_category_id", b2cGoodCategoryDTO.getGood_category_id());
-    }
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodCategoryDTO;
+//import com.backendsys.mapper.B2c.B2cGoodCategoryMapper;
+//import com.backendsys.utils.response.PageInfoResult;
+//import com.github.pagehelper.PageHelper;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Service
+//public class B2cGoodCategoryServiceImpl implements B2cGoodCategoryService {
+//
+//    @Autowired
+//    private B2cGoodCategoryMapper b2cGoodCategoryMapper;
+//
+//    /**
+//     * 查询 列表
+//     */
+//    public Map<String, Object> queryGoodCategoryList(Integer pageNum, Integer pageSize, B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        // 分页查询
+//        if (pageNum != null && pageSize != null) {
+//            PageHelper.startPage(pageNum, pageSize);
+//            PageHelper.getLocalPage().setPageSizeZero(true);
+//        }
+//        // 分页输出 (自定义)
+//        List<Map<String, Object>> list = b2cGoodCategoryMapper.queryGoodCategoryList(b2cGoodCategoryDTO);
+//        PageInfoResult pageInfoResult = new PageInfoResult(list);
+//        return pageInfoResult.toMap();
+//    }
+//
+//    /**
+//     * 查询 详情
+//     */
+//    @Override
+//    public Map<String, Object> queryGoodCategoryDetail(Long good_category_id) {
+//        return b2cGoodCategoryMapper.queryGoodCategoryDetail(good_category_id);
+//    }
+//
+//    /**
+//     * 创建
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> insertGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        b2cGoodCategoryMapper.insertGoodCategory(b2cGoodCategoryDTO);
+//        return Map.of("good_category_id", b2cGoodCategoryDTO.getGood_category_id());
+//    }
+//
+//    /**
+//     * 更新
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> updateGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        b2cGoodCategoryMapper.updateGoodCategory(b2cGoodCategoryDTO);
+//        return Map.of("good_category_id", b2cGoodCategoryDTO.getGood_category_id());
+//    }
+//
+//    /**
+//     * 删除
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> deleteGoodCategory(B2cGoodCategoryDTO b2cGoodCategoryDTO) {
+//        b2cGoodCategoryMapper.deleteGoodCategory(b2cGoodCategoryDTO);
+//        return Map.of("good_category_id", b2cGoodCategoryDTO.getGood_category_id());
+//    }
+//}

+ 13 - 13
src/main/java/com/backendsys/service/B2c/B2cGoodService.java

@@ -1,13 +1,13 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodDTO;
-
-import java.util.Map;
-
-public interface B2cGoodService {
-    Map<String, Object> queryGoodList(Integer pageNum, Integer pageSize, B2cGoodDTO b2cGoodDTO);
-    Map<String, Object> queryGoodDetail(Long good_id);
-    Map<String, Object> insertGood(B2cGoodDTO b2cGoodDTO);
-    Map<String, Object> updateGood(B2cGoodDTO b2cGoodDTO);
-    Map<String, Object> deleteGood(B2cGoodDTO b2cGoodDTO);
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodDTO;
+//
+//import java.util.Map;
+//
+//public interface B2cGoodService {
+//    Map<String, Object> queryGoodList(Integer pageNum, Integer pageSize, B2cGoodDTO b2cGoodDTO);
+//    Map<String, Object> queryGoodDetail(Long good_id);
+//    Map<String, Object> insertGood(B2cGoodDTO b2cGoodDTO);
+//    Map<String, Object> updateGood(B2cGoodDTO b2cGoodDTO);
+//    Map<String, Object> deleteGood(B2cGoodDTO b2cGoodDTO);
+//}

+ 72 - 72
src/main/java/com/backendsys/service/B2c/B2cGoodServiceImpl.java

@@ -1,72 +1,72 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodDTO;
-import com.backendsys.mapper.B2c.B2cGoodMapper;
-import com.backendsys.utils.response.PageInfoResult;
-import com.github.pagehelper.PageHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class B2cGoodServiceImpl implements B2cGoodService {
-
-    @Autowired
-    private B2cGoodMapper b2cGoodMapper;
-
-    /**
-     * 查询 列表
-     */
-    public Map<String, Object> queryGoodList(Integer pageNum, Integer pageSize, B2cGoodDTO b2cGoodDTO) {
-        // 分页查询
-        if (pageNum != null && pageSize != null) {
-            PageHelper.startPage(pageNum, pageSize);
-            PageHelper.getLocalPage().setPageSizeZero(true);
-        }
-        // 分页输出 (自定义)
-        List<Map<String, Object>> list = b2cGoodMapper.queryGoodList(b2cGoodDTO);
-        PageInfoResult pageInfoResult = new PageInfoResult(list);
-        return pageInfoResult.toMap();
-    }
-
-    /**
-     * 查询 详情
-     */
-    @Override
-    public Map<String, Object> queryGoodDetail(Long good_id) {
-        return b2cGoodMapper.queryGoodDetail(good_id);
-    }
-
-    /**
-     * 创建
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> insertGood(B2cGoodDTO b2cGoodDTO) {
-        b2cGoodMapper.insertGood(b2cGoodDTO);
-        return Map.of("good_id", b2cGoodDTO.getGood_id());
-    }
-
-    /**
-     * 更新
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> updateGood(B2cGoodDTO b2cGoodDTO) {
-        b2cGoodMapper.updateGood(b2cGoodDTO);
-        return Map.of("good_id", b2cGoodDTO.getGood_id());
-    }
-
-    /**
-     * 删除
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> deleteGood(B2cGoodDTO b2cGoodDTO) {
-        b2cGoodMapper.deleteGood(b2cGoodDTO);
-        return Map.of("good_id", b2cGoodDTO.getGood_id());
-    }
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodDTO;
+//import com.backendsys.mapper.B2c.B2cGoodMapper;
+//import com.backendsys.utils.response.PageInfoResult;
+//import com.github.pagehelper.PageHelper;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Service
+//public class B2cGoodServiceImpl implements B2cGoodService {
+//
+//    @Autowired
+//    private B2cGoodMapper b2cGoodMapper;
+//
+//    /**
+//     * 查询 列表
+//     */
+//    public Map<String, Object> queryGoodList(Integer pageNum, Integer pageSize, B2cGoodDTO b2cGoodDTO) {
+//        // 分页查询
+//        if (pageNum != null && pageSize != null) {
+//            PageHelper.startPage(pageNum, pageSize);
+//            PageHelper.getLocalPage().setPageSizeZero(true);
+//        }
+//        // 分页输出 (自定义)
+//        List<Map<String, Object>> list = b2cGoodMapper.queryGoodList(b2cGoodDTO);
+//        PageInfoResult pageInfoResult = new PageInfoResult(list);
+//        return pageInfoResult.toMap();
+//    }
+//
+//    /**
+//     * 查询 详情
+//     */
+//    @Override
+//    public Map<String, Object> queryGoodDetail(Long good_id) {
+//        return b2cGoodMapper.queryGoodDetail(good_id);
+//    }
+//
+//    /**
+//     * 创建
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> insertGood(B2cGoodDTO b2cGoodDTO) {
+//        b2cGoodMapper.insertGood(b2cGoodDTO);
+//        return Map.of("good_id", b2cGoodDTO.getGood_id());
+//    }
+//
+//    /**
+//     * 更新
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> updateGood(B2cGoodDTO b2cGoodDTO) {
+//        b2cGoodMapper.updateGood(b2cGoodDTO);
+//        return Map.of("good_id", b2cGoodDTO.getGood_id());
+//    }
+//
+//    /**
+//     * 删除
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> deleteGood(B2cGoodDTO b2cGoodDTO) {
+//        b2cGoodMapper.deleteGood(b2cGoodDTO);
+//        return Map.of("good_id", b2cGoodDTO.getGood_id());
+//    }
+//}

+ 13 - 13
src/main/java/com/backendsys/service/B2c/B2cGoodUnitService.java

@@ -1,13 +1,13 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodUnitDTO;
-
-import java.util.Map;
-
-public interface B2cGoodUnitService {
-    Map<String, Object> queryGoodUnitList(Integer pageNum, Integer pageSize, B2cGoodUnitDTO b2cGoodUnitDTO);
-    Map<String, Object> queryGoodUnitDetail(Long good_id);
-    Map<String, Object> insertGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
-    Map<String, Object> updateGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
-    Map<String, Object> deleteGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodUnitDTO;
+//
+//import java.util.Map;
+//
+//public interface B2cGoodUnitService {
+//    Map<String, Object> queryGoodUnitList(Integer pageNum, Integer pageSize, B2cGoodUnitDTO b2cGoodUnitDTO);
+//    Map<String, Object> queryGoodUnitDetail(Long good_id);
+//    Map<String, Object> insertGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
+//    Map<String, Object> updateGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
+//    Map<String, Object> deleteGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO);
+//}

+ 72 - 72
src/main/java/com/backendsys/service/B2c/B2cGoodUnitServiceImpl.java

@@ -1,72 +1,72 @@
-package com.backendsys.service.B2c;
-
-import com.backendsys.entity.B2c.B2cGoodUnitDTO;
-import com.backendsys.mapper.B2c.B2cGoodUnitMapper;
-import com.backendsys.utils.response.PageInfoResult;
-import com.github.pagehelper.PageHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class B2cGoodUnitServiceImpl implements B2cGoodUnitService {
-
-    @Autowired
-    private B2cGoodUnitMapper b2cGoodUnitMapper;
-
-    /**
-     * 查询 列表
-     */
-    public Map<String, Object> queryGoodUnitList(Integer pageNum, Integer pageSize, B2cGoodUnitDTO b2cGoodUnitDTO) {
-        // 分页查询
-        if (pageNum != null && pageSize != null) {
-            PageHelper.startPage(pageNum, pageSize);
-            PageHelper.getLocalPage().setPageSizeZero(true);
-        }
-        // 分页输出 (自定义)
-        List<Map<String, Object>> list = b2cGoodUnitMapper.queryGoodUnitList(b2cGoodUnitDTO);
-        PageInfoResult pageInfoResult = new PageInfoResult(list);
-        return pageInfoResult.toMap();
-    }
-
-    /**
-     * 查询 详情
-     */
-    @Override
-    public Map<String, Object> queryGoodUnitDetail(Long good_unit_id) {
-        return b2cGoodUnitMapper.queryGoodUnitDetail(good_unit_id);
-    }
-
-    /**
-     * 创建
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> insertGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO) {
-        b2cGoodUnitMapper.insertGoodUnit(b2cGoodUnitDTO);
-        return Map.of("good_unit_id", b2cGoodUnitDTO.getGood_unit_id());
-    }
-
-    /**
-     * 更新
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> updateGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO) {
-        b2cGoodUnitMapper.updateGoodUnit(b2cGoodUnitDTO);
-        return Map.of("good_unit_id", b2cGoodUnitDTO.getGood_unit_id());
-    }
-
-    /**
-     * 删除
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Map<String, Object> deleteGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO) {
-        b2cGoodUnitMapper.deleteGoodUnit(b2cGoodUnitDTO);
-        return Map.of("good_unit_id", b2cGoodUnitDTO.getGood_unit_id());
-    }
-}
+//package com.backendsys.service.B2c;
+//
+//import com.backendsys.entity.B2c.B2cGoodUnitDTO;
+//import com.backendsys.mapper.B2c.B2cGoodUnitMapper;
+//import com.backendsys.utils.response.PageInfoResult;
+//import com.github.pagehelper.PageHelper;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//@Service
+//public class B2cGoodUnitServiceImpl implements B2cGoodUnitService {
+//
+//    @Autowired
+//    private B2cGoodUnitMapper b2cGoodUnitMapper;
+//
+//    /**
+//     * 查询 列表
+//     */
+//    public Map<String, Object> queryGoodUnitList(Integer pageNum, Integer pageSize, B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        // 分页查询
+//        if (pageNum != null && pageSize != null) {
+//            PageHelper.startPage(pageNum, pageSize);
+//            PageHelper.getLocalPage().setPageSizeZero(true);
+//        }
+//        // 分页输出 (自定义)
+//        List<Map<String, Object>> list = b2cGoodUnitMapper.queryGoodUnitList(b2cGoodUnitDTO);
+//        PageInfoResult pageInfoResult = new PageInfoResult(list);
+//        return pageInfoResult.toMap();
+//    }
+//
+//    /**
+//     * 查询 详情
+//     */
+//    @Override
+//    public Map<String, Object> queryGoodUnitDetail(Long good_unit_id) {
+//        return b2cGoodUnitMapper.queryGoodUnitDetail(good_unit_id);
+//    }
+//
+//    /**
+//     * 创建
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> insertGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        b2cGoodUnitMapper.insertGoodUnit(b2cGoodUnitDTO);
+//        return Map.of("good_unit_id", b2cGoodUnitDTO.getGood_unit_id());
+//    }
+//
+//    /**
+//     * 更新
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> updateGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        b2cGoodUnitMapper.updateGoodUnit(b2cGoodUnitDTO);
+//        return Map.of("good_unit_id", b2cGoodUnitDTO.getGood_unit_id());
+//    }
+//
+//    /**
+//     * 删除
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Map<String, Object> deleteGoodUnit(B2cGoodUnitDTO b2cGoodUnitDTO) {
+//        b2cGoodUnitMapper.deleteGoodUnit(b2cGoodUnitDTO);
+//        return Map.of("good_unit_id", b2cGoodUnitDTO.getGood_unit_id());
+//    }
+//}

+ 40 - 0
src/main/resources/mapper/b2c/good/GoodBrandDao.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.backendsys.modules.b2c.good.dao.GoodBrandDao">
+
+    <sql id="includeGoodBrand">
+        id,
+        COALESCE(parent_id, -1) parent_id,
+        COALESCE(brand_name, "") brand_name,
+        COALESCE(brand_name_en, "") brand_name_en,
+        sort,
+        status
+    </sql>
+
+    <resultMap id="resultMapGoodBrand" type="com.backendsys.modules.b2c.good.entity.GoodBrand">
+        <id property="id" column="id" jdbcType="BIGINT" />
+        <result property="parent_id" column="parent_id" javaType="java.lang.Long" />
+        <result property="brand_name" column="brand_name" />
+        <result property="brand_name_en" column="brand_name_en" />
+        <result property="sort" column="sort" javaType="java.lang.Integer" />
+        <result property="status" column="status" javaType="java.lang.Integer" />
+    </resultMap>
+
+    <select id="selectGoodBrandList" resultMap="resultMapGoodBrand">
+        SELECT <include refid="includeGoodBrand" />
+        FROM b2c_good_brand
+        <where>
+            <if test="brand_name != null and brand_name != ''">
+                AND brand_name = #{brand_name}
+            </if>
+            <if test="brand_name_en != null and brand_name_en != ''">
+                AND brand_name_en = #{brand_name_en}
+            </if>
+            <if test="status != null and status != ''">
+                AND status = #{status}
+            </if>
+        </where>
+        ORDER BY sort DESC
+    </select>
+
+</mapper>

+ 124 - 0
src/main/resources/mapper/b2c/good/GoodCategoryDao.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.backendsys.modules.b2c.good.dao.GoodCategoryDao">
+
+    <sql id="includeGoodCategory">
+        g.id id,
+        g.id good_category_id,
+        COALESCE(g.parent_id, -1) parent_id,
+        gt.category_name category_name,
+        COALESCE(gt.category_description, '') category_description,
+        g.sort sort,
+        g.status status
+    </sql>
+
+    <sql id="includeGoodCategoryDetail">
+        g.id id,
+        g.id good_category_id,
+        COALESCE(g.parent_id, -1) parent_id,
+        g.sort sort,
+        g.status status
+    </sql>
+
+    <sql id="includeGoodCategoryTranslation">
+        id,
+        good_category_id,
+        language,
+        category_name,
+        COALESCE(category_description, '') category_description
+    </sql>
+    <sql id="leftJoinTranslations">
+        LEFT JOIN b2c_good_category_i18n gt ON g.id = gt.good_category_id
+    </sql>
+
+    <sql id="includeGoodCategoryDetailFull">
+        g.id id,
+        g.id good_category_id,
+        COALESCE(g.parent_id, -1) parent_id,
+        gt.language,
+        gt.category_name category_name,
+        COALESCE(gt.category_description, '') category_description,
+        g.sort sort,
+        g.status status
+    </sql>
+
+    <resultMap id="resultMapGoodCategory" type="java.util.LinkedHashMap">
+        <id property="id" column="id" jdbcType="BIGINT" />
+        <result property="good_category_id" column="good_category_id" javaType="java.lang.Long" />
+        <result property="parent_id" column="parent_id" javaType="java.lang.Long" />
+        <result property="category_name" column="category_name" />
+        <result property="category_description" column="category_description" />
+        <result property="sort" column="sort" javaType="java.lang.Integer" />
+        <result property="status" column="status" javaType="java.lang.Integer" />
+    </resultMap>
+
+    <resultMap id="resultMapGoodCategoryDetail" type="java.util.LinkedHashMap">
+        <id property="id" column="id" jdbcType="BIGINT" />
+        <result property="good_category_id" column="good_category_id" javaType="java.lang.Long" />
+        <result property="parent_id" column="parent_id" javaType="java.lang.Long" />
+        <result property="sort" column="sort" javaType="java.lang.Integer" />
+        <result property="status" column="status" javaType="java.lang.Integer" />
+        <collection property="translations" javaType="java.util.List"
+            select="queryTranslationsById" column="id">
+            <id property="id" column="id" />
+            <result property="category_name" column="category_name" />
+            <result property="category_description" column="category_description" />
+        </collection>
+    </resultMap>
+
+    <resultMap id="resultMapGoodCategoryDetailFull" type="java.util.LinkedHashMap">
+        <id property="id" column="id" jdbcType="BIGINT" />
+        <result property="good_category_id" column="good_category_id" javaType="java.lang.Long" />
+        <result property="parent_id" column="parent_id" javaType="java.lang.Long" />
+        <result property="language" column="language" />
+        <result property="category_name" column="category_name" />
+        <result property="category_description" column="category_description" />
+        <result property="sort" column="sort" javaType="java.lang.Integer" />
+        <result property="status" column="status" javaType="java.lang.Integer" />
+    </resultMap>
+
+    <!-- 查 列表 -->
+    <select id="selectGoodCategoryList" resultMap="resultMapGoodCategory">
+        SELECT <include refid="includeGoodCategory" /> FROM b2c_good_category g
+        <include refid="leftJoinTranslations" />
+        <where>
+            gt.language = #{lang}
+            <if test="category_name != null and category_name != ''">
+                AND gt.category_name LIKE CONCAT('%', #{category_name}, '%')
+            </if>
+            <if test="status != null and status != ''">
+                AND g.status = #{status}
+            </if>
+        </where>
+        ORDER BY g.sort DESC
+    </select>
+
+    <!-- 查 详情 -->
+    <select id="selectGoodCategoryDetail" resultMap="resultMapGoodCategoryDetail">
+        SELECT <include refid="includeGoodCategoryDetail" />
+        FROM b2c_good_category g
+        <where>
+            <if test="good_category_id != null and good_category_id != ''">
+                AND g.id = #{good_category_id}
+            </if>
+        </where>
+    </select>
+
+    <!-- 查 详情 完整 -->
+    <select id="selectGoodCategoryDetailFull" resultMap="resultMapGoodCategoryDetailFull">
+        SELECT <include refid="includeGoodCategoryDetailFull" />
+        FROM b2c_good_category g
+        <include refid="leftJoinTranslations" />
+        WHERE
+            gt.language = #{lang}
+            AND g.status = #{status}
+    </select>
+
+    <!-- 查 翻译详情 (子查询) -->
+    <select id="queryTranslationsById" resultType="java.util.LinkedHashMap">
+        SELECT <include refid="includeGoodCategoryTranslation" />
+        FROM b2c_good_category_i18n
+        WHERE good_category_id = #{id}
+    </select>
+
+</mapper>

+ 36 - 0
src/main/resources/mapper/b2c/good/GoodCategoryI18nDao.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.backendsys.modules.b2c.good.dao.GoodCategoryI18nDao">
+
+    <!-- 批量插入 -->
+    <insert id="insertBatch" parameterType="java.util.List">
+        INSERT INTO b2c_good_category_i18n (
+            good_category_id, language,
+            category_name, category_description
+        )
+        VALUES
+        <foreach collection="translations" item="item" separator=",">
+        (
+            #{item.good_category_id}, #{item.language},
+            #{item.category_name}, #{item.category_description}
+        )
+        </foreach>
+    </insert>
+
+    <!-- 批量更新 -->
+    <update id="updateBatch" parameterType="com.backendsys.modules.b2c.good.entity.GoodI18n">
+        <foreach collection="translations" item="item" separator=";">
+            UPDATE b2c_good_category_i18n
+            <set>
+                <trim suffixOverrides="," suffix=" ">
+                    category_name = #{item.category_name},
+                    <if test="item.category_description != null and item.category_description != ''">
+                        category_description = #{item.category_description},
+                    </if>
+                </trim>
+            </set>
+            WHERE good_category_id = #{item.good_category_id} AND language = #{item.language}
+        </foreach>
+    </update>
+
+</mapper>

+ 237 - 0
src/main/resources/mapper/b2c/good/GoodDao.xml

@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.backendsys.modules.b2c.good.dao.GoodDao">
+
+    <sql id="includeGood">
+        g.id id,
+        g.id good_id,
+        g.uid uid,
+        gc.id category_id,
+        gc.category_name category_name,
+
+        COALESCE(g.brand_id, -1) brand_id,
+        COALESCE(gb.brand_name, '') brand_name,
+        COALESCE(gb.brand_name_en, '') brand_name_en,
+        COALESCE(g.unit_id, -1) unit_id,
+        COALESCE(gu.unit_name, '') unit_name,
+        COALESCE(gu.unit_name_en, '') unit_name_en,
+
+        COALESCE(g.good_thumb, '') good_thumb,
+        COALESCE(g.good_images, '') good_images,
+        gt.good_name good_name,
+        COALESCE(gt.good_description, '') good_description,
+        g.status status,
+        g.is_top is_top,
+        g.create_time create_time,
+        g.update_time update_time
+    </sql>
+
+    <sql id="includeGoodDetail">
+        g.id id,
+        g.id good_id,
+        g.uid uid,
+        gc.id category_id,
+        gc.category_name category_name,
+
+        COALESCE(g.brand_id, -1) brand_id,
+        COALESCE(gb.brand_name, '') brand_name,
+        COALESCE(gb.brand_name_en, '') brand_name_en,
+        COALESCE(g.unit_id, -1) unit_id,
+        COALESCE(gu.unit_name, '') unit_name,
+        COALESCE(gu.unit_name_en, '') unit_name_en,
+
+        COALESCE(g.good_thumb, '') good_thumb,
+        COALESCE(g.good_images, '') good_images,
+        g.status status,
+        g.is_top is_top,
+        g.create_time create_time,
+        g.update_time update_time
+    </sql>
+
+    <sql id="includeGoodTranslation">
+        id,
+        good_id,
+        language,
+        good_name,
+        good_description,
+        good_content,
+        COALESCE(meta_keyword, '') meta_keyword,
+        COALESCE(meta_description, '') meta_description
+    </sql>
+    <sql id="leftJoinCategory">
+        LEFT JOIN b2c_good_category_i18n gc ON gc.good_category_id = g.category_id AND gc.language = #{lang}
+    </sql>
+    <sql id="leftJoinTranslations">LEFT JOIN b2c_good_i18n gt ON g.id = gt.good_id</sql>
+    <sql id="leftJoinUnit">LEFT JOIN b2c_good_unit gu ON g.unit_id = gu.id</sql>
+    <sql id="leftJoinBrand">LEFT JOIN b2c_good_brand gb ON g.brand_id = gb.id</sql>
+
+
+    <sql id="includeGoodDetailFull">
+        g.id id,
+        g.id good_id,
+        gt.language,
+        g.uid uid,
+
+        gc.id category_id,
+        gc.category_name category_name,
+
+        COALESCE(g.brand_id, -1) brand_id,
+        COALESCE(gb.brand_name, '') brand_name,
+        COALESCE(gb.brand_name_en, '') brand_name_en,
+        COALESCE(g.unit_id, -1) unit_id,
+        COALESCE(gu.unit_name, '') unit_name,
+        COALESCE(gu.unit_name_en, '') unit_name_en,
+
+        COALESCE(g.good_thumb, '') good_thumb,
+        COALESCE(g.good_images, '') good_images,
+
+        gt.good_name good_name,
+        COALESCE(gt.good_description, '') good_description,
+        COALESCE(gt.good_content, '') good_content,
+
+        g.status status,
+        g.is_top is_top,
+        g.create_time create_time,
+        g.update_time update_time
+    </sql>
+
+    <resultMap id="resultMapGood" type="java.util.LinkedHashMap">
+        <id property="id" column="id" jdbcType="BIGINT" />
+        <result property="good_id" column="good_id" javaType="java.lang.Long" />
+        <result property="uid" column="uid" />
+        <result property="category_id" column="category_id" javaType="java.lang.Long" />
+        <result property="category_name" column="category_name" />
+        <result property="brand_id" column="brand_id" javaType="java.lang.Long" />
+        <result property="brand_name" column="brand_name" />
+        <result property="brand_name_en" column="brand_name_en" />
+        <result property="unit_id" column="unit_id" javaType="java.lang.Long" />
+        <result property="unit_name" column="unit_name" />
+        <result property="unit_name_en" column="unit_name_en" />
+        <result property="good_thumb" column="good_thumb" />
+        <result property="good_images" column="good_images" />
+        <result property="good_name" column="good_name" />
+        <result property="good_description" column="good_description" />
+        <result property="status" column="status" javaType="java.lang.Integer" />
+        <result property="is_top" column="is_top" javaType="java.lang.Integer" />
+        <result property="create_time" column="create_time" />
+        <result property="update_time" column="update_time" />
+    </resultMap>
+
+    <resultMap id="resultMapGoodDetail" type="java.util.LinkedHashMap">
+        <id property="id" column="id" jdbcType="BIGINT" />
+        <result property="good_id" column="good_id" javaType="java.lang.Long" />
+        <result property="uid" column="uid" />
+        <result property="category_id" column="category_id" javaType="java.lang.Long" />
+        <result property="category_name" column="category_name" />
+        <result property="brand_id" column="brand_id" javaType="java.lang.Long" />
+        <result property="brand_name" column="brand_name" />
+        <result property="brand_name_en" column="brand_name_en" />
+        <result property="unit_id" column="unit_id" javaType="java.lang.Long" />
+        <result property="unit_name" column="unit_name" />
+        <result property="unit_name_en" column="unit_name_en" />
+        <result property="good_thumb" column="good_thumb" />
+        <result property="good_images" column="good_images" />
+        <result property="status" column="status" javaType="java.lang.Integer" />
+        <result property="is_top" column="is_top" javaType="java.lang.Integer" />
+        <result property="create_time" column="create_time" />
+        <result property="update_time" column="update_time" />
+        <collection property="translations" javaType="java.util.List"
+            select="queryTranslationsById" column="id">
+            <id property="id" column="id" />
+            <result property="good_name" column="good_name" />
+            <result property="good_description" column="good_description" />
+            <result property="good_content" column="good_content" />
+            <result property="meta_keyword" column="meta_keyword" />
+            <result property="meta_description" column="meta_description" />
+        </collection>
+    </resultMap>
+
+    <resultMap id="resultMapGoodDetailFull" type="java.util.LinkedHashMap">
+        <id property="id" column="id" jdbcType="BIGINT" />
+        <result property="good_id" column="good_id" javaType="java.lang.Long" />
+        <result property="uid" column="uid" />
+        <result property="language" column="language" />
+        <result property="category_id" column="category_id" javaType="java.lang.Long" />
+        <result property="category_name" column="category_name" />
+        <result property="brand_id" column="brand_id" javaType="java.lang.Long" />
+        <result property="unit_id" column="unit_id" javaType="java.lang.Long" />
+        <result property="good_thumb" column="good_thumb" />
+        <result property="good_images" column="good_images" />
+        <result property="good_name" column="good_name" />
+        <result property="good_description" column="good_description" />
+        <result property="good_content" column="good_content" />
+        <result property="meta_keyword" column="meta_keyword" />
+        <result property="meta_description" column="meta_description" />
+        <result property="status" column="status" javaType="java.lang.Integer" />
+        <result property="is_top" column="is_top" javaType="java.lang.Integer" />
+        <result property="create_time" column="create_time" />
+        <result property="update_time" column="update_time" />
+    </resultMap>
+
+    <!-- 查 列表 -->
+    <select id="selectGoodList" resultMap="resultMapGood">
+        SELECT <include refid="includeGood" /> FROM b2c_good g
+        <include refid="leftJoinCategory" />
+        <include refid="leftJoinTranslations" />
+        <include refid="leftJoinUnit" />
+        <include refid="leftJoinBrand" />
+        <where>
+            gt.language = #{lang}
+            <if test="uid != null and uid != ''">
+                AND g.uid = #{uid}
+            </if>
+            <if test="category_id != null and category_id != ''">
+                AND g.category_id = #{category_id}
+            </if>
+            <if test="good_name != null and good_name != ''">
+                AND gt.good_name LIKE CONCAT('%', #{good_name}, '%')
+            </if>
+            <if test="status != null and status != ''">
+                AND g.status = #{status}
+            </if>
+            <if test="create_time_begin != null and create_time_begin != '' and create_time_end != null and create_time_end != ''">
+                AND g.create_time BETWEEN #{create_time_begin} AND #{create_time_end}
+            </if>
+        </where>
+        ORDER BY g.is_top = 1 DESC, g.create_time DESC
+    </select>
+
+    <!-- 查 详情 -->
+    <select id="selectGoodDetail" resultMap="resultMapGoodDetail">
+        SELECT <include refid="includeGoodDetail" />
+        FROM b2c_good g
+        <include refid="leftJoinCategory" />
+        <include refid="leftJoinUnit" />
+        <include refid="leftJoinBrand" />
+        <where>
+            <if test="uid != null and uid != ''">
+                AND g.uid = #{uid}
+            </if>
+            <if test="good_id != null and good_id != ''">
+                AND g.id = #{good_id}
+            </if>
+        </where>
+    </select>
+
+    <!-- 查 详情 完整 -->
+    <select id="selectGoodDetailFull" resultMap="resultMapGoodDetailFull">
+        SELECT <include refid="includeGoodDetailFull" />
+        FROM b2c_good g
+        <include refid="leftJoinCategory" />
+        <include refid="leftJoinTranslations" />
+        <include refid="leftJoinUnit" />
+        <include refid="leftJoinBrand" />
+        WHERE
+            gt.language = #{lang}
+            AND g.uid = #{uid}
+            AND g.status = #{status}
+    </select>
+
+    <!-- 查 翻译详情 (子查询) -->
+    <select id="queryTranslationsById" resultType="java.util.LinkedHashMap">
+        SELECT <include refid="includeGoodTranslation" />
+        FROM b2c_good_i18n
+        WHERE good_id = #{id}
+    </select>
+
+</mapper>

+ 44 - 0
src/main/resources/mapper/b2c/good/GoodI18nDao.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.backendsys.modules.b2c.good.dao.GoodI18nDao">
+
+    <!-- 批量插入 -->
+    <insert id="insertBatch" parameterType="java.util.List">
+        INSERT INTO b2c_good_i18n (
+            good_id, language,
+            good_name, good_description, good_content, meta_keyword, meta_description
+        )
+        VALUES
+        <foreach collection="translations" item="item" separator=",">
+        (
+            #{item.good_id}, #{item.language},
+            #{item.good_name}, #{item.good_description}, #{item.good_content},
+            #{item.meta_keyword}, #{item.meta_description}
+        )
+        </foreach>
+    </insert>
+
+    <!-- 批量更新 -->
+    <update id="updateBatch" parameterType="com.backendsys.modules.b2c.good.entity.GoodI18n">
+        <foreach collection="translations" item="item" separator=";">
+            UPDATE b2c_good_i18n
+            <set>
+                <trim suffixOverrides="," suffix=" ">
+                    good_name = #{item.good_name},
+                    good_content = #{item.good_content},
+                    <if test="item.good_description != null and item.good_description != ''">
+                        good_description = #{item.good_description},
+                    </if>
+                    <if test="item.meta_keyword != null and item.meta_keyword != ''">
+                        meta_keyword = #{item.meta_keyword},
+                    </if>
+                    <if test="item.meta_description != null and item.meta_description != ''">
+                        meta_description = #{item.meta_description},
+                    </if>
+                </trim>
+            </set>
+            WHERE good_id = #{item.good_id} AND language = #{item.language}
+        </foreach>
+    </update>
+
+</mapper>

+ 4 - 14
src/main/resources/mapper/cms/article/ArticleDao.xml

@@ -9,8 +9,8 @@
         COALESCE(a.thumb, '') thumb,
         uf.user_id user_id,
         COALESCE(uf.nickname, '') user_nickname,
-        COALESCE(ac.id, -1) category_id,
-        COALESCE(ac.category_name, '') category_name,
+        ac.id category_id,
+        ac.category_name category_name,
         at.title title,
         COALESCE(at.description, '') description,
         a.status status,
@@ -170,8 +170,8 @@
             <if test="status != null and status != ''">
                 AND a.status = #{status}
             </if>
-            <if test="create_time != null and create_time != ''">
-                AND a.create_time >= #{create_time}
+            <if test="create_time_begin != null and create_time_begin != '' and create_time_end != null and create_time_end != ''">
+                AND a.create_time BETWEEN #{create_time_begin} AND #{create_time_end}
             </if>
         </where>
         ORDER BY a.is_top = 1 DESC, a.create_time DESC
@@ -213,14 +213,4 @@
         WHERE article_id = #{id}
     </select>
 
-    <!-- 查 详情 (公共) (带翻译 Object) (关联查询) -->
-<!--    <select id="queryArticleDetailPublic" resultMap="resultMapArticle">-->
-<!--        SELECT <include refid="includeArticle" />, content-->
-<!--        FROM cms_article a-->
-<!--        <include refid="leftJoinCategory" />-->
-<!--        <include refid="leftJoinUser" />-->
-<!--        <include refid="leftJoinTranslations" />-->
-<!--        WHERE a.uid = #{uid} AND at.language = #{lang}-->
-<!--    </select>-->
-
 </mapper>

+ 6 - 6
src/main/resources/mapper/crt/drama/CrtDramaProjectStoryboardDao.xml

@@ -15,12 +15,12 @@
             <if test="story_scene != null and story_scene != ''">story_scene = #{story_scene},</if>
             <if test="story_weather_time != null and story_weather_time != ''">story_weather_time = #{story_weather_time},</if>
             <if test="lora_figure_ids != null and lora_figure_ids != ''">lora_figure_ids = #{lora_figure_ids},</if>
-            <if test="param_image_count != null and param_image_count != ''">param_image_count = #{param_image_count},</if>
-            <if test="param_prompt_weight != null and param_prompt_weight != ''">param_prompt_weight = #{param_prompt_weight},</if>
-            <if test="param_sampling_method != null and param_sampling_method != ''">param_sampling_method = #{param_sampling_method},</if>
-            <if test="param_step_count != null and param_step_count != ''">param_step_count = #{param_step_count},</if>
-            <if test="param_random_seed != null and param_random_seed != ''">param_random_seed = #{param_random_seed},</if>
-            <if test="param_random_seed_custom != null and param_random_seed_custom != ''">param_random_seed_custom = #{param_random_seed_custom},</if>
+            <if test="param_batch_size != null and param_batch_size != ''">param_batch_size = #{param_batch_size},</if>
+            <if test="param_prompt_flux_guidance != null and param_prompt_flux_guidance != ''">param_prompt_flux_guidance = #{param_prompt_flux_guidance},</if>
+            <if test="param_sampler != null and param_sampler != ''">param_sampler = #{param_sampler},</if>
+            <if test="param_step != null and param_step != ''">param_step = #{param_step},</if>
+            <if test="param_seed != null and param_seed != ''">param_seed = #{param_seed},</if>
+            <if test="param_seed_custom != null and param_seed_custom != ''">param_seed_custom = #{param_seed_custom},</if>
             <if test="text_to_image_prompt != null and text_to_image_prompt != ''">text_to_image_prompt = #{text_to_image_prompt},</if>
             <if test="param_video_reference_type != null and param_video_reference_type != ''">param_video_reference_type = #{param_video_reference_type},</if>
             <if test="param_video_reference_images != null and param_video_reference_images != ''">param_video_reference_images = #{param_video_reference_images},</if>