Bläddra i källkod

Merge remote-tracking branch 'origin/ScrmStores' into ScrmStores

吴树波 2 veckor sedan
förälder
incheckning
2f495b4b11
22 ändrade filer med 562 tillägg och 42 borttagningar
  1. 66 2
      fs-common/src/main/java/com/fs/common/utils/txocr/TxOcrClient.java
  2. 5 0
      fs-service/src/main/java/com/fs/common/param/BaseQueryParam.java
  3. 11 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductCategoryScrm.java
  4. 62 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreScrmOcr.java
  5. 87 0
      fs-service/src/main/java/com/fs/hisStore/listener/FsStoreScrmListener.java
  6. 3 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductCategoryScrmMapper.java
  7. 65 3
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  8. 10 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmMapper.java
  9. 32 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmOcrMapper.java
  10. 14 1
      fs-service/src/main/java/com/fs/hisStore/service/IFsStoreProductScrmService.java
  11. 13 2
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java
  12. 14 1
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java
  13. 1 1
      fs-service/src/main/java/com/fs/hospital580/mapper/MedicineMapper.java
  14. 7 7
      fs-service/src/main/resources/application-dev-yjb.yml
  15. 1 1
      fs-service/src/main/resources/application-druid-bnkc-test.yml
  16. 6 1
      fs-service/src/main/resources/mapper/hisStore/FsStoreProductCategoryScrmMapper.xml
  17. 16 3
      fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml
  18. 9 0
      fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml
  19. 77 0
      fs-service/src/main/resources/mapper/hisStore/FsStoreScrmOcrMapper.xml
  20. 9 1
      fs-user-app/src/main/java/com/fs/app/controller/store/IndexScrmController.java
  21. 53 19
      fs-user-app/src/main/java/com/fs/app/controller/store/ProductScrmController.java
  22. 1 0
      fs-user-app/src/main/java/com/fs/app/controller/store/StoreOrderScrmController.java

+ 66 - 2
fs-common/src/main/java/com/fs/common/utils/txocr/TxOcrClient.java

@@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 
 import java.util.Arrays;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * @description:
@@ -22,12 +24,74 @@ public class TxOcrClient  {
 
     private static final String YPLS = "药品零售";
 
+
+    /**
+     * 营业执照识别
+     * @param imageUrl
+     * @return
+     */
+    public static String bizLicenseOCR(String imageUrl){
+        try{
+            Credential cred = new Credential("AKIDviPyMZbRp24udCcpqjQxHOK4cx88ze6N", "97tVwEJE81sY0StDPPGukQ2ZvkU3QceY");
+            HttpProfile httpProfile = new HttpProfile();
+            httpProfile.setEndpoint("ocr.tencentcloudapi.com");
+            ClientProfile clientProfile = new ClientProfile();
+            clientProfile.setHttpProfile(httpProfile);
+            OcrClient client = new OcrClient(cred, "", clientProfile);
+            BizLicenseOCRRequest req = new BizLicenseOCRRequest();
+            req.setImageUrl(imageUrl);
+            BizLicenseOCRResponse resp = client.BizLicenseOCR(req);
+            String business = resp.getBusiness();
+            return business;
+        } catch (TencentCloudSDKException e) {
+            log.info("营业执照OCR请求发生异常!异常信息是:{}",e.toString());
+        }
+        return null;
+    }
+
+
+    /**
+     * 药品经营许可证识别
+     * @param imageUrl
+     * @return
+     */
+    public static String enterpriseLicenseOCR(String imageUrl){
+        try{
+            Credential cred = new Credential("AKIDviPyMZbRp24udCcpqjQxHOK4cx88ze6N", "97tVwEJE81sY0StDPPGukQ2ZvkU3QceY");
+            HttpProfile httpProfile = new HttpProfile();
+            httpProfile.setEndpoint("ocr.tencentcloudapi.com");
+            ClientProfile clientProfile = new ClientProfile();
+            clientProfile.setHttpProfile(httpProfile);
+            OcrClient client = new OcrClient(cred, "", clientProfile);
+            EnterpriseLicenseOCRRequest req = new EnterpriseLicenseOCRRequest();
+            req.setImageUrl(imageUrl);
+            EnterpriseLicenseOCRResponse resp = client.EnterpriseLicenseOCR(req);
+            Optional<EnterpriseLicenseInfo> jyfw = Arrays.stream(resp.getEnterpriseLicenseInfos())
+                    .filter(enterpriseLicenseInfo -> enterpriseLicenseInfo.getName().equals("经营范围")).findAny();
+            if(!jyfw.isPresent()){
+                return null;
+            }
+            AtomicReference<String> value = new AtomicReference<>();
+                    Arrays.stream(resp.getEnterpriseLicenseInfos()).forEach(enterpriseLicenseInfo -> {
+                String name = enterpriseLicenseInfo.getName();
+                if(name.equals("经营范围")){
+                    value.set(enterpriseLicenseInfo.getValue());
+                }
+            });
+            log.info("许可证书OCR请求识别成功!结果是:{}",AbstractModel.toJsonString(resp));
+            return value.get();
+        } catch (TencentCloudSDKException e) {
+            log.info("证书识别失败!异常信息是:{}",e.toString());
+        }
+        return null;
+    }
+
     /**
      * BizLicenseOCR
      * 本接口支持快速精准识别营业执照上的字段,包括统一社会信用代码、公司名称、主体类型、法定代表人、注册资本、组成形式、成立日期、营业期限和经营范围等字段。
      * 默认接口请求频率限制:10次/秒。
-     * @param imageUrl
-     * @param keywords
+     * @param imageUrl 图片url
+     * @param keywords 需要对比的关键字
      * @return ContainsResult
      */
     public static ContainsResult isContains(String imageUrl, String keywords) {

+ 5 - 0
fs-service/src/main/java/com/fs/common/param/BaseQueryParam.java

@@ -19,4 +19,9 @@ public class BaseQueryParam extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "搜索字符串")
     private String keyword;
 
+    /**
+     * 是否药品
+     * **/
+    private Integer isDrug;
+
 }

+ 11 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductCategoryScrm.java

@@ -40,6 +40,11 @@ public class FsStoreProductCategoryScrm extends BaseEntity
     @Excel(name = "删除状态")
     private Integer isDel;
 
+    /**
+     * 是否药品0否药品1
+     * **/
+    private Integer isDrug;
+
     public Long getStoreId() {
         return storeId;
     }
@@ -115,5 +120,11 @@ public class FsStoreProductCategoryScrm extends BaseEntity
         return isDel;
     }
 
+    public Integer getIsDrug() {
+        return isDrug;
+    }
 
+    public void setIsDrug(Integer isDrug) {
+        this.isDrug = isDrug;
+    }
 }

+ 62 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreScrmOcr.java

@@ -0,0 +1,62 @@
+package com.fs.hisStore.domain;
+
+import java.time.LocalDateTime;
+import com.alibaba.fastjson.JSONObject;
+import lombok.Data;
+import org.springframework.data.annotation.Id;
+
+/**
+ * @description: 店铺OCR识别信息实体类
+ * @author: Guos
+ * @time: 2025/11/21 上午9:35
+ */
+@Data
+public class FsStoreScrmOcr {
+
+    /**
+     * 店铺ID
+     */
+    @Id
+    private Long storeId;
+
+    /**
+     * 营业执照文件url
+     */
+    private String businessLicense;
+
+    /**
+     * 营业执照文件经营范围描述
+     */
+    private String businessLicenseTxt;
+
+    /**
+     * 药品经营许可证文件
+     */
+    private String drugLicense;
+
+    /**
+     * 药品经营许可证文件经营范围描述
+     */
+    private String drugLicenseTxt;
+
+    /**
+     * 营业执照返回的全部结果
+     */
+    private String businessLicenseOcrResult;
+
+    /**
+     * 药品经营许可证返回的全部结果
+     */
+    private String drugLicenseOcrResult;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 修改时间
+     */
+    private LocalDateTime updateTime;
+
+}

+ 87 - 0
fs-service/src/main/java/com/fs/hisStore/listener/FsStoreScrmListener.java

@@ -0,0 +1,87 @@
+package com.fs.hisStore.listener;
+
+import com.fs.common.utils.txocr.TxOcrClient;
+import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.hisStore.domain.FsStoreScrmOcr;
+import com.fs.hisStore.mapper.FsStoreScrmMapper;
+import com.fs.hisStore.mapper.FsStoreScrmOcrMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.event.EventListener;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/11/21 上午9:44
+ */
+@Slf4j
+@Component
+public class FsStoreScrmListener {
+
+    @Resource
+    private FsStoreScrmOcrMapper fsStoreScrmOcrMapper;
+
+    @Autowired
+    private FsStoreScrmMapper fsStoreMapper;
+
+
+    @EventListener
+    public void StoreScrmOcrListener(FsStoreScrm fsStore){
+        log.info("StoreScrmOcrListener start");
+        //先查ocr的表中是否存在,
+        // 1.店铺存在,url不一致 调用识别并更新
+        // 2.店铺存在,url一致,不重新调用识别
+        // 3.店铺不存在,说明是新增,新增直接识别别插入
+        FsStoreScrmOcr fsStoreScrmOcr = new FsStoreScrmOcr();
+        Boolean oldBusinessLicenseFlag = false;
+        Boolean oldDrugLicenseFlag = false;
+        FsStoreScrmOcr OldFsStoreScrmOcr = null;
+        if(null == fsStore.getStoreId()){
+            log.info("新增店铺id为空!");
+            //如果是新增id是自增的,这时候可以先用StoreSeq,或者account以及storeName这种具有唯一性的字段进行反查StoreId
+            String storeSeq = fsStore.getStoreSeq();//这个是必须会生成的,所以我们这直接去查询
+            FsStoreScrm fsStoreScrm = fsStoreMapper.selectFsStoreByStoreSeq(storeSeq);
+            fsStoreScrmOcr.setStoreId(fsStoreScrm.getStoreId());
+        }else{
+            fsStoreScrmOcr.setStoreId(fsStore.getStoreId());
+            OldFsStoreScrmOcr = fsStoreScrmOcrMapper.selectById(fsStore.getStoreId());
+            if(!ObjectUtils.isEmpty(OldFsStoreScrmOcr)){
+                fsStoreScrmOcr.setStoreId(OldFsStoreScrmOcr.getStoreId());
+                String OldBusinessLicense = OldFsStoreScrmOcr.getBusinessLicense();
+                String OldDrugLicense = OldFsStoreScrmOcr.getDrugLicense();
+                oldDrugLicenseFlag = OldDrugLicense.equals(fsStore.getDrugLicense());
+                oldBusinessLicenseFlag = OldBusinessLicense.equals(fsStore.getBusinessLicense());
+            }
+        }
+        //不一致才会去更新
+        if(!oldBusinessLicenseFlag){
+            fsStoreScrmOcr.setBusinessLicense(fsStore.getBusinessLicense());
+            String result = TxOcrClient.bizLicenseOCR(fsStoreScrmOcr.getBusinessLicense());
+            if(!result.isEmpty()){
+                fsStoreScrmOcr.setBusinessLicenseTxt(result);
+            }
+        }
+        if(!oldDrugLicenseFlag){
+            fsStoreScrmOcr.setDrugLicense(fsStore.getDrugLicense());
+            String result = TxOcrClient.enterpriseLicenseOCR(fsStore.getDrugLicense());
+            if(!result.isEmpty()){
+                fsStoreScrmOcr.setDrugLicenseTxt(result);
+            }
+        }
+        fsStoreScrmOcr.setUpdateTime(LocalDateTime.now());
+        if(ObjectUtils.isEmpty(OldFsStoreScrmOcr)){
+            fsStoreScrmOcr.setCreateTime(LocalDateTime.now());
+            fsStoreScrmOcrMapper.insert(fsStoreScrmOcr);
+        }else{
+            fsStoreScrmOcrMapper.updateById(fsStoreScrmOcr);
+        }
+        log.info("StoreScrmOcrListener end");
+    }
+
+}

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductCategoryScrmMapper.java

@@ -79,6 +79,9 @@ public interface FsStoreProductCategoryScrmMapper
             "<if test = 'maps.storeId != null    '> " +
             "and c.store_id =#{maps.storeId} " +
             "</if>" +
+            "<if test = 'maps.isDrug != null and maps.isDrug == 0'> " +
+            "and c.is_drug = #{maps.isDrug} " +
+            "</if>" +
             " order by c.sort asc "+
             "</script>"})
     List<FsStoreProductCategoryScrm> selectFsStoreProductCategoryListQuery(@Param("maps") FsStoreProductCategoryScrm param);

+ 65 - 3
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -16,6 +16,7 @@ import com.fs.hisStore.domain.FsStoreProductScrm;
 import com.fs.hisStore.param.FsStoreProductQueryParam;
 import com.fs.hisStore.vo.*;
 import com.fs.statis.dto.ProductAuditDTO;
+import io.swagger.models.auth.In;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
@@ -178,7 +179,7 @@ public interface FsStoreProductScrmMapper
         "from fs_store_product_scrm p " +
         "left join fs_store_product_category_scrm pc " +
         "on p.cate_id = pc.cate_id " +
-        "left JOIN fs_store_scrm ss " +
+        "inner JOIN fs_store_scrm ss " +
         "on ss.store_id = p.store_id " +
         "left join ( " +
         "select product_id, push_status " +
@@ -205,7 +206,7 @@ public interface FsStoreProductScrmMapper
         "</if> " +
         "where 1=1 " +
         //审核通过的才会展示到列表,防止主要商品列表中展示未审核商品
-        "<if test='maps.isAudit == null'>"+
+        "<if test='maps.isAudit == null and (maps.isDrug == null or (maps.isDrug != null and maps.isDrug == 1))'>"+
             "<if test='maps.isShow == 1'>" +
                 "and p.is_audit =  1"+
             "</if>" +
@@ -213,6 +214,8 @@ public interface FsStoreProductScrmMapper
                 "and p.is_audit !=  1"+
             "</if>" +
         "</if>" +
+
+
         // 评论内容条件
         "<if test='maps.commentContent != null and maps.commentContent.trim() != \"\"'> " +
         "and fsosc.content like CONCAT('%', #{maps.commentContent}, '%') " +
@@ -394,6 +397,10 @@ public interface FsStoreProductScrmMapper
             "and p.is_good = #{maps.isGood}" +
             "</if>" +
 
+            "<if test = 'maps.isDrug != null and maps.isDrug != \"\"' > " +
+            "and p.is_drug = #{maps.isDrug}" +
+            "</if>" +
+
             "<if test = 'maps.defaultOrder != null and maps.defaultOrder==\"desc\"  '> " +
             "order by p.sort desc,product_id desc" +
             "</if>" +
@@ -460,7 +467,7 @@ public interface FsStoreProductScrmMapper
             "</if>" +
             "and  p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}")
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count,@Param("config") MedicalMallConfig  config);
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig  config);
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig  config, @Param("isDrug") Integer isDrug);
 
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig  config);
     @Select({"<script> " +
@@ -636,4 +643,59 @@ public interface FsStoreProductScrmMapper
      */
     List<ForbiddenOnlineMedicine> selectForbiddenKeywords(@Param("keyword") String keyword);
 
+    @Select({"<script> " +
+//            "select p.* from fs_store_product_scrm p  " +
+            "SELECT\n" +
+            "\tp.* \n" +
+            "FROM\n" +
+            "\tfs_store_product_scrm p\n" +
+            "where p.is_del=0 and p.is_show=1  and p.is_audit = '1'" +
+            "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
+            "and (p.product_name like CONCAT('%',#{maps.productName},'%')  or p.keyword like concat('%',#{maps.productName},'%') ) " +
+            "</if>" +
+            "<if test = 'maps.isDisplay != null and maps.isDisplay == 1   '> " +
+            "and p.is_display =#{maps.isDisplay}  " +
+            "</if>" +
+            "<if test = 'maps.companyId != null'> " +
+            "and find_in_set(#{maps.companyId}, p.company_ids) " +
+            "</if>" +
+            "<if test = 'maps.cateId != null    '> " +
+            "and p.cate_id =#{maps.cateId}  " +
+            "</if>" +
+            "<if test = 'maps.storeId != null and maps.storeId != \"\"' > " +
+            "and p.store_id = #{maps.storeId}" +
+            "</if>" +
+            "<if test = 'maps.isGood != null and maps.isGood != \"\"' > " +
+            "and p.is_good = #{maps.isGood}" +
+            "</if>" +
+
+            "<if test = 'maps.isDrug != null and maps.isDrug == 0' > " +
+            "and p.is_drug = #{maps.isDrug}" +
+            "</if>" +
+
+            "<if test = 'maps.defaultOrder != null and maps.defaultOrder==\"desc\"  '> " +
+            "order by p.sort desc,product_id desc" +
+            "</if>" +
+            "<if test = 'maps.priceOrder != null and maps.priceOrder==\"desc\"   '> " +
+            "order by p.price desc " +
+            "</if>" +
+            "<if test = 'maps.priceOrder != null and maps.priceOrder==\"asc\"   '> " +
+            "order by p.price asc " +
+            "</if>" +
+            "<if test = 'maps.salesOrder != null  and maps.salesOrder==\"desc\" '> " +
+            "order by p.sales desc " +
+            "</if>" +
+            "<if test = 'maps.salesOrder != null  and maps.salesOrder==\"asc\" '> " +
+            "order by p.sales asc " +
+            "</if>" +
+            "<if test = 'maps.newOrder != null and maps.newOrder==\"desc\" '> " +
+            "and p.is_new =1 order by p.create_time desc  " +
+            "</if>" +
+            "</script>"})
+    List<FsStoreProductListQueryVO> selectFsStoreProductOrdinaryListQuery(@Param("maps")FsStoreProductQueryParam param);
+
+    /**
+     * 普通商品我猜你喜欢列表
+     * **/
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListList();
 }

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

@@ -210,4 +210,14 @@ public interface FsStoreScrmMapper
      * @return
      * **/
     List<FsStoreProductScrmInfoDTO> getStoreInfo(@Param("storeIds") Long[] storeIds);
+
+    /**
+     * 查询店铺管理
+     *
+     * @param storeSeq 店铺管理主键
+     * @return 店铺管理
+     */
+    FsStoreScrm selectFsStoreByStoreSeq(@Param("storeSeq") String storeSeq);
+
+
 }

+ 32 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmOcrMapper.java

@@ -0,0 +1,32 @@
+package com.fs.hisStore.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.hisStore.domain.FsStoreScrmOcr;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @description:
+ * @author: Guos
+ * @time: 2025/11/21 上午9:37
+ */
+public interface FsStoreScrmOcrMapper {
+
+
+    FsStoreScrmOcr selectById(@Param("storeId") Long storeId);
+
+    /**
+     * 插入店铺OCR信息记录
+     * @param fsStoreScrmOcr 店铺OCR信息实体对象
+     * @return 影响的记录数
+     */
+    int insert(FsStoreScrmOcr fsStoreScrmOcr);
+
+    /**
+     * 根据店铺ID更新OCR信息记录
+     * @param fsStoreScrmOcr 店铺OCR信息实体对象
+     * @return 影响的记录数
+     */
+    int updateById(FsStoreScrmOcr fsStoreScrmOcr);
+
+
+}

+ 14 - 1
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreProductScrmService.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.fs.common.core.domain.R;
+import com.fs.common.param.BaseQueryParam;
 import com.fs.common.utils.txocr.ContainsResult;
 import com.fs.his.domain.FsStoreProduct;
 import com.fs.hisStore.domain.ForbiddenOnlineMedicine;
@@ -113,7 +114,7 @@ public interface IFsStoreProductScrmService
 
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count);
 
-    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery();
+    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(BaseQueryParam param);
 
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery();
 
@@ -185,4 +186,16 @@ public interface IFsStoreProductScrmService
      * @param cateId 分类id
      */
     ContainsResult checkStoreDrugLicense(Long storeId, Long cateId);
+
+    /**
+     * 普通商品查询
+     * @param param 请求参数
+     * **/
+    List<FsStoreProductListQueryVO> selectFsStoreProductOrdinaryListQuery(FsStoreProductQueryParam param);
+
+
+    /**
+     * 普通商品查询
+     * **/
+    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListList();
 }

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

@@ -19,6 +19,7 @@ import com.fs.common.BeanCopyUtils;
 import com.fs.common.core.domain.R;
 import com.fs.common.exception.CustomException;
 import com.fs.common.exception.ServiceException;
+import com.fs.common.param.BaseQueryParam;
 import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.txocr.ContainsResult;
 import com.fs.common.utils.txocr.TxOcrClient;
@@ -978,10 +979,10 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
     }
 
     @Override
-    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery() {
+    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(BaseQueryParam param) {
         SysConfig config = configService.selectConfigByConfigKey("medicalMall.func.switch");
         MedicalMallConfig medicalMallConfig = JSON.parseObject(config.getConfigValue(), MedicalMallConfig.class);
-        return fsStoreProductMapper.selectFsStoreProductTuiListQuery(medicalMallConfig);
+        return fsStoreProductMapper.selectFsStoreProductTuiListQuery(medicalMallConfig,param.getIsDrug());
     }
 
     @Override
@@ -1500,6 +1501,16 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
         return TxOcrClient.enterpriseLicenseOCR(drugLicenseUrl, cateName);
     }
 
+    @Override
+    public List<FsStoreProductListQueryVO> selectFsStoreProductOrdinaryListQuery(FsStoreProductQueryParam param) {
+        return fsStoreProductMapper.selectFsStoreProductOrdinaryListQuery(param);
+    }
+
+    @Override
+    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodListList() {
+        return fsStoreProductMapper.selectFsStoreProductGoodListList();
+    }
+
     @Override
     public List<Map<String, String>> getStoreProductColumns() {
         List<Map<String, String> > list = fsStoreProductMapper.getStoreProductColumns();

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

@@ -27,6 +27,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanWrapper;
 import org.springframework.beans.BeanWrapperImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -49,6 +50,7 @@ import java.util.stream.Collectors;
 @Service
 @Slf4j
 public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
+
     @Autowired
     private FsStoreScrmMapper fsStoreMapper;
 
@@ -57,11 +59,16 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
 
     @Autowired
     private FsStoreProductScrmMapper fsStoreProduct;
+
     @Autowired
     private ConfigUtil configUtil;
 
     private static final String MERCHANT_PREFIX = "YJB";
 
+    @Autowired
+    private ApplicationEventPublisher applicationEventPublisher;
+
+
     /**
      * 查询店铺管理
      *
@@ -97,6 +104,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
      */
     @Override
     public Long insertFsStore(FsStoreScrm fsStore) {
+        //检查商家填写的账号是否重复
         if (fsStore.getAccount() != null) {
             FsStoreScrm fs = fsStoreMapper.selectFsStoreByAccount(fsStore.getAccount());
             if (fs != null) {
@@ -127,6 +135,8 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
         fsStore.setStoreSeq(sequence);
         fsStore.setQualificationUpdateTime(LocalDate.now());
         fsStoreMapper.insertFsStore(fsStore);
+        //信息发布
+        applicationEventPublisher.publishEvent(fsStore);
         return fsStore.getStoreId();
     }
 
@@ -230,7 +240,10 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
             log.error("获取diff出错", e);
         }
         fsStore.setQualificationUpdateTime(LocalDate.now());
-        return fsStoreMapper.updateFsStore(fsStore);
+        int updateRowNum = fsStoreMapper.updateFsStore(fsStore);
+        //信息发布
+        applicationEventPublisher.publishEvent(fsStore);
+        return updateRowNum;
     }
 
     @Override

+ 1 - 1
fs-service/src/main/java/com/fs/hospital580/mapper/MedicineMapper.java

@@ -18,7 +18,7 @@ public interface MedicineMapper {
     @Mapping(source = "productName", target = "commonName")
     @Mapping(source = "productName", target = "name")
     @Mapping(source = "dosageForm", target = "dosage")
-    @Mapping(source = "dosage", target = "spec")
+    @Mapping(source = "prescribeSpec", target = "spec")
     @Mapping(source = "prescribeSpec", target = "packingSpec")
     @Mapping(source = "manufacturer", target = "manufacturer")
     @Mapping(source = "drugRegCertNo", target = "approvalNumber")

+ 7 - 7
fs-service/src/main/resources/application-dev-yjb.yml

@@ -33,7 +33,7 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://nj-cdb-6306xy90.sql.tencentcdb.com:27077/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    url: jdbc:mysql://nj-cdb-4tbz4oqv.sql.tencentcdb.com:25247/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                     username: root
                     password: Ylrz147..
                 # 初始连接数
@@ -81,7 +81,7 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                  url: jdbc:mysql://nj-cdb-6306xy90.sql.tencentcdb.com:27077/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                  url: jdbc:mysql://nj-cdb-4tbz4oqv.sql.tencentcdb.com:25247/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                   username: root
                   password: Ylrz147..
                 # 初始连接数
@@ -158,8 +158,8 @@ openIM:
 isNewWxMerchant: true
 
 hospital580:
-    url: https://ehospital-openapi-test.sq580.com
-    clientId: yjbz_15700159162_test
-    secretKey: ESzFwwum4Jz95f4ubg4rP7lQG4LZsWFv
-    storeId: 17478
-    callbackUrl: http://v78ee625.natappfree.cc/hospital580/sync/medicine
+    url: https://ehospital-openapi.sq580.com
+    clientId: yjbz_4537_prod
+    secretKey: F5oXOThiYOLkZK4zBsp8R4ecs7c25umw
+    storeId: 188804
+    callbackUrl: https://storeuserapp.bjyjbao.com/hospital580/sync/medicine

+ 1 - 1
fs-service/src/main/resources/application-druid-bnkc-test.yml

@@ -39,7 +39,7 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                  url: jdbc:mysql://nj-cdb-n80v6uox.sql.tencentcdb.com:22935/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                  url: jdbc:mysql://nj-cdb-n80v6uox.sql.tencentcdb.com:22935/fs_his_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                   username: root
                   password: Ylrz_1q2w3e4r5t6y
                 # 从库数据源

+ 6 - 1
fs-service/src/main/resources/mapper/hisStore/FsStoreProductCategoryScrmMapper.xml

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
         <result property="isDel"    column="is_del"    />
         <result property="storeId"    column="store_id"    />
+        <result property="isDrug"    column="is_drug"    />
     </resultMap>
 
     <sql id="selectFsStoreProductCategoryVo">
-        select cate_id, pid, cate_name, sort, pic, is_show, create_time, update_time, is_del,store_id from fs_store_product_category_scrm
+        select cate_id, pid, cate_name, sort, pic, is_show, create_time, update_time, is_del,store_id,is_drug from fs_store_product_category_scrm
     </sql>
 
     <select id="selectFsStoreProductCategoryList" parameterType="FsStoreProductCategoryScrm" resultMap="FsStoreProductCategoryResult">
@@ -30,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="pic != null  and pic != ''"> and pic = #{pic}</if>
             <if test="isShow != null "> and is_show = #{isShow}</if>
             <if test="isDel != null "> and is_del = #{isDel}</if>
+            <if test="isDrug != null "> and is_drug = #{isDrug}</if>
             <if test="storeId != null "> and store_id = #{storeId}</if>
         </where>
     </select>
@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time,</if>
             <if test="isDel != null">is_del,</if>
             <if test="storeId != null">store_id,</if>
+            <if test="isDrug != null ">is_drug ,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="pid != null">#{pid},</if>
@@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">#{updateTime},</if>
             <if test="isDel != null">#{isDel},</if>
             <if test="storeId != null">#{storeId},</if>
+            <if test="isDrug != null ">#{isDrug} ,</if>
          </trim>
     </insert>
 
@@ -76,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="isDel != null">is_del = #{isDel},</if>
+            <if test="isDrug != null ">is_drug = #{isDrug},</if>
         </trim>
         where cate_id = #{cateId}
     </update>

+ 16 - 3
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -571,7 +571,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             GROUP BY product_name
             ) t_all ON t_all.product_name = fsp.product_name
 
-            <if test='config.isStores == "1" '>
+            <if test='config.isStores == "1" and (isDrug == null or isDrug != null and isDrug == 1)'>
                 INNER JOIN fs_store_scrm fs ON fs.store_id = fsp.store_id
             </if>
 
@@ -581,12 +581,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND fsp.is_good = 1
             AND fsp.is_best = 1
             AND fsp.is_display = 1
-            <if test='config.isAudit == "1" '>
+            <if test='config.isAudit == "1" and (isDrug == null or isDrug != null and isDrug == 1)'>
                 AND fsp.is_audit = '1'
             </if>
-            <if test='config.isStores == "1" '>
+            <if test='config.isStores == "1" and (isDrug == null or isDrug != null and isDrug == 1)'>
                 AND fs.status = '1'
             </if>
+             <if test='isDrug != null '>
+                 AND fsp.is_drug = #{isDrug}
+             </if>
             GROUP BY fsp.product_name
             ORDER BY fsp.sort DESC, fsp.product_id DESC
     </select>
@@ -856,4 +859,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
     </select>
 
+    <select id="selectFsStoreProductGoodListList" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        select p.* from fs_store_product_scrm p
+        where p.is_del = 0
+        and p.is_show = 1
+        and p.is_good = 1
+        and p.is_display = 1
+        and p.is_drug = 0
+        order by p.sort desc
+    </select>
+
 </mapper>

+ 9 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -963,4 +963,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item}
         </foreach>
     </select>
+
+    <select id="selectFsStoreByStoreSeq" resultType="com.fs.hisStore.domain.FsStoreScrm">
+        select
+            store_id,
+            business_license,
+            drug_license
+        from fs_store_scrm
+        where store_seq= #{storeSeq}
+    </select>
 </mapper>

+ 77 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmOcrMapper.xml

@@ -0,0 +1,77 @@
+<?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.FsStoreScrmOcrMapper">
+
+    <!-- 插入店铺OCR信息记录 -->
+    <insert id="insert" parameterType="com.fs.hisStore.domain.FsStoreScrmOcr">
+        INSERT INTO fs_store_scrm_ocr (
+            store_id,
+            business_license,
+            business_license_txt,
+            drug_license,
+            drug_license_txt,
+            business_license_ocr_result,
+            drug_license_ocr_result,
+            create_time,
+            update_time
+        ) VALUES (
+            #{storeId},
+            #{businessLicense},
+            #{businessLicenseTxt},
+            #{drugLicense},
+            #{drugLicenseTxt},
+            #{businessLicenseOcrResult},
+            #{drugLicenseOcrResult},
+            #{createTime},
+            #{updateTime}
+        )
+    </insert>
+
+        <!-- 根据店铺ID更新OCR信息记录 -->
+        <update id="updateById" parameterType="com.fs.hisStore.domain.FsStoreScrmOcr">
+            UPDATE fs_store_scrm_ocr
+            <set>
+                <if test="businessLicense != null and businessLicense != ''">
+                    business_license = #{businessLicense},
+                </if>
+                <if test="businessLicenseTxt != null and businessLicenseTxt != ''">
+                    business_license_txt = #{businessLicenseTxt},
+                </if>
+                <if test="drugLicense != null and drugLicense != ''">
+                    drug_license = #{drugLicense},
+                </if>
+                <if test="drugLicenseTxt != null and drugLicenseTxt != ''">
+                    drug_license_txt = #{drugLicenseTxt},
+                </if>
+                <if test="businessLicenseOcrResult != null">
+                    business_license_ocr_result = #{businessLicenseOcrResult},
+                </if>
+                <if test="drugLicenseOcrResult != null">
+                    drug_license_ocr_result = #{drugLicenseOcrResult},
+                </if>
+                update_time = #{updateTime}
+            </set>
+            WHERE store_id = #{storeId}
+        </update>
+
+    <!-- 根据店铺ID查询OCR信息 -->
+    <select id="selectById" resultType="com.fs.hisStore.domain.FsStoreScrmOcr">
+        select
+            store_id,
+            business_license,
+            drug_license,
+            business_license_txt,
+            drug_license_txt,
+            business_license_ocr_result,
+            drug_license_ocr_result,
+            create_time,
+            update_time
+        from fs_store_scrm_ocr
+        where store_id= #{storeId}
+    </select>
+
+
+
+</mapper>

+ 9 - 1
fs-user-app/src/main/java/com/fs/app/controller/store/IndexScrmController.java

@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.Cacheable;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.LinkedList;
 import java.util.List;
 
 
@@ -58,10 +59,17 @@ public class IndexScrmController extends AppBaseController {
 	@ApiOperation("获取首页数据")
 	@GetMapping("/getIndexData")
 	public R getIndexData(HttpServletRequest request){
+		String isDrug=request.getParameter("isDrug");
 		List<FsArticleCateListQueryVO> articleCateList=articleCateService.selectFsArticleCateListQuery();
 		List<FsAdvListQueryVO> advList=advService.selectFsAdvListQuery(1);
 		List<FsStoreProductListQueryVO> newProductList=productService.selectFsStoreProductNewQuery(10);
-		List<FsStoreProductListQueryVO> hotProductList=productService.selectFsStoreProductHotQuery(10);
+		List<FsStoreProductListQueryVO> hotProductList=null;
+		if(isDrug != null && isDrug.equals("0")){
+			hotProductList = new LinkedList<>();
+		}else {
+			newProductList=productService.selectFsStoreProductNewQuery(10);
+		}
+		productService.selectFsStoreProductHotQuery(10);
 		IndexVO vo=IndexVO.builder().articleCateList(articleCateList).advList(advList).newProductList(newProductList).hotProductList(hotProductList).build();
 		return R.ok().put("data", vo);
 	}

+ 53 - 19
fs-user-app/src/main/java/com/fs/app/controller/store/ProductScrmController.java

@@ -4,6 +4,7 @@ package com.fs.app.controller.store;
 import com.alibaba.fastjson.JSON;
 import com.fs.app.annotation.Login;
 import com.fs.app.controller.AppBaseController;
+import com.fs.common.BeanCopyUtils;
 import com.fs.common.core.domain.R;
 import com.fs.common.param.BaseQueryParam;
 import com.fs.common.utils.StringUtils;
@@ -19,6 +20,9 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -65,12 +69,13 @@ public class ProductScrmController extends AppBaseController {
      * @return     */
     @ApiOperation("获取分类")
     @GetMapping("/getProductCate")
-    public R getProductCate(@RequestParam(name = "storeId",required = false) Long storeId){
+    public R getProductCate(@RequestParam(name = "storeId",required = false) Long storeId,@RequestParam(name = "isDrug",required = false) Integer isDrug){
         try {
             FsStoreProductCategoryScrm param=new FsStoreProductCategoryScrm();
             param.setIsShow(1);
             param.setIsDel(0);
             param.setStoreId(storeId);
+            param.setIsDrug(isDrug);
             List<FsStoreProductCategoryScrm> list=categoryService.selectFsStoreProductCategoryListQuery(param);
             return R.ok().put("data",list);
         } catch (Exception e){
@@ -79,12 +84,13 @@ public class ProductScrmController extends AppBaseController {
     }
     @ApiOperation("获取分类")
     @GetMapping("/getProductCateByPid")
-    public R getProductCateByPid(@RequestParam(value="pid") Long pid, @RequestParam(value="storeId",required = false) Long storeId,HttpServletRequest request){
+    public R getProductCateByPid(@RequestParam(value="pid") Long pid, @RequestParam(value="storeId",required = false) Long storeId, @Param("isDrug") Integer isDrug, HttpServletRequest request){
         try {
             FsStoreProductCategoryScrm param=new FsStoreProductCategoryScrm();
             param.setIsShow(1);
             param.setIsDel(0);
             param.setPid(pid);
+            param.setIsDrug(isDrug);
             param.setStoreId(storeId);
             List<FsStoreProductCategoryScrm> list=categoryService.selectFsStoreProductCategoryListQuery(param);
             return R.ok().put("data",list);
@@ -98,29 +104,44 @@ public class ProductScrmController extends AppBaseController {
     public R getProducts(FsStoreProductQueryParam param, HttpServletRequest request){
         PageHelper.startPage(param.getPage(), param.getPageSize());
         param.setIsDisplay(1);
-        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductListQuery(param);
+        List<FsStoreProductListQueryVO> productList = null;
+        if(param.getIsDrug() != null && param.getIsDrug() == 0){
+            productList = productService.selectFsStoreProductOrdinaryListQuery(param);
+        }else {
+            productList = productService.selectFsStoreProductListQuery(param);
+        }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(productList);
         return R.ok().put("data",listPageInfo);
     }
     @ApiOperation("获取商品详情")
     @GetMapping("/getProductDetails")
-    public R getProductDetails(@RequestParam(value="productId") Long productId,String storeId){
-        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId, storeId);
-        if(product==null){
-            return R.error("商品不存在或已下架");
-        }
-        //增加店铺信息
+    public R getProductDetails(@RequestParam(value="productId") Long productId,String storeId,Integer isDrug){
+        FsStoreProductQueryVO product = new FsStoreProductQueryVO();
         FsStoreScrm fsStoreScrm = null;
-        if(StringUtils.isNotEmpty(product.getStoreId())){
-            fsStoreScrm = storeScrmService.selectFsStoreByStoreId(Long.parseLong(product.getStoreId()));
-            //根据按判断校验条件
-            SysConfig mallconfig = configService.selectConfigByConfigKey("medicalMall.func.switch");
-            MedicalMallConfig medicalMallConfig = JSON.parseObject(mallconfig.getConfigValue(), MedicalMallConfig.class);
+        if(isDrug != null && isDrug == 0){
+            FsStoreProductScrm productScrm = productService.selectFsStoreProductById(productId);
+            if(productScrm == null){
+                return R.error("操作失败,商品不存在!");
+            }
+            BeanUtils.copyProperties(productScrm, product);
+        }else {
+            product = productService.selectFsStoreProductByIdQuery(productId, storeId);
+            if(product==null){
+                return R.error("商品不存在或已下架");
+            }
+            //增加店铺信息
+            if(StringUtils.isNotEmpty(product.getStoreId())){
+                fsStoreScrm = storeScrmService.selectFsStoreByStoreId(Long.parseLong(product.getStoreId()));
+                //根据按判断校验条件
+                SysConfig mallconfig = configService.selectConfigByConfigKey("medicalMall.func.switch");
+                MedicalMallConfig medicalMallConfig = JSON.parseObject(mallconfig.getConfigValue(), MedicalMallConfig.class);
 
-            if(medicalMallConfig != null && medicalMallConfig.isThreePartyEntry() && fsStoreScrm.getStatus() != 1){
-                return R.error("当前商品店铺"+fsStoreScrm.getStoreName()+"已停用!");
+                if(medicalMallConfig != null && medicalMallConfig.isThreePartyEntry() && fsStoreScrm.getStatus() != 1){
+                    return R.error("当前商品店铺"+fsStoreScrm.getStoreName()+"已停用!");
+                }
             }
         }
+
         List<FsStoreProductAttrScrm> productAttr=attrService.selectFsStoreProductAttrByProductId(product.getProductId());
         List<FsStoreProductAttrValueScrm> productValues=attrValueService.selectFsStoreProductAttrValueByProductId(product.getProductId());
 
@@ -272,15 +293,28 @@ public class ProductScrmController extends AppBaseController {
     @GetMapping("/getTuiProducts")
     public R getTuiProducts(BaseQueryParam param, HttpServletRequest request){
         PageHelper.startPage(param.getPage(), param.getPageSize());
-        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductTuiListQuery();
-        PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list.size() < 4?list.subList(0,list.size()):list.subList(0,4));
+        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductTuiListQuery(param);
+        PageInfo<FsStoreProductListQueryVO> listPageInfo;
+
+        //普通商品
+        if(param.getIsDrug() != null && param.getIsDrug() == 0){
+            listPageInfo = new PageInfo<>(list);
+        }else {//药品
+            listPageInfo=new PageInfo<>(list.size() < 4?list.subList(0,list.size()):list.subList(0,4));
+        }
+
         return R.ok().put("data",listPageInfo);
     }
     @ApiOperation("获取喜欢商品数据")
     @GetMapping("/getGoodsProducts")
     public R getGoodsProducts(BaseQueryParam param, HttpServletRequest request){
         PageHelper.startPage(param.getPage(), param.getPageSize());
-        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductGoodListQuery();
+        List<FsStoreProductListQueryVO> list;
+        if(param.getIsDrug() != null && param.getIsDrug() == 0){
+            list =productService.selectFsStoreProductGoodListList();
+        }else {
+            list = productService.selectFsStoreProductGoodListQuery();
+        }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
 

+ 1 - 0
fs-user-app/src/main/java/com/fs/app/controller/store/StoreOrderScrmController.java

@@ -470,6 +470,7 @@ public class StoreOrderScrmController extends AppBaseController {
                 o.setReqSeqId("store-" + storePayment.getPayCode());
                 o.setTransAmt(storePayment.getPayMoney().toString());
                 o.setGoodsDesc("商城订单支付");
+                o.setAppId(param.getAppId());
                 HuifuCreateOrderResult result = huiFuService.createOrder(o);
                 //创建订单
                 if (result.getBank_code() != null && result.getBank_code().equals("00000000")) {