Forráskód Böngészése

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java

caoliqin 2 napja
szülő
commit
d7c7a60cf8

+ 4 - 3
fs-service/src/main/java/com/fs/fastGpt/service/impl/AiHookServiceImpl.java

@@ -465,8 +465,8 @@ public class AiHookServiceImpl implements AiHookService {
             }
 
             //对用户处理的内容做处理,去除手机号替换
-            //String maskedContent = processContent(qwContent);
-            String contentEmj = replaceWxEmo(qwContent);
+            String maskedContent = processContent(qwContent);
+            String contentEmj = replaceWxEmo(maskedContent);
             if(!contentEmj.contains("表情包")){
                 if(!contentEmj.isEmpty()){
                     addSaveAiMsg(1,1,contentEmj,user,fastGptChatSession.getSessionId(),role.getRoleId(),qwExternalContacts,fastGptChatSession.getUserId(),null,null,null);
@@ -972,7 +972,8 @@ public class AiHookServiceImpl implements AiHookService {
      * @return
      */
     private @Nullable String processContent(String qwContent) {
-        String maskedContent = SensitiveDataUtils.maskMobileNumbers(qwContent);
+        //String maskedContent = SensitiveDataUtils.maskMobileNumbers(qwContent);
+        String maskedContent = qwContent;
         if(maskedContent != null && !maskedContent.isEmpty()){
             FastGptChatReplaceText fastGptChatReplaceText = new FastGptChatReplaceText();
             fastGptChatReplaceText.setStatus(1);

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

@@ -119,6 +119,10 @@ public interface IFsStorePaymentService
     String v3TransferNotify(String notifyData, HttpServletRequest request);
 
 
+    String v3TransferNotifyWithCompanyId(Long companyId,String notifyData, HttpServletRequest request);
+
+
+
     R sendRedPacketTest(WxSendRedPacketParam param);
 
     List<FsStorePaymentVO> selectFsStorePaymentListQueryVO(FsStorePaymentParam fsStorePayment);

+ 39 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -1135,6 +1135,45 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         }
     }
 
+    @Override
+    public String v3TransferNotifyWithCompanyId(Long companyId, String notifyData, HttpServletRequest request) {
+        logger.info("分公司回调V3::companyId:{}",companyId);
+        logger.info("zyp \n【收到转账回调V3::分公司】:{}",notifyData);
+        try {
+//            String json = configService.selectConfigByKey("redPacket.config");
+            String json = companyConfigMapper.selectRedPacketConfigByKey(companyId);
+            RedPacketConfig config = JSONUtil.toBean(json, RedPacketConfig.class);
+
+            //创建微信订单
+            WxPayConfig payConfig = new WxPayConfig();
+            BeanUtils.copyProperties(config,payConfig);
+            WxPayService wxPayService = new WxPayServiceImpl();
+            wxPayService.setConfig(payConfig);
+            SignatureHeader signatureHeader = new SignatureHeader();
+            signatureHeader.setTimeStamp(request.getHeader("Wechatpay-Timestamp"));
+            signatureHeader.setNonce(request.getHeader("Wechatpay-Nonce"));
+            signatureHeader.setSerial(request.getHeader("Wechatpay-Serial"));
+            signatureHeader.setSignature(request.getHeader("Wechatpay-Signature"));
+            TransferBillsNotifyResult result = wxPayService.parseTransferBillsNotifyV3Result(notifyData,signatureHeader);
+            logger.info("到零钱回调1:{}",result.getResult());
+            if (result.getResult().getState().equals("SUCCESS")) {
+                R r = redPacketLogService.syncRedPacket(result.getResult().getOutBillNo(),result.getResult().getTransferBillNo());
+                logger.info("result:{}",r);
+                if (r.get("code").equals(200)){
+                    return WxPayNotifyResponse.success("处理成功");
+                }else {
+                    return WxPayNotifyResponse.fail("");
+                }
+            }else {
+                return WxPayNotifyResponse.fail("");
+            }
+        } catch (WxPayException e) {
+            e.printStackTrace();
+            logger.error("zyp \n【转账回调异常】:{}", e.getReturnMsg());
+            return WxPayNotifyResponse.fail(e.getMessage());
+        }
+    }
+
     @Override
     @Transactional
     public R sendRedPacketTest(WxSendRedPacketParam param) {

+ 6 - 6
fs-service/src/main/java/com/fs/live/service/impl/LiveCompletionPointsRecordServiceImpl.java

@@ -143,16 +143,16 @@ public class LiveCompletionPointsRecordServiceImpl implements ILiveCompletionPoi
 
                 long daysBetween = ChronoUnit.DAYS.between(lastDate, today);
 
-                if (daysBetween == 1) {
+                if (daysBetween == 0) {
+                    continuousDays = latestRecord.getContinuousDays();
+                    log.debug("今天已有其他直播间完课记录,继承连续天数, liveId={}, userId={}, continuousDays={}", 
+                            liveId, userId, continuousDays);
+                } else if (daysBetween == 1) {
                     // 昨天完课了,连续天数+1
                     continuousDays = latestRecord.getContinuousDays() + 1;
-                } else if (daysBetween > 1) {
+                } else {
                     // 中断了,重新开始
                     continuousDays = 1;
-                } else {
-                    // daysBetween == 0 说明今天已经有记录了(理论上不会进入这里,因为前面已经检查过)
-                    log.warn("异常情况: 今天已有完课记录, liveId={}, userId={}", liveId, userId);
-                    return;
                 }
             }
 

+ 12 - 5
fs-service/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

@@ -55,6 +55,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.fs.common.utils.sign.Md5Utils;
@@ -123,7 +124,7 @@ public class LiveServiceImpl implements ILiveService
     private CompanyMapper companyMapper;
     @Autowired
     private LiveCouponMapper liveCouponMapper;
-    
+
     @Autowired
     LiveTagConfigMapper liveTagConfigMapper;
 
@@ -282,7 +283,7 @@ public class LiveServiceImpl implements ILiveService
             }
         }
         liveVo.setCompletionPointsEnabled(completionPointsEnabled);
-        
+
         LiveVideo liveVideo = liveVideoService.selectLiveVideoByLiveIdAndType(id, 3);
         if (liveVideo != null) {
             liveVo.setPreviewUrl(liveVideo.getVideoUrl());
@@ -636,7 +637,7 @@ public class LiveServiceImpl implements ILiveService
             liveTagConfigMapper.deleteByLiveId(live.getLiveId());
             insertLiveTagConfig(live.getLiveTagList(),live.getLiveId(),live.getCreateBy());
         }
-        
+
         return result;
     }
 
@@ -937,8 +938,14 @@ public class LiveServiceImpl implements ILiveService
         if (live.getCompanyId() != null && exist.getCompanyId() != null && !Objects.equals(exist.getCompanyId(), live.getCompanyId())) {
             return R.error("您没有权限操作此直播间");
         }
-        String rtmpPushUrl = generateRtmpPushUrl("rtmp://200149.push.tlivecloud.com", "live", exist.getLiveId().toString());
-        String hlvPlayUrl = generateHlvPlayUrl("https://live.test.ifeiyu100.com", "live", exist.getLiveId().toString());
+
+        SysConfig sysConfig = sysConfigService.selectConfigByConfigKey("living.config");
+        Map<String, String> livingConfigMap = JSON.parseObject(sysConfig.getConfigValue(), Map.class);
+        if (livingConfigMap == null || livingConfigMap.isEmpty()) {
+            return R.error("缺失直播配置");
+        }
+        String rtmpPushUrl = generateRtmpPushUrl(livingConfigMap.get("domain"), livingConfigMap.get("app"), exist.getLiveId().toString());
+        String hlvPlayUrl = generateHlvPlayUrl(livingConfigMap.get("http"), livingConfigMap.get("app"), exist.getLiveId().toString());
         Date now = new Date();
         exist.setRtmpUrl(rtmpPushUrl);
         exist.setFlvHlsUrl(hlvPlayUrl);

+ 2 - 2
fs-service/src/main/resources/application-config-dev-jnlzjk.yml

@@ -86,8 +86,8 @@ tmp_secret_config:
 cloud_host:
   company_name: 济南联志健康
   projectCode: LZJK
-  spaceName:
-  volcengineUrl: https://jnlzvolcengine.ylrztop.com
+  spaceName: lzjk-2114522511
+  volcengineUrl: https://jnlzjkvolcengine.ylrztop.com
 headerImg:
   imgUrl:
 

+ 2 - 2
fs-service/src/main/resources/application-config-druid-jnlzjk.yml

@@ -87,8 +87,8 @@ tmp_secret_config:
 cloud_host:
   company_name: 济南联志健康
   projectCode: LZJK
-  spaceName:
-  volcengineUrl: https://jnlzvolcengine.ylrztop.com
+  spaceName: lzjk-2114522511
+  volcengineUrl: https://jnlzjkvolcengine.ylrztop.com
 headerImg:
   imgUrl:
 

+ 6 - 0
fs-service/src/main/resources/application-dev-jnlzjk.yml

@@ -42,6 +42,9 @@ spring:
                   url: jdbc:mysql://nj-cdb-22nvjajz.sql.tencentcdb.com:29237/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
                   username: root
                   password: Ylrz_1q2w3e4r5t6y
+#                  url: jdbc:mysql://139.186.77.83:3306/fs_his_jnlzjk_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
+#                  username: Rtroot
+#                  password: Rtroot
                 # 从库数据源
                 slave:
                     # 从数据源开关/默认关闭
@@ -97,6 +100,9 @@ spring:
                     url: jdbc:mysql://nj-cdb-22nvjajz.sql.tencentcdb.com:29237/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                     username: root
                     password: Ylrz_1q2w3e4r5t6y
+#                    url: jdbc:mysql://139.186.77.83:3306/fs_his_jnlzjk_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
+#                    username: Rtroot
+#                    password: Rtroot
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量

+ 15 - 0
fs-user-app/src/main/java/com/fs/app/controller/course/CourseTransferController.java

@@ -71,6 +71,21 @@ public class CourseTransferController {
         return paymentService.TransferNotifyWithCompanyId(companyId,notifyData,request);
     }
 
+    /**
+     * 分公司配置回调地址
+     * @param companyId
+     * @param notifyData
+     * @param request
+     * @param response
+     * @return
+     * @throws Exception
+     */
+    @PostMapping( "/v3TransferNotifyWithCompanyId/{companyId}")
+    public String v3TransferNotifyWithCompanyId(@PathVariable("companyId") Long companyId,@RequestBody String notifyData,HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+        return paymentService.v3TransferNotifyWithCompanyId(companyId,notifyData,request);
+    }
+
     @Autowired
     private IFsCourseRedPacketLogService fsCourseRedPacketLogService;