Jelajahi Sumber

fix:修复商品管理的保存回显问题

caoliqin 1 Minggu lalu
induk
melakukan
d8824985e1

+ 71 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -67,6 +67,9 @@ public class FsStoreProductScrm extends BaseEntity
     @Excel(name = "市场价")
     private BigDecimal otPrice;
 
+    @Excel(name = "市场价")
+    private BigDecimal agentPrice;
+
     /** 邮费 */
     @Excel(name = "邮费")
     private BigDecimal postage;
@@ -183,6 +186,74 @@ public class FsStoreProductScrm extends BaseEntity
     /** 指定企业 */
     private String companyIds;
 
+    /** 店铺ID */
+    @Excel(name = "店铺ID")
+    private Long storeId;
+
+    /** 药品展示图 */
+    @Excel(name = "药品展示图")
+    private String drugImage;
+
+    /** 药品注册证书编号 */
+    @Excel(name = "药品注册证书编号")
+    private String drugRegCertNo;
+
+    /** 通用名称 */
+    @Excel(name = "通用名称")
+    private String commonName;
+
+    /** 剂型 */
+    @Excel(name = "剂型")
+    private String dosageForm;
+
+    /** 单价 */
+    @Excel(name = "单价")
+    private String unitPrice;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    private String batchNumber;
+
+    /** 上市许可持有人 */
+    @Excel(name = "上市许可持有人")
+    private String mah;
+
+    /** 上市许可持有人地址 */
+    @Excel(name = "上市许可持有人地址")
+    private String mahAddress;
+
+    /** 生产企业 */
+    @Excel(name = "生产企业")
+    private String manufacturer;
+
+    /** 生产企业地址 */
+    @Excel(name = "生产企业地址")
+    private String manufacturerAddress;
+
+    /** 功能主治 */
+    @Excel(name = "功能主治")
+    private String indications;
+
+    /** 用法用量 */
+    @Excel(name = "用法用量")
+    private String dosage;
+
+    /** 不良反应 */
+    @Excel(name = "不良反应")
+    private String adverseReactions;
+
+    /** 禁忌 */
+    @Excel(name = "禁忌")
+    private String contraindications;
+
+    /** 注意事项 */
+    @Excel(name = "注意事项")
+    private String precautions;
+
+    /** 审核状态(0未审核1审核通过2审核退回) */
+    @Excel(name = "审核状态(0未审核1审核通过2审核退回)")
+    private String isAudit;
+
     /**
      * 商品图片
      */

+ 2 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -72,7 +72,8 @@ public interface FsStoreProductScrmMapper
      */
     public int deleteFsStoreProductByIds(Long[] productIds);
     @Select({"<script> " +
-            "select p.*,pc.cate_name  from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id   " +
+            "select p.*,pc.cate_name, fs_store.store_name from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id  " +
+            "left join fs_store on fs_store.store_id = p.store_id " +
             "where 1=1 " +
             "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
             "and p.product_name like CONCAT('%',#{maps.productName},'%') " +

+ 122 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductAddEditParam.java

@@ -1,5 +1,6 @@
 package com.fs.hisStore.param;
 
+import com.fs.common.annotation.Excel;
 import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
 import com.fs.hisStore.dto.ProductArrtDTO;
 import lombok.Data;
@@ -138,6 +139,127 @@ public class FsStoreProductAddEditParam implements Serializable
 
     private Integer tuiCateId;
 
+    /** 店铺ID */
+    @Excel(name = "店铺ID")
+    private Long storeId;
+
+    /** 药品展示图 */
+    @Excel(name = "药品展示图")
+    private String drugImage;
+
+    /** 药品注册证书编号 */
+    @Excel(name = "药品注册证书编号")
+    private String drugRegCertNo;
+
+    /** 通用名称 */
+    @Excel(name = "通用名称")
+    private String commonName;
+
+    /** 剂型 */
+    @Excel(name = "剂型")
+    private String dosageForm;
+
+    /** 单价 */
+    @Excel(name = "单价")
+    private String unitPrice;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    private String batchNumber;
+
+    /** 上市许可持有人 */
+    @Excel(name = "上市许可持有人")
+    private String mah;
+
+    /** 上市许可持有人地址 */
+    @Excel(name = "上市许可持有人地址")
+    private String mahAddress;
+
+    /** 生产企业 */
+    @Excel(name = "生产企业")
+    private String manufacturer;
+
+    /** 生产企业地址 */
+    @Excel(name = "生产企业地址")
+    private String manufacturerAddress;
+
+    /** 功能主治 */
+    @Excel(name = "功能主治")
+    private String indications;
+
+    /** 用法用量 */
+    @Excel(name = "用法用量")
+    private String dosage;
+
+    /** 不良反应 */
+    @Excel(name = "不良反应")
+    private String adverseReactions;
+
+    /** 禁忌 */
+    @Excel(name = "禁忌")
+    private String contraindications;
+
+    /** 注意事项 */
+    @Excel(name = "注意事项")
+    private String precautions;
+
+    /** 审核状态(0未审核1审核通过2审核退回) */
+    @Excel(name = "审核状态(0未审核1审核通过2审核退回)")
+    private String isAudit;
+
+    /**
+     * 商品图片
+     */
+    @Excel(name = "商品图片")
+    private String imgUrl;
+
+    /**
+     * 轮播图
+     */
+    @Excel(name = "轮播图")
+    private String images;
+
+    /**
+     * 商品介绍
+     */
+    @Excel(name = "商品介绍")
+    private String productIntroduce;
+
+    /**
+     * 产品描述
+     */
+    @Excel(name = "产品描述")
+    private String desc;
+    /**
+     * 成本价
+     */
+    @Excel(name = "成本价")
+    private BigDecimal costPrice;
+
+    /**
+     * 浏览量
+     */
+    @Excel(name = "浏览量")
+    private Long views;
+
+    /**
+     * 产品二维码地址(用户小程序海报)
+     */
+    @Excel(name = "产品二维码地址(用户小程序海报)")
+    private String codeUrl;
+    /**
+     * 商品类型:1非处方 2处方
+     */
+    @Excel(name = "是否为处方药:1非处方 2处方")
+    private Integer isPrescribe;
+
+
+    /** 品牌 */
+    @Excel(name = "品牌")
+    private String brand;
+
+    private Integer isDrug;
+
     //属性项目
     private List<ProductArrtDTO> items;
     //sku结果集

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

@@ -78,4 +78,9 @@ public class FsStoreProductListVO  implements Serializable
      * 所属公司
      */
     private String companyName;
+
+    /**
+     * 所属店铺
+     */
+    private String storeName;
 }

+ 78 - 2
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -6,8 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="FsStoreProductScrm" id="FsStoreProductResult">
         <result property="productId"    column="product_id"    />
-        <result property="image"    column="image"    />
         <result property="video"    column="video"    />
+        <result property="image"    column="image"    />
         <result property="sliderImage"    column="slider_image"    />
         <result property="productName"    column="product_name"    />
         <result property="productInfo"    column="product_info"    />
@@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="price"    column="price"    />
         <result property="vipPrice"    column="vip_price"    />
         <result property="otPrice"    column="ot_price"    />
+        <result property="agentPrice"    column="agent_price"    />
         <result property="postage"    column="postage"    />
         <result property="unitName"    column="unit_name"    />
         <result property="sort"    column="sort"    />
@@ -49,10 +50,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isDisplay"    column="is_display"    />
         <result property="tuiCateId"    column="tui_cate_id"    />
         <result property="companyIds"    column="company_ids"    />
+        <result property="storeId"    column="store_id"    />
+        <result property="isDrug"    column="is_drug"    />
+        <result property="drugImage"    column="drug_image"    />
+        <result property="drugRegCertNo"    column="drug_reg_cert_no"    />
+        <result property="commonName"    column="common_name"    />
+        <result property="dosageForm"    column="dosage_form"    />
+        <result property="unitPrice"    column="unit_price"    />
+        <result property="batchNumber"    column="batch_number"    />
+        <result property="mah"    column="mah"    />
+        <result property="mahAddress"    column="mah_address"    />
+        <result property="manufacturer"    column="manufacturer"    />
+        <result property="manufacturerAddress"    column="manufacturer_address"    />
+        <result property="indications"    column="indications"    />
+        <result property="dosage"    column="dosage"    />
+        <result property="adverseReactions"    column="adverse_reactions"    />
+        <result property="contraindications"    column="contraindications"    />
+        <result property="precautions"    column="precautions"    />
+        <result property="isAudit"    column="is_audit"    />
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
-        select product_id, image,video, 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,company_ids from fs_store_product_scrm
+        select product_id, video, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, agent_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, company_ids, store_id, is_drug, drug_image, drug_reg_cert_no, common_name, dosage_form, unit_price, batch_number, mah, mah_address, manufacturer, manufacturer_address, indications, dosage, adverse_reactions, contraindications, precautions, is_audit from fs_store_product_scrm
     </sql>
 
     <select id="selectFsStoreProductByProductId" parameterType="Long" resultMap="FsStoreProductResult">
@@ -136,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="price != null">price,</if>
             <if test="vipPrice != null">vip_price,</if>
             <if test="otPrice != null">ot_price,</if>
+            <if test="agentPrice != null">agent_price,</if>
             <if test="postage != null">postage,</if>
             <if test="unitName != null">unit_name,</if>
             <if test="sort != null">sort,</if>
@@ -168,6 +188,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDisplay != null">is_display,</if>
             <if test="tuiCateId != null">tui_cate_id,</if>
             <if test="companyIds != null and companyIds != ''">company_ids,</if>
+            <if test="storeId != null">store_id,</if>
+            <if test="isDrug != null">is_drug,</if>
+            <if test="drugImage != null">drug_image,</if>
+            <if test="drugRegCertNo != null">drug_reg_cert_no,</if>
+            <if test="commonName != null">common_name,</if>
+            <if test="dosageForm != null">dosage_form,</if>
+            <if test="unitPrice != null">unit_price,</if>
+            <if test="batchNumber != null">batch_number,</if>
+            <if test="mah != null">mah,</if>
+            <if test="mahAddress != null">mah_address,</if>
+            <if test="manufacturer != null">manufacturer,</if>
+            <if test="manufacturerAddress != null">manufacturer_address,</if>
+            <if test="indications != null">indications,</if>
+            <if test="dosage != null">dosage,</if>
+            <if test="adverseReactions != null">adverse_reactions,</if>
+            <if test="contraindications != null">contraindications,</if>
+            <if test="precautions != null">precautions,</if>
+            <if test="isAudit != null">is_audit,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -181,6 +219,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="price != null">#{price},</if>
             <if test="vipPrice != null">#{vipPrice},</if>
             <if test="otPrice != null">#{otPrice},</if>
+            <if test="agentPrice != null">#{agentPrice},</if>
             <if test="postage != null">#{postage},</if>
             <if test="unitName != null">#{unitName},</if>
             <if test="sort != null">#{sort},</if>
@@ -213,6 +252,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDisplay != null">#{isDisplay},</if>
             <if test="tuiCateId != null">#{tuiCateId},</if>
             <if test="companyIds != null and companyIds != ''">#{companyIds},</if>
+            <if test="storeId != null">#{storeId},</if>
+            <if test="isDrug != null">#{isDrug},</if>
+            <if test="drugImage != null">#{drugImage},</if>
+            <if test="drugRegCertNo != null">#{drugRegCertNo},</if>
+            <if test="commonName != null">#{commonName},</if>
+            <if test="dosageForm != null">#{dosageForm},</if>
+            <if test="unitPrice != null">#{unitPrice},</if>
+            <if test="batchNumber != null">#{batchNumber},</if>
+            <if test="mah != null">#{mah},</if>
+            <if test="mahAddress != null">#{mahAddress},</if>
+            <if test="manufacturer != null">#{manufacturer},</if>
+            <if test="manufacturerAddress != null">#{manufacturerAddress},</if>
+            <if test="indications != null">#{indications},</if>
+            <if test="dosage != null">#{dosage},</if>
+            <if test="adverseReactions != null">#{adverseReactions},</if>
+            <if test="contraindications != null">#{contraindications},</if>
+            <if test="precautions != null">#{precautions},</if>
+            <if test="isAudit != null">#{isAudit},</if>
          </trim>
     </insert>
 
@@ -230,6 +287,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="price != null">price = #{price},</if>
             <if test="vipPrice != null">vip_price = #{vipPrice},</if>
             <if test="otPrice != null">ot_price = #{otPrice},</if>
+            <if test="agentPrice != null">agent_price = #{agentPrice},</if>
             <if test="postage != null">postage = #{postage},</if>
             <if test="unitName != null">unit_name = #{unitName},</if>
             <if test="sort != null">sort = #{sort},</if>
@@ -262,6 +320,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDisplay != null">is_display = #{isDisplay},</if>
             <if test="tuiCateId != null">tui_cate_id = #{tuiCateId},</if>
             <if test="companyIds != null and companyIds != ''">company_ids = #{companyIds},</if>
+            <if test="storeId != null">store_id = #{storeId},</if>
+            <if test="isDrug != null">is_drug = #{isDrug},</if>
+            <if test="drugImage != null">drug_image = #{drugImage},</if>
+            <if test="drugRegCertNo != null">drug_reg_cert_no = #{drugRegCertNo},</if>
+            <if test="commonName != null">common_name = #{commonName},</if>
+            <if test="dosageForm != null">dosage_form = #{dosageForm},</if>
+            <if test="unitPrice != null">unit_price = #{unitPrice},</if>
+            <if test="batchNumber != null">batch_number = #{batchNumber},</if>
+            <if test="mah != null">mah = #{mah},</if>
+            <if test="mahAddress != null">mah_address = #{mahAddress},</if>
+            <if test="manufacturer != null">manufacturer = #{manufacturer},</if>
+            <if test="manufacturerAddress != null">manufacturer_address = #{manufacturerAddress},</if>
+            <if test="indications != null">indications = #{indications},</if>
+            <if test="dosage != null">dosage = #{dosage},</if>
+            <if test="adverseReactions != null">adverse_reactions = #{adverseReactions},</if>
+            <if test="contraindications != null">contraindications = #{contraindications},</if>
+            <if test="precautions != null">precautions = #{precautions},</if>
+            <if test="isAudit != null">is_audit = #{isAudit},</if>
         </trim>
         where product_id = #{productId}
     </update>