Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	mec-web/src/main/resources/bootstrap-test.properties
Joburgess 4 éve
szülő
commit
f18cccc8e4

+ 1 - 1
mec-auth/mec-auth-server/src/main/resources/bootstrap-test.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.114.1.200:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=02105743-16b8-46ab-87df-2aca0f3dbca3
+spring.cloud.nacos.config.namespace=f9d46b0a-9847-48ae-8e4b-216c7a3eb466
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

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

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import com.ym.mec.biz.dal.entity.Subject;
 import org.apache.ibatis.annotations.Param;
 
 import com.ym.mec.auth.api.entity.SysUser;
@@ -307,4 +308,12 @@ public interface StudentManageDao {
      * @return
      */
     int countPracticeGroupStudents(Map<String, Object> params);
+
+    /**
+     * 获取学生的声部
+     * @param userIds
+     * @return
+     */
+    List<Subject> getStudentSubject(@Param("userIds") Set<Integer> userIds);
+
 }

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -135,6 +135,7 @@ public class StudentManageServiceImpl implements StudentManageService {
         List<StudentListCourseDto> studentListCourseDtoList = studentManageDao.queryStudentRemianCourse(userIds);
         Map<Integer, StudentListCourseDto> StudentListCourseDtoMap = studentListCourseDtoList.stream().collect(Collectors.toMap(StudentListCourseDto::getUserId, studentListCourseDto -> studentListCourseDto));
 
+        //List<Subject> studentSubject = studentManageDao.getStudentSubject(userIds);
         StudentListCourseDto studentListCourseDto = null;
         for (StudentManageListDto dto : dataList) {
             studentListCourseDto = StudentListCourseDtoMap.get(dto.getUserId());
@@ -153,6 +154,10 @@ public class StudentManageServiceImpl implements StudentManageService {
                 dto.setHasCourse(YesOrNoEnum.NO);
                 dto.setHasPracticeCourse(YesOrNoEnum.NO);
             }
+//            for (Subject subject : studentSubject) {
+//                if(!subject.getId().equals(dto.getUserId())) continue;
+//                dto.setSubjectName(subject.getName());
+//            }
         }
 
         if (queryInfo.getIsExport()) {

+ 11 - 3
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -154,8 +154,7 @@
     <select id="findStudentsByOrganId" resultMap="studentManageListDto">
         SELECT o.`name_` organ_name_,s.`user_id_` ,su.`username_` ,su.`phone_` parents_phone_,su.`real_name_` ,su.`gender_` , su.organ_id_,
 		tu.`real_name_` teacher_name_,IF(s.service_tag_=2,0,s.service_tag_) service_tag_ ,s.`operating_tag_` , s.care_package_, s.come_on_package_, suca.`course_balance_` ,
-		sub.`name_` music_group_subject_ ,su.birthdate_,s.subject_id_list_,s.teacher_id_,
-		case when su.password_ is null then false else true end isActive_,s.is_new_user_,case when count(sut.user_id_) > 0 then 1 else 0 end is_signed_contract_
+		sub.`name_` music_group_subject_ ,su.birthdate_,s.subject_id_list_,s.teacher_id_,case when su.password_ is null then false else true end isActive_,s.is_new_user_,case when sut.user_id_ is null then 0 else 1 end is_signed_contract_
 		FROM `student` s LEFT JOIN `sys_user` su on s.`user_id_` = su.`id_`
 		LEFT JOIN `organization` o on o.`id_` = su.`organ_id_`
 		LEFT JOIN `sys_user` tu on tu.`id_` = s.`teacher_id_` 
@@ -163,7 +162,6 @@
 		LEFT JOIN `subject` sub on sub.id_ = s.`subject_id_list_`
 		left join sys_user_tsign sut on sut.user_id_ = s.user_id_
         <include refid="findStudentsByOrganIdSql"/>
-        group by s.user_id_
         ORDER BY su.create_time_ DESC
         <include refid="global.limit"/>
     </select>
@@ -903,4 +901,14 @@
             AND (su.id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
         </if>
     </select>
+
+    <select id="getStudentSubject" resultMap="com.ym.mec.biz.dal.dao.SubjectDao.Subject">
+        SELECT s.user_id_ id_ ,GROUP_CONCAT(sj.name_) name_ FROM student s
+        LEFT JOIN subject sj ON FIND_IN_SET(sj.id_,s.subject_id_list_)
+        WHERE s.user_id_ IN
+        <foreach collection="userIds" item="userId" open="(" close=")" separator=",">
+            #{userId}
+        </foreach>
+        GROUP BY s.user_id_
+    </select>
 </mapper>

+ 2 - 2
mec-eureka/src/main/resources/bootstrap-test.properties

@@ -1,9 +1,9 @@
 #\u6307\u5b9a\u5f00\u53d1\u73af\u5883
 #spring.profiles.active=dev
 #\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=47.96.85.100:8848
+spring.cloud.nacos.config.server-addr=47.114.1.200:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=02105743-16b8-46ab-87df-2aca0f3dbca3
+spring.cloud.nacos.config.namespace=f9d46b0a-9847-48ae-8e4b-216c7a3eb466
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-gateway/mec-gateway-web/src/main/resources/bootstrap-test.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.96.85.100:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=02105743-16b8-46ab-87df-2aca0f3dbca3
+spring.cloud.nacos.config.namespace=f9d46b0a-9847-48ae-8e4b-216c7a3eb466
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 2 - 2
mec-im/src/main/resources/bootstrap-test.properties

@@ -1,9 +1,9 @@
 #\u6307\u5b9a\u5f00\u53d1\u73af\u5883
 #spring.profiles.active=dev
 #\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=47.96.85.100:8848
+spring.cloud.nacos.config.server-addr=47.114.1.200:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=02105743-16b8-46ab-87df-2aca0f3dbca3
+spring.cloud.nacos.config.namespace=f9d46b0a-9847-48ae-8e4b-216c7a3eb466
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-student/src/main/resources/bootstrap-test.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.114.1.200:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=02105743-16b8-46ab-87df-2aca0f3dbca3
+spring.cloud.nacos.config.namespace=f9d46b0a-9847-48ae-8e4b-216c7a3eb466
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 2 - 2
mec-teacher/src/main/resources/bootstrap-test.properties

@@ -1,9 +1,9 @@
 #\u6307\u5b9a\u5f00\u53d1\u73af\u5883
 #spring.profiles.active=dev
 #\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=47.96.85.100:8848
+spring.cloud.nacos.config.server-addr=47.114.1.200:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=02105743-16b8-46ab-87df-2aca0f3dbca3
+spring.cloud.nacos.config.namespace=f9d46b0a-9847-48ae-8e4b-216c7a3eb466
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 2 - 2
mec-web/src/main/resources/bootstrap-test.properties

@@ -1,9 +1,9 @@
 #\u6307\u5b9a\u5f00\u53d1\u73af\u5883
 #spring.profiles.active=dev
 #\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=47.114.1.200
+spring.cloud.nacos.config.server-addr=47.114.1.200:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=f753d9d9-4bb2-4df6-a483-da9e169617c4
+spring.cloud.nacos.config.namespace=f9d46b0a-9847-48ae-8e4b-216c7a3eb466
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}