浏览代码

会员调整

yuanliang 9 月之前
父节点
当前提交
656a860e66

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/HomeServiceImpl.java

@@ -141,6 +141,7 @@ public class HomeServiceImpl implements HomeService {
         List<HomeTotalStudent> totalList = baserMapper.totalStudent(query.getTimeType().getCode(), query);
         Integer registerNum = 0;
         Integer vipNum = 0;
+        Integer svipNum = 0;
         Integer practiceNum = 0;
         Integer videoNum = 0;
         Integer liveNum = 0;
@@ -151,6 +152,7 @@ public class HomeServiceImpl implements HomeService {
         for (HomeTotalStudent totalStudent : totalList) {
             totalStudent.setRegisterNum(null == totalStudent.getRegisterNum() ? 0 : totalStudent.getRegisterNum());
             totalStudent.setVipNum(null == totalStudent.getVipNum() ? 0 : totalStudent.getVipNum());
+            totalStudent.setSvipNum(null == totalStudent.getSvipNum() ? 0 : totalStudent.getSvipNum());
             totalStudent.setPracticeNum(null == totalStudent.getPracticeNum() ? 0 : totalStudent.getPracticeNum());
             totalStudent.setVideoNum(null == totalStudent.getVideoNum() ? 0 : totalStudent.getVideoNum());
             totalStudent.setLiveNum(null == totalStudent.getLiveNum() ? 0 : totalStudent.getLiveNum());
@@ -160,6 +162,7 @@ public class HomeServiceImpl implements HomeService {
 
             registerNum += totalStudent.getRegisterNum();
             vipNum += totalStudent.getVipNum();
+            svipNum += totalStudent.getSvipNum();
             practiceNum += totalStudent.getPracticeNum();
             videoNum += totalStudent.getVideoNum();
             liveNum += totalStudent.getLiveNum();
@@ -170,6 +173,7 @@ public class HomeServiceImpl implements HomeService {
         HomeTotalStudent total = new HomeTotalStudent();
         total.setRegisterNum(registerNum);
         total.setVipNum(vipNum);
+        total.setSvipNum(svipNum);
         total.setPracticeNum(practiceNum);
         total.setVideoNum(videoNum);
         total.setLiveNum(liveNum);

+ 3 - 3
cooleshow-user/user-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -268,8 +268,8 @@
         left join (
         select distinct user_id_ from user_bank_card where del_flag_ = 0 and user_id_ = #{userId}
         ) b on t.user_id_ = b.user_id_
-        left join vip_card_record vcr on t.user_id_ = vcr.user_id_ and cvr.client_type_ = 'TEACHER'
-        and vcr.efficient_flag_ = 1 and vcr.end_time_ >= now() and now() > vcr.start_time_ and (vcr.vip_type_ = 'VIP' or vcr.vip_type_ = 'SVIP')
+        left join vip_card_record vcr on t.user_id_ = vcr.user_id_ and vcr.client_type_ = 'TEACHER'
+        and vcr.efficient_flag_ = 1 and vcr.end_time_ >= now() and now() > vcr.start_time_ and (vcr.vip_type_ = 'VIP' or vcr.vip_type_ = 'SVIP') and vcr.client_type_ = 'TEACHER'
         where u.del_flag_ = 0 and t.user_id_ = #{userId}
     </select>
 
@@ -342,7 +342,7 @@
         u.gender_ AS gender,
         u.phone_ AS phone,
         u.birthdate_ AS birthdate,
-        (SELECT group_concat(name_) FROM `subject` WHERE find_in_set(id_,sr.subject_id_)) AS subjectName,
+        (SELECT group_concat(name_) FROM `subject` WHERE find_in_set(id_,sr.subject_id_)) AS subjectName
 <!--        if(sr.membership_start_time_ &lt;= now() and sr.membership_end_time_ &gt;= now(),1,0) AS isVip-->
         FROM student_star s
         LEFT JOIN sys_user u ON s.student_id_ = u.id_