Jelajahi Sumber

金牛:售后部分商品退款

ct 3 minggu lalu
induk
melakukan
5e8b0e4775

+ 47 - 0
fs-admin/src/main/java/com/fs/company/controller/CompanyStatisticsController.java

@@ -19,6 +19,7 @@ import com.fs.crm.service.ICrmCustomerService;
 import com.fs.crm.service.ICrmCustomerVisitService;
 import com.fs.crm.vo.CrmCustomerStatisticsVO;
 import com.fs.crm.vo.CrmCustomerVisitStatisticsVO;
+import com.fs.his.service.IFsStoreAfterSalesService;
 import com.fs.his.service.IFsStoreOrderService;
 import com.fs.his.service.IFsStorePaymentService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,6 +50,10 @@ public class CompanyStatisticsController extends BaseController
 
     @Autowired
     private IFsStoreOrderService storeOrderService;
+
+    @Autowired
+    private IFsStoreAfterSalesService storeAfterSalesService;
+
     @Autowired
     private IFsStorePaymentService storePaymentService;
     @Autowired
@@ -146,6 +151,48 @@ public class CompanyStatisticsController extends BaseController
         }
     }
 
+    @GetMapping("/afterSalesOrder")
+    public R afterSalesOrder(FsStoreStatisticsParam param)
+    {
+        if(StringUtils.isNotEmpty(param.getUserIds())){
+            String[] userIds=param.getUserIds().split(",");
+            Long[] ids=new Long[userIds.length];
+            for(int i=0;i<ids.length; i++){
+                ids[i]=Long.parseLong(userIds[i]);
+            }
+            param.setUsers(ids);
+        }
+        else{
+            //获取部门下的所有用户
+            CompanyUser usermap=new CompanyUser();
+            usermap.setDeptId(param.getDeptId());
+            List<CompanyUser> users = userService.getUserListByDeptId(usermap);
+            List<Long> userIds = users.stream().map(element -> element.getUserId()).collect(Collectors.toList());
+            param.setUsers(userIds.toArray(new Long[userIds.size()]));
+        }
+        if(param.getUsers()!=null&&param.getUsers().length>0){
+            List<FsStoreOrderStatisticsVO> list= storeAfterSalesService.selectFsStoreAfterSalesServiceStatisticsList(param);
+
+            TimeUtils.TimeEntity timeEntity= TimeUtils.parseTime(param.getType().toString(),param.getStartTime(),param.getEndTime());
+            timeEntity.setUserIds(param.getUsers());
+            Integer cycleNum = timeEntity.getCycleNum();
+            Integer beginTime = timeEntity.getBeginTime();
+            List<Integer> timeList = new ArrayList<>();
+            for (int i = 1; i <= cycleNum; i++) {
+                timeList.add(beginTime);
+                beginTime = TimeUtils.formatTime(beginTime);
+            }
+            List<JSONObject> jsonObjectList = storeOrderService.selectFsPackageOrderCounts(timeEntity.toMap());
+            List<String> dates = jsonObjectList.stream().map(jsonObject -> jsonObject.getString("type")).collect(Collectors.toList());
+            List<Integer> orderCount = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("orderCount")).collect(Collectors.toList());
+            List<Integer> payPrice = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("payPrice")).collect(Collectors.toList());
+            return R.ok().put("list",list).put("dates",dates).put("orderCount",orderCount).put("payPrice",payPrice);
+        }
+        else {
+            return R.ok("未查找到数据");
+        }
+    }
+
 
     @GetMapping("/inquiryOrder")
     public R storeInquiryOrder(FsStoreStatisticsParam param)

+ 6 - 1
fs-service/src/main/java/com/fs/core/config/RedissonConfig.java

@@ -19,6 +19,9 @@ public class RedissonConfig {
     @Value("${spring.redis.host}")
     private String host;
 
+    @Value("${spring.redis.database}")
+    private int database;
+
     @Bean(destroyMethod = "shutdown")
     public RedissonClient redissonClient() {
         String address = "redis://" + host + ":" + port;
@@ -26,7 +29,9 @@ public class RedissonConfig {
         config.useSingleServer()
                 .setAddress(address) // 设置连接地址
                 .setConnectionMinimumIdleSize(10) // 最小空闲连接数
-                .setConnectionPoolSize(64); // 最大连接数
+                .setConnectionPoolSize(64) // 最大连接数
+                .setDatabase(database); //数据库
+
         if (null!=password&&!"".equals(password)) {
             config.useSingleServer().setPassword(password);
         }

+ 49 - 0
fs-service/src/main/java/com/fs/his/mapper/FsStoreAfterSalesMapper.java

@@ -1,6 +1,9 @@
 package com.fs.his.mapper;
 
 import java.util.List;
+
+import com.fs.company.param.FsStoreStatisticsParam;
+import com.fs.company.vo.FsStoreOrderStatisticsVO;
 import com.fs.his.domain.FsStoreAfterSales;
 import com.fs.his.domain.FsStoreAfterSalesItem;
 import com.fs.his.domain.FsStoreAfterSalesLogs;
@@ -238,4 +241,50 @@ public interface FsStoreAfterSalesMapper
             " order by so.id desc "+
             "</script>"})
     Long selectFsStoreAfterSalesExcelListVOCount(@Param("maps") FsStoreAfterSalesParam fsStoreAfterSales);
+
+    @Select({"<script> " +
+            "select u.nick_name, count(o.order_id) as order_count,sum(IFNULL(o.pay_price,0)) as pay_price  " +
+            "from  fs_store_after_sales o left join company_user u on o.company_user_id=u.user_id  " +
+            "where o.status &gt; 1 " +
+            "<if test = 'maps.type != null and maps.type ==1 '> " +
+            "and TO_DAYS(o.create_time) = TO_DAYS(NOW()) " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==2 '> " +
+            "and TO_DAYS(NOW()) - TO_DAYS(o.create_time) &lt;= 1 " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==3 '> " +
+            "and YEARWEEK(DATE_FORMAT(o.create_time,'%Y-%m-%d')) = YEARWEEK(NOW()) " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==4 '> " +
+            "and YEARWEEK(DATE_FORMAT(o.create_time,'%Y-%m-%d')) = YEARWEEK(NOW())-1 " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==5 '> " +
+            "and DATE_FORMAT(o.create_time,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m') " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==6 '> " +
+            "and PERIOD_DIFF(DATE_FORMAT(NOW(),'%Y%m'),DATE_FORMAT(o.create_time,'%Y%m')) = 1 " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==7 '> " +
+            "and QUARTER(o.create_time) = QUARTER(NOW()) " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==8 '> " +
+            "and QUARTER(o.create_time) = QUARTER(DATE_SUB(NOW(),INTERVAL 1 QUARTER)) " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==9 '> " +
+            "and YEAR(o.create_time)=YEAR(NOW()) " +
+            "</if>" +
+            "<if test = 'maps.type != null and maps.type ==10 '> " +
+            "and  YEAR(o.create_time) = YEAR(DATE_SUB(NOW(),INTERVAL 1 YEAR))" +
+            "</if>" +
+            "<if test = 'maps.startTime != null and maps.startTime != \"\" '> " +
+            "AND date_format(o.create_time,'%y%m%d') &gt;= date_format(#{maps.startTime},'%y%m%d')"+
+            "</if>" +
+            "<if test = 'maps.endTime != null and maps.endTime != \"\" '> " +
+            "AND date_format(o.create_time,'%y%m%d') &lt;= date_format(#{maps.endTime},'%y%m%d')"+
+            "</if>" +
+            "and  o.`company_user_id` IN " +
+            "<foreach  item='item' index='index' collection='maps.users' open='(' separator=',' close=')'> #{item}    </foreach>"+
+            " group by o.company_user_id "+
+            "</script>"})
+    List<FsStoreOrderStatisticsVO> selectFsPackageOrderStatisticsList(@Param("maps")FsStoreStatisticsParam param);
 }

+ 4 - 0
fs-service/src/main/java/com/fs/his/service/IFsStoreAfterSalesService.java

@@ -3,6 +3,8 @@ package com.fs.his.service;
 import java.util.List;
 
 import com.fs.common.core.domain.R;
+import com.fs.company.param.FsStoreStatisticsParam;
+import com.fs.company.vo.FsStoreOrderStatisticsVO;
 import com.fs.his.domain.FsStoreAfterSales;
 import com.fs.his.domain.FsStoreAfterSalesItem;
 import com.fs.his.domain.FsStoreAfterSalesLogs;
@@ -100,4 +102,6 @@ public interface IFsStoreAfterSalesService
     Long selectFsStoreAfterSalesExcelListVOCount(FsStoreAfterSalesParam fsStoreAfterSales);
 
     void exportData(FsStoreAfterSalesParam fsStoreAfterSales);
+
+    List<FsStoreOrderStatisticsVO> selectFsStoreAfterSalesServiceStatisticsList(FsStoreStatisticsParam param);
 }

+ 19 - 12
fs-service/src/main/java/com/fs/his/service/impl/FsStoreAfterSalesServiceImpl.java

@@ -18,8 +18,10 @@ import com.fs.common.exception.CustomException;
 import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.param.FsStoreStatisticsParam;
 import com.fs.company.service.ICompanyService;
 import com.fs.company.service.impl.CompanyServiceImpl;
+import com.fs.company.vo.FsStoreOrderStatisticsVO;
 import com.fs.core.config.WxPayProperties;
 import com.fs.core.utils.OrderCodeUtils;
 import com.fs.his.config.FsSysConfig;
@@ -543,18 +545,18 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
                 Map<String, Object> extendInfoMap = new HashMap<>();
                 extendInfoMap.put("org_req_seq_id", orderType + "-" + payment.getPayCode());
                 request.setExtendInfo(extendInfoMap);
-//                HuiFuRefundResult refund = huiFuService.refund(request);
-//                logger.info("订单退款返回结果:退款订单id:" + order.getOrderId() + refund);
-//                if ((refund.getResp_code().equals("00000000") || refund.getResp_code().equals("00000100")) && (refund.getTrans_stat().equals("S") || refund.getTrans_stat().equals("P"))) {
-//                    FsStorePayment paymentMap = new FsStorePayment();
-//                    paymentMap.setPaymentId(payment.getPaymentId());
-//                    paymentMap.setStatus(-1);
-//                    paymentMap.setRefundTime(DateUtils.getNowDate());
-//                    paymentMap.setRefundMoney(payment.getPayMoney());
-//                    fsStorePaymentMapper.updateFsStorePayment(paymentMap);
-//                } else {
-//                    throw new CustomException("退款请求失败" + refund.getResp_desc());
-//                }
+                HuiFuRefundResult refund = huiFuService.refund(request);
+                logger.info("订单退款返回结果:退款订单id:" + order.getOrderId() + refund);
+                if ((refund.getResp_code().equals("00000000") || refund.getResp_code().equals("00000100")) && (refund.getTrans_stat().equals("S") || refund.getTrans_stat().equals("P"))) {
+                    FsStorePayment paymentMap = new FsStorePayment();
+                    paymentMap.setPaymentId(payment.getPaymentId());
+                    paymentMap.setStatus(-1);
+                    paymentMap.setRefundTime(DateUtils.getNowDate());
+                    paymentMap.setRefundMoney(payment.getPayMoney());
+                    fsStorePaymentMapper.updateFsStorePayment(paymentMap);
+                } else {
+                    throw new CustomException("退款请求失败" + refund.getResp_desc());
+                }
             }
             //管易作废
             if (StringUtils.isNotEmpty(fsStoreOrder.getExtendOrderId())) {
@@ -951,4 +953,9 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
         task.setFileUrl(result.get("msg").toString());
         fsExportTaskMapper.updateFsExportTask(task);
     }
+
+    @Override
+    public List<FsStoreOrderStatisticsVO> selectFsStoreAfterSalesServiceStatisticsList(FsStoreStatisticsParam param) {
+        return fsStoreAfterSalesMapper.selectFsPackageOrderStatisticsList(param);
+    }
 }

+ 9 - 42
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -1,6 +1,7 @@
 package com.fs.hisStore.mapper;
 
 import java.util.List;
+import java.util.Map;
 
 import com.fs.his.param.FsStoreProductListSParam;
 import com.fs.his.vo.FsStoreProductListSVO;
@@ -180,7 +181,9 @@ public interface FsStoreProductScrmMapper
     @Select({"<script> " +
             "select p.* from fs_store_product_scrm p  " +
             //新增审核状态及所属店铺审核状态
+            "<if test = 'maps.isStores != null and maps.isStores == 1   '>"+
             "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
+            "</if>" +
             "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},'%') ) " +
@@ -242,34 +245,11 @@ public interface FsStoreProductScrmMapper
     @Update("update fs_store_product_scrm set stock=stock+#{num}, sales=sales-#{num}" +
             " where product_id=#{productId}")
     int incStockDecSales( @Param("num")Long num, @Param("productId")Long productId);
-    @Select({"<script> " +
-            "select p.* from fs_store_product_scrm p " +
-            //新增审核状态及所属店铺审核状态
-            "<if test='config.isAudit == \"1\" '>" +
-            "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
-            "</if>" +
-            "where p.is_del=0 and p.is_show=1 " +
-            "<if test='config.isAudit == \"1\" '>" +
-            "and p.is_audit = '1'  " +
-            "</if>" +
-            "and  p.is_new=1 and p.is_display=1 order by p.sort desc limit #{count}" +
-            "</script>"})
-    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count,@Param("config") MedicalMallConfig  config);
-    @Select({"<script> " +
-            "select p.* from fs_store_product_scrm p " +
-            //新增审核状态及所属店铺审核状态
-            "<if test='config.isAudit == \"1\" '>" +
-            "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
-            "</if>" +
-            "where p.is_del=0 and p.is_show=1 " +
-            "<if test='config.isAudit == \"1\" '>" +
-            "and p.is_audit = '1'" +
-            "</if>" +
-            "and  p.is_hot=1 and p.is_display=1 order by p.sort desc limit #{count}" +
-            "</script>"})
-    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count,@Param("config") MedicalMallConfig  config);
-    @Select({"<script> " +
-            "select p.* from fs_store_product_scrm p " +
+
+    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(Map<String, Object> params);
+
+    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(Map<String, Object> params);
+    @Select("select p.* from fs_store_product_scrm p " +
             //新增审核状态及所属店铺审核状态
             "<if test='config.isAudit == \"1\" '>" +
             "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
@@ -278,22 +258,9 @@ public interface FsStoreProductScrmMapper
             "<if test='config.isAudit == \"1\" '>" +
             "and p.is_audit = '1'" +
             "</if>" +
-            "and  p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}" +
-            "</script>"})
+            "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);
-    @Select({"<script> " +
-            "select p.* from fs_store_product_scrm p " +
-            //新增审核状态及所属店铺审核状态
-            "<if test='config.isAudit == \"1\" '>" +
-            "inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1 " +
-            "</if>" +
-            "where p.is_del=0 and p.is_show=1 " +
-            "<if test='config.isAudit == \"1\" '>" +
-            "and p.is_audit = '1'" +
-            "</if>" +
-            "and  p.is_good=1 and p.is_display=1 order by p.sort desc" +
-            "</script>"})
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig  config);
     @Select({"<script> " +
             "select count(1) from fs_store_product_scrm  " +

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductQueryParam.java

@@ -32,4 +32,7 @@ public class FsStoreProductQueryParam extends BaseQueryParam implements Serializ
     private Integer isDrug;
     //店铺id
     private Long storeId;
+
+    //是否多店铺 1是
+    private Integer isStores;
 }

+ 11 - 3
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -338,7 +338,7 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
         product.setStoreId(param.getStoreId());
         product.setIsDrug(param.getIsDrug().toString());
         //校验店铺资质信息
-        if(!("益善缘".equals(cloudHostProper.getCompanyName()))){
+        if(!("益善缘".equals(cloudHostProper.getCompanyName())) && !("康年堂".equals(cloudHostProper.getCompanyName()))){
             //获取店铺
             FsStoreScrm store = fsStoreScrmService.selectFsStoreByStoreId(product.getStoreId());
             if(store == null || 1 != store.getStatus()){
@@ -679,6 +679,8 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
 
     @Override
     public List<FsStoreProductListQueryVO> selectFsStoreProductListQuery(FsStoreProductQueryParam param) {
+        boolean stores = medicalMallConfig.isStores();
+        param.setIsStores(stores?1:0);
         return fsStoreProductMapper.selectFsStoreProductListQuery(param);
     }
 
@@ -708,12 +710,18 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
 
     @Override
     public List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count) {
-        return fsStoreProductMapper.selectFsStoreProductNewQuery(count,medicalMallConfig);
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("count", count);
+        map.put("config", medicalMallConfig);
+        return fsStoreProductMapper.selectFsStoreProductNewQuery(map);
     }
 
     @Override
     public List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count) {
-        return fsStoreProductMapper.selectFsStoreProductHotQuery(count,medicalMallConfig);
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("count", count);
+        map.put("config", medicalMallConfig);
+        return fsStoreProductMapper.selectFsStoreProductHotQuery(map);
     }
 
     @Override

+ 1 - 1
fs-service/src/main/resources/application-common.yml

@@ -36,7 +36,7 @@ server:
 # 日志配置
 logging:
   level:
-    com.fs: info
+    com.fs: debug
     org.springframework: warn
 
 express:

+ 5 - 5
fs-service/src/main/resources/application-config-druid-knt.yml

@@ -23,13 +23,13 @@ wx:
         token: PPKOdAlCoMO
         aesKey: PKvaxtpSv8NGpfTDm7VUHIK8Wok2ESyYX24qpXJAdMP
   pay:
-    appId: wx7cf96953a4be5181 #微信公众号或者小程序等的appid
-    mchId: 1611402045 #微信支付商户号
+    appId: wx1de020b57c05a990 #微信公众号或者小程序等的appid
+    mchId: 1723480901 #微信支付商户号:陕西康年堂医药连锁有限公司
     mchKey: 8cab128997a3547c1363b0898b877f38 #微信支付商户密钥
     subAppId:  #服务商模式下的子商户公众账号ID
     subMchId:  #服务商模式下的子商户号
     keyPath: c:\\cert\\apiclient_cert.p12 # p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath:开头)
-    notifyUrl: https://userapp.his.runtzh.com/app/wxpay/wxPayNotify
+    notifyUrl: https://userapp.kangniantangyiyao.top/app/wxpay/wxPayNotify
   mp:
     useRedis: false
     redisConfig:
@@ -58,8 +58,8 @@ watch:
   password3: v9xsKuqn_$d2y
 
 fs :
-  commonApi: http://192.168.0.18:7771
-  h5CommonApi: http://192.168.0.18:7771
+  commonApi: http://192.168.0.196:7771
+  h5CommonApi: http://192.168.0.196:7771
 nuonuo:
   key: 10924508
   secret: A2EB20764D304D16

+ 162 - 0
fs-service/src/main/resources/application-druid-knt-test.yml

@@ -0,0 +1,162 @@
+# 数据源配置
+spring:
+    profiles:
+        include: config-druid-knt,common
+    # redis 配置
+    redis:
+        # 地址
+        host: 127.0.0.1
+        # 端口,默认为6379
+        port: 6379
+        # 数据库索引
+        database: 3
+        # 密码
+        password:
+        # 连接超时时间
+        timeout: 20s
+        lettuce:
+            pool:
+                # 连接池中的最小空闲连接
+                min-idle: 0
+                # 连接池中的最大空闲连接
+                max-idle: 8
+                # 连接池的最大数据库连接数
+                max-active: 8
+                # #连接池最大阻塞等待时间(使用负值表示没有限制)
+                max-wait: -1ms
+    datasource:
+        #        clickhouse:
+        #            type: com.alibaba.druid.pool.DruidDataSource
+        #            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
+        #            url: jdbc:clickhouse://cc-2vc8zzo26w0l7m2l6.public.clickhouse.ads.aliyuncs.com/sop?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
+        #            username: rt_2024
+        #            password: Yzx_19860213
+        #            initialSize: 10
+        #            maxActive: 100
+        #            minIdle: 10
+        #            maxWait: 6000
+        mysql:
+            type: com.alibaba.druid.pool.DruidDataSource
+            driverClassName: com.mysql.cj.jdbc.Driver
+            druid:
+                # 主库数据源
+                master:
+                    url: jdbc:mysql://120.46.174.121:2345/fs_knt_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Ylrztek250218!3@.
+                # 从库数据源
+                slave:
+                    # 从数据源开关/默认关闭
+                    enabled: false
+                    url:
+                    username:
+                    password:
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        sop:
+            type: com.alibaba.druid.pool.DruidDataSource
+            driverClassName: com.mysql.cj.jdbc.Driver
+            druid:
+                # 主库数据源
+                master:
+                    url: jdbc:mysql://120.46.174.121:2345/knt_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Ylrztek250218!3@.
+                read:
+                    url: jdbc:mysql://120.46.174.121:2345/knt_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+rocketmq:
+    name-server: 192.168.0.176:8100 # RocketMQ NameServer 地址
+    producer:
+        group: my-producer-group
+        access-key: jnmyunl # 替换为实际的 accessKey
+        secret-key: 73a!ul~xQl@-6u1 # 替换为实际的 secretKey
+        tls-enable: false
+    consumer:
+        topic: course-finish-notes
+        group: course-finish-group
+        access-key: jnmyunl # 替换为实际的 accessKey
+        secret-key: 73a!ul~xQl@-6u1 # 替换为实际的 secretKey
+        tls-enable: false
+openIM:
+    secret: openIM123
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 33 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -452,4 +452,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{productId}
         </foreach>
     </select>
+    <select id="selectFsStoreProductNewQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        select p.* from fs_store_product_scrm p
+        <if test='config.isAudit == "1"'>
+            inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
+        </if>
+        where p.is_del=0 and p.is_show=1
+        <if test='config.isAudit == "1"'>
+            and p.is_audit = '1'
+        </if>
+        and p.is_new=1 and p.is_display=1 order by p.sort desc limit #{count}
+    </select>
+    <select id="selectFsStoreProductHotQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        select p.* from fs_store_product_scrm p
+        <if test='config.isAudit == "1" '>
+        inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
+        </if>
+        where p.is_del=0 and p.is_show=1
+        <if test='config.isAudit == "1" '>
+        and p.is_audit = '1'
+        </if>
+        and  p.is_hot=1 and p.is_display=1 order by p.sort desc limit #{count}
+    </select>
+    <select id="selectFsStoreProductGoodListQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        select p.* from fs_store_product_scrm p
+        <if test='config.isAudit == "1" '>
+        inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
+        </if>
+        where p.is_del=0 and p.is_show=1
+        <if test='config.isAudit == "1" '>
+        and p.is_audit = '1'
+        </if>
+        and  p.is_good=1 and p.is_display=1 order by p.sort desc
+    </select>
 </mapper>

+ 2 - 2
fs-user-app/src/main/resources/application.yml

@@ -11,6 +11,6 @@ spring:
 #    active: druid-yzt
 #    active: druid-hdt
 #    active: druid-sxjz
-    active: druid-qdtst
+#    active: druid-qdtst
 #    active: druid-yzt
-#    active: druid-jnmy-test
+    active: druid-knt-test