zouxuan 3 년 전
부모
커밋
e34714bdfc

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java

@@ -32,7 +32,7 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
 
     int countStudents(Map<String, Object> params);
 
-    List<Student> queryByOperatingTag(@Param("operatingTag") Integer operatingTag);
+    List<Integer> queryByOperatingTag(@Param("operatingTag") Integer operatingTag);
 
     int batchUpdate(@Param("studentList") List<Student> studentList);
 

+ 2 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServiceImpl.java

@@ -258,9 +258,8 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
         }*/
         String month = DateUtil.format(new Date(), DateUtil.ISO_YEAR_MONTH_FORMAT);
         studentOperatingVisitDao.deleteByUserId(month);
-        List<Student> updateStudentList = studentDao.queryByOperatingTag(1);
-        if (!CollectionUtils.isEmpty(updateStudentList)) {
-            List<Integer> operatingUserIds = updateStudentList.stream().map(e -> e.getUserId()).collect(Collectors.toList());
+        List<Integer> operatingUserIds = studentDao.queryByOperatingTag(1);
+        if (!CollectionUtils.isEmpty(operatingUserIds)) {
             List<Integer> userIds = studentOperatingVisitDao.queryUserIds(month);
             operatingUserIds.removeAll(userIds);
             if(!CollectionUtils.isEmpty(operatingUserIds)){

+ 3 - 5
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -235,11 +235,6 @@
         </where>
     </sql>
 
-    <select id="queryByOperatingTag" resultMap="Student">
-        SELECT operating_tag_,user_id_,tenant_id_
-        FROM student
-        WHERE operating_tag_ = #{operatingTag}
-    </select>
 
     <update id="batchUpdate" parameterType="java.util.List">
         <foreach collection="studentList" item="item" index="index" open="" close="" separator=";">
@@ -1465,6 +1460,9 @@
         WHERE s.teacher_id_ = #{userId} AND s.subject_id_list_ IS NOT NULL AND s.subject_id_list_ != ''
         GROUP BY sb.id_
     </select>
+    <select id="queryByOperatingTag" resultType="java.lang.Integer">
+        SELECT user_id_ FROM student WHERE operating_tag_ = #{operatingTag}
+    </select>
     <sql id="queryStudentBasicInfoSql">
         <where>
             AND su.lock_flag_ = 0 AND su.del_flag_ = 0