Guos 4 недель назад
Родитель
Сommit
56c178a284

+ 125 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsPlatformProductScrmController.java

@@ -0,0 +1,125 @@
+package com.fs.hisStore.controller;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.hisStore.domain.FsPlatformProductScrm;
+import com.fs.hisStore.domain.FsStoreProductAttrScrm;
+import com.fs.hisStore.param.FsPlatFormProductAddEditParam;
+import com.fs.hisStore.service.IFsPlatformProductScrmService;
+import com.fs.hisStore.service.IFsStoreProductAttrScrmService;
+import com.fs.hisStore.vo.FsPlatformProductListVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description: 总平台商品库
+ * @author: Guos
+ * @time: 2025/12/16 下午2:13
+ */
+@Slf4j
+@RestController
+@RequestMapping("/store/store/platformProduct")
+public class FsPlatformProductScrmController extends BaseController {
+
+    @Autowired
+    private IFsPlatformProductScrmService fsPlatformProductService;
+
+    @Autowired
+    private IFsStoreProductAttrScrmService attrService;
+
+    /**
+     * 总后台商品总库协议过期提醒
+     * @return
+     */
+    @Log(title = "总后台商品总库协议过期提醒", businessType = BusinessType.OTHERe)
+    @GetMapping("/productNoticeInfo")
+    public R getProductNoticeInfo() {
+        List<String> productNoticeInfo = fsPlatformProductService.getProductNoticeInfo();
+        if (CollectionUtils.isEmpty(productNoticeInfo)) {return R.ok().put("code", 0);}
+        return R.ok().put("code", 200).put("data", productNoticeInfo);
+    }
+
+    /**
+     * 查询商品列表
+     * @param vo
+     * @return TableDataInfo
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsPlatformProductScrm vo) {
+        startPage();
+        List<FsPlatformProductListVO> list = fsPlatformProductService.selectList(vo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取商品详细信息
+     * @param productId
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:query')")
+    @GetMapping(value = "/{productId}")
+    public R getInfo(@PathVariable("productId") Long productId) {
+        FsPlatformProductScrm product = fsPlatformProductService.selectFsPlatformProductById(productId);
+        List<FsStoreProductAttrScrm> attrs = attrService.selectFsStoreProductAttrByProductId(productId);
+        return R.ok().put("data", product).put("attrs", attrs);
+    }
+
+    /**
+     * 删除商品
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:remove')")
+    @Log(title = "商品管理", businessType = BusinessType.DELETE, isStoreLog = true,
+            logParamExpression = "#p0.length>1?new String[]{'商品','批量删除商品信息'}: new String[]{'商品','删除商品信息'}")
+    @DeleteMapping("/{productIds}")
+    public R remove(@PathVariable Long[] productIds) {
+        return fsPlatformProductService.deleteFsPlatFormProductByIds(productIds);
+    }
+
+    /**
+     * 商品复制
+     * @param product 商品对象
+     * @return R
+     * */
+    @PreAuthorize("@ss.hasPermi('his:storeProduct:copyProduct')")
+    @PostMapping("/copyProduct")
+    @Log(title = "复制商品", businessType = BusinessType.INSERT, isStoreLog = true, logParam = {"商品", "复制商品"})
+    public R copyProduct(@RequestBody FsPlatformProductScrm product) {
+        return fsPlatformProductService.copyProduct(product);
+    }
+
+    /**
+     * 新增或修改商品
+     * @param fsStoreProduct 商品对象
+     * @return R
+     * */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:add')")
+    @Log(title = "商品管理", businessType = BusinessType.INSERT, businessTypeExpression = "#p0.getProductId()>0? T(com.fs.common.enums.BusinessType).UPDATE: T(com.fs.common.enums.BusinessType).INSERT"
+            , isStoreLog = true, logParamExpression = "#p0.getProductId()>0? new String[]{'商品','修改商品'}: new String[]{'商品','新增商品'}")
+    @PostMapping(value = "/addOrEdit")
+    public R addOrEdit(@RequestBody FsPlatFormProductAddEditParam fsStoreProduct) {
+        if (ObjectUtils.isNotNull(fsStoreProduct.getIsShow())) {
+            if (fsStoreProduct.getIsShow() == 1) {
+                logger.info("商品上架:{}", fsStoreProduct.getProductName() + new Date());
+            }
+        }
+
+        if (ObjectUtils.isNotNull(fsStoreProduct.getIsDisplay())) {
+            if (fsStoreProduct.getIsDisplay() == 1) {
+                logger.info("商品前端展示:{}", fsStoreProduct.getProductName() + new Date());
+            }
+        }
+        return fsPlatformProductService.addOrEdit(fsStoreProduct);
+    }
+
+
+}

+ 579 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsPlatformProductScrm.java

@@ -0,0 +1,579 @@
+package com.fs.hisStore.domain;
+
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/12/16 下午2:36
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsPlatformProductScrm extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 商品id
+     */
+    @TableId(value = "product_id", type = IdType.ID_WORKER)
+    private Long productId;
+
+    /**
+     * 商品图片
+     */
+    @Excel(name = "商品图片")
+    private String image;
+
+    @TableField(strategy = FieldStrategy.IGNORED)
+    private String video;
+
+    /**
+     * 轮播图
+     */
+    @Excel(name = "轮播图")
+    private String sliderImage;
+
+    /**
+     * 商品名称
+     */
+    @Excel(name = "商品名称")
+    private String productName;
+
+    /**
+     * 商品简介
+     */
+    @Excel(name = "商品简介")
+    private String productInfo;
+
+    /**
+     * 关键字
+     */
+    @Excel(name = "关键字")
+    private String keyword;
+
+    /**
+     * 产品条码(一维码)
+     */
+    @Excel(name = "产品条码", readConverterExp = "一=维码")
+    private String barCode;
+
+    /**
+     * 分类id
+     */
+    @Excel(name = "分类id")
+    private Long cateId;
+
+    /**
+     * 商品价格
+     */
+    @Excel(name = "商品价格")
+    private BigDecimal price;
+
+    /**
+     * 会员价格
+     */
+    @Excel(name = "会员价格")
+    private BigDecimal vipPrice;
+
+    /**
+     * 市场价
+     */
+    @Excel(name = "市场价")
+    private BigDecimal otPrice;
+
+    @Excel(name = "市场价")
+    private BigDecimal agentPrice;
+
+    /**
+     * 邮费
+     */
+    @Excel(name = "邮费")
+    private BigDecimal postage;
+
+    /**
+     * 单位名
+     */
+    @Excel(name = "单位名")
+    private String unitName;
+
+    /**
+     * 排序
+     */
+    @Excel(name = "排序")
+    private Long sort;
+
+    /**
+     * 销量
+     */
+    @Excel(name = "销量")
+    private Long sales;
+
+    /**
+     * 库存
+     */
+    @Excel(name = "库存")
+    private Long stock;
+
+    /**
+     * 状态(0:未上架,1:上架)
+     */
+    @Excel(name = "状态", dictType = "store_product_is_show", readConverterExp = "0=:未上架,1:上架")
+    private Integer isShow;
+
+    /**
+     * 是否热卖
+     */
+    @Excel(name = "是否热卖")
+    private Integer isHot;
+
+    /**
+     * 是否优惠
+     */
+    @Excel(name = "是否优惠")
+    private Integer isBenefit;
+
+    /**
+     * 是否精品
+     */
+    @Excel(name = "是否精品")
+    private Integer isBest;
+
+    /**
+     * 是否新品
+     */
+    @Excel(name = "是否新品")
+    private Integer isNew;
+
+    @Excel(name = "是否在商品展示")
+    private Integer isDisplay;
+
+    /**
+     * 产品描述
+     */
+    @Excel(name = "产品描述")
+    private String description;
+
+    /**
+     * 是否包邮
+     */
+    @Excel(name = "是否包邮")
+    private Integer isPostage;
+
+    /**
+     * 是否删除
+     */
+    @Excel(name = "是否删除")
+    private Integer isDel;
+
+    /**
+     * 获得积分
+     */
+    @Excel(name = "获得积分")
+    private BigDecimal giveIntegral;
+
+    /**
+     * 成本价
+     */
+    @Excel(name = "成本价")
+    private BigDecimal cost;
+
+    /**
+     * 是否优品推荐
+     */
+    @Excel(name = "是否优品推荐")
+    private Integer isGood;
+
+    /**
+     * 浏览量
+     */
+    @Excel(name = "浏览量")
+    private Long browse;
+
+    /**
+     * 产品二维码地址(用户小程序海报)
+     */
+    @Excel(name = "产品二维码地址(用户小程序海报)")
+    private String codePath;
+
+    /**
+     * 运费模板ID
+     */
+    @Excel(name = "运费模板ID")
+    private Integer tempId;
+
+    /**
+     * 规格 0单 1多
+     */
+    @Excel(name = "规格 0单 1多")
+    private Integer specType;
+
+    /**
+     * 是开启积分兑换
+     */
+    @Excel(name = "是开启积分兑换")
+    private Integer isIntegral;
+
+    /**
+     * 需要多少积分兑换 只在开启积分兑换时生效
+     */
+    @Excel(name = "需要多少积分兑换 只在开启积分兑换时生效")
+    private Long integral;
+
+    /**
+     * 商品类型:1非处方 2处方
+     */
+    @Excel(name = "商品类型:1非处方 2处方", dictType = "store_product_type")
+    private Integer productType;
+
+    /**
+     * 国药准字
+     */
+    @Excel(name = "国药准字")
+    private String prescribeCode;
+
+    /**
+     * 规格
+     */
+    @Excel(name = "规格")
+    private String prescribeSpec;
+
+    /**
+     * 生产厂家
+     */
+    @Excel(name = "生产厂家")
+    private String prescribeFactory;
+
+    /**
+     * 处方名
+     */
+    @Excel(name = "处方名")
+    private String prescribeName;
+
+    private Integer tuiCateId;
+
+    /**
+     * 指定企业
+     */
+    private String companyIds;
+
+    private Long storeId;
+
+    @TableField(exist = false)
+    private Long[] storeIds;
+
+    /**
+     * 药品展示图
+     */
+    @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;
+
+
+    @Excel(name = "是否药品")
+    private String isDrug;
+
+    /**
+     * 评价内容
+     */
+    private String commentContent;
+
+    /**
+     * 交易类型
+     **/
+    @TableField(exist = false)
+    private Integer transactionStatus;
+
+    /***
+     * 投诉咨询
+     * **/
+    private String complaint;
+
+    /**
+     * 说明书
+     **/
+    private String instructionManual;
+
+    /**
+     * 审核说明(0 首营 1非首映)
+     */
+    private String reviewAudit;
+
+    /**
+     * 首营弹资质上传证明
+     */
+    private String qualificationCertificate;
+
+    /**
+     * 首营弹资质开始时间
+     */
+    private LocalDate qualificationCertificateStart;
+    /**
+     * 首营弹资质结束时间
+     */
+    private  LocalDate  qualificationCertificateEnd;
+
+
+    /**
+     * 营业执照
+     **/
+    private String business;
+
+    /**
+     * 营业执照有效期开始
+     **/
+    private LocalDate businessStart;
+
+    /**
+     * 营业执照有效期结束
+     **/
+    private LocalDate businessEnd;
+
+    /**
+     * 生产许可证件
+     **/
+    private String license;
+
+    /**
+     * 生产许可证件有效期开始
+     **/
+    private LocalDate licenseStart;
+
+    /**
+     * 生产许可证件有效期结束
+     **/
+    private LocalDate licenseEnd;
+
+    /**
+     * 生产注册证书
+     **/
+    private String certificate;
+
+    /**
+     * 注册证书有效期开始
+     **/
+    private LocalDate certificateStart;
+
+    /**
+     * 注册证书有效期结束
+     **/
+    private LocalDate certificateEnd;
+
+    /**
+     * 商品备案证书
+     **/
+    private String voucher;
+
+    /**
+     * 备案证书有效期开始
+     **/
+    private LocalDate voucherStart;
+
+    /**
+     * 备案证书有效期结束
+     **/
+    private LocalDate voucherEnd;
+
+    /**
+     * GMP认证
+     **/
+    private String gmpAuth;
+
+    /**
+     * GMP认证有效期开始
+     **/
+    private LocalDate gmpAuthStart;
+
+    /**
+     * GMP认证有效期结束
+     **/
+    private LocalDate gmpAuthEnd;
+
+    /**
+     * 非首营链接
+     * **/
+    private String businessLink;
+
+    /**
+     * 生产企业营业执照是否长期有效
+     * **/
+    private Byte isBusinessPermanent;
+
+    /**
+     * 生产企业的生产许可证/备案凭证是否长期有效
+     * **/
+    private Byte isLicensePermanent;
+
+    /**
+     * 商品注册证/备案凭证是否长期有效
+     * **/
+    private Byte isCertificatePermanent;
+
+    /**
+     * GMP/GSP认证证书是否长期有效
+     * **/
+    private Byte isGmpAuthPermanent;
+
+    /**
+     * 添加的药品的成分
+     * **/
+    private String ingredient;
+
+    /**
+     * 器械编号
+     * **/
+    private String medicalDeviceCode;
+
+}

+ 65 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/IFsPlatformProductScrmMapper.java

@@ -0,0 +1,65 @@
+package com.fs.hisStore.mapper;
+
+import com.fs.hisStore.domain.FsPlatformProductScrm;
+import com.fs.hisStore.vo.FsPlatformProductListVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/12/16 下午2:21
+ */
+public interface IFsPlatformProductScrmMapper {
+
+    /**
+     * 查询商品列表
+     * @param
+     * @return
+     */
+    List<FsPlatformProductListVO> selectList(@Param("maps") FsPlatformProductScrm maps);
+
+    /**
+     * 获取商品资质提示信息
+     * @return
+     */
+    List<String> getProductNoticeInfo();
+
+    /**
+     * 通过商品id获取商品详细信息
+     * @param productId
+     * @return
+     */
+    FsPlatformProductScrm selectFsPlatformProductById(Long productId);
+
+    /**
+     * 获取基础产品信息
+     * @param ids 商品ID
+     * @return
+     * **/
+    List<FsPlatformProductScrm> getBaseProductInfo(@Param("ids") Long[] ids);
+
+    /**
+     * 批量删除商品
+     *
+     * @param productIds 需要删除的数据ID
+     * @return 结果
+     */
+    int deleteFsPlatFormProductByIds(Long[] productIds);
+
+    /**
+     * 新增商品
+     *
+     * @param fsStoreProduct 商品
+     * @return 结果
+     */
+    int insertFsPlatformProduct(FsPlatformProductScrm fsStoreProduct);
+
+    /**
+     * 修改商品
+     * @param product 商品
+     * @return 结果
+     */
+    int updateFsPlatformProduct(FsPlatformProductScrm product);
+}

+ 377 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsPlatFormProductAddEditParam.java

@@ -0,0 +1,377 @@
+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;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/12/16 下午5:00
+ */
+@Data
+public class FsPlatFormProductAddEditParam {
+
+    /** 商品id */
+    private Long productId;
+
+    /** 商品图片 */
+    private String image;
+
+    private String video;
+
+    /** 轮播图 */
+    private String sliderImage;
+
+    /** 商品名称 */
+    private String productName;
+
+    /** 商品简介 */
+    private String productInfo;
+
+    /** 关键字 */
+    private String keyword;
+
+    /** 产品条码(一维码) */
+    private String barCode;
+
+    /** 分类id */
+    private Long cateId;
+
+    /** 商品价格 */
+    private BigDecimal price;
+
+    /** 会员价格 */
+    private BigDecimal vipPrice;
+
+    /** 市场价 */
+    private BigDecimal otPrice;
+
+    /** 邮费 */
+    private BigDecimal postage;
+
+    /** 单位名 */
+    private String unitName;
+
+    /** 排序 */
+    private Long sort;
+
+    /** 销量 */
+    private Long sales;
+
+    /** 库存 */
+    private Long stock;
+
+    /** 状态(0:未上架,1:上架) */
+    private Integer isShow;
+
+    /** 是否热卖 */
+    private Integer isHot;
+
+    /** 是否优惠 */
+    private Integer isBenefit;
+
+    /** 是否精品 */
+    private Integer isBest;
+
+    /** 是否新品 */
+    private Integer isNew;
+
+    private Integer isDisplay;
+
+    /** 产品描述 */
+    private String description;
+
+    /** 是否包邮 */
+    private Integer isPostage;
+
+    /** 是否删除 */
+    private Integer isDel;
+
+    /** 获得积分 */
+    private BigDecimal giveIntegral;
+
+    /** 成本价 */
+    private BigDecimal cost;
+
+    /** 是否优品推荐 */
+    private Integer isGood;
+
+    /** 浏览量 */
+    private Long browse;
+
+    /** 产品二维码地址(用户小程序海报) */
+    private String codePath;
+
+    /** 运费模板ID */
+    private Integer tempId;
+
+    /** 规格 0单 1多 */
+    private Integer specType;
+
+    /** 是开启积分兑换 */
+    private Integer isIntegral;
+
+    /** 需要多少积分兑换 只在开启积分兑换时生效 */
+    private Long integral;
+
+    /** 商品类型:1非处方 2处方 */
+    private Integer productType;
+
+    /** 国药准字 */
+    private String prescribeCode;
+
+    /** 规格 */
+    private String prescribeSpec;
+
+    /** 生产厂家 */
+    private String prescribeFactory;
+
+    /** 处方名 */
+    private String prescribeName;
+
+    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结果集
+    private List<FsStoreProductAttrValueScrm> values;
+    // 指定企业
+    private String companyIds;
+
+    /**
+     * 说明书
+     * **/
+    private String instructionManual;
+
+    /**
+     * 审核说明(0 首营 1非首映)
+     */
+    private String reviewAudit;
+
+    /**
+     * 首营弹资质上传证明
+     */
+    private String qualificationCertificate;
+
+    /**
+     * 首营弹资质开始时间
+     */
+    private String qualificationCertificateStart;
+    /**
+     * 首营弹资质结束时间
+     */
+    private  String  qualificationCertificateEnd;
+
+    /**
+     * 营业执照
+     * **/
+    private String business;
+
+    /**
+     * 有效期
+     * **/
+    private List<String> businessExpire;
+
+    /**
+     * 生成许可证件
+     * **/
+    private String license;
+
+    /**
+     * 生成许可证件有效期
+     * **/
+    private List<String> licenseExpire;
+
+    /**
+     * 生成注册证书
+     * **/
+    private String certificate;
+
+    /**
+     * 证书有效期
+     * **/
+    private List<String> certificateExpire;
+
+    /**
+     * 商品备案证书
+     * **/
+    private String voucher;
+
+    /**
+     * 备案日期
+     * **/
+    private List<String> voucherExpire;
+
+    /**
+     *GMP认证
+     * **/
+    private String gmpAuth;
+
+    /**
+     * GMP认证有效期
+     * **/
+    private List<String> gmpAuthExpire;
+
+    /**
+     * 非首营链接
+     * **/
+    private String businessLink;
+
+    //加入证书长期按钮
+    /**
+     * 生产企业营业执照是否长期有效
+     * **/
+    private Byte isBusinessPermanent;
+
+    /**
+     * 生产企业的生产许可证/备案凭证是否长期有效
+     * **/
+    private Byte isLicensePermanent;
+
+    /**
+     * 商品注册证/备案凭证是否长期有效
+     * **/
+    private Byte isCertificatePermanent;
+
+    /**
+     * GMP/GSP认证证书是否长期有效
+     * **/
+    private Byte isGmpAuthPermanent;
+
+    /**
+     * 添加的药品的成分
+     * **/
+    private String ingredient;
+
+    /**
+     * 器械编号
+     * **/
+    private String medicalDeviceCode;
+
+}

+ 56 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsPlatformProductScrmService.java

@@ -0,0 +1,56 @@
+package com.fs.hisStore.service;
+
+import com.fs.common.core.domain.R;
+import com.fs.hisStore.domain.FsPlatformProductScrm;
+import com.fs.hisStore.domain.FsStoreProductScrm;
+import com.fs.hisStore.param.FsPlatFormProductAddEditParam;
+import com.fs.hisStore.param.FsStoreProductAddEditParam;
+import com.fs.hisStore.vo.FsPlatformProductListVO;
+import java.util.List;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/12/16 下午2:20
+ */
+public interface IFsPlatformProductScrmService {
+
+    /**
+     * 查询商品列表
+     * @param vo
+     * @return
+     */
+    List<FsPlatformProductListVO> selectList(FsPlatformProductScrm vo);
+
+    /**
+     * 通过商品id获取商品详细信息
+     * @param productId
+     * @return
+     */
+    FsPlatformProductScrm selectFsPlatformProductById(Long productId);
+
+    /**
+     * 获取商品资质提示信息
+     * @return List<String>
+     * **/
+    List<String> getProductNoticeInfo();
+
+    /**
+     * 批量删除商品
+     * @param productIds 需要删除的商品ID
+     * @return 结果
+     */
+    R deleteFsPlatFormProductByIds(Long[] productIds);
+
+    /**
+     * 复制商品
+     * **/
+    R copyProduct(FsPlatformProductScrm product);
+
+    /**
+     * 新增或修改商品
+     * @param fsStoreProduct
+     * @return
+     */
+    R addOrEdit(FsPlatFormProductAddEditParam fsStoreProduct);
+}

+ 449 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsPlatformProductScrmServiceImpl.java

@@ -0,0 +1,449 @@
+package com.fs.hisStore.service.impl;
+
+import cn.hutool.core.collection.ListUtil;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.fs.common.core.domain.R;
+import com.fs.company.cache.ICompanyCacheService;
+import com.fs.his.utils.ConfigUtil;
+import com.fs.hisStore.domain.*;
+import com.fs.hisStore.dto.ProductArrtDTO;
+import com.fs.hisStore.dto.ProductAttrCountDto;
+import com.fs.hisStore.mapper.*;
+import com.fs.hisStore.param.FsPlatFormProductAddEditParam;
+import com.fs.hisStore.param.FsStoreProductAddEditParam;
+import com.fs.hisStore.service.IFsPlatformProductScrmService;
+import com.fs.hisStore.utils.StoreAuditLogUtil;
+import com.fs.hisStore.vo.FsPlatformProductListVO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+import java.util.function.Consumer;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/12/16 下午2:20
+ */
+@Slf4j
+@Service
+public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmService {
+
+    @Autowired
+    private ConfigUtil configUtil;
+
+    @Autowired
+    private ICompanyCacheService companyCacheService;
+
+    @Autowired
+    private StoreAuditLogUtil storeAuditLogUtil;
+
+    @Autowired
+    private FsStoreProductAttrScrmMapper fsStoreProductAttrMapper;
+
+    @Autowired
+    private IFsPlatformProductScrmMapper fsPlatformProductScrmMapper;
+
+    @Autowired
+    private FsStoreProductAttrValueScrmMapper fsStoreProductAttrValueMapper;
+
+    @Autowired
+    private FsStoreProductPackageScrmMapper fsStoreProductPackageMapper;
+
+    @Autowired
+    private FsStoreProductGroupScrmMapper fsStoreProductGroupMapper;
+
+
+    /**
+     * 查询商品列表
+     * @param vo
+     * @return
+     */
+    @Override
+    public List<FsPlatformProductListVO> selectList(FsPlatformProductScrm vo) {
+        List<FsPlatformProductListVO> fsPlatformProductListVOS = fsPlatformProductScrmMapper.selectList(vo);
+        for (FsPlatformProductListVO item : fsPlatformProductListVOS) {
+            if (StringUtils.isBlank(item.getCompanyIds())) {continue;}
+            List<String> companyNameList = new ArrayList<>();
+            String[] split = item.getCompanyIds().split(",");
+            for (String companyId : split) {
+                if (StringUtils.isNotBlank(companyId)) {
+                    String companyName = companyCacheService.selectCompanyNameById(Long.valueOf(companyId));
+                    companyNameList.add(companyName);
+                }
+            }
+            item.setCompanyName(String.join(",", companyNameList));
+        }
+        return fsPlatformProductListVOS;
+    }
+
+    /**
+     * 通过商品id获取商品详细信息
+     * @param productId
+     * @return
+     */
+    @Override
+    public FsPlatformProductScrm selectFsPlatformProductById(Long productId) {
+        return fsPlatformProductScrmMapper.selectFsPlatformProductById(productId);
+    }
+
+    /**
+     * 获取商品资质提示信息
+     * @return List<String>
+     * **/
+    @Override
+    public List<String> getProductNoticeInfo(){
+        return fsPlatformProductScrmMapper.getProductNoticeInfo();
+    }
+
+    /**
+     * 批量删除商品
+     * @param productIds 需要删除的商品ID
+     * @return 结果
+     */
+    @Override
+    public R deleteFsPlatFormProductByIds(Long[] productIds){
+        storeAuditLogUtil.addBatchAuditArray(productIds, "", "");
+        StringBuilder sb = new StringBuilder();
+        List<FsPlatformProductScrm> storeInfos = fsPlatformProductScrmMapper.getBaseProductInfo(productIds);
+        sb.append("删除成功");
+        if(fsPlatformProductScrmMapper.deleteFsPlatFormProductByIds(productIds) > 0){
+            storeInfos.forEach(storeInfo -> {
+                sb.append("删除商品ID:").append(storeInfo.getProductId()).append("-")
+                        .append("删除商品名称:").append(storeInfo.getProductName()).append("/");
+            });
+        }
+        return R.ok(sb.toString());
+    }
+
+    /**
+     * 复制商品
+     * @param product
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public R copyProduct(FsPlatformProductScrm product) {
+        //获取复制商品信息
+        FsPlatformProductScrm copyProductInfo = fsPlatformProductScrmMapper.selectFsPlatformProductById(product.getProductId());
+        if(copyProductInfo==null){
+            return R.error("复制,商品数据不存在!");
+        }
+        //重新设置一些新的信息
+        copyProductInfo.setProductId(null);
+        copyProductInfo.setCreateTime(new Date());
+        copyProductInfo.setUpdateTime(new Date());
+        copyProductInfo.setIsAudit("1");
+        copyProductInfo.setIsShow(1);
+
+        //插入复制商品
+        copyProductInfo.setProductId(createId());
+        if(fsPlatformProductScrmMapper.insertFsPlatformProduct(copyProductInfo) < 1){
+            return R.error("操作失败,复制信息异常!");
+        }
+
+        Long productId = copyProductInfo.getProductId();
+        //获取项目属性
+        List<FsStoreProductAttrScrm> attrScrmList = fsStoreProductAttrMapper.selectFsStoreProductAttrByProductId(product.getProductId());
+        if(!attrScrmList.isEmpty()){
+            attrScrmList.stream().forEach(a->{
+                a.setId(null);
+                a.setProductId(productId);
+                fsStoreProductAttrMapper.insertFsStoreProductAttr(a);
+            });
+        }
+
+        //获取对应的属性信息
+        List<FsStoreProductAttrValueScrm> attrValueScrmList = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(product.getProductId());
+        if(!attrValueScrmList.isEmpty()){
+            attrValueScrmList.stream().forEach(a->{
+                a.setId(null);
+                a.setProductId(productId);
+                a.setCreateTime(new Date());
+                a.setUpdateTime(new Date());
+                fsStoreProductAttrValueMapper.insertFsStoreProductAttrValue(a);
+            });
+        }
+        storeAuditLogUtil.addOperLog(copyProductInfo.getProductId());
+        return R.ok().put("msg",new StringBuilder().append("一键复制商品/").append("商品名称:").append(product.getProductName()));
+    }
+
+    /**
+     * 新增或修改商品
+     * @param param
+     * @return
+     */
+    @Override
+    @Transactional
+    public R addOrEdit(FsPlatFormProductAddEditParam param) {
+        //基础信息
+        ProductAttrCountDto countDto = computedProductCount(param.getValues());
+        FsPlatformProductScrm product = new FsPlatformProductScrm();
+        BeanUtils.copyProperties(param, product);
+
+        //数据转换和提取
+        populateBasicInfo(product, countDto, param);
+        populateDateRanges(product, param);
+        setDefaultBarcodeIfAvailable(product, param);
+        product.setBusinessLink(param.getBusinessLink());
+        product.setCreateTime(new Date());
+
+
+        //这里是更新
+        if(param.getProductId() != null && param.getProductId() > 0){
+            FsPlatformProductScrm oldFsStoreProduct = fsPlatformProductScrmMapper.selectFsPlatformProductById(product.getProductId());
+            Boolean isAudit = configUtil.generateConfigByKey("medicalMall.func.switch").getBoolean("isAudit");
+            try {
+                if (isAudit != null && isAudit && param.getIsDrug() != 1) {
+                    if (oldFsStoreProduct.getIsAudit() != null && "1".equals(oldFsStoreProduct.getIsAudit())) {
+                        Map<String, Object> diff = getDiff(oldFsStoreProduct, product);
+                        Set<String> diff_columns = diff.keySet();
+                        JSONArray productColumns = configUtil.generateConfigByKey("medicalMall.func.switch").getJSONArray("productColumns");
+                        if(com.fs.common.utils.StringUtils.isNotEmpty(productColumns)){
+                            //判断diff_columns是否在productColumns中,不是则将isAudit设置为0
+                            for (String column : diff_columns) {
+                                if (!productColumns.contains(column)) {
+                                    product.setIsAudit("0");
+                                    break;
+                                }
+                            }
+                        }else{
+                            product.setIsAudit("0");
+                        }
+                    }
+                }
+            } catch (IllegalAccessException e) {
+                log.error("获取diff出错", e);
+            }
+            //只要是编辑,都待审核,通过审核sql 去处理audit和show字段。
+            if(oldFsStoreProduct.getIsAudit() != null){
+                product.setIsAudit("1");
+            }
+            fsPlatformProductScrmMapper.updateFsPlatformProduct(product);
+        } else{
+            //总后台商品如果是上架就默认通过审核
+            if(product.getIsShow() == 1){
+                product.setIsAudit("1");
+            }
+            //复制新的id
+            product.setProductId(createId());
+            fsPlatformProductScrmMapper.insertFsPlatformProduct(product);
+        }
+        storeAuditLogUtil.addOperLog(product.getProductId());
+        //处理多规格
+        handleProductAttributes(param, product, null);
+        return R.ok();
+    }
+
+    private void handleProductAttributes(FsPlatFormProductAddEditParam param, FsPlatformProductScrm product, Long storeId) {
+        if (param.getSpecType().equals(0)) {
+            ProductArrtDTO fromatDetailDto = ProductArrtDTO.builder()
+                    .value("规格")
+                    .detail(ListUtil.toList(param.getPrescribeSpec()))
+                    .build();
+            List<ProductArrtDTO> items=new ArrayList<>();
+            items.add(fromatDetailDto);
+            param.getValues().get(0).setSku("每"+param.getUnitName());
+            addProductAttr(product.getProductId(),items, param.getValues(), storeId);
+        } else {
+            addProductAttr(product.getProductId(), param.getItems(), param.getValues(), storeId);
+        }
+    }
+
+    /**
+     * 添加商品属性
+     * @param productId 商品id
+     * @param items 属性
+     * @param values 属性值
+     * @param storeId 店铺id
+     */
+    private void addProductAttr(Long productId, List<ProductArrtDTO> items, List<FsStoreProductAttrValueScrm> values,Long storeId){
+        //清空attr
+        fsStoreProductAttrMapper.clear(productId);
+        //清空values
+        //查出商品属性所有ID;
+        List<FsStoreProductAttrValueScrm> attrValues=fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(productId);
+        fsStoreProductAttrValueMapper.deleteFsStoreProductAttrValueByProductId(productId);
+        //写入attr
+        for(ProductArrtDTO vo:items){
+            FsStoreProductAttrScrm attr=new FsStoreProductAttrScrm();
+            attr.setProductId(productId);
+            attr.setAttrName(vo.getValue());
+            attr.setAttrValues(StringUtils.join(vo.getDetail(), ","));
+            fsStoreProductAttrMapper.insertFsStoreProductAttr(attr);
+        }
+        Map<String,Object> map = new LinkedHashMap<>();
+        map.put("attr",items);
+        // map.put("value",values);
+
+        for(FsStoreProductAttrValueScrm val: values){
+            //更新套餐商品属性ID  获取套餐
+            Long id=val.getId();
+            if(val.getDetail()!=null){
+                List<String> stringList = new ArrayList<>(val.getDetail().values());
+                Collections.sort(stringList);
+                val.setSku(StrUtil.join(",",stringList));
+            }
+            val.setProductId(productId);
+            val.setStoreId(storeId);
+            fsStoreProductAttrValueMapper.insertFsStoreProductAttrValue(val);
+            if(attrValues!=null&&attrValues.size()>0){
+                for(FsStoreProductAttrValueScrm attrValue:attrValues){
+                    if(attrValue.getId().equals(id)){
+                        fsStoreProductGroupMapper.updateProducts(attrValue.getId(),val.getId());
+                        fsStoreProductPackageMapper.updateProducts(attrValue.getId(),val.getId());
+                    }
+                }
+            }
+
+        }
+    }
+
+    //价格与积分计算
+    private ProductAttrCountDto computedProductCount(List<FsStoreProductAttrValueScrm> values) {
+        BigDecimal val=new BigDecimal(0);
+        //取最小价格
+        BigDecimal minPrice = values
+                .stream()
+                .map(FsStoreProductAttrValueScrm::getPrice)
+                .min(Comparator.naturalOrder())
+                .orElse(val);
+
+        //取最小积分
+        /*Integer minIntegral = values
+                .stream()
+                .map(FsStoreProductAttrValueScrm::getIntegral)
+                .min(Comparator.naturalOrder())
+                .orElse(0);*/
+        Integer minIntegral = 0;
+
+        BigDecimal minOtPrice = values
+                .stream()
+                .map(FsStoreProductAttrValueScrm::getOtPrice)
+                .min(Comparator.naturalOrder())
+                .orElse(val);
+
+        BigDecimal minCost = values
+                .stream()
+                .map(FsStoreProductAttrValueScrm::getCost)
+                .min(Comparator.naturalOrder())
+                .orElse(val);
+        //计算库存
+        Integer stock = values
+                .stream()
+                .map(FsStoreProductAttrValueScrm::getStock)
+                .reduce(Integer::sum)
+                .orElse(0);
+
+//        if (stock <= 0) {
+//            throw new CustomException("库存不能低于0");
+//        }
+
+        return ProductAttrCountDto.builder()
+                .minPrice(minPrice)
+                .minOtPrice(minOtPrice)
+                .minCost(minCost)
+                .stock(stock)
+                .minIntegral(minIntegral)
+                .build();
+    }
+
+    private void populateBasicInfo(FsPlatformProductScrm product, ProductAttrCountDto countDto, FsPlatFormProductAddEditParam param) {
+        product.setPrice(countDto.getMinPrice());
+        product.setOtPrice(countDto.getMinOtPrice());
+        product.setCost(countDto.getMinCost());
+        product.setIntegral(Long.valueOf(countDto.getMinIntegral()));
+        product.setStock(Long.valueOf(countDto.getStock()));
+        product.setCompanyIds(param.getCompanyIds());
+        product.setVideo(param.getVideo());
+        product.setStoreId(param.getStoreId());
+        product.setIsDrug(param.getIsDrug().toString());
+        product.setInstructionManual(param.getInstructionManual());
+    }
+
+    private void populateDateRanges(FsPlatformProductScrm product, FsPlatFormProductAddEditParam param) {
+        setDateRange(product::setBusinessStart, product::setBusinessEnd, param.getBusinessExpire());
+        setDateRange(product::setLicenseStart, product::setLicenseEnd, param.getLicenseExpire());
+        setDateRange(product::setCertificateStart, product::setCertificateEnd, param.getCertificateExpire());
+        setDateRange(product::setVoucherStart, product::setVoucherEnd, param.getVoucherExpire());
+        setDateRange(product::setGmpAuthStart, product::setGmpAuthEnd, param.getGmpAuthExpire());
+    }
+
+    private void setDateRange(Consumer<LocalDate> startSetter, Consumer<LocalDate> endSetter, List<String> dates) {
+        if (dates != null && dates.size() >= 2) {
+            startSetter.accept(parseLocalDate(dates.get(0)));
+            endSetter.accept(parseLocalDate(dates.get(1)));
+        }
+    }
+
+    private void setDefaultBarcodeIfAvailable(FsPlatformProductScrm product, FsPlatFormProductAddEditParam param) {
+        if (!param.getValues().isEmpty() && param.getValues().get(0).getBarCode() != null) {
+            product.setBarCode(param.getValues().get(0).getBarCode());
+        }
+    }
+
+    /**
+     * 将字符串日期(yyyy-MM-dd)转换为 LocalDate
+     * @param dateStr 日期字符串(如 "2023-01-01")
+     * @return LocalDate 实例,转换失败返回 null
+     */
+    private LocalDate parseLocalDate(String dateStr) {
+        if (dateStr == null || dateStr.trim().isEmpty()) {
+            return null;
+        }
+        try {
+            // 假设前端传递的日期格式为 yyyy-MM-dd,可根据实际情况调整
+            return LocalDate.parse(dateStr, DateTimeFormatter.ISO_LOCAL_DATE);
+        } catch (Exception e) {
+            // 日志记录转换失败的异常(可选)
+            // log.error("日期转换失败: {}", dateStr, e);
+            return null;
+        }
+    }
+
+    public static Map<String, Object> getDiff(Object obj1, Object obj2) throws IllegalAccessException {
+        Map<String, Object> diff = new HashMap<>();
+        if (obj1 == null || obj2 == null || !obj1.getClass().equals(obj2.getClass())) {
+            return diff;
+        }
+
+        Field[] fields = obj1.getClass().getDeclaredFields();
+        for (Field field : fields) {
+            field.setAccessible(true);
+            Object value1 = field.get(obj1);
+            Object value2 = field.get(obj2);
+
+            // BigDecimal类型特殊处理
+            if (value1 instanceof BigDecimal && value2 instanceof BigDecimal) {
+                BigDecimal bd1 = (BigDecimal) value1;
+                BigDecimal bd2 = (BigDecimal) value2;
+                // 使用compareTo方法比较,避免精度问题
+                if (bd1.compareTo(bd2) != 0) {
+                    diff.put(field.getName(), new Object[]{value1, value2});
+                }
+            }
+            // 其他类型使用默认比较
+            else if (!Objects.equals(value1, value2)) {
+                diff.put(field.getName(), new Object[]{value1, value2});
+            }
+        }
+        return diff;
+    }
+
+    private static Long createId(){
+        return IdWorker.getId()  % 100000000L;  // 返回后8位(又重复风险);
+    }
+
+
+}

+ 2 - 2
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -499,14 +499,14 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
 
     @Override
     public void merchantQualificationExpiryCheck() {
-        log.info("定时任务店铺资质过期更新状态--------------------------start{}");
+        log.info("定时任务店铺资质过期更新状态--------------------------start");
         //获取资质过期商铺
         List<Long> storeIds = fsStoreMapper.getStoreQualificationExpiredInfo();
         if (!storeIds.isEmpty()) {
             //更新商铺状态】
             fsStoreMapper.batchUpdateStoreStatusById(storeIds);
         }
-        log.info("定时任务店铺资质过期更新状态--------------------------end{}");
+        log.info("定时任务店铺资质过期更新状态--------------------------end");
     }
 
     @Override

+ 141 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsPlatformProductListVO.java

@@ -0,0 +1,141 @@
+package com.fs.hisStore.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/12/16 下午2:33
+ */
+@Data
+public class FsPlatformProductListVO {
+
+    /** 商品id */
+    private Long productId;
+
+    /** 商品图片 */
+    private String image;
+
+    /** 轮播图 */
+    private String sliderImage;
+
+    /** 商品名称 */
+    private String productName;
+
+    /** 商品简介 */
+    private String productInfo;
+
+    /** 关键字 */
+    private String keyword;
+
+    /** 产品条码(一维码) */
+    private String barCode;
+
+    /** 分类id */
+    private Long cateId;
+
+    /** 商品价格 */
+    private BigDecimal price;
+
+    /** 会员价格 */
+    private BigDecimal vipPrice;
+
+    /** 市场价 */
+    private BigDecimal otPrice;
+
+    /** 邮费 */
+    private BigDecimal postage;
+
+    /** 单位名 */
+    private String unitName;
+
+    /** 排序 */
+    private Long sort;
+
+    /** 销量 */
+    private Long sales;
+
+    /** 库存 */
+    private Long stock;
+
+    /** 状态(0:未上架,1:上架) */
+    private Integer isShow;
+
+    private Integer productType;
+
+    private String cateName;
+
+    /**
+     * 公司列表
+     */
+    private String companyIds;
+
+    /**
+     * 所属公司
+     */
+    private String companyName;
+
+    private String isDrug;
+
+    private String drugImage;
+
+    private String drugRegCertNo;
+
+    private String commonName;
+
+    private String dosageForm;
+
+    private String unitPrice;
+
+    private String batchNumber;
+
+    private String mah;
+
+    private String mahAddress;
+
+    private String manufacturer;
+
+    private String manufacturerAddress;
+
+    private String indications;
+
+    private String dosage;
+
+    private String adverseReactions;
+
+    private String contraindications;
+
+    private String precautions;
+
+    private String isAudit;
+
+    private String storeId;
+
+    private String storeName;
+    // 同步药品状态 推送状态 0推送中1成功2失
+    private Byte pushStatus;
+
+    /**
+     * 审核说明(0 首营 1非首映)
+     */
+    private String reviewAudit;
+
+    /**
+     * 首营弹资质上传证明
+     */
+    private String qualificationCertificate;
+
+    /**
+     * 首营弹资质开始时间
+     */
+    private String qualificationCertificateStart;
+    /**
+     * 首营弹资质结束时间
+     */
+    private  String  qualificationCertificateEnd;
+
+
+
+}

+ 594 - 0
fs-service/src/main/resources/mapper/hisStore/FsPlatformProductScrmMapper.xml

@@ -0,0 +1,594 @@
+<?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.fs.hisStore.mapper.IFsPlatformProductScrmMapper">
+
+    <resultMap type="FsPlatformProductScrm" id="FsPlatFormProductResult">
+        <result property="productId"    column="product_id"    />
+        <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"    />
+        <result property="keyword"    column="keyword"    />
+        <result property="barCode"    column="bar_code"    />
+        <result property="cateId"    column="cate_id"    />
+        <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"    />
+        <result property="sales"    column="sales"    />
+        <result property="stock"    column="stock"    />
+        <result property="isShow"    column="is_show"    />
+        <result property="isHot"    column="is_hot"    />
+        <result property="isBenefit"    column="is_benefit"    />
+        <result property="isBest"    column="is_best"    />
+        <result property="isNew"    column="is_new"    />
+        <result property="description"    column="description"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="isPostage"    column="is_postage"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="giveIntegral"    column="give_integral"    />
+        <result property="cost"    column="cost"    />
+        <result property="isGood"    column="is_good"    />
+        <result property="browse"    column="browse"    />
+        <result property="codePath"    column="code_path"    />
+        <result property="tempId"    column="temp_id"    />
+        <result property="specType"    column="spec_type"    />
+        <result property="isIntegral"    column="is_integral"    />
+        <result property="integral"    column="integral"    />
+        <result property="productType"    column="product_type"    />
+        <result property="prescribeCode"    column="prescribe_code"    />
+        <result property="prescribeSpec"    column="prescribe_spec"    />
+        <result property="prescribeFactory"    column="prescribe_factory"    />
+        <result property="prescribeName"    column="prescribe_name"    />
+        <result property="isDisplay"    column="is_display"    />
+        <result property="tuiCateId"    column="tui_cate_id"    />
+        <result property="companyIds"    column="company_ids"    />
+        <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="ingredient" column="ingredient"/>
+        <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"/>
+        <result property="storeId" column="store_id"/>
+        <result property="instructionManual" column="instruction_manual"/>
+        <result property="business" column="business"/>
+        <result property="businessStart" column="business_start"/>
+        <result property="businessEnd" column="business_end"/>
+        <result property="license" column="license"/>
+        <result property="licenseStart" column="license_start"/>
+        <result property="licenseEnd" column="license_end"/>
+        <result property="certificate" column="certificate"/>
+        <result property="certificateStart" column="certificate_start"/>
+        <result property="certificateEnd" column="certificate_end"/>
+        <result property="voucher" column="voucher"/>
+        <result property="voucherStart" column="voucher_start"/>
+        <result property="voucherEnd" column="voucher_end"/>
+        <result property="gmpAuth" column="gmp_auth"/>
+        <result property="gmpAuthStart" column="gmp_auth_start"/>
+        <result property="gmpAuthEnd" column="gmp_auth_end"/>
+        <result property="businessLink" column="business_link"/>
+        <result property="medicalDeviceCode" column="medical_device_code"/>
+        <result property="isBusinessPermanent" column="is_business_permanent"/>
+        <result property="isLicensePermanent" column="is_license_permanent"/>
+        <result property="isCertificatePermanent" column="is_certificate_permanent"/>
+        <result property="isGmpAuthPermanent" column="is_gmp_auth_permanent"/>
+    </resultMap>
+
+    <sql id="selectFsPlatFormProductVo">
+        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,is_drug,drug_image,drug_reg_cert_no,common_name,dosage_form,
+               unit_price,batch_number,mah,mah_address,manufacturer,manufacturer_address,indications,ingredient,dosage,
+               adverse_reactions,contraindications,precautions,is_audit,store_id,instruction_manual,review_audit,qualification_certificate,qualification_certificate_start,qualification_certificate_end,
+               business, business_start, business_end,
+               license, license_start, license_end,
+               certificate, certificate_start, certificate_end,
+               voucher, voucher_start, voucher_end,
+               gmp_auth, gmp_auth_start, gmp_auth_end,business_link,medical_device_code,
+               is_business_permanent,is_license_permanent,is_certificate_permanent,is_gmp_auth_permanent
+        from fs_platform_product_scrm
+    </sql>
+
+    <sql id="baseSql">
+        DISTINCT p.product_id, p.image,p.video, p.slider_image, p.product_name, p.product_info, p.keyword, p.bar_code,
+       p.cate_id, p.price, p.vip_price, p.ot_price, p.postage, p.unit_name, p.sort, p.stock,p.sales,
+       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.company_ids,p.is_drug,p.drug_image,p.drug_reg_cert_no,p.common_name,p.dosage_form,
+       p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.ingredient,p.dosage,
+       p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,
+       p.is_business_permanent,p.is_license_permanent,p.is_certificate_permanent,p.is_gmp_auth_permanent
+    </sql>
+
+    <select id="selectList" resultType="com.fs.hisStore.vo.FsPlatformProductListVO">
+        SELECT
+        <include refid="baseSql"/>,
+        case
+        when p.is_show = 1 and p.is_audit = 1 then 1
+        when p.is_show = 0 and p.is_audit = 0 then 0
+        when p.is_show = 1 and p.is_audit = 0 then 3
+        when p.is_show = 0 and p.is_audit = 2 then 4
+        end AS is_show,
+        pc.cate_name
+        FROM
+        fs_platform_product_scrm p
+        LEFT JOIN
+        fs_store_product_category_scrm pc ON p.cate_id = pc.cate_id
+        WHERE 1=1
+        and p.is_del = 0 and p.is_drug = 1
+        <if test="maps.isAudit == null and maps.isShow != null">
+            <if test="maps.isShow == 1">
+                AND p.is_audit = 1
+                AND p.is_show = 1
+            </if>
+            <if test="maps.isShow == 0">
+                AND p.is_audit != 1
+                AND p.is_show = #{maps.isShow}
+            </if>
+            <if test="maps.isShow == -1">
+            </if>
+            <if test="maps.isShow == 3">
+                AND p.is_audit = 0
+                AND p.is_show = 1
+            </if>
+            <if test="maps.isShow == 4">
+                AND p.is_audit = 2
+                AND p.is_show = 0
+            </if>
+        </if>
+        <if test="maps.isAudit != null">
+            AND p.is_audit = #{maps.isAudit}
+        </if>
+        <if test="maps.productName != null and maps.productName.trim() != ''">
+            AND p.product_name LIKE CONCAT('%', #{maps.productName}, '%')
+        </if>
+        <if test="maps.cateId != null">
+            AND (pc.cate_id = #{maps.cateId} OR pc.pid = #{maps.cateId})
+        </if>
+        <if test="maps.productType != null">
+            AND p.product_type = #{maps.productType}
+        </if>
+
+        <if test="maps.companyIds != null and maps.companyIds.trim() != ''">
+            AND p.company_ids REGEXP REPLACE(#{maps.companyIds}, ',', '|')
+        </if>
+        <if test="maps.storeId != null and maps.storeId != ''">
+            AND p.store_id = #{maps.storeId}
+        </if>
+        <if test="maps.storeIds != null">
+            AND p.store_id IN
+            <foreach collection="maps.storeIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+
+        <if test="maps.drugRegCertNo != null and maps.drugRegCertNo.trim() != ''">
+            AND drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')
+        </if>
+        <if test="maps.commonName != null and maps.commonName.trim() != ''">
+            AND common_name LIKE CONCAT('%', #{maps.commonName}, '%')
+        </if>
+        <if test="maps.dosageForm != null and maps.dosageForm.trim() != ''">
+            AND dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')
+        </if>
+        <if test="maps.unitPrice != null and maps.unitPrice.trim() != ''">
+            AND unit_price = #{maps.unitPrice}
+        </if>
+        <if test="maps.batchNumber != null and maps.batchNumber.trim() != ''">
+            AND batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')
+        </if>
+        <if test="maps.mah != null and maps.mah.trim() != ''">
+            AND mah LIKE CONCAT('%', #{maps.mah}, '%')
+        </if>
+        <if test="maps.mahAddress != null and maps.mahAddress.trim() != ''">
+            AND mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')
+        </if>
+        <if test="maps.manufacturer != null and maps.manufacturer.trim() != ''">
+            AND manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')
+        </if>
+        <if test="maps.manufacturerAddress != null and maps.manufacturerAddress.trim() != ''">
+            AND manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')
+        </if>
+        <if test="maps.indications != null and maps.indications.trim() != ''">
+            AND indications LIKE CONCAT('%', #{maps.indications}, '%')
+        </if>
+        <if test="maps.dosage != null and maps.dosage.trim() != ''">
+            AND dosage LIKE CONCAT('%', #{maps.dosage}, '%')
+        </if>
+        <if test="maps.adverseReactions != null and maps.adverseReactions.trim() != ''">
+            AND adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')
+        </if>
+        <if test="maps.contraindications != null and maps.contraindications.trim() != ''">
+            AND contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')
+        </if>
+        <if test="maps.precautions != null and maps.precautions.trim() != ''">
+            AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')
+        </if>
+        <if test="maps.prescribeSpec != null and maps.prescribeSpec.trim() != ''">
+            AND p.prescribe_spec LIKE CONCAT('%', #{maps.prescribeSpec}, '%')
+        </if>
+        ORDER BY
+        p.product_id DESC
+    </select>
+
+    <select id="getProductNoticeInfo" resultType="java.lang.String">
+        SELECT
+        CONCAT(
+        product_name,
+        '商品的',
+        '生产企业营业执照',
+        CASE
+        WHEN business_end &lt; CURDATE() THEN '已过期'
+        ELSE '即将1个月内过期'
+        END
+        ) AS status_text
+        FROM fs_platform_product_scrm
+        WHERE business_end IS NOT NULL
+        AND business_end &lt;= DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
+        AND is_business_permanent != 1
+        and is_show = 1 and is_audit = 1 and is_drug = 1
+        <if test="storeId != null">AND store_id = #{storeId}</if>
+        UNION ALL
+        SELECT
+        CONCAT(
+        product_name,
+        '商品的',
+        '生产企业的生产许可证/备案凭证',
+        CASE
+        WHEN license_end &lt; CURDATE() THEN '已过期'
+        ELSE '即将1个月内过期'
+        END
+        ) AS status_text
+        FROM fs_platform_product_scrm
+        WHERE license_end IS NOT NULL
+        AND license_end &lt;= DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
+        AND is_license_permanent != 1
+        and is_show = 1 and is_audit = 1 and is_drug = 1
+        <if test="storeId != null">AND store_id = #{storeId}</if>
+        UNION ALL
+        SELECT
+        CONCAT(
+        product_name,
+        '商品的',
+        '商品注册证/备案凭证',
+        CASE
+        WHEN certificate_end &lt; CURDATE() THEN '已过期'
+        ELSE '即将1个月内过期'
+        END
+        ) AS status_text
+        FROM fs_platform_product_scrm
+        WHERE certificate_end IS NOT NULL
+        AND certificate_end &lt;= DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
+        AND is_certificate_permanent != 1
+        and is_show = 1 and is_audit = 1 and is_drug = 1
+    </select>
+
+    <select id="selectFsPlatformProductById"  parameterType="Long" resultMap="FsPlatFormProductResult">
+        <include refid="selectFsPlatFormProductVo"/>
+        where product_id = #{productId}
+    </select>
+
+    <select id="getBaseProductInfo" resultMap="FsPlatFormProductResult">
+        SELECT
+            p.product_id,
+            p.product_name
+        FROM
+        fs_platform_product_scrm p
+        WHERE p.product_id IN <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">#{item}</foreach>
+    </select>
+
+    <delete id="deleteFsPlatFormProductByIds">
+        delete from fs_platform_product_scrm where product_id in
+        <foreach item="productId" collection="array" open="(" separator="," close=")">
+            #{productId}
+        </foreach>
+    </delete>
+
+    <insert id="insertFsPlatformProduct" parameterType="FsPlatformProductScrm" useGeneratedKeys="false" keyProperty="productId">
+        insert into fs_platform_product_scrm
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="productId != null and productId != ''">product_id,</if>
+            <if test="image != null and image != ''">image,</if>
+            <if test="video != null and video != ''">video,</if>
+            <if test="sliderImage != null and sliderImage != ''">slider_image,</if>
+            <if test="productName != null and productName != ''">product_name,</if>
+            <if test="productInfo != null and productInfo != ''">product_info,</if>
+            <if test="keyword != null and keyword != ''">keyword,</if>
+            <if test="barCode != null">bar_code,</if>
+            <if test="cateId != null">cate_id,</if>
+            <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>
+            <if test="sales != null">sales,</if>
+            <if test="stock != null">stock,</if>
+            <if test="isShow != null">is_show,</if>
+            <if test="isHot != null">is_hot,</if>
+            <if test="isBenefit != null">is_benefit,</if>
+            <if test="isBest != null">is_best,</if>
+            <if test="isNew != null">is_new,</if>
+            <if test="description != null">description,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="isPostage != null">is_postage,</if>
+            <if test="isDel != null">is_del,</if>
+            <if test="giveIntegral != null">give_integral,</if>
+            <if test="cost != null">cost,</if>
+            <if test="isGood != null">is_good,</if>
+            <if test="browse != null">browse,</if>
+            <if test="codePath != null and codePath != ''">code_path,</if>
+            <if test="tempId != null">temp_id,</if>
+            <if test="specType != null">spec_type,</if>
+            <if test="isIntegral != null">is_integral,</if>
+            <if test="integral != null">integral,</if>
+            <if test="productType != null">product_type,</if>
+            <if test="prescribeCode != null">prescribe_code,</if>
+            <if test="prescribeSpec != null">prescribe_spec,</if>
+            <if test="prescribeFactory != null">prescribe_factory,</if>
+            <if test="prescribeName != null">prescribe_name,</if>
+            <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="isDrug!= null and isDrug != ''">is_drug,</if>
+            <if test="drugImage != null and drugImage != ''">drug_image ,</if>
+            <if test="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_cert_no ,</if>
+            <if test="commonName != null and commonName != ''">common_name ,</if>
+            <if test="dosageForm != null and dosageForm != ''">dosage_form ,</if>
+            <if test="unitPrice != null and unitPrice != ''">unit_price ,</if>
+            <if test="batchNumber != null and batchNumber != ''">batch_number ,</if>
+            <if test="mah != null and mah != ''">mah ,</if>
+            <if test="mahAddress != null and mahAddress != ''">mah_address ,</if>
+            <if test="manufacturer != null and manufacturer != ''">manufacturer ,</if>
+            <if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address,</if>
+            <if test="indications != null and indications != ''">indications ,</if>
+            <if test="ingredient != null and ingredient != ''">ingredient ,</if>
+            <if test="dosage != null and dosage != ''">dosage ,</if>
+            <if test="adverseReactions != null and adverseReactions != ''">adverse_reactions ,</if>
+            <if test="contraindications != null and contraindications != ''">contraindications ,</if>
+            <if test="precautions != null and precautions != ''">precautions ,</if>
+            <if test="isAudit != null and isAudit != ''">is_audit ,</if>
+            <if test="storeId != null and storeId != ''">store_id ,</if>
+            <if test="instructionManual != null and instructionManual != ''">instruction_manual ,</if>
+            <if test="reviewAudit != null and reviewAudit != ''">review_audit ,</if>
+            <if test="qualificationCertificate != null and qualificationCertificate != ''">qualification_certificate ,</if>
+            <if test="qualificationCertificateStart != null">qualification_certificate_start ,</if>
+            <if test="qualificationCertificateEnd != null">qualification_certificate_end ,</if>
+            <if test="business != null and business != ''">business ,</if>
+            <if test="businessStart != null">business_start ,</if>
+            <if test="businessEnd != null">business_end ,</if>
+            <if test="license != null and license != ''">license ,</if>
+            <if test="licenseStart != null">license_start ,</if>
+            <if test="licenseEnd != null">license_end ,</if>
+            <if test="certificate != null and certificate != ''">certificate ,</if>
+            <if test="certificateStart != null">certificate_start ,</if>
+            <if test="certificateEnd != null">certificate_end ,</if>
+            <if test="voucher != null and voucher != ''">voucher ,</if>
+            <if test="voucherStart != null">voucher_start ,</if>
+            <if test="voucherEnd != null">voucher_end ,</if>
+            <if test="gmpAuth != null and gmpAuth != ''">gmp_auth ,</if>
+            <if test="gmpAuthStart != null">gmp_auth_start ,</if>
+            <if test="gmpAuthEnd != null">gmp_auth_end ,</if>
+            <if test="businessLink != null">business_link ,</if>
+            <if test="medicalDeviceCode != null">medical_device_code ,</if>
+            <if test="isBusinessPermanent != null">is_business_permanent ,</if>
+            <if test="isLicensePermanent != null">is_license_permanent ,</if>
+            <if test="isCertificatePermanent != null">is_certificate_permanent ,</if>
+            <if test="isGmpAuthPermanent != null">is_gmp_auth_permanent ,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="productId != null and productId != ''">#{productId},</if>
+            <if test="image != null and image != ''">#{image},</if>
+            <if test="video != null and video != ''">#{video},</if>
+            <if test="sliderImage != null and sliderImage != ''">#{sliderImage},</if>
+            <if test="productName != null and productName != ''">#{productName},</if>
+            <if test="productInfo != null and productInfo != ''">#{productInfo},</if>
+            <if test="keyword != null and keyword != ''">#{keyword},</if>
+            <if test="barCode != null">#{barCode},</if>
+            <if test="cateId != null">#{cateId},</if>
+            <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>
+            <if test="sales != null">#{sales},</if>
+            <if test="stock != null">#{stock},</if>
+            <if test="isShow != null">#{isShow},</if>
+            <if test="isHot != null">#{isHot},</if>
+            <if test="isBenefit != null">#{isBenefit},</if>
+            <if test="isBest != null">#{isBest},</if>
+            <if test="isNew != null">#{isNew},</if>
+            <if test="description != null">#{description},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="isPostage != null">#{isPostage},</if>
+            <if test="isDel != null">#{isDel},</if>
+            <if test="giveIntegral != null">#{giveIntegral},</if>
+            <if test="cost != null">#{cost},</if>
+            <if test="isGood != null">#{isGood},</if>
+            <if test="browse != null">#{browse},</if>
+            <if test="codePath != null and codePath != ''">#{codePath},</if>
+            <if test="tempId != null">#{tempId},</if>
+            <if test="specType != null">#{specType},</if>
+            <if test="isIntegral != null">#{isIntegral},</if>
+            <if test="integral != null">#{integral},</if>
+            <if test="productType != null">#{productType},</if>
+            <if test="prescribeCode != null">#{prescribeCode},</if>
+            <if test="prescribeSpec != null">#{prescribeSpec},</if>
+            <if test="prescribeFactory != null">#{prescribeFactory},</if>
+            <if test="prescribeName != null">#{prescribeName},</if>
+            <if test="isDisplay != null">#{isDisplay},</if>
+            <if test="tuiCateId != null">#{tuiCateId},</if>
+            <if test="companyIds != null and companyIds != ''">#{companyIds},</if>
+            <if test="isDrug!= null and isDrug!= ''">#{isDrug} ,</if>
+            <if test="drugImage != null and drugImage != ''">#{drugImage} ,</if>
+            <if test="drugRegCertNo != null and drugRegCertNo != ''">#{drugRegCertNo} ,</if>
+            <if test="commonName != null and commonName != ''">#{commonName} ,</if>
+            <if test="dosageForm != null and dosageForm != ''">#{dosageForm} ,</if>
+            <if test="unitPrice != null and unitPrice != ''">#{unitPrice} ,</if>
+            <if test="batchNumber != null and batchNumber != ''">#{batchNumber} ,</if>
+            <if test="mah != null and mah != ''">#{mah} ,</if>
+            <if test="mahAddress != null and mahAddress != ''">#{mahAddress} ,</if>
+            <if test="manufacturer != null and manufacturer != ''">#{manufacturer} ,</if>
+            <if test="manufacturerAddress != null and manufacturerAddress != ''">#{manufacturerAddress} ,</if>
+            <if test="indications != null and indications != ''">#{indications} ,</if>
+            <if test="ingredient != null and ingredient != ''">#{ingredient} ,</if>
+            <if test="dosage != null and dosage != ''">#{dosage} ,</if>
+            <if test="adverseReactions != null and adverseReactions != ''">#{adverseReactions} ,</if>
+            <if test="contraindications != null and contraindications != ''">#{contraindications} ,</if>
+            <if test="precautions != null and precautions != ''">#{precautions} ,</if>
+            <if test="isAudit != null and isAudit != ''">#{isAudit} ,</if>
+            <if test="storeId != null and storeId != ''">#{storeId} ,</if>
+            <if test="instructionManual != null and instructionManual != ''">#{instructionManual} ,</if>
+            <if test="reviewAudit != null and reviewAudit != ''">#{reviewAudit} ,</if>
+            <if test="qualificationCertificate != null and qualificationCertificate != ''">#{qualificationCertificate} ,</if>
+            <if test="qualificationCertificateStart != null">#{qualificationCertificateStart} ,</if>
+            <if test="qualificationCertificateEnd != null ">#{qualificationCertificateEnd} ,</if>
+            <if test="business != null and business != ''">#{business} ,</if>
+            <if test="businessStart != null">#{businessStart} ,</if>
+            <if test="businessEnd != null">#{businessEnd} ,</if>
+            <if test="license != null and license != ''">#{license} ,</if>
+            <if test="licenseStart != null">#{licenseStart} ,</if>
+            <if test="licenseEnd != null">#{licenseEnd} ,</if>
+            <if test="certificate != null and certificate != ''">#{certificate} ,</if>
+            <if test="certificateStart != null">#{certificateStart} ,</if>
+            <if test="certificateEnd != null">#{certificateEnd} ,</if>
+            <if test="voucher != null and voucher != ''">#{voucher} ,</if>
+            <if test="voucherStart != null">#{voucherStart} ,</if>
+            <if test="voucherEnd != null">#{voucherEnd} ,</if>
+            <if test="gmpAuth != null and gmpAuth != ''">#{gmpAuth} ,</if>
+            <if test="gmpAuthStart != null">#{gmpAuthStart} ,</if>
+            <if test="gmpAuthEnd != null">#{gmpAuthEnd} ,</if>
+            <if test="businessLink != null">#{businessLink} ,</if>
+            <if test="medicalDeviceCode != null">#{medicalDeviceCode},</if>
+            <if test="isBusinessPermanent != null">#{isBusinessPermanent} ,</if>
+            <if test="isLicensePermanent != null">#{isLicensePermanent} ,</if>
+            <if test="isCertificatePermanent != null">#{isCertificatePermanent} ,</if>
+            <if test="isGmpAuthPermanent != null">#{isGmpAuthPermanent} ,</if>
+        </trim>
+    </insert>
+
+    <update id="updateFsPlatformProduct" parameterType="FsPlatformProductScrm">
+        update fs_platform_product_scrm
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="image != null and image != ''">image = #{image},</if>
+            <if test="video != null and video != ''">video = #{video},</if>
+            <if test="sliderImage != null and sliderImage != ''">slider_image = #{sliderImage},</if>
+            <if test="productName != null and productName != ''">product_name = #{productName},</if>
+            <if test="productInfo != null and productInfo != ''">product_info = #{productInfo},</if>
+            <if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
+            <if test="barCode != null">bar_code = #{barCode},</if>
+            <if test="cateId != null">cate_id = #{cateId},</if>
+            <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>
+            <if test="sales != null">sales = #{sales},</if>
+            <if test="stock != null">stock = #{stock},</if>
+            <if test="isShow != null">is_show = #{isShow},</if>
+            <if test="isHot != null">is_hot = #{isHot},</if>
+            <if test="isBenefit != null">is_benefit = #{isBenefit},</if>
+            <if test="isBest != null">is_best = #{isBest},</if>
+            <if test="isNew != null">is_new = #{isNew},</if>
+            <if test="description != null">description = #{description},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="isPostage != null">is_postage = #{isPostage},</if>
+            <if test="isDel != null">is_del = #{isDel},</if>
+            <if test="giveIntegral != null">give_integral = #{giveIntegral},</if>
+            <if test="cost != null">cost = #{cost},</if>
+            <if test="isGood != null">is_good = #{isGood},</if>
+            <if test="browse != null">browse = #{browse},</if>
+            <if test="codePath != null and codePath != ''">code_path = #{codePath},</if>
+            <if test="tempId != null">temp_id = #{tempId},</if>
+            <if test="specType != null">spec_type = #{specType},</if>
+            <if test="isIntegral != null">is_integral = #{isIntegral},</if>
+            <if test="integral != null">integral = #{integral},</if>
+            <if test="productType != null">product_type = #{productType},</if>
+            <if test="prescribeCode != null">prescribe_code = #{prescribeCode},</if>
+            <if test="prescribeSpec != null">prescribe_spec = #{prescribeSpec},</if>
+            <if test="prescribeFactory != null">prescribe_factory = #{prescribeFactory},</if>
+            <if test="prescribeName != null">prescribe_name = #{prescribeName},</if>
+            <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="isDrug != null and isDrug != ''">is_drug = #{isDrug} ,</if>
+            <if test="drugImage != null and drugImage != ''">drug_image = #{drugImage} ,</if>
+            <if test="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_cert_no = #{drugRegCertNo} ,</if>
+            <if test="commonName != null and commonName != ''">common_name = #{commonName} ,</if>
+            <if test="dosageForm != null and dosageForm != ''">dosage_form = #{dosageForm} ,</if>
+            <if test="unitPrice != null and unitPrice != ''">unit_price = #{unitPrice} ,</if>
+            <if test="batchNumber != null and batchNumber != ''">batch_number = #{batchNumber} ,</if>
+            <if test="mah != null and mah != ''">mah = #{mah} ,</if>
+            <if test="mahAddress != null and mahAddress != ''">mah_address = #{mahAddress} ,</if>
+            <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer} ,</if>
+            <if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address= #{manufacturerAddress} ,</if>
+            <if test="indications != null and indications != ''">indications = #{indications} ,</if>
+            <if test="ingredient != null and ingredient != ''">ingredient = #{ingredient} ,</if>
+            <if test="dosage != null and dosage != ''">dosage = #{dosage} ,</if>
+            <if test="adverseReactions != null and adverseReactions != ''">adverse_reactions = #{adverseReactions} ,</if>
+            <if test="contraindications != null and contraindications != ''">contraindications = #{contraindications} ,</if>
+            <if test="precautions != null and precautions != ''">precautions = #{precautions} ,</if>
+            <if test="isAudit != null and isAudit != ''">is_audit = #{isAudit} ,</if>
+            <if test="storeId != null and storeId != ''">store_id = #{storeId} ,</if>
+            <if test="instructionManual != null and instructionManual != ''">instruction_manual = #{instructionManual} ,</if>
+            <if test="reviewAudit != null and reviewAudit != ''">review_audit = #{reviewAudit} ,</if>
+            <if test="qualificationCertificate != null and qualificationCertificate != ''">qualification_certificate = #{qualificationCertificate} ,</if>
+            <if test="qualificationCertificateStart != null ">qualification_certificate_start = #{qualificationCertificateStart} ,</if>
+            <if test="qualificationCertificateEnd != null ">qualification_certificate_end = #{qualificationCertificateEnd} ,</if>
+            <if test="business != null and business != ''">business = #{business} ,</if>
+            <if test="businessStart != null">business_start = #{businessStart} ,</if>
+            <if test="businessEnd != null">business_end = #{businessEnd} ,</if>
+            <if test="license != null and license != ''">license = #{license} ,</if>
+            <if test="licenseStart != null">license_start = #{licenseStart} ,</if>
+            <if test="licenseEnd != null">license_end = #{licenseEnd} ,</if>
+            <if test="certificate != null and certificate != ''">certificate = #{certificate} ,</if>
+            <if test="certificateStart != null">certificate_start = #{certificateStart} ,</if>
+            <if test="certificateEnd != null">certificate_end = #{certificateEnd} ,</if>
+            <if test="voucher != null and voucher != ''">voucher = #{voucher} ,</if>
+            <if test="voucherStart != null">voucher_start = #{voucherStart} ,</if>
+            <if test="voucherEnd != null">voucher_end = #{voucherEnd} ,</if>
+            <if test="gmpAuth != null and gmpAuth != ''">gmp_auth = #{gmpAuth} ,</if>
+            <if test="gmpAuthStart != null">gmp_auth_start = #{gmpAuthStart} ,</if>
+            <if test="gmpAuthEnd != null">gmp_auth_end = #{gmpAuthEnd} ,</if>
+            <if test="businessLink != null">business_link = #{businessLink} ,</if>
+            <if test="medicalDeviceCode != null">medical_device_code =#{medicalDeviceCode},</if>
+            <if test="isBusinessPermanent != null">is_business_permanent = #{isBusinessPermanent} ,</if>
+            <if test="isLicensePermanent != null">is_license_permanent = #{isLicensePermanent} ,</if>
+            <if test="isCertificatePermanent != null">is_certificate_permanent = #{isCertificatePermanent} ,</if>
+            <if test="isGmpAuthPermanent != null">is_gmp_auth_permanent = #{isGmpAuthPermanent} ,</if>
+        </trim>
+        where product_id = #{productId}
+    </update>
+
+</mapper>