Browse Source

fix 班级

he2802 3 years ago
parent
commit
f164aba400

+ 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/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -472,7 +472,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