瀏覽代碼

Merge remote-tracking branch 'origin/master'

周箭河 5 年之前
父節點
當前提交
7c976092ea

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupQueryInfo.java

@@ -23,6 +23,8 @@ public class VipGroupQueryInfo extends QueryInfo {
     private Integer educationalTeacherId;
 
     private Boolean hasEducationalTeacherId;
+    
+    private Integer userId;
 
     public Boolean getHasEducationalTeacherId() {
         return hasEducationalTeacherId;
@@ -87,4 +89,12 @@ public class VipGroupQueryInfo extends QueryInfo {
     public void setOrganId(String organId) {
         this.organId = organId;
     }
+
+	public Integer getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesReplyServiceImpl.java

@@ -287,7 +287,7 @@ public class ExtracurricularExercisesReplyServiceImpl extends BaseServiceImpl<Lo
 		LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
 
 		if(nowDate.getDayOfWeek()==DayOfWeek.MONDAY){
-			int lastWeekTodayUpdateNum = studentExtracurricularExercisesSituationDao.findLastWeekTodayUpdateNum(nowDate.toString());
+			int lastWeekTodayUpdateNum = studentExtracurricularExercisesSituationDao.findLastWeekTodayUpdateNum(nowDate.plusDays(-1).toString());
 			if(lastWeekTodayUpdateNum<=0){
 				nowDate = nowDate.plusDays(-1);
 			}

+ 11 - 1
mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

@@ -189,6 +189,9 @@
             <if test="educationalTeacherId!=null">
                 AND vg.educational_teacher_id_=#{educationalTeacherId}
             </if>
+            <if test="userId!=null">
+                AND cssp.user_id_ = #{userId}
+            </if>
         </where>
     </sql>
 
@@ -201,17 +204,24 @@
             vip_group vg
             LEFT JOIN sys_user su ON vg.user_id_=su.id_
             LEFT JOIN vip_group_activity vga ON vg.vip_group_activity_id_=vga.id_
+            left join course_schedule_student_payment cssp on cssp.music_group_id_ = vg.id_ and cssp.group_type_ = 'VIP'
         <include refid="vipGroupQueryCondition"/>
+        group by vg.id_
         ORDER BY vg.id_ DESC
         <include refid="global.limit"/>
 	</select>
 
     <select id="countVipGroupByOrgan" resultType="int">
+    	select count(*) from
+    	(
         SELECT
-        count(*)
+        count(distinct vg.id_)
         FROM
         vip_group vg
+        left join course_schedule_student_payment cssp on cssp.music_group_id_ = vg.id_ and cssp.group_type_ = 'VIP'
         <include refid="vipGroupQueryCondition"/>
+        GROUP BY vg.id_
+        ) t
     </select>
 
     <!-- 向数据库增加一条记录 -->