liujc 1 年之前
父节点
当前提交
c12f0459e5

+ 70 - 70
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,73 @@
+POST http://127.0.0.1:8005/schoolStaff/updateAccount
+Authorization: bearer 6882e681-2f9a-4f8f-aee1-79b1e42de850
+Content-Type: application/json
+Content-Length: 71
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{"coopId":19,"phone":"19900990111","staffId":1839,"userType":"TEACHER"}
+
+<> 2023-05-30T145725.200.json
+
+###
+
+POST http://127.0.0.1:8005/schoolStaff/updateAccount
+Authorization: bearer 6882e681-2f9a-4f8f-aee1-79b1e42de850
+Content-Type: application/json
+Content-Length: 71
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{"coopId":16,"phone":"19900990111","staffId":1820,"userType":"TEACHER"}
+
+<> 2023-05-30T145417.200.json
+
+###
+
+POST http://127.0.0.1:8005/schoolStaff/updateAccount
+Authorization: bearer 6882e681-2f9a-4f8f-aee1-79b1e42de850
+Content-Type: application/json
+Content-Length: 71
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{"coopId":16,"phone":"19900990111","staffId":1837,"userType":"TEACHER"}
+
+<> 2023-05-30T145329.200.json
+
+###
+
+POST http://127.0.0.1:8005/schoolStaff/updateAccount
+Authorization: bearer 6882e681-2f9a-4f8f-aee1-79b1e42de850
+Content-Type: application/json
+Content-Length: 71
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{"coopId":19,"phone":"19900990114","staffId":1837,"userType":"TEACHER"}
+
+<> 2023-05-30T144905.200.json
+
+###
+
+POST http://127.0.0.1:8005/schoolStaff/updateAccount
+Authorization: bearer 9e3a8ca3-b369-485a-aae0-5cdf17d46e61
+Content-Type: application/json
+Content-Length: 71
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{"coopId":19,"phone":"19900990114","staffId":1837,"userType":"TEACHER"}
+
+<> 2023-05-30T144848.200.json
+
+###
+
 POST http://127.0.0.1:8005/open/school/staffSave
 Content-Type: application/json
 coopId: 19
@@ -559,73 +629,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T190114.200.json
-
-###
-
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T185307.200.json
-
-###
-
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T184904.200.json
-
-###
-
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T184725.200.json
-
-###
-
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T184519.200.json
-
-###
-

+ 6 - 3
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/TokenController.java

@@ -177,10 +177,13 @@ public class TokenController extends BaseController {
 
 		Collection<OAuth2AccessToken> list = tokenStore.findTokensByClientIdAndUserName(clientId, SecurityConstants.PHONE_PRINCIPAL_PREFIX + phone);
 
-		if (list == null || list.size() == 0) {
-			list = tokenStore.findTokensByClientIdAndUserName(clientId, SecurityConstants.USERNAME_PRINCIPAL_PREFIX + phone);
+        Collection<OAuth2AccessToken> tokensByClientIdAndUserName = tokenStore.findTokensByClientIdAndUserName(clientId, SecurityConstants.USERNAME_PRINCIPAL_PREFIX + phone);
+        if (list == null || list.size() == 0) {
+			list = tokensByClientIdAndUserName;
 		} else {
-			list.addAll(tokenStore.findTokensByClientIdAndUserName(clientId, SecurityConstants.USERNAME_PRINCIPAL_PREFIX + phone));
+            if (tokensByClientIdAndUserName != null && tokensByClientIdAndUserName.size() > 0) {
+                list.addAll(tokensByClientIdAndUserName);
+            }
 		}
 		if (list != null) {
 			for (OAuth2AccessToken accessToken : list) {

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseSchedule.java

@@ -218,6 +218,15 @@ public class CourseSchedule  extends BaseEntity{
     @ApiModelProperty("教学点")
     private String teachingPoint;
 
+
+    public String getTeachingPoint() {
+        return teachingPoint;
+    }
+
+    public void setTeachingPoint(String teachingPoint) {
+        this.teachingPoint = teachingPoint;
+    }
+
     public SimpleDateFormat getSimpleDateFormat() {
         return simpleDateFormat;
     }

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/EFriendRoleType.java

@@ -25,6 +25,7 @@ public enum EFriendRoleType implements BaseEnum<Integer, EFriendRoleType> {
     }
 
     public static EFriendRoleType getByName(String name) {
+        if (name == null) return STUDENT;
         switch (name) {
             case "SCHOOLMASTER":
                 return SCHOOLMASTER;

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/CoursePatrolEvaluationWrapper.java

@@ -87,6 +87,9 @@ public class CoursePatrolEvaluationWrapper {
         // 必须存在巡堂
         private Boolean patrolFlag;
 
+        @ApiModelProperty(value = "课程状态", required = false)
+        private CourseStatusEnum status;
+
         public String getKeyword() {
             return Optional.ofNullable(keyword).filter(StringUtils::isNotBlank).orElse(null);
         }

+ 6 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/TeachingPointWrapper.java

@@ -49,10 +49,15 @@ public class TeachingPointWrapper {
         @ApiModelProperty("教学点")
         private String teachingPoint;
 
-        @NotNull(message = "课程ID不能为空")
+//        @NotNull(message = "课程ID不能为空")
         @ApiModelProperty("班级ID")
         private Integer classGroupId;
 
+
+//        @NotNull(message = "课程ID不能为空")
+        @ApiModelProperty("课程ID")
+        private Integer courseScheduleId;
+
     }
 
 

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java

@@ -763,4 +763,10 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
      * @param endTime 结束时间
      */
     List<CourseSchedule> getByTeacherAndTime(Integer teacherId, Date startTime, Date endTime);
+
+    /**
+     * 设置课程的场地
+     *
+     */
+    Boolean teachingPointCourse(TeachingPointWrapper.TeachingPoint teachingPoint);
 }

+ 16 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -5599,6 +5599,22 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     }
 
 
+    /**
+     * 设置课程的场地
+     *
+     * @param teachingPoint
+     */
+    @Override
+    public Boolean teachingPointCourse(TeachingPointWrapper.TeachingPoint teachingPoint) {
+        CourseSchedule courseSchedule = get(Long.valueOf(teachingPoint.getCourseScheduleId()));
+        if (courseSchedule == null) {
+            throw new BizException("课程不存在");
+        }
+        courseSchedule.setTeachingPoint(teachingPoint.getTeachingPoint());
+
+        courseScheduleDao.update(courseSchedule);
+        return true;
+    }
 
     @Override
 	public List<CourseStudentDto> queryCourseStudentList(Long courseId) {

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

@@ -188,6 +188,7 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
         for (ImGroupMemberDto imGroupMemberDto : imGroupMemberDtos) {
             imGroupMemberDto.setType(EFriendRoleType.getByName(imGroupMemberDto.getRoleType()).name());
             imGroupMemberDto.getUser().setUsername(imGroupMemberDto.getGroupNickname());
+            imGroupMemberDto.setNickname(imGroupMemberDto.getGroupNickname());
         }
         return imGroupMemberDtos;
     }
@@ -337,7 +338,8 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
         List<ImGroup> groups = imGroups.stream().filter(imGroup -> imGroup.getMemberNum().equals(1)).collect(Collectors.toList());
         for (ImGroup group : groups) {
             try {
-                imPluginService.groupDismiss(group.getId(), new ArrayList<>());
+                ImGroupMemberWrapper.ImGroupMember build = ImGroupMemberWrapper.ImGroupMember.builder().userId(userId).build();
+                imPluginService.groupDismiss(group.getId(), Lists.newArrayList(build));
             } catch (Exception e) {
                 log.error("解散群组失败{},{}", userId, group.getId(), e);
             }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SchoolStaffServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
+import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.auth.api.enums.SysUserType;
 import com.ym.mec.auth.api.enums.YesOrNoEnum;
@@ -70,6 +71,9 @@ public class SchoolStaffServiceImpl extends ServiceImpl<SchoolStaffMapper, Schoo
     @Autowired
     private ImUserFriendDao imUserFriendDao;
 
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
 
     @Autowired
     private RealnameAuthenticationPluginContext realnameAuthenticationPluginContext;
@@ -626,6 +630,7 @@ public class SchoolStaffServiceImpl extends ServiceImpl<SchoolStaffMapper, Schoo
         //2)如果删除的是最后一个群成员,那么解散群
         imGroupService.quitSchoolGroup(schoolStaff.getUserId());
 
+        sysUserFeignService.exitByPhone("education", sysUserService.queryUserById(schoolStaff.getUserId().intValue()).getPhone());
 
         return true;
 
@@ -775,6 +780,7 @@ public class SchoolStaffServiceImpl extends ServiceImpl<SchoolStaffMapper, Schoo
             }
             teacherDao.updateUser(sysUser);
         }
+        sysUserFeignService.exitByPhone("education", sysUser.getPhone());
         return super.updateById(entity);
     }
 }

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

@@ -72,6 +72,9 @@
             <if test="param.id != null">
                 and t.id_ = #{param.id}
             </if>
+            <if test="param.status != null">
+                and cs.status_ = #{param.status}
+            </if>
         </where>
         order by cs.start_class_time_, cs.id_
     </select>

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -220,7 +220,7 @@
         INSERT INTO course_schedule
         (id_,group_type_,music_group_id_,class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,
         teacher_id_,actual_teacher_id_,type_,name_,teach_mode_,student_num_,leave_student_num_,
-        schoole_id_,is_lock_,note_,teaching_content_,organ_id_,member_flag_,pre_course_flag_,valid_end_time_,valid_start_time_,tenant_id_)
+        schoole_id_,is_lock_,note_,teaching_content_,organ_id_,member_flag_,pre_course_flag_,valid_end_time_,valid_start_time_,tenant_id_,teaching_point_)
         VALUE
         <foreach collection="list" item="course" separator=",">
             (#{course.id},#{course.groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{course.musicGroupId},
@@ -229,7 +229,7 @@
             #{course.teacherId},#{course.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             #{course.name},#{course.teachMode,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{course.studentNum},
             #{course.leaveStudentNum},#{course.schoolId},#{course.isLock},#{course.note},#{course.teachingContent},
-            #{course.organId},#{course.memberFlag},#{course.preCourseFlag},#{course.validEndTime},#{course.validStartTime},#{course.tenantId})
+            #{course.organId},#{course.memberFlag},#{course.preCourseFlag},#{course.validEndTime},#{course.validStartTime},#{course.tenantId},#{course.teachingPoint})
         </foreach>
     </insert>
 

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java

@@ -475,4 +475,12 @@ public class ClassGroupController extends BaseController {
     public HttpResponseResult<Boolean> teachingPoint(@Validated @RequestBody TeachingPointWrapper.TeachingPoint teachingPoint) {
         return succeed(courseScheduleService.teachingPoint(teachingPoint));
     }
+
+
+
+    @ApiOperation(value = "学校端-设置课程场地")
+    @PostMapping("/teachingPointCourseSchedule")
+    public HttpResponseResult<Boolean> teachingPointCourse(@Validated @RequestBody TeachingPointWrapper.TeachingPoint teachingPoint) {
+        return succeed(courseScheduleService.teachingPointCourse(teachingPoint));
+    }
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/education/ImGroupNoticeController.java

@@ -31,7 +31,7 @@ public class ImGroupNoticeController extends BaseController {
 
     @ApiOperation(value = "新增")
     @RequestMapping("/add")
-    @PreAuthorize("@pcs.hasPermissions('imGroupNotice/add','system')")
+//    @PreAuthorize("@pcs.hasPermissions('imGroupNotice/add','system')")
     public Object add(ImGroupNotice imGroupNotice ) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if(sysUser == null){