wangxy před 6 dny
rodič
revize
11f882ad90

+ 2 - 2
fs-admin/src/main/java/com/fs/api/controller/IndexStatisticsController.java

@@ -52,8 +52,8 @@ public class IndexStatisticsController {
     @Autowired
     private ICompanyService companyService;
 
-    @Autowired
-    private MedicalMallConfig medicalMallConfig;
+//    @Autowired
+//    private MedicalMallConfig medicalMallConfig;
 
     @Autowired
     private IStatisticsService statisticsService;

+ 7 - 9
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreAfterSalesScrmController.java

@@ -13,18 +13,12 @@ import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.framework.web.service.TokenService;
 import com.fs.his.domain.FsUser;
 import com.fs.his.service.IFsUserService;
-import com.fs.hisStore.domain.FsStoreAfterSalesItemScrm;
-import com.fs.hisStore.domain.FsStoreAfterSalesScrm;
-import com.fs.hisStore.domain.FsStoreAfterSalesStatusScrm;
-import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.domain.*;
 import com.fs.hisStore.param.FsStoreAfterSalesAudit1Param;
 import com.fs.hisStore.param.FsStoreAfterSalesAudit2Param;
 import com.fs.hisStore.param.FsStoreAfterSalesCancelParam;
 import com.fs.hisStore.param.FsStoreAfterSalesRefundParam;
-import com.fs.hisStore.service.IFsStoreAfterSalesItemScrmService;
-import com.fs.hisStore.service.IFsStoreAfterSalesScrmService;
-import com.fs.hisStore.service.IFsStoreAfterSalesStatusScrmService;
-import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.hisStore.service.*;
 import com.fs.hisStore.vo.FsStoreAfterSalesVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -54,6 +48,9 @@ public class FsStoreAfterSalesScrmController extends BaseController
     @Autowired
     private IFsStoreAfterSalesStatusScrmService storeAfterSalesStatusService;
 
+    @Autowired
+    private IFsStoreScrmService storeScrmService;
+
     @Autowired
     private TokenService tokenService;
     /**
@@ -111,7 +108,8 @@ public class FsStoreAfterSalesScrmController extends BaseController
         FsUser user=userService.selectFsUserById(afterSales.getUserId());
         user.setPhone(ParseUtils.parsePhone(user.getPhone()));
         FsStoreOrderScrm order=fsStoreOrderService.selectFsStoreOrderByOrderCode(afterSales.getOrderCode());
-        return R.ok().put("afterSales",afterSales).put("items",items).put("logs",logs).put("user",user).put("order",order);
+        FsStoreScrm storeScrm = storeScrmService.selectFsStoreByStoreId(order.getStoreId());
+        return R.ok().put("afterSales",afterSales).put("items",items).put("logs",logs).put("user",user).put("order",order).put("store",storeScrm);
     }
 
     /**

+ 18 - 5
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -11,6 +11,7 @@ import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.model.LoginUser;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
+import com.fs.common.exception.base.BaseException;
 import com.fs.common.utils.CloudHostUtils;
 import com.fs.common.utils.ParseUtils;
 import com.fs.common.utils.ServletUtils;
@@ -42,10 +43,7 @@ import com.fs.his.utils.ConfigUtil;
 import com.fs.his.vo.FsStoreOrderListAndStatisticsVo;
 import com.fs.his.vo.FsStoreOrderListVO;
 import com.fs.hisStore.config.FsErpConfig;
-import com.fs.hisStore.domain.FsStoreOrderItemScrm;
-import com.fs.hisStore.domain.FsStoreOrderScrm;
-import com.fs.hisStore.domain.FsStoreOrderStatusScrm;
-import com.fs.hisStore.domain.FsStorePaymentScrm;
+import com.fs.hisStore.domain.*;
 import com.fs.his.dto.ExpressInfoDTO;
 import com.fs.hisStore.dto.StoreOrderExpressExportDTO;
 import com.fs.hisStore.dto.StoreOrderProductDTO;
@@ -56,6 +54,7 @@ import com.fs.hisStore.vo.*;
 import com.fs.system.domain.SysConfig;
 import com.fs.system.mapper.SysConfigMapper;
 import io.swagger.annotations.ApiOperation;
+import me.chanjar.weixin.mp.bean.card.Abstract;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -138,6 +137,9 @@ public class FsStoreOrderScrmController extends BaseController {
     @Autowired
     private IFsStoreOrderLogsScrmService fsStoreOrderLogsService;
 
+    @Autowired
+    private  IFsStoreScrmService iFsStoreScrmService;
+
     private IErpOrderService getErpService(){
         //判断是否开启erp
         IErpOrderService erpOrderService = null;
@@ -532,6 +534,17 @@ public class FsStoreOrderScrmController extends BaseController {
     @GetMapping(value = "/{id}")
     public R getInfo(@PathVariable("id") Long id) {
         FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
+        //获取店铺信息
+        FsStoreScrm fsStoreScrm = new FsStoreScrm();
+        List<FsStoreScrm> allStoreList = iFsStoreScrmService.selectFsStoreList(fsStoreScrm);
+        if(Objects.isNull(allStoreList)){
+            throw  new BaseException("店铺信息为空");
+        }
+        Map<Long, FsStoreScrm> storeScrmMap = allStoreList.stream().collect(Collectors.toMap(FsStoreScrm::getStoreId, StoreScrm -> StoreScrm));
+        FsStoreScrm storeScrm = storeScrmMap.get(order.getStoreId());
+        if(storeScrm==null){
+            throw new BaseException("该订单的店铺信息为空");
+        }
         order.setUserPhone(ParseUtils.parsePhone(order.getUserPhone()));
         order.setUserAddress(ParseUtils.parseAddress(order.getUserAddress()));
         //填充用户评论内容
@@ -565,7 +578,7 @@ public class FsStoreOrderScrmController extends BaseController {
 
         List<FsStoreOrderAuditLogVO> auditLogs = orderAuditLogService.selectStoreOrderAuditLogVOByOrderId(order.getId());
         return R.ok().put("order", order).put("items", items).put("logs", logs).put("user", user).put("payments",payments).put("tuiMoneyLogs",tuiMoneyLogs)
-                .put("auditLogs",auditLogs);
+                .put("auditLogs",auditLogs).put("storeScrm",storeScrm);
     }
 
     @GetMapping(value = "/queryAddress/{id}")

+ 10 - 3
fs-service/src/main/java/com/fs/his/mapper/FsStoreAfterSalesMapper.java

@@ -73,13 +73,14 @@ public interface FsStoreAfterSalesMapper
     public int deleteFsStoreAfterSalesByIds(Long[] ids);
 
     @Select({"<script> " +
-            "select so.*,st.store_name,us.nick_name,us.phone,fso.order_code,fso.delivery_sn as delivery_id,c.company_name,cu.nick_name as company_user_nick_name,fpo.package_name FROM fs_store_after_sales so " +
+            "select so.*,st.store_name,us.nick_name,us.phone,fso.order_code,fso.delivery_sn as delivery_id,c.company_name,cu.nick_name as company_user_nick_name,fpo.package_name,ssc.store_name as storeScrName,ssc.store_seq as storeSeq,ssc.merchant_id as merchantId   FROM fs_store_after_sales so " +
             " LEFT JOIN fs_store st ON so.store_id =st.store_id " +
             " LEFT JOIN fs_user us ON us.user_id=so.user_id " +
             " LEFT JOIN fs_store_order fso ON fso.order_id=so.order_id " +
             " left join company c on so.company_id = c.company_id " +
             " left join fs_package_order fpo on fso.package_order_id = fpo.order_id " +
-            " left join company_user cu on so.company_user_id = cu.user_id   WHERE so.is_del=0 "+
+            " left join company_user cu on so.company_user_id = cu.user_id"+"" +
+            " left join fs_store_scrm ssc on fso.store_id=ssc.store_id" + " WHERE so.is_del=0 "+
             "    <if test=\"maps.storeId != null \"> and so.store_id = #{maps.storeId}</if>\n" +
             "    <if test=\"maps.refundAmount != null \"> and so.refund_amount = #{maps.refundAmount}</if>\n" +
             "    <if test=\"maps.refundType != null \"> and so.refund_type = #{maps.refundType}</if>\n" +
@@ -116,7 +117,13 @@ public interface FsStoreAfterSalesMapper
             "    <if test=\"maps.orderCode != null \"> and fso.order_code= #{maps.orderCode}</if>"+
             "<if test = 'maps.deptId != null    '> " +
             "  AND (so.dept_id = #{maps.deptId} OR so.dept_id IN ( SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors) )) " +
-            "</if>" +
+            "</if>" + "<if test = 'maps.storeScrName != null    '> " +
+            "  and ssc.store_name like concat('%', #{maps.storeScrName}, '%')"+
+            "</if>" +"<if test = 'maps.storeSeq != null    '> " +
+            "  and ssc.store_seq like concat('%', #{maps.storeSeq}, '%')"+
+            "</if>" +"<if test = 'maps.merchantId != null    '> " +
+            "  and ssc.merchant_id like concat('%', #{maps.merchantId}, '%')"+
+            "</if>"+
             " order by so.create_time desc "+
             "</script>"})
     List<FsStoreAfterSalesListVO> selectFsStoreAfterSalesListVO(@Param("maps") FsStoreAfterSalesParam fsStoreAfterSales);

+ 13 - 0
fs-service/src/main/java/com/fs/his/param/FsStoreAfterSalesParam.java

@@ -119,5 +119,18 @@ public class FsStoreAfterSalesParam extends BaseEntity {
     private String companyUserNickName;
 
 
+    private String  storeScrName;
+
+    /**
+     * 店铺id
+     */
+    private  String  storeSeq;
+
+    /**
+     * 商家id
+     */
+    private  String  merchantId;
+
+
 
 }

+ 14 - 0
fs-service/src/main/java/com/fs/his/vo/FsStoreAfterSalesListVO.java

@@ -123,4 +123,18 @@ public class FsStoreAfterSalesListVO {
     private String deliveryId;
 
     private String packageName;
+
+
+
+    private String  storeScrName;
+
+    /**
+     * 店铺id
+     */
+    private  String  storeSeq;
+
+    /**
+     * 商家id
+     */
+    private  String  merchantId;
 }

+ 12 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreAfterSalesScrm.java

@@ -140,4 +140,16 @@ public class FsStoreAfterSalesScrm extends BaseEntity
 
     private String remark;
 
+    private  String storeName;
+
+    /**
+     * 店铺id
+     */
+    private String storeSeq;
+
+    /**
+     * 商家id
+     */
+    private String merchantId;
+
 }

+ 250 - 65
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreScrm.java

@@ -17,217 +17,402 @@ import java.time.LocalDate;
  */
 @EqualsAndHashCode(callSuper = true)
 @Data
-public class FsStoreScrm extends BaseEntity
-{
+public class FsStoreScrm extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** ID */
+    /**
+     * ID
+     */
     private Long storeId;
 
-    /** 所属城市ids */
+    /**
+     * 所属城市ids
+     */
     private String cityIds;
 
-    /** 店铺名称 */
+    /**
+     * 店铺名称
+     */
     @Excel(name = "店铺名称")
     private String storeName;
 
-    /** 店铺介绍 */
+    /**
+     * 店铺介绍
+     */
     @Excel(name = "店铺介绍")
     private String descs;
 
-    /** 店铺LOGO */
+    /**
+     * 店铺LOGO
+     */
     @Excel(name = "店铺LOGO")
     private String logoUrl;
 
-    /** 地址 */
+    /**
+     * 地址
+     */
     @Excel(name = "地址")
     private String address;
 
-    /** 经度 */
+    /**
+     * 经度
+     */
     private String lng;
 
-    /** 维度 */
+    /**
+     * 维度
+     */
     private String lat;
 
-    /** 店铺电话 */
+    /**
+     * 店铺电话
+     */
     @Excel(name = "店铺电话")
     private String phone;
 
-    /** 资质证书 */
+    /**
+     * 资质证书
+     */
     @Excel(name = "资质证书")
     private String licenseImages;
 
-    /** 商品总数 */
+    /**
+     * 商品总数
+     */
     @Excel(name = "商品总数")
     private Long productCount;
 
-    /** 状态 */
+    /**
+     * 状态
+     */
     @Excel(name = "状态")
     private Integer status;
 
-    /** 销量 */
+    /**
+     * 销量
+     */
     @Excel(name = "销量")
     private Long salesCount;
 
-    /** 余额 */
+    /**
+     * 余额
+     */
     @Excel(name = "余额")
     private BigDecimal balance;
 
-    /** 累计金额 */
+    /**
+     * 累计金额
+     */
     @Excel(name = "累计金额")
     private BigDecimal totalMoney;
 
-    /** 审核状态 */
+    /**
+     * 审核状态
+     */
     @Excel(name = "审核状态")
     private Integer isAudit;
 
-    /** 登录帐号 */
+    /**
+     * 登录帐号
+     */
     @Excel(name = "登录帐号")
     private String account;
 
-    /** 登录密码 */
+    /**
+     * 登录密码
+     */
     @Excel(name = "登录密码")
     private String password;
 
-    /** 配送方式 1=配送 ,2=到店自提 */
+    /**
+     * 配送方式 1=配送 ,2=到店自提
+     */
     private String shippingType;
 
 
-    /** 佣金类型 */
+    /**
+     * 佣金类型
+     */
     private Integer brokerageType;
 
-    /** 佣金比例 */
+    /**
+     * 佣金比例
+     */
     private Integer brokerageRate;
 
-    /** 店铺全称 */
+    /**
+     * 店铺全称
+     */
     private String fullName;
 
-    /** 退货联系电话 */
+    /**
+     * 退货联系电话
+     */
     private String refundPhone;
 
-    /** 退货地址 */
+    /**
+     * 退货地址
+     */
     private String refundAddress;
 
-    /** 退货联系人 */
+    /**
+     * 退货联系人
+     */
     private String refundConsignee;
 
-    /** 配送方式 */
+    /**
+     * 配送方式
+     */
     private Integer deliveryType;
 
-    /** 发货联系电话 */
+    /**
+     * 发货联系电话
+     */
     private String sendPhone;
 
-    /** 企业注册地址 */
+    /**
+     * 企业注册地址
+     */
     private String enterpriseAddress;
 
-    /** 法人代表姓名 */
+    /**
+     * 法人代表姓名
+     */
     private String legalPersonName;
 
-    /** 统一社会信用代码 */
+    /**
+     * 统一社会信用代码
+     */
     private String unifiedSocialCreditCode;
-    /** 统一社会信用代码失效日期 */
+    /**
+     * 统一社会信用代码失效日期
+     */
     private String unifiedSocialCreditCodeExpireEnd;
 
-    /** 经营范围 */
+    /**
+     * 经营范围
+     */
     private String businessScope;
 
-    /** 营业执照图片 */
+    /**
+     * 营业执照图片
+     */
     private String businessLicense;
 
-    /** 营业执照有效期开始 */
+    /**
+     * 营业执照有效期开始
+     */
     private LocalDate businessLicenseExpireStart;
 
-    /** 营业执照有效期结束 */
+    /**
+     * 营业执照有效期结束
+     */
     private LocalDate businessLicenseExpireEnd;
 
-    /** 药品经营许可证 */
+    /**
+     * 药品经营许可证
+     */
     private String drugLicense;
 
-    /** 药品经营许可证有效期开始 */
+    /**
+     * 药品经营许可证有效期开始
+     */
     private LocalDate drugLicenseExpiryStart;
 
-    /** 药品经营许可证有效期结束 */
+    /**
+     * 药品经营许可证有效期结束
+     */
     private LocalDate drugLicenseExpiryEnd;
 
-    /** 1类器械生产备案 */
+    /**
+     * 1类器械生产备案
+     */
     private String medicalDevice1;
 
-    /** 1类器械生产备案有效期开始 */
+    /**
+     * 1类器械生产备案有效期开始
+     */
     private LocalDate medicalDevice1ExpiryStart;
 
-    /** 1类器械生产备案有效期结束 */
+    /**
+     * 1类器械生产备案有效期结束
+     */
     private LocalDate medicalDevice1ExpiryEnd;
 
-    /** 2类医疗器械备案 */
+    /**
+     * 2类医疗器械备案
+     */
     private String medicalDevice2;
 
-    /** 2类医疗器械备案有效期开始 */
+    /**
+     * 2类医疗器械备案有效期开始
+     */
     private LocalDate medicalDevice2ExpiryStart;
 
-    /** 2类医疗器械备案有效期结束 */
+    /**
+     * 2类医疗器械备案有效期结束
+     */
     private LocalDate medicalDevice2ExpiryEnd;
 
-    /** 3类器械经营许可证 */
+    /**
+     * 3类器械经营许可证
+     */
     private String medicalDevice3;
 
-    /** 3类器械经营许可证有效期开始 */
+    /**
+     * 3类器械经营许可证有效期开始
+     */
     private LocalDate medicalDevice3ExpiryStart;
 
-    /** 3类器械经营许可证有效期结束 */
+    /**
+     * 3类器械经营许可证有效期结束
+     */
     private LocalDate medicalDevice3ExpiryEnd;
 
-    /** 食品经营许可证 */
+    /**
+     * 食品经营许可证
+     */
     private String foodLicense;
 
-    /** 食品经营许可证有效期开始 */
+    /**
+     * 食品经营许可证有效期开始
+     */
     private LocalDate foodLicenseExpiryStart;
 
-    /** 食品经营许可证有效期结束 */
+    /**
+     * 食品经营许可证有效期结束
+     */
     private LocalDate foodLicenseExpiryEnd;
 
-    /** 医疗机构执业许可证 */
+    /**
+     * 医疗机构执业许可证
+     */
     private String medicalLicense;
 
-    /** 医疗机构执业许可证有效期开始 */
+    /**
+     * 医疗机构执业许可证有效期开始
+     */
     private LocalDate medicalLicenseExpiryStart;
 
-    /** 医疗机构执业许可证有效期结束 */
+    /**
+     * 医疗机构执业许可证有效期结束
+     */
     private LocalDate medicalLicenseExpiryEnd;
 
     /**
-     *营业执照是否长期有效(1长期有效、0非长期有效)
+     * 营业执照是否长期有效(1长期有效、0非长期有效)
      **/
     private Byte isBusinessLicensePermanent;
 
-    /** 其它资质-入驻协议 */
+    /**
+     * 其它资质-入驻协议
+     */
     private String settlementAgreement;
 
-    /** 其它资质-入驻协议有效期开始 */
+    /**
+     * 其它资质-入驻协议有效期开始
+     */
     private LocalDate settlementAgreementStart;
 
-    /** 其它资质-入驻协议有效期结束 */
+    /**
+     * 其它资质-入驻协议有效期结束
+     */
     private LocalDate settlementAgreementEnd;
 
-    /** 质量保证协议 */
+    /**
+     * 质量保证协议
+     */
     private String qualityAssuranceAgreement;
 
-    /** 质量保证协议有效期开始 */
+    /**
+     * 质量保证协议有效期开始
+     */
     private LocalDate qualityAssuranceAgreementStart;
 
-    /** 质量保证协议有效期结束 */
+    /**
+     * 质量保证协议有效期结束
+     */
     private LocalDate qualityAssuranceAgreementEnd;
 
-    /** 其它特殊资质 */
+    /**
+     * 其它特殊资质
+     */
     private String otherSpecialQualification;
 
-    /** 其它特殊资质有效期开始 */
+    /**
+     * 其它特殊资质有效期开始
+     */
     private LocalDate otherSpecialQualificationStart;
 
-    /** 其它特殊资质有效期结束 */
+    /**
+     * 其它特殊资质有效期结束
+     */
     private LocalDate otherSpecialQualificationEnd;
 
     /**
      * 用于兼容查询店铺id
      */
     private Long queryStoreId;
+
+    /**
+     * 店铺id
+     */
+    private String storeSeq;
+
+    /**
+     * 商家id
+     */
+    private String merchantId;
+
+    /**
+     * 营业执照上传编码
+     */
+    private String businessCode;
+
+    /**
+     * 药品经营许可证编码
+     */
+    private String drugCode;
+
+    /**
+     * 一类器械生产备案文件编码
+     */
+    private String medicalDevice1Code;
+
+    /**
+     * 二类器械生产备案文件编码
+     */
+    private String medicalDevice2Code;
+
+    /**
+     * 三类器械生产备案文件编码
+     */
+    private String medicalDevice3Code;
+
+    /**
+     * 食品经营许可证上传编码
+     */
+    private String foodCode;
+
+    /**
+     * 医疗机构执业许可证上传编码
+     */
+    private String medicalCode;
+
+    /**
+     * 其它特殊资质编码
+     */
+    private String otherSpecialQualificationCode;
+
+    /**
+     * 质量保证协议编码
+     */
+    private String qualityAssuranceAgreementCode;
+
+    /**
+     * 其它资质入驻协议编码
+     */
+    private String settlementAgreementCode;
+
+
 }

+ 16 - 2
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreAfterSalesScrmMapper.java

@@ -87,8 +87,13 @@ public interface FsStoreAfterSalesScrmMapper
     List<FsStoreAfterSalesQueryVO>  selectFsStoreAfterSalesListQuery(@Param("maps") FsStoreAfterSalesQueryParam storeAfterSalesParam);
 
     @Select({"<script> " +
-            "select s.*,o.delivery_status,o.delivery_id,u.phone as user_phone,c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber  from fs_store_after_sales_scrm s INNER join fs_store_order_scrm o on o.order_code=s.order_code left join fs_user u on s.user_id=u.user_id left join company c on c.company_id=s.company_id left join company_user cu on cu.user_id=s.company_user_id " +
-            "where 1=1 " +
+            "select s.*,o.delivery_status,o.delivery_id,u.phone as user_phone,c.company_name ," +
+            "cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber,ssc.store_name as storeName,ssc.store_seq as storeSeq,ssc.merchant_id as merchantId  " +
+            "from fs_store_after_sales_scrm s INNER join fs_store_order_scrm o on o.order_code=s.order_code " +
+            "left join fs_user u on s.user_id=u.user_id left join company c on c.company_id=s.company_id " +
+            "left join company_user cu on cu.user_id=s.company_user_id " +
+            "left join fs_store_scrm ssc on o.store_id=ssc.store_id " +
+            " where 1=1 " +
             "<if test = 'maps.status != null    '> " +
             "and s.status = #{maps.status} " +
             "</if>" +
@@ -134,6 +139,15 @@ public interface FsStoreAfterSalesScrmMapper
             "<if test = 'maps.deptId != null    '> " +
             "  AND (o.dept_id = #{maps.deptId} OR o.dept_id IN ( SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors) )) " +
             "</if>" +
+            "<if test = 'maps.storeName != null and maps.storeName != \"\"   '> " +
+            " AND ssc.store_name  like CONCAT('%',#{maps.storeName},'%')  " +
+            "</if>" +
+            "<if test = 'maps.storeSeq != null and maps.storeSeq != \"\"   '> " +
+            " AND ssc.store_seq  like CONCAT('%',#{maps.storeSeq},'%')  " +
+            "</if>" +
+            "<if test = 'maps.merchantId != null and maps.merchantId != \"\"   '> " +
+            " AND ssc.merchant_id  like CONCAT('%',#{maps.merchantId},'%')  " +
+            "</if>" +
             " ${maps.params.dataScope} "+
             "order by s.create_time desc "+
             "</script>"})

+ 10 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmMapper.java

@@ -135,4 +135,14 @@ public interface FsStoreScrmMapper
      * 通过商品ID获取关联店偶
      * **/
     List<FsStoreScrm> getStoreInfoByproductId(@Param("productIds") Set<Long> productIds);
+
+
+    @Select("SELECT COUNT(DISTINCT merchant_id) FROM fs_store_scrm WHERE merchant_id LIKE CONCAT(#{datePrefix}, '%')")
+    Long countMerchantsByDatePrefix(@Param("datePrefix") String datePrefix );
+
+    /**
+     * 查询当天已生成的店铺数量
+     */
+    @Select("SELECT COUNT(*) FROM fs_store_scrm WHERE merchant_id = #{merchantId} AND store_seq LIKE CONCAT(#{date}, '%')")
+    Long countByStoreSeqPrefix(@Param("merchantId") String merchantId,@Param("date") String date);
 }

+ 15 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderParam.java

@@ -111,4 +111,19 @@ public class FsStoreOrderParam extends BaseEntity implements Serializable
     //导出字段
     private String filter;
 
+    /**
+     * 店铺名字
+     */
+    private  String storeName;
+
+    /**
+     * 店铺id
+     */
+    private  String  storeSeq;
+
+    /**
+     * 商家id
+     */
+    private  String  merchantId;
+
 }

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

@@ -31,6 +31,7 @@ import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -43,8 +44,7 @@ import java.util.stream.Collectors;
  */
 @Service
 @Slf4j
-public class FsStoreScrmServiceImpl implements IFsStoreScrmService
-{
+public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
     @Autowired
     private FsStoreScrmMapper fsStoreMapper;
 
@@ -56,6 +56,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
     @Autowired
     private ConfigUtil configUtil;
 
+    private static final String MERCHANT_PREFIX = "YJB";
 
     /**
      * 查询店铺管理
@@ -64,8 +65,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
      * @return 店铺管理
      */
     @Override
-    public FsStoreScrm selectFsStoreByStoreId(Long storeId)
-    {
+    public FsStoreScrm selectFsStoreByStoreId(Long storeId) {
         return fsStoreMapper.selectFsStoreByStoreId(storeId);
     }
 
@@ -81,8 +81,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
      * @return 店铺管理
      */
     @Override
-    public List<FsStoreScrm> selectFsStoreList(FsStoreScrm fsStore)
-    {
+    public List<FsStoreScrm> selectFsStoreList(FsStoreScrm fsStore) {
         return fsStoreMapper.selectFsStoreList(fsStore);
     }
 
@@ -93,21 +92,62 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
      * @return 结果
      */
     @Override
-    public Long insertFsStore(FsStoreScrm fsStore)
-    {
-        if (fsStore.getAccount()!=null){
+    public Long insertFsStore(FsStoreScrm fsStore) {
+        if (fsStore.getAccount() != null) {
             FsStoreScrm fs = fsStoreMapper.selectFsStoreByAccount(fsStore.getAccount());
-            if (fs!=null){
+            if (fs != null) {
                 throw new CustomException("店铺账号重复");
             }
         }
         StoreMD5PasswordEncoder storeMD5PasswordEncoder = new StoreMD5PasswordEncoder();
         fsStore.setPassword(storeMD5PasswordEncoder.encode("XyzAbc~12"));
         fsStore.setCreateTime(DateUtils.getNowDate());
+        //生成商家id
+        String merchantId = generateMerchantId();
+        //生成店铺id
+        String sequence = generateStoreSequence(merchantId);
+        fsStore.setMerchantId(merchantId);
+        fsStore.setStoreSeq(sequence);
         fsStoreMapper.insertFsStore(fsStore);
         return fsStore.getStoreId();
     }
 
+    /**
+     * 生成商家ID:YJB202510180001
+     * 格式:前缀 + 年月日 + 4位序列号
+     */
+    public String generateMerchantId() {
+        // 获取当天日期
+        String datePart = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
+
+        // 查询当天已生成的商家数量
+        Long todayCount = fsStoreMapper.countMerchantsByDatePrefix(MERCHANT_PREFIX + datePart);
+
+        // 生成序号 (从0001开始)
+        Long sequence = (todayCount == null) ? 1L : todayCount + 1;
+        String sequencePart = String.format("%04d", sequence);
+
+        return MERCHANT_PREFIX + datePart + sequencePart;
+    }
+
+    /**
+     * 生成店铺序号:年月日 + 当天第几家店
+     * 格式:202510180001
+     */
+    public String generateStoreSequence(String merchantId) {
+        // 获取当天日期
+        String datePart = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
+
+        // 查询当天已生成的店铺数量
+        Long todayCount = fsStoreMapper.countByStoreSeqPrefix(merchantId, datePart);
+
+        // 生成序号 (从1开始)
+        Long sequence = (todayCount == null) ? 1L : todayCount + 1;
+        String sequencePart = String.format("%04d", sequence);
+
+        return datePart + sequencePart;
+    }
+
     /**
      * 修改店铺管理
      *
@@ -115,8 +155,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
      * @return 结果
      */
     @Override
-    public int updateFsStore(FsStoreScrm fsStore)
-    {
+    public int updateFsStore(FsStoreScrm fsStore) {
         fsStore.setUpdateTime(DateUtils.getNowDate());
         storeAuditLogUtil.addOperLog(fsStore.getStoreId());
         FsStoreScrm oldFsStore = fsStoreMapper.selectFsStoreByStoreId(fsStore.getStoreId());
@@ -127,7 +166,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
                     Map<String, Object> diff = getDiff(oldFsStore, fsStore);
                     Set<String> diff_columns = diff.keySet();
                     JSONArray storeColumns = configUtil.generateConfigByKey("medicalMall.func.switch").getJSONArray("storeColumns");
-                    if(StringUtils.isNotEmpty(storeColumns)){
+                    if (StringUtils.isNotEmpty(storeColumns)) {
                         //判断diff_columns是否在storeColumns中,不是则将isAudit设置为0
                         for (String column : diff_columns) {
                             if (!storeColumns.contains(column)) {
@@ -135,7 +174,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
                                 break;
                             }
                         }
-                    }else{
+                    } else {
                         fsStore.setIsAudit(0);
                     }
                 }
@@ -146,10 +185,10 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
 
         //验证资质日期是否正常
         LocalDate today = LocalDate.now(ZoneId.of("Asia/Shanghai"));
-        if(fsStore.getBusinessLicenseExpireEnd().isBefore(today) || fsStore.getDrugLicenseExpiryEnd().isBefore(today)
+        if (fsStore.getBusinessLicenseExpireEnd().isBefore(today) || fsStore.getDrugLicenseExpiryEnd().isBefore(today)
                 || fsStore.getMedicalDevice2ExpiryEnd().isBefore(today) || fsStore.getMedicalLicenseExpiryEnd().isBefore(today) || fsStore.getStatus() == 0) {
             fsStore.setStatus(0);
-        }else {
+        } else {
             fsStore.setStatus(1);
         }
 
@@ -191,9 +230,8 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
      * @return 结果
      */
     @Override
-    public int deleteFsStoreByStoreIds(Long[] storeIds)
-    {
-        storeAuditLogUtil.addBatchAuditArray(storeIds,null,null);
+    public int deleteFsStoreByStoreIds(Long[] storeIds) {
+        storeAuditLogUtil.addBatchAuditArray(storeIds, null, null);
         return fsStoreMapper.deleteFsStoreByStoreIds(storeIds);
     }
 
@@ -204,8 +242,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
      * @return 结果
      */
     @Override
-    public int deleteFsStoreByStoreId(Long storeId)
-    {
+    public int deleteFsStoreByStoreId(Long storeId) {
         return fsStoreMapper.deleteFsStoreByStoreId(storeId);
     }
 
@@ -213,23 +250,23 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
     @Transactional
     public int updateFsStoreAudit(FsStoreAuditParam fsStore) {
 
-        FsStoreScrm fsStoreScrm=fsStoreMapper.selectFsStoreByStoreId(fsStore.getStoreId());
-        if(fsStoreScrm == null){
+        FsStoreScrm fsStoreScrm = fsStoreMapper.selectFsStoreByStoreId(fsStore.getStoreId());
+        if (fsStoreScrm == null) {
             throw new ServiceException("操作失败,审核店铺数据不存在!");
         }
-        FsStoreScrm updateStore=new FsStoreScrm();
+        FsStoreScrm updateStore = new FsStoreScrm();
         updateStore.setStoreId(fsStore.getStoreId());
         updateStore.setIsAudit(fsStore.getIsAudit());
-        if(fsStoreScrm.getStatus() == 0){
+        if (fsStoreScrm.getStatus() == 0) {
             LocalDate today = LocalDate.now(ZoneId.of("Asia/Shanghai"));
-            if(fsStoreScrm.getBusinessLicenseExpireEnd().isAfter(today) && fsStoreScrm.getDrugLicenseExpiryEnd().isAfter(today)
+            if (fsStoreScrm.getBusinessLicenseExpireEnd().isAfter(today) && fsStoreScrm.getDrugLicenseExpiryEnd().isAfter(today)
                     && fsStoreScrm.getMedicalDevice2ExpiryEnd().isAfter(today) && fsStoreScrm.getMedicalLicenseExpiryEnd().isAfter(today)) {
                 updateStore.setStatus(1);
             }
         }
         fsStoreMapper.updateFsStore(updateStore);
         //更新日志
-        storeAuditLogUtil.addAudit(fsStore.getStoreId(),fsStore.getReason(),fsStore.getAttachImage());
+        storeAuditLogUtil.addAudit(fsStore.getStoreId(), fsStore.getReason(), fsStore.getAttachImage());
         return 1;
     }
 
@@ -237,7 +274,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
     public int updateFsStoreLogo(FsStoreScrm fsStore) {
 
 
-        return   fsStoreMapper.updateFsStore(fsStore);
+        return fsStoreMapper.updateFsStore(fsStore);
     }
 
     @Override
@@ -281,7 +318,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         fsStoreScrm.setIsAudit(1);//审核通过
         //List<FsStoreScrm>  storeList =  fsStoreMapper.selectFsStoreList( fsStoreScrm);
 //        List<FsStoreScrm>  storeList =  fsStoreMapper.selectFsStoreList(fsStoreScrm);
-        List<FsStoreScrm>  storeList =  fsStoreMapper.selectFsStoreListByProduct(fsStoreScrm); //查询有商品的列表
+        List<FsStoreScrm> storeList = fsStoreMapper.selectFsStoreListByProduct(fsStoreScrm); //查询有商品的列表
         return storeList.stream().map(store -> {
             FsStoreProductScrm fsStoreProductScrm = new FsStoreProductScrm();
             fsStoreProductScrm.setStoreId(store.getStoreId());
@@ -301,7 +338,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
 
     @Override
     public List<Map<String, String>> getStoreColumns() {
-        List<Map<String, String> > list = fsStoreMapper.getStoreColumns();
+        List<Map<String, String>> list = fsStoreMapper.getStoreColumns();
         List<Map<String, String>> result = new ArrayList<>();
 
         for (Map<String, String> column : list) {
@@ -325,6 +362,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
     public List<String> getStoreAgreementExpiryTips() {
         return fsStoreMapper.queryValidStoreAgreementExpiryTips();
     }
+
     @Override
     public FsStoreDetailsScrmVo getStoreInfoByStoreId(Long storeId) {
         return fsStoreMapper.selectStoreInfoByStoreId(storeId);
@@ -346,7 +384,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         try {
             // 仅当开启审核功能时才进行判断
             if (Boolean.TRUE.equals(isAuditEnabled) && oldFsStore.getIsAudit() == 1) {
-                if(getFullDiff(oldFsStore, fsStore)){
+                if (getFullDiff(oldFsStore, fsStore)) {
                     fsStore.setIsAudit(0);
                 }
             } else {
@@ -361,10 +399,10 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         updateStore.setUpdateTime(DateUtils.getNowDate());
         //验证资质日期是否正常
         LocalDate today = LocalDate.now(ZoneId.of("Asia/Shanghai"));
-        if(fsStore.getBusinessLicenseExpireEnd().isBefore(today) || fsStore.getDrugLicenseExpiryEnd().isBefore(today)
+        if (fsStore.getBusinessLicenseExpireEnd().isBefore(today) || fsStore.getDrugLicenseExpiryEnd().isBefore(today)
                 || fsStore.getMedicalDevice2ExpiryEnd().isBefore(today) || fsStore.getMedicalLicenseExpiryEnd().isBefore(today)) {
             updateStore.setStatus(0);
-        }else {
+        } else {
             updateStore.setStatus(1);
         }
 
@@ -376,7 +414,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         log.info("定时任务店铺资质过期更新状态--------------------------start{}");
         //获取资质过期商铺
         List<Long> storeIds = fsStoreMapper.getStoreQualificationExpiredInfo();
-        if(!storeIds.isEmpty()){
+        if (!storeIds.isEmpty()) {
             //更新商铺状态】
             fsStoreMapper.batchUpdateStoreStatusById(storeIds);
         }
@@ -398,7 +436,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
             Object newValue = oldField.get(newObj);
             Object oldValue = getFieldValue(oldObj, fieldName);
             if (!Objects.equals(oldValue, newValue)) {
-              return true;
+                return true;
             }
         }
         return false;

+ 12 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreAfterSalesVO.java

@@ -101,6 +101,18 @@ public class FsStoreAfterSalesVO implements Serializable
     private Date createTime;
 
 
+    private  String storeName;
+
+    /**
+     * 店铺id
+     */
+    private String storeSeq;
+
+    /**
+     * 商家id
+     */
+    private String merchantId;
+
 
 
 }

+ 14 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreOrderVO.java

@@ -254,5 +254,19 @@ public class FsStoreOrderVO implements Serializable
     //erp推送账号
     private String erpAccount;
 
+    /**
+     * 店铺名字
+     */
+    private  String storeName;
+
+    /**
+     * 店铺id
+     */
+    private  String  storeSeq;
+
+    /**
+     * 商家id
+     */
+    private  String  merchantId;
 
 }

+ 77 - 0
fs-service/src/main/java/com/fs/hisStore/vo/OrderStoreVO.java

@@ -0,0 +1,77 @@
+package com.fs.hisStore.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class OrderStoreVO implements Serializable {
+
+    /**
+     * 店铺名称
+     */
+    private String storeName;
+
+    /**
+     * 店铺LOGO
+     */
+    private String logoUrl;
+
+    /**
+     * 店铺电话
+     */
+    private String phone;
+
+    /**
+     * 营业执照图片
+     */
+    private String businessLicense;
+
+    /**
+     * 药品经营许可证
+     */
+    private String drugLicense;
+
+    /**
+     * 1类器械生产备案
+     */
+    private String medicalDevice1;
+
+    /**
+     * 2类医疗器械备案
+     */
+    private String medicalDevice2;
+
+    /**
+     * 3类器械经营许可证
+     */
+    private String medicalDevice3;
+
+    /**
+     * 食品经营许可证
+     */
+    private String foodLicense;
+
+    /**
+     * 医疗机构执业许可证
+     */
+    private String medicalLicense;
+
+    /**
+     * 其它特殊资质
+     */
+    private String otherSpecialQualification;
+
+
+    /**
+     * 质量保证协议
+     */
+    private String qualityAssuranceAgreement;
+
+    /**
+     * 其它资质-入驻协议
+     */
+    private String settlementAgreement;
+
+
+}

+ 13 - 1
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -1577,7 +1577,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <select id="selectFsStoreOrderListVO" resultType="com.fs.hisStore.vo.FsStoreOrderVO">
         select o.*,u.phone,u.register_code,u.register_date,u.source, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber
-        , csc.name miniProgramName
+        , csc.name miniProgramName,ssc.store_name,
+        ssc.store_seq,
+        ssc.merchant_id
         from fs_store_order_scrm o
         left join fs_user u on o.user_id=u.user_id
         left join company c on c.company_id=o.company_id
@@ -1598,6 +1600,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE sp.business_code IS NOT NULL
         ) sp_latest ON sp_latest.business_code = o.order_code AND sp_latest.rn = 1
         LEFT JOIN fs_course_play_source_config csc ON csc.appid = sp_latest.app_id
+        LEFT JOIN fs_store_scrm ssc on o.store_id=ssc.store_id
         <where>
             <if test="maps.coursePlaySourceConfigId != null">
                 and csc.id = #{maps.coursePlaySourceConfigId}
@@ -1709,6 +1712,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="maps.erpAccount == '未分拣'">
                 and ( df.login_account is null or df.login_account like '')
             </if>
+            <if test="maps.storeName != null and maps.storeName != ''">
+                and ssc.store_name like concat('%',#{maps.storeName},'%')
+            </if>
+            <if test="maps.storeSeq != null and maps.storeSeq != ''">
+                and ssc.store_seq like concat('%',#{maps.storeSeq},'%')
+            </if>
+            <if test="maps.merchantId != null and maps.merchantId != ''">
+                and ssc.merchant_id like concat('%',#{maps.merchantId},'%')
+            </if>
         </where>
         ${maps.params.dataScope}
         <if test="maps.productName != null and  maps.productName !=  ''   ">

+ 37 - 1
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -84,7 +84,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                medical_device3_expiry_end,food_license,food_license_expiry_start,food_license_expiry_end,medical_license,
                medical_license_expiry_start,medical_license_expiry_end,settlement_agreement,settlement_agreement_start,settlement_agreement_end,
                quality_assurance_agreement,quality_assurance_agreement_start,quality_assurance_agreement_end,other_special_qualification,
-               other_special_qualification_start,other_special_qualification_end,is_business_license_permanent
+               other_special_qualification_start,other_special_qualification_end,is_business_license_permanent,store_seq,merchant_id,business_code,
+               drug_code,medical_device1_code,medical_device2_code,medical_device3_code,food_code,medical_code,other_special_qualification_code,
+               quality_assurance_agreement_code,settlement_agreement_code
         from fs_store_scrm
     </sql>
 
@@ -173,6 +175,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="otherSpecialQualification !=null ">other_special_qualification , </if>
             <if test="otherSpecialQualificationStart !=null ">other_special_qualification_start , </if>
             <if test="otherSpecialQualificationEnd !=null ">other_special_qualification_end , </if>
+            <if test="storeSeq !=null ">store_seq , </if>
+            <if test="merchantId !=null ">merchant_id , </if>
+            <if test="businessCode !=null ">business_code , </if>
+            <if test="drugCode !=null ">drug_code , </if>
+            <if test="medicalDevice1Code !=null ">medical_device1_code , </if>
+            <if test="medicalDevice2Code !=null ">medical_device2_code , </if>
+            <if test="medicalDevice3Code !=null ">medical_device3_code , </if>
+            <if test="foodCode !=null ">food_code , </if>
+            <if test="medicalCode !=null ">medical_code , </if>
+            <if test="otherSpecialQualificationCode !=null ">other_special_qualification_code , </if>
+            <if test="qualityAssuranceAgreementCode !=null ">quality_assurance_agreement_code , </if>
+            <if test="settlementAgreementCode !=null ">settlement_agreement_code , </if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="cityIds != null">#{cityIds},</if>
@@ -238,6 +252,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="otherSpecialQualification !=null ">#{otherSpecialQualification} , </if>
             <if test="otherSpecialQualificationStart !=null ">#{otherSpecialQualificationStart} , </if>
             <if test="otherSpecialQualificationEnd !=null ">#{otherSpecialQualificationEnd} , </if>
+            <if test="storeSeq !=null ">#{storeSeq} , </if>
+            <if test="merchantId !=null ">#{merchantId} , </if>
+            <if test="businessCode !=null ">#{businessCode} , </if>
+            <if test="drugCode !=null ">#{drugCode} , </if>
+            <if test="medicalDevice1Code !=null ">#{medicalDevice1Code} , </if>
+            <if test="medicalDevice2Code !=null ">#{medicalDevice2Code} , </if>
+            <if test="medicalDevice3Code !=null ">#{medicalDevice3Code} , </if>
+            <if test="foodCode !=null ">#{foodCode} , </if>
+            <if test="medicalCode !=null ">#{medicalCode} , </if>
+            <if test="otherSpecialQualificationCode !=null ">#{otherSpecialQualificationCode} , </if>
+            <if test="qualityAssuranceAgreementCode !=null ">#{qualityAssuranceAgreementCode} , </if>
+            <if test="settlementAgreementCode !=null ">#{settlementAgreementCode} , </if>
         </trim>
     </insert>
 
@@ -307,6 +333,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="otherSpecialQualification !=null ">other_special_qualification = #{otherSpecialQualification} , </if>
             <if test="otherSpecialQualificationStart !=null ">other_special_qualification_start = #{otherSpecialQualificationStart} , </if>
             <if test="otherSpecialQualificationEnd !=null ">other_special_qualification_end = #{otherSpecialQualificationEnd} , </if>
+            <if test="businessCode !=null ">business_code=#{businessCode} , </if>
+            <if test="drugCode !=null ">drug_code=#{drugCode} , </if>
+            <if test="medicalDevice1Code !=null ">medical_device1_code=#{medicalDevice1Code} , </if>
+            <if test="medicalDevice2Code !=null ">medical_device2_code=#{medicalDevice2Code} , </if>
+            <if test="medicalDevice3Code !=null ">medical_device3_code=#{medicalDevice3Code} , </if>
+            <if test="foodCode !=null ">food_code=#{foodCode} , </if>
+            <if test="medicalCode !=null ">medical_code=#{medicalCode} , </if>
+            <if test="otherSpecialQualificationCode !=null ">other_special_qualification_code=#{otherSpecialQualificationCode} , </if>
+            <if test="qualityAssuranceAgreementCode !=null ">quality_assurance_agreement_code=#{qualityAssuranceAgreementCode} , </if>
+            <if test="settlementAgreementCode !=null ">settlement_agreement_code=#{settlementAgreementCode} , </if>
         </trim>
         where store_id = #{storeId}
     </update>