he2802 3 年 前
コミット
381da2363d

+ 1 - 1
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://192.168.1.222:3306/zz_edu_saas?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+                url: jdbc:mysql://192.168.1.222:3306/zz_edu_saas_pre?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
                 username: root
                 password:  zhongzheng2021
             # 从库数据源

+ 7 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeServiceImpl.java

@@ -265,8 +265,11 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
             }
         }
         ClassGradeVo classGradeVo = this.queryById(bo.getGradeId());
+
         //开班发送短信
-        if (update.getClassStatus() != null && update.getClassStatus().equals(1) && (classGradeVo.getClassStatus() == null || classGradeVo.getClassStatus().equals(0))) {
+        if ( update.getClassStatus() != null && update.getClassStatus().equals(1) && (classGradeVo.getClassStatus() == null || classGradeVo.getClassStatus().equals(0))) {
+            classGradeVo.setClassStartTime(update.getClassStartTime());
+            classGradeVo.setClassEndTime(update.getClassEndTime());
             sendClassSMS(classGradeVo);
         }
         return this.updateById(update);
@@ -280,7 +283,8 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
         if (!CollectionUtils.isEmpty(informRemindVo.getInformRemindBusiness())) {
             Long businessId = 0L;
             for (InformRemindBusinessVo informRemindBusiness : informRemindVo.getInformRemindBusiness()) {
-                businessId += baseMapper.querClassSMS(classGradeVo.getGradeId(), informRemindBusiness.getBusinessId());
+                Long rs = baseMapper.querClassSMS(classGradeVo.getGradeId(), informRemindBusiness.getBusinessId());
+                businessId += rs;
             }
             String endTime;
             String startTime;
@@ -288,7 +292,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
             Long timeId = classGradeVo.getClassEndTime()*1000;
             Date date = new Date(timeId);
             endTime = simpleDateFormat.format(date);
-            Long timeSId = classGradeVo.getClassEndTime()*1000;
+            Long timeSId = classGradeVo.getClassStartTime()*1000;
             Date dateS = new Date(timeSId);
             startTime = simpleDateFormat.format(dateS);
             List<Long> userIds = baseMapper.queryUser(classGradeVo.getGradeId());

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/bo/InformUserAddBo.java

@@ -25,7 +25,7 @@ public class InformUserAddBo {
     @ApiModelProperty("发送时间")
     private Long sendTime;
     /** 发送状态 1成功 0失败 */
-    @ApiModelProperty("发送状态 1成功 0失败")
+    @ApiModelProperty("发送状态 1成功 0失败 2草稿")
     private Integer sendStatus;
     /** 已读回执 1已读 0未读 */
     @ApiModelProperty("已读回执 1已读 0未读")

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/service/impl/InformServiceImpl.java

@@ -162,6 +162,9 @@ public class InformServiceImpl extends ServiceImpl<InformMapper, Inform> impleme
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
                 informUserAddBo.setSendStatus(1);
             }
+            if (bo.getIssueStatus() == 2 && bo.getStatus().equals(1)){
+                informUserAddBo.setSendStatus(2);
+            }
             informUserAddBo.setCreateTime(DateUtils.getNowTime());
             informUserAddBo.setUpdateTime(DateUtils.getNowTime());
             iInformUserService.insertByAddBo(informUserAddBo);
@@ -220,6 +223,9 @@ public class InformServiceImpl extends ServiceImpl<InformMapper, Inform> impleme
                     informUserAddBo.setSendTime(DateUtils.getNowTime());
                     informUserAddBo.setSendStatus(1);
                 }
+                if (bo.getIssueStatus() == 2 && bo.getStatus().equals(1)){
+                    informUserAddBo.setSendStatus(2);
+                }
                 informUserAddBo.setCreateTime(DateUtils.getNowTime());
                 informUserAddBo.setUpdateTime(DateUtils.getNowTime());
                 iInformUserService.insertByAddBo(informUserAddBo);

+ 16 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -572,6 +572,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
         InformQueryBo informQueryBo = new InformQueryBo();
         informQueryBo.setIssue(1);
         informQueryBo.setIssueStatus(2);
+        informQueryBo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
         List<InformVo> informVos = informService.listInform(informQueryBo);
         for (InformVo informVo : informVos) {
             List<Integer> statusList = new ArrayList<>();
@@ -597,6 +598,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
         Calendar rightNow = Calendar.getInstance();
         boolean status = false;
         for (UserPlanVo userPlanVo : userPlanVos) {
+            status = false;
             List<CalendarStudyVo> calendarStudyUp = userPlanVo.getCalendarStudyVo();
             for (CalendarStudyVo studyVo : calendarStudyUp) {
                 if (studyVo.getMonth().equals(Convert.toLong(rightNow.get(Calendar.MONTH) + 1)) && studyVo.getYear().equals(Convert.toLong(rightNow.get(Calendar.YEAR)))) {
@@ -670,7 +672,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                                     }
                                 }
 
-                                dayStudyVo.setPerform(0);
+                            //    dayStudyVo.setPerform(0);
+                                if (dayStudyVo.getDate() > c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))) {
+                                    if(Validator.isNotEmpty(dayStudyVo.getPerform())&&dayStudyVo.getPerform().equals(0)){
+                                        //过期且没完成
+                                        dayStudyVo.setPerform(2);
+                                    }
+                                }
                                 List<DaySectionVo> daySectionList = new ArrayList<>();
                                 if (!com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(dayStudyVo.getDaySectionList())) {
                                     daySectionList = dayStudyVo.getDaySectionList();
@@ -683,11 +691,16 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                                     daySectionVo.setStudyGoodsKnob(Convert.toLong(Sec));
                                 }
 
-                                daySectionVo.setGoodsPerform(0);
+                            //    daySectionVo.setGoodsPerform(0);
+                                if (dayStudyVo.getDate() > c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))) {
+                                    if(Validator.isNotEmpty(daySectionVo.getGoodsPerform())&&daySectionVo.getGoodsPerform().equals(0)){
+                                        //过期且没完成
+                                        daySectionVo.setGoodsPerform(2);
+                                    }
+                                }
                                 daySectionList.add(daySectionVo);
                                 dayStudyVo.setDaySectionList(daySectionList);
                                 allNum -= Sec;
-
                             }
                         }
                     }

+ 3 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -673,9 +673,10 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                 userSubscribeImports.add(userSubscribeImport);
                 continue;
             }
+            //产品确定不跟安排状态有关
             Long applyId = baseMapper.selectApplyId(userSubscribeImport.getApplyName());
             if (applyId == null) {
-                userSubscribeImport.setCause("考试标题有误或已过期或未开启");
+                userSubscribeImport.setCause("考试标题有误");
                 userSubscribeImports.add(userSubscribeImport);
                 continue;
             }
@@ -900,7 +901,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
             }
             Long applyId = baseMapper.selectApplyId(userSubscribeImport.getApplyName());
             if (applyId == null) {
-                userSubscribeImport.setCause("考试标题有误或已过期或未开启");
+                userSubscribeImport.setCause("考试标题有误");
                 userSubscribeImports.add(userSubscribeImport);
                 continue;
             }

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -476,7 +476,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         and g.business_id =#{businessId}
     </select>
 
-    <select id="querClassSMS"  parameterType="map" resultMap="ClassGradeStudentVo">
+    <select id="querClassSMS"  parameterType="map" resultType="Long">
         SELECT
             COUNT(1)
         FROM

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/UserSubscribeMapper.xml

@@ -195,7 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectApplyId" parameterType="map"  resultType="Long">
-        SELECT ea.apply_id FROM exam_apply ea where ea.apply_name=#{applyName} and ea.status = 1
+        SELECT ea.apply_id FROM exam_apply ea where ea.apply_name=#{applyName} and ea.status != -1
     </select>
     <select id="selectSubscribeId" parameterType="map"  resultType="Long">
         SELECT