Procházet zdrojové kódy

店铺管理--商品关联版式区分站点字段统一

Gaosheng před 3 dny
rodič
revize
d5b03aa0e7

+ 1 - 1
xinkeaboard-server/b2b2c-entity/src/main/java/com/slodon/b2b2c/goods/dto/GoodsRelatedTemplateAddDTO.java

@@ -13,7 +13,7 @@ public class GoodsRelatedTemplateAddDTO implements Serializable {
     private String templateName;
 
     @ApiModelProperty("模版渠道")
-    private String channel ;
+    private String distributionChannel ;
 
     @ApiModelProperty("模版位置(1-顶部,2-底部)")
     private Integer templatePosition;

+ 1 - 1
xinkeaboard-server/b2b2c-entity/src/main/java/com/slodon/b2b2c/goods/dto/GoodsRelatedTemplateUpdateDTO.java

@@ -13,7 +13,7 @@ public class GoodsRelatedTemplateUpdateDTO implements Serializable {
     private Integer templateId;
 
     @ApiModelProperty("模版渠道")
-    private String channel;
+    private String distributionChannel;
 
     @ApiModelProperty("模版名称")
     private String templateName;

+ 2 - 2
xinkeaboard-server/b2b2c-entity/src/main/java/com/slodon/b2b2c/goods/example/GoodsRelatedTemplateExample.java

@@ -25,9 +25,9 @@ public class GoodsRelatedTemplateExample implements Serializable {
     private Integer templateId;
 
     /**
-     * 模版名称
+     * 模版渠道
      */
-    private String channel;
+    private String distributionChannel;
 
     /**
      * 模版名称

+ 1 - 1
xinkeaboard-server/b2b2c-entity/src/main/java/com/slodon/b2b2c/goods/pojo/GoodsRelatedTemplate.java

@@ -16,7 +16,7 @@ public class GoodsRelatedTemplate implements Serializable {
     private Integer templateId;
 
     @ApiModelProperty("模版渠道")
-    private String channel;
+    private String distributionChannel;
 
     @ApiModelProperty("模版名称")
     private String templateName;

+ 3 - 3
xinkeaboard-server/b2b2c-web/src/main/java/com/slodon/b2b2c/controller/goods/seller/GoodsRelatedTemplateController.java

@@ -54,7 +54,7 @@ public class GoodsRelatedTemplateController extends BaseController {
         Vendor vendor = UserUtil.getUser(request, Vendor.class);
         //验证参数
         AssertUtil.isTrue(goodsRelatedTemplateAddDTO == null, "关联模板不能为空,请重试!");
-        AssertUtil.notEmpty(goodsRelatedTemplateAddDTO.getChannel(), "关联模板发布渠道不能为空,请重试!");
+        AssertUtil.notEmpty(goodsRelatedTemplateAddDTO.getDistributionChannel(), "关联模板发布渠道不能为空,请重试!");
         AssertUtil.notEmpty(goodsRelatedTemplateAddDTO.getTemplateName(), "关联模板名称不能为空,请重试!");
         AssertUtil.notNullOrZero(goodsRelatedTemplateAddDTO.getTemplatePosition(), "关联模板位置不能为空,请重试!");
         AssertUtil.notEmpty(goodsRelatedTemplateAddDTO.getTemplateContent(), "关联模板内容不能为空,请重试!");
@@ -123,7 +123,7 @@ public class GoodsRelatedTemplateController extends BaseController {
     })
     @GetMapping("list")
     public JsonResult<PageVO<GoodsRelatedTemplateVO>> getList(HttpServletRequest request,
-                                                              @RequestParam(value = "channel", required = false, defaultValue = "1") String channel,
+                                                              @RequestParam(value = "distributionChannel", required = false, defaultValue = "1") String distributionChannel,
                                                               @RequestParam(value = "templateName", required = false) String templateName,
                                                               @RequestParam(value = "templatePosition", required = false) Integer templatePosition) {
         Vendor vendor = UserUtil.getUser(request, Vendor.class);
@@ -133,7 +133,7 @@ public class GoodsRelatedTemplateController extends BaseController {
         //根据条件查询集合
         GoodsRelatedTemplateExample example = new GoodsRelatedTemplateExample();
         example.setStoreId(vendor.getStoreId());
-        example.setChannel(channel);
+        example.setDistributionChannel(distributionChannel);
         example.setTemplateNameLike(templateName);
         if (templatePosition != null && (templatePosition == TEMPLATE_CONTENT_1 || templatePosition == TEMPLATE_CONTENT_2)) {
             example.setTemplatePosition(templatePosition);

+ 1 - 1
xinkeaboard-server/b2b2c-web/src/main/java/com/slodon/b2b2c/model/goods/GoodsRelatedTemplateModel.java

@@ -121,7 +121,7 @@ public class GoodsRelatedTemplateModel {
         GoodsRelatedTemplateExample example = new GoodsRelatedTemplateExample();
         example.setStoreId(storeId);
         example.setTemplateName(goodsRelatedTemplateUpdateDTO.getTemplateName());
-        example.setChannel(goodsRelatedTemplateUpdateDTO.getChannel());
+        example.setDistributionChannel(goodsRelatedTemplateUpdateDTO.getDistributionChannel());
         example.setTemplateIdNotEquals(goodsRelatedTemplateUpdateDTO.getTemplateId());
         List<GoodsRelatedTemplate> list = goodsRelatedTemplateReadMapper.listByExample(example);
         if (!CollectionUtils.isEmpty(list)) {

+ 2 - 2
xinkeaboard-server/b2b2c-web/src/main/java/com/slodon/b2b2c/vo/goods/GoodsRelatedTemplateVO.java

@@ -12,7 +12,7 @@ public class GoodsRelatedTemplateVO {
     private Integer templateId;
 
     @ApiModelProperty("模版渠道")
-    private String channel;
+    private String distributionChannel;
 
     @ApiModelProperty("模版名称")
     private String templateName;
@@ -25,7 +25,7 @@ public class GoodsRelatedTemplateVO {
 
     public GoodsRelatedTemplateVO(GoodsRelatedTemplate goodsRelatedTemplate) {
         this.templateId = goodsRelatedTemplate.getTemplateId();
-        this.channel = goodsRelatedTemplate.getChannel();
+        this.distributionChannel = goodsRelatedTemplate.getDistributionChannel();
         this.templateName =goodsRelatedTemplate.getTemplateName();
         this.templatePosition = goodsRelatedTemplate.getTemplatePosition();
         this.templateContent = goodsRelatedTemplate.getTemplateContent();

+ 3 - 3
xinkeaboard-server/b2b2c-web/src/main/resources/mapper/read/goods/GoodsRelatedTemplateReadMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.slodon.b2b2c.dao.read.goods.GoodsRelatedTemplateReadMapper">
   <resultMap id="resultMap" type="com.slodon.b2b2c.goods.pojo.GoodsRelatedTemplate">
     <id column="template_id" property="templateId" />
-    <result column="channel" property="channel" />
+    <result column="distribution_channel" property="distributionChannel" />
     <result column="template_name" property="templateName" />
     <result column="template_position" property="templatePosition" />
     <result column="store_id" property="storeId" />
@@ -24,8 +24,8 @@
         <if test="example.templateIdIn != null">
           AND `template_id` in (${example.templateIdIn})
         </if>
-        <if test="example.channel != null">
-          AND `channel` = #{example.channel}
+        <if test="example.distributionChannel != null">
+          AND `distribution_channel` = #{example.distributionChannel}
         </if>
         <if test="example.templateName != null">
           AND `template_name` = #{example.templateName}

+ 11 - 11
xinkeaboard-server/b2b2c-web/src/main/resources/mapper/write/goods/GoodsRelatedTemplateWriteMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.slodon.b2b2c.dao.write.goods.GoodsRelatedTemplateWriteMapper">
   <resultMap id="resultMap" type="com.slodon.b2b2c.goods.pojo.GoodsRelatedTemplate">
     <id column="template_id" property="templateId" />
-    <result column="channel" property="channel" />
+    <result column="distribution_channel" property="distributionChannel" />
     <result column="template_name" property="templateName" />
     <result column="template_position" property="templatePosition" />
     <result column="store_id" property="storeId" />
@@ -13,8 +13,8 @@
   <!--除主键外的所有字段,用于插入操作-->
   <sql id="columns">
     <trim suffixOverrides=",">
-      <if test="channel != null">
-        `channel`,
+      <if test="distributionChannel != null">
+        `distribution_channel`,
       </if>
       <if test="templateName != null">
         `template_name`,
@@ -47,8 +47,8 @@
         <if test="example.templateIdIn != null">
           AND `template_id` in (${example.templateIdIn})
         </if>
-        <if test="example.channel != null">
-          AND `channel` = #{example.channel}
+        <if test="example.distributionChannel != null">
+          AND `distribution_channel` = #{example.distributionChannel}
         </if>
         <if test="example.templateName != null">
           AND `template_name` = #{example.templateName}
@@ -196,8 +196,8 @@
     )
     VALUES(
     <trim suffixOverrides=",">
-      <if test="channel != null">
-        #{channel},
+      <if test="distributionChannel != null">
+        #{distributionChannel},
       </if>
       <if test="templateName != null">
         #{templateName},
@@ -221,8 +221,8 @@
   <update id="updateByExampleSelective">
     UPDATE `goods_related_template`
     <trim prefix="SET" suffixOverrides=",">
-      <if test="record.channel != null">
-        `channel` = #{record.channel},
+      <if test="record.distributionChannel != null">
+        `distribution_channel` = #{record.distributionChannel},
       </if>
       <if test="record.templateName != null">
         `template_name` = #{record.templateName},
@@ -246,8 +246,8 @@
   <update id="updateByPrimaryKeySelective">
     UPDATE `goods_related_template`
     <trim prefix="SET" suffixOverrides=",">
-      <if test="channel != null">
-        `channel` = #{channel},
+      <if test="distributionChannel != null">
+        `distribution_channel` = #{distributionChannel},
       </if>
       <if test="templateName != null">
         `template_name` = #{templateName},

+ 1 - 1
xinkeaboard-server/doc/DDL/update.sql

@@ -14,4 +14,4 @@ ALTER TABLE product
 ALTER TABLE enquiry ADD COLUMN channel TINYINT NOT NULL DEFAULT 1 COMMENT '询盘渠道 1:海外门户 2:国内分销门户';
 
 
-ALTER TABLE goods_related_template ADD COLUMN channel TINYINT NOT NULL DEFAULT 1 COMMENT '渠道 1:海外门户 2:国内分销门户';
+ALTER TABLE goods_related_template ADD COLUMN distribution_channel TINYINT NOT NULL DEFAULT 1 COMMENT '渠道 1:海外门户 2:国内分销门户';