Jelajahi Sumber

coding:多小程序和商品 新增是否特殊字段

zhangqin 1 bulan lalu
induk
melakukan
ec7d3d105b

+ 5 - 2
fs-admin/src/main/java/com/fs/web/controller/system/FsCoursePlaySourceConfigController.java

@@ -42,7 +42,8 @@ public class FsCoursePlaySourceConfigController extends BaseController {
                               @RequestParam(required = false) Integer isMall,
                               @RequestParam(required = false, defaultValue = "1") Integer pageNum,
                               @RequestParam(required = false, defaultValue = "10") Integer pageSize,
-                              @RequestParam(required = false) Long companyId
+                              @RequestParam(required = false) Long companyId,
+                              @RequestParam(required = false) Integer specialMini
     ) {
         FsCoursePlaySourceConfig fsCoursePlaySourceConfig = new FsCoursePlaySourceConfig();
         fsCoursePlaySourceConfig.setName(name);
@@ -50,7 +51,9 @@ public class FsCoursePlaySourceConfigController extends BaseController {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         fsCoursePlaySourceConfig.setCreateUserId(loginUser.getUser().getUserId());
         fsCoursePlaySourceConfig.setCreateDeptId(loginUser.getUser().getDeptId());
-
+        if (specialMini != null){
+            fsCoursePlaySourceConfig.setSpecialMini(specialMini);
+        }
         PageHelper.startPage(pageNum, pageSize);
         List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.selectFsCoursePlaySourceConfigList(fsCoursePlaySourceConfig);
         return getDataTable(list);

+ 4 - 0
fs-service-system/src/main/java/com/fs/store/domain/FsCoursePlaySourceConfig.java

@@ -75,5 +75,9 @@ public class FsCoursePlaySourceConfig extends BaseEntity {
      * 小程序状态:0正常,1半封禁,2封禁
      */
     private Integer status;
+    /**
+     * 是否特殊小程序1是0否
+     */
+    private Integer specialMini;
 
 }

+ 4 - 0
fs-service-system/src/main/java/com/fs/store/domain/FsStoreProduct.java

@@ -3,6 +3,7 @@ package com.fs.store.domain;
 import java.math.BigDecimal;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -186,4 +187,7 @@ public class FsStoreProduct extends BaseEntity
 
     private String erp;
 
+    @Excel(name = "是否特殊商品 1是 0否")
+    private Integer specialProducts;
+
 }

+ 4 - 1
fs-service-system/src/main/java/com/fs/store/mapper/FsStoreProductMapper.java

@@ -83,6 +83,9 @@ public interface FsStoreProductMapper
             "<if test = 'maps.warehouseCode != null    '> " +
             "and p.warehouse_code =#{maps.warehouseCode} " +
             "</if>" +
+            "<if test = 'maps.specialProducts != null    '> " +
+            "and p.special_products =#{maps.specialProducts} " +
+            "</if>" +
             " order by p.product_id desc "+
             "</script>"})
     List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps")FsStoreProduct fsStoreProduct);
@@ -91,7 +94,7 @@ public interface FsStoreProductMapper
     @Select({"<script> " +
             "  select p.*,pc.cate_name from (SELECT ave.bar_code as bar_code,p.product_id, p.image, p.slider_image,p.product_name, p.product_info,p.keyword, p.cate_id, p.price, p.vip_price, " +
             " p.ot_price,p.agent_price, p.postage,p.unit_name,p.sort,p.sales,p.stock,p.is_show,p.is_hot,p.is_benefit,p.is_best,p.is_new,p.description,p.create_time,p.update_time,p.is_postage,p.is_del,p.give_integral," +
-            " p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral,p.product_type,p.prescribe_code, p.prescribe_spec,p.prescribe_factory,p.prescribe_name,p.is_display,p.tui_cate_id " +
+            " p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral,p.product_type,p.prescribe_code, p.prescribe_spec,p.prescribe_factory,p.prescribe_name,p.is_display,p.tui_cate_id,p.special_products " +
             " FROM fs_store_product p LEFT JOIN fs_store_product_attr_value ave on p.product_id=ave.product_id  WHERE ave.bar_code != '' and p.product_id is not null" +
             ") p left join fs_store_product_category pc on p.cate_id=pc.cate_id   " +
             " where 1=1 " +

+ 4 - 2
fs-service-system/src/main/java/com/fs/store/param/FsStoreProductAddEditParam.java

@@ -150,7 +150,9 @@ public class FsStoreProductAddEditParam implements Serializable
     private List<ProductArrtDTO> items;
     //sku结果集
     private List<FsStoreProductAttrValue> values;
-
-
+    /**
+     * 是否特殊商品1是0否
+     */
+    private Integer specialProducts;
 
 }

+ 5 - 0
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductListVO.java

@@ -78,4 +78,9 @@ public class FsStoreProductListVO  implements Serializable
      */
     private String warehouseCode;
 
+    /**
+     * 是否特殊商品 1是 0否
+     */
+    private Integer specialProducts;
+
 }

+ 2 - 0
fs-service-system/src/main/java/com/fs/system/param/FsCoursePlaySourceConfigCreateParam.java

@@ -57,4 +57,6 @@ public class FsCoursePlaySourceConfigCreateParam {
 
     @ApiModelProperty("小程序状态:0正常,1半封禁,2封禁")
     private Integer status;
+    @ApiModelProperty("是否是特殊小程序 0否 1是")
+    private Integer specialMini;
 }

+ 2 - 0
fs-service-system/src/main/java/com/fs/system/param/FsCoursePlaySourceConfigEditParam.java

@@ -54,4 +54,6 @@ public class FsCoursePlaySourceConfigEditParam {
 
     @ApiModelProperty("小程序状态:0正常,1半封禁,2封禁")
     private Integer status;
+    @ApiModelProperty("是否是特殊小程序 0否 1是")
+    private Integer specialMini;
 }

+ 6 - 1
fs-service-system/src/main/resources/mapper/store/FsStoreProductMapper.xml

@@ -47,10 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="prescribeName"    column="prescribe_name"    />
         <result property="isDisplay"    column="is_display"    />
         <result property="tuiCateId"    column="tui_cate_id"    />
+        <result property="specialProducts"    column="special_products"    />
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
-        select product_id, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,is_display,tui_cate_id,warehouse_id,warehouse_code from fs_store_product
+        select product_id, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,is_display,tui_cate_id,warehouse_id,warehouse_code,special_products from fs_store_product
     </sql>
 
     <select id="selectFsStoreProductList" parameterType="FsStoreProduct" resultMap="FsStoreProductResult">
@@ -96,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDisplay != null "> and is_display = #{isDisplay}</if>
             <if test="warehouseId != null"> and warehouse_id = #{warehouseId}</if>
             <if test="warehouseCode != null"> and warehouse_code = #{warehouseCode}</if>
+            <if test="specialProducts != null"> and special_products = #{specialProducts}</if>
         </where>
     </select>
 
@@ -150,6 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tuiCateId != null">tui_cate_id,</if>
             <if test="warehouseId != null">warehouse_id,</if>
             <if test="warehouseCode != null">warehouse_code,</if>
+            <if test="specialProducts != null">special_products,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -195,6 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tuiCateId != null">#{tuiCateId},</if>
             <if test="warehouseId != null">#{warehouseId},</if>
             <if test="warehouseCode != null">#{warehouseCode},</if>
+            <if test="specialProducts != null">#{specialProducts},</if>
          </trim>
     </insert>
 
@@ -244,6 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tuiCateId != null">tui_cate_id = #{tuiCateId},</if>
             <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
             <if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
+            <if test="specialProducts != null">special_products = #{specialProducts},</if>
         </trim>
         where product_id = #{productId}
     </update>

+ 6 - 1
fs-service-system/src/main/resources/mapper/system/FsCoursePlaySourceConfigMapper.xml

@@ -20,10 +20,11 @@
         <result property="createUserId"    column="create_user_id"    />
         <result property="createDeptId"    column="create_dept_id"    />
         <result property="status"    column="status"    />
+        <result property="specialMini"    column="special_mini"    />
     </resultMap>
 
     <sql id="selectFsCoursePlaySourceConfigVo">
-        select id, name, appid,status, secret, img, original_id, token, aes_key, msg_data_format,is_del, create_time, update_time, create_user_id, create_dept_id from fs_course_play_source_config
+        select id, name, appid,status, secret, img, original_id, token, aes_key, msg_data_format,is_del, create_time, update_time, create_user_id, create_dept_id,special_mini from fs_course_play_source_config
     </sql>
 
     <select id="selectFsCoursePlaySourceConfigList" parameterType="FsCoursePlaySourceConfig" resultMap="FsCoursePlaySourceConfigResult">
@@ -41,6 +42,7 @@
             <if test="isDel != null "> and is_del = #{isDel}</if>
             <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
             <if test="createDeptId != null "> and create_dept_id = #{createDeptId}</if>
+            <if test="specialMini != null "> and special_mini = #{specialMini}</if>
         </where>
     </select>
 
@@ -69,6 +71,7 @@
             <if test="createUserId != null">create_user_id,</if>
             <if test="createDeptId != null">create_dept_id,</if>
             <if test="status != null">`status`,</if>
+            <if test="specialMini != null">`special_mini`,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="name != null and name != ''">#{name},</if>
@@ -85,6 +88,7 @@
             <if test="createUserId != null">#{createUserId},</if>
             <if test="createDeptId != null">#{createDeptId},</if>
             <if test="status != null">#{status},</if>
+            <if test="specialMini != null">#{specialMini},</if>
         </trim>
     </insert>
 
@@ -105,6 +109,7 @@
             <if test="createUserId != null">create_user_id = #{createUserId},</if>
             <if test="createDeptId != null">create_dept_id = #{createDeptId},</if>
             <if test="status != null">`status` = #{status},</if>
+            <if test="specialMini != null">`special_mini` = #{specialMini},</if>
         </trim>
         where id = #{id}
     </update>