zouxuan 5 年之前
父節點
當前提交
3144f72f90

+ 1 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -68,7 +68,7 @@ public class UserController extends BaseController {
 	public Object add(SysUser sysUser) {
 //		sysUser.setPassword(new BCryptPasswordEncoder().encode(sysUser.getPassword()));
 		sysUserService.insert(sysUser);
-		return succeed();
+		return succeed(sysUser.getId());
 	}
 
 	@ApiOperation(value = "设置密码")

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderDao.java

@@ -3,6 +3,8 @@ package com.ym.mec.biz.dal.dao;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
 import com.ym.mec.common.dal.BaseDAO;
 
+import java.util.List;
+
 public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPaymentCalender> {
 
 
@@ -11,4 +13,11 @@ public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPa
      * @param musicGroupId
      */
     void delByGroupId(String musicGroupId);
+
+    /**
+     * 根据乐团编号获取乐团缴费日历
+     * @param musicGroupId
+     * @return
+     */
+    List<MusicGroupPaymentCalender> findByMusicGroupId(String musicGroupId);
 }

+ 10 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service.impl;
 
 import com.ym.mec.biz.dal.dao.ClassGroupDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
 import com.ym.mec.biz.dal.dao.TeacherDao;
 import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.*;
@@ -12,14 +13,14 @@ import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.collection.MapUtil;
-
-import io.swagger.annotations.ApiImplicitParams;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
-import java.time.*;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.*;
 
 @Service
@@ -30,6 +31,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     @Autowired
     private TeacherDao teacherDao;
     @Autowired
+    private MusicGroupPaymentCalenderDao musicGroupPaymentCalenderDao;
+    @Autowired
     private ClassGroupRelationService classGroupRelationService;
     @Autowired
     private ClassGroupStudentMapperService classGroupStudentMapperService;
@@ -326,7 +329,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         List<CourseListDto> courseListDtos = classGroupDao.queryCoursePage(userId);
         courseListDtos.forEach(e->{
             if("VIP".equals(e.getTeachMode())){
-                classGroupDao.findVipStuNames(e.getMusicGroupId());
+                e.setStudentNames(classGroupDao.findVipStuNames(e.getMusicGroupId()));
+            }else {
+                List<MusicGroupPaymentCalender> musicGroupPaymentCalenders = musicGroupPaymentCalenderDao.findByMusicGroupId(e.getMusicGroupId());
+
             }
         });
         return classGroupDao.queryCoursePage(userId);

+ 5 - 7
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -257,14 +257,12 @@
     </select>
 
     <resultMap type="com.ym.mec.biz.dal.dto.CourseListDto" id="CourseListDto">
-        <result column="id_" property="musicGroupName"/>
+        <result column="music_group_name_" property="musicGroupName"/>
         <result column="music_group_id_" property="musicGroupId"/>
-        <result column="subject_id_list_" property="teachMode"/>
-        <result column="name_" property="totalClassTimes"/>
-        <result column="student_num_" property="currentClassTimes"/>
-        <result column="create_time_" property="studentNames"/>
-        <result column="update_time_" property="teacherName"/>
-        <result column="type_" property="address"/>
+        <result column="type_" property="teachMode"/>
+        <result column="total_class_times_" property="totalClassTimes"/>
+        <result column="current_class_times_" property="currentClassTimes"/>
+        <result column="address_" property="address"/>
     </resultMap>
     <select id="queryCoursePage" resultMap="CourseListDto">
         SELECT * FROM (

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

@@ -72,4 +72,7 @@
     <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM music_group_payment_calender
 	</select>
+    <select id="findByMusicGroupId" resultMap="MusicGroupPaymentCalender">
+        SELECT * FROM music_group_payment_calender mgpc WHERE music_group_id_ = #{musicGroupId}
+    </select>
 </mapper>