Преглед на файлове

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

xw преди 16 часа
родител
ревизия
55d4df1e01

+ 1 - 1
fs-company/src/main/resources/application.yml

@@ -3,7 +3,7 @@ server:
 # Spring配置
 spring:
   profiles:
-    active: druid-jnsyj-test
+    active: druid-bjczwh-test
 #    active: druid-jnmy-test
 #    active: druid-jzzx-test
 #    active: druid-hdt

+ 17 - 17
fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java

@@ -78,7 +78,7 @@ public class IpadSendServer {
         miniProgramVo.setBase(vo);
         WxWorkResponseDTO<WxWorkSendAppMsgRespDTO> resp = ipadSendUtils.sendMiniProgram(miniProgramVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -91,7 +91,7 @@ public class IpadSendServer {
         fileVo.setBase(vo);
         WxWorkResponseDTO<WxwSendCDNFileMsgRespDTO> resp = ipadSendUtils.sendFile(fileVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -102,7 +102,7 @@ public class IpadSendServer {
         txtVo.setBase(vo);
         WxWorkResponseDTO<WxWorkSendTextMsgRespDTO> resp = ipadSendUtils.sendTxt(txtVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -113,7 +113,7 @@ public class IpadSendServer {
         imgVo.setBase(vo);
         WxWorkResponseDTO<WxwSendCDNImgMsgRespDTO> resp = ipadSendUtils.sendImg(imgVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -130,7 +130,7 @@ public class IpadSendServer {
         linkVo.setBase(vo);
         WxWorkResponseDTO<WxwSendLinkMsgRespDTO> resp = ipadSendUtils.sendLink(linkVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -143,7 +143,7 @@ public class IpadSendServer {
         videoVo.setBase(vo);
         WxWorkResponseDTO<WxwSendCDNVideoMsgRespDTO> resp = ipadSendUtils.sendVideo(videoVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -165,7 +165,7 @@ public class IpadSendServer {
         videoVo.setBase(vo);
         WxWorkResponseDTO<WxwSendVideoNumberRespDTO> resp = ipadSendUtils.sendWxVideo(videoVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -173,7 +173,7 @@ public class IpadSendServer {
 
     public void sendVoice(BaseVo vo, QwSopCourseFinishTempSetting.Setting content) {
         if (StringUtils.isEmpty(content.getVoiceUrl()) || StringUtils.isEmpty(content.getVoiceDuration())) {
-            log.debug("语音未生成无法发送,转文字发送:{}", vo);
+            log.info("语音未生成无法发送,转文字发送:{}", vo);
             sendTxt(vo, content);
             return;
         }
@@ -184,7 +184,7 @@ public class IpadSendServer {
         voiceVo.setBase(vo);
         WxWorkResponseDTO<WxwSendCDNVoiceMsgRespDTO> resp = ipadSendUtils.sendVoice(voiceVo);
         if (resp.getErrcode() != 0) {
-            log.debug("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
+            log.info("ID:{}-ipad接口请求返回异常:{}", vo.getId(), resp.getErrmsg());
             content.setSendStatus(2);
             content.setSendRemarks("发送失败:" + resp.getErrmsg());
         }
@@ -193,22 +193,22 @@ public class IpadSendServer {
     public boolean isSend(QwUser qwUser, BaseVo parentVo) {
         // 判断企微发送方式是否是ipad
         if (qwUser.getSendMsgType() == 0) {
-            log.debug("发送方式是侧边栏企微用户:ID:{} 名称:{}", qwUser.getId(), qwUser.getQwUserName());
+            log.info("发送方式是侧边栏企微用户:ID:{} 名称:{}", qwUser.getId(), qwUser.getQwUserName());
             return false;
         }
         // 判断是否信息准确
         if (org.springframework.util.StringUtils.isEmpty(qwUser.getUid())) {
-            log.debug("企微用户:ID:{} 名称:{}", qwUser.getId(), qwUser.getQwUserName());
+            log.info("企微用户:ID:{} 名称:{}", qwUser.getId(), qwUser.getQwUserName());
             return false;
         }
         // 是否已经授权服务器地址
         if (qwUser.getServerId() == null) {
-            log.debug("企微用户:ID:{} 名称:{} 未绑定AI主机", qwUser.getId(), qwUser.getQwUserName());
+            log.info("企微用户:ID:{} 名称:{} 未绑定AI主机", qwUser.getId(), qwUser.getQwUserName());
             return false;
         }
         // ipad状态是否是登录状态
         if (qwUser.getIpadStatus() == 0) {
-            log.debug("企微用户:ID:{} 名称:{} 未登录uid:{},serveID:{}", qwUser.getId(), qwUser.getQwUserName(), qwUser.getUid(), qwUser.getServerId());
+            log.info("企微用户:ID:{} 名称:{} 未登录uid:{},serveID:{}", qwUser.getId(), qwUser.getQwUserName(), qwUser.getUid(), qwUser.getServerId());
             return false;
         }
         // 更新信息使用的类
@@ -240,7 +240,7 @@ public class IpadSendServer {
                 return false;
             }
             parentVo.setCorpId(login.getUser_info().getObject().getCorp_id());
-            log.debug("QwUserID:{}, AI主机信息:{}", qwUser.getId(), login);
+            log.info("QwUserID:{}, AI主机信息:{}", qwUser.getId(), login);
         } catch (Exception e) {
             updateQwUser.setId(qwUser.getId());
             updateQwUser.setRemark("登录状态异常:" + e.getMessage());
@@ -303,15 +303,15 @@ public class IpadSendServer {
             contactHParam.setCorpId(qwUser.getCorpId().trim());
             Integer courseType = setting.getCourseType();
             if (setting.getType() == 2 && courseType != 0) {// 课程消息,进行复杂的条件判断
-                log.debug("企微查询:{}", contactHParam);
+                log.info("企微查询:{}", contactHParam);
                 Long qwExternalContactId = qwExternalContactMapper.getQwExternalContactId(contactHParam);
                 FsCourseWatchLog watchLog = watchLogService.getWatchCourseLogVideoBySop(
                         setting.getVideoId().longValue(),
                         String.valueOf(qwUser.getId()),
                         qwExternalContactId
                 );
-                log.debug("ID:{}-看课记录参数:videoID:{}, qwUserID:{}, extID:{}", qwSopLogs.getId(), setting.getVideoId().longValue(), qwUser.getId(), qwExternalContactId);
-                log.debug("ID:{}-看课记录:{}", qwSopLogs.getId(), watchLog);
+                log.info("ID:{}-看课记录参数:videoID:{}, qwUserID:{}, extID:{}", qwSopLogs.getId(), setting.getVideoId().longValue(), qwUser.getId(), qwExternalContactId);
+                log.info("ID:{}-看课记录:{}", qwSopLogs.getId(), watchLog);
                 String logId = qwSopLogs.getId();
                 if (watchLog != null) {
                     //新逻辑

+ 5 - 1
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -1535,7 +1535,11 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 
         //2025.6.19 红包金额为0的时候
         if (amount.compareTo(BigDecimal.ZERO)>0){
-
+            Company company = companyMapper.selectCompanyById(param.getCompanyId());
+            BigDecimal money = company.getMoney();
+            if (money.compareTo(BigDecimal.ZERO)<=0) {
+                return R.error("服务商余额不足,请联系群主服务器充值!");
+            }
             // ===================== 20251022 xgb 修改 本次修改目的为了实时扣减公司余额=====================
             // 1 使用redis缓存加锁 预扣减余额 红包发送失败 恢复redis缓存余额,如果回滚失败登记异常记录表 定时任务重新回滚余额
             // 2 另起定时任务 同步缓存余额到redis中

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

@@ -14,12 +14,12 @@ fs:
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证
   captchaType: math
-#  jwt:
-#    # 加密秘钥
-#    secret: f4e2e52034348f86b67cde581c0f9eb5
-#    # token有效时长,7天,单位秒
-#    expire: 31536000
-#    header: AppToken
+  jwt:
+    # 加密秘钥
+    secret: f4e2e52034348f86b67cde581c0f9eb5
+    # token有效时长,7天,单位秒
+    expire: 31536000
+    header: AppToken
 # 开发环境配置
 server:
   servlet:

+ 6 - 6
fs-service/src/main/resources/application-config-druid-bjczwh.yml

@@ -57,12 +57,12 @@ watch:
 fs :
   commonApi: http://127.0.0.1:7771
   h5CommonApi: http://127.0.0.1:7771
-  jwt:
-    # 加密秘钥
-    secret: bjczwh-bcdefg
-    # token有效时长,7天,单位秒
-    expire: 31536000
-    header: AppToken
+#  jwt:
+#    # 加密秘钥
+#    secret: bjczwh-bcdefg
+#    # token有效时长,7天,单位秒
+#    expire: 31536000
+#    header: AppToken
 nuonuo:
   key: 10924508
   secret: A2EB20764D304D16

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

@@ -39,7 +39,7 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                  url: jdbc:mysql://rm-bp10925iw97l3b2hbvo.mysql.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                  url: jdbc:mysql://rm-bp1jo9h8iua0h68c9ko.mysql.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                   username: root
                   password: Ylrz_1q2w3e4r5t6y
                 # 从库数据源

+ 6 - 6
fs-service/src/main/resources/application-druid-bjczwh.yml

@@ -39,9 +39,9 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                  url: jdbc:mysql://rm-bp10925iw97l3b2hb.mysql.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                  username: xqgy
-                  password: xqGY25-8
+                  url: jdbc:mysql://rm-bp1jo9h8iua0h68c9.mysql.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                  username: root
+                  password: Ylrz_1q2w3e4r5t6y
                 # 从库数据源
                 slave:
                     # 从数据源开关/默认关闭
@@ -94,9 +94,9 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://rm-bp10925iw97l3b2hb.mysql.rds.aliyuncs.com:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: xqgy
-                    password: xqGY25-8
+                    url: jdbc:mysql://rm-bp1jo9h8iua0h68c9.mysql.rds.aliyuncs.com:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Ylrz_1q2w3e4r5t6y
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量

+ 11 - 11
fs-service/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml

@@ -82,9 +82,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test ='maps.userId !=null'>
                 and l.user_id = #{maps.userId}
             </if>
-            <if test ='maps.project !=null'>
-                and l.project = #{maps.project}
-            </if>
+<!--            <if test ='maps.project !=null'>-->
+<!--                and l.project = #{maps.project}-->
+<!--            </if>-->
             <if test ='maps.qwExternalContactId !=null'>
                 and l.qw_external_contact_id = #{maps.qwExternalContactId}
             </if>
@@ -122,10 +122,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and DATE(qec.create_time) &lt;= DATE(#{maps.qecETime})
             </if>
             <if test= 'maps.sTime != null '>
-                and l.create_time &gt;= #{maps.sTime}
+                and l.create_time &gt;= CONCAT(#{maps.sTime}," 00:00:00")
             </if>
             <if test='maps.eTime != null '>
-                and l.create_time &lt;= #{maps.eTime}
+                and l.create_time &lt; CONCAT(#{maps.eTime}, ' 00:00:00') + INTERVAL 1 DAY
             </if>
             <if test= 'maps.scheduleStartTime != null '>
                 and DATE(l.camp_period_time) &gt;= DATE(#{maps.scheduleStartTime})
@@ -145,12 +145,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                     #{sopId}
                 </foreach>
             </if>
-            <if test ='maps.project !=null'>
-                and l.project = #{maps.project}
-            </if>
-            <if test ='maps.project !=null'>
-                and l.project = #{maps.project}
-            </if>
+<!--            <if test ='maps.project !=null'>-->
+<!--                and l.project = #{maps.project}-->
+<!--            </if>-->
+<!--            <if test ='maps.project !=null'>-->
+<!--                and l.project = #{maps.project}-->
+<!--            </if>-->
             <if test="maps.sopId != null  and maps.sopId != '' ">
                 and l.sop_id = #{maps.sopId}
             </if>