Browse Source

Merge remote-tracking branch 'origin/master_saas' into master_saas

zouxuan 2 years ago
parent
commit
0836640248

+ 196 - 178
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,199 @@
+GET http://127.0.0.1:8005/open/sysConfig/queryByParamName?paramName=open_coop_id
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-02T093159.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+coopId: 19
+tenantId: 1
+Content-Length: 127
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "schoolId": 23,
+  "userType": "ORCHESTRA_LEADER",
+  "username": "小石",
+  "mobile": "15599993302",
+  "smsCode" : 666666
+}
+
+<> 2023-06-01T212120.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+coopId: 19
+tenantId: 1
+Content-Length: 130
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "schoolId": 23,
+  "userType": "ORCHESTRA_LEADER",
+  "username": "测试113",
+  "mobile": "19900990155",
+  "smsCode" : 666666
+}
+
+<> 2023-06-01T205245.200.json
+
+###
+
+POST http://127.0.0.1:8005/schoolStaff/remove?id=1856
+Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
+tenantId: 1
+Content-Length: 0
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T204922.200.json
+
+###
+
+POST http://127.0.0.1:8005/schoolStaff/remove?id=1040
+Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
+tenantId: 1
+Content-Length: 0
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T204556.200.json
+
+###
+
+POST http://127.0.0.1:8005/schoolStaff/remove?id=1040
+Authorization: bearer 3f804d4e-b7f0-41ad-8dbf-119a0c54becc
+tenantId: 1
+Content-Length: 0
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T204521.200.json
+
+###
+
+GET http://127.0.0.1:9001/studentOrder/setSuccessStatus
+Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T203947.200.json
+
+###
+
+GET http://127.0.0.1:9001/studentOrder/setSuccessStatus
+Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T203823.200.json
+
+###
+
+GET http://127.0.0.1:9001/studentOrder/setSuccessStatus
+Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T202754.200.json
+
+###
+
+GET http://127.0.0.1:9001/studentOrder/setSuccessStatus
+Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T202246.200.json
+
+###
+
+GET http://127.0.0.1:9001/studentOrder/setSuccessStatus
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-01T202120.200.json
+
+###
+
+POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
+Authorization: bearer cc492cd7-4ba9-413c-a7e9-d9d9b44f6d07
+Content-Type: application/json
+Content-Length: 144
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "宁老师",
+//  "groupType": "SCHOOL",
+  "roleType": "STUDENT",
+  "musicGroupId": "23050514590600001",
+//  "lockFlag": false
+}
+
+<> 2023-06-01T195106.200.json
+
+###
+
+POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
+Authorization: bearer cc492cd7-4ba9-413c-a7e9-d9d9b44f6d07
+Content-Type: application/json
+Content-Length: 154
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "宁老师",
+//  "groupType": "SCHOOL",
+  "roleType": "ORCHESTRA_TEACHER",
+  "musicGroupId": "23050514590600001",
+//  "lockFlag": false
+}
+
+<> 2023-06-01T195052.200.json
+
+###
+
+POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
+Authorization: bearer cc492cd7-4ba9-413c-a7e9-d9d9b44f6d07
+Content-Type: application/json
+Content-Length: 154
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "宁老师",
+//  "groupType": "SCHOOL",
+  "roleType": "ORCHESTRA_MANAGER",
+  "musicGroupId": "23050514590600001",
+//  "lockFlag": false
+}
+
+<> 2023-06-01T195028.200.json
+
+###
+
 POST http://127.0.0.1:8005/imGroup/schoolQueryGroupList
 Authorization: bearer 0fde0d90-4ffd-4d34-990c-eca290471d6b
 Content-Type: application/json
@@ -648,181 +844,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-GET http://127.0.0.1:8005/imGroup/queryGroupMemberList?imGroupId=62
-Content-Type: application/json
-Authorization: bearer 9e3a8ca3-b369-485a-aae0-5cdf17d46e61
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-29T182845.200.json
-
-###
-
-POST http://127.0.0.1:8005/coursePatrolEvaluation/pageStat
-Authorization: bearer 9e3a8ca3-b369-485a-aae0-5cdf17d46e61
-Content-Type: application/json
-coopId: 12
-Content-Length: 58
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "startTime": "2023-01-01",
-  "endTime": "2024-04-04"
-}
-
-<> 2023-05-29T182738.200.json
-
-###
-
-POST http://127.0.0.1:8005/coursePatrolEvaluation/pageStat
-Authorization: bearer 703c9711-ca6d-45c3-9583-34d7b9d86705
-Content-Type: application/json
-coopId: 12
-Content-Length: 58
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "startTime": "2023-01-01",
-  "endTime": "2024-04-04"
-}
-
-<> 2023-05-29T182713.200.json
-
-###
-
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer 66862b1d-938b-467e-b7c9-65f77f0e7347
-tenantId: 1
-coopId: 14
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-25T181738.200.json
-
-###
-
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer 66862b1d-938b-467e-b7c9-65f77f0e7347
-tenantId: 1
-coopId: 14
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-25T181606.200.json
-
-###
-
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer 66862b1d-938b-467e-b7c9-65f77f0e7347
-tenantId: 1
-coopId: 14
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-25T180935.200.json
-
-###
-
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer 66862b1d-938b-467e-b7c9-65f77f0e7347
-tenantId: 1
-coopId: 14
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-25T180923.200.json
-
-###
-
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer 3f804d4e-b7f0-41ad-8dbf-119a0c54becc
-tenantId: 1
-coopId: 1
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-25T180355.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 07bef4ad-6d9e-46e0-8fd3-c24a2fd11332
-Content-Type: application/json
-Content-Length: 155
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-//  "musicGroupId": "23042416211000001",
-//  "roleType": "ORCHESTRA_TEACHER"
-  "lockFlag": false
-}
-
-<> 2023-05-24T195305.200.json
-
-###
-
-POST https://test.dayaedu.com/api-auth/smsLogin?phone=19900990033&clientId=school&clientSecret=school&smsCode=666666
-Content-Length: 0
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-24T194548.200.json
-
-###
-
-GET http://127.0.0.1:8005/imGroup/queryGroupMemberList?imGroupId=62
-Content-Type: application/json
-Authorization: bearer 387ba749-39ac-4a02-a183-00cf8ac29f10
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-24T193935.200.json
-
-###
-
-GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=false
-Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-19T175057.200.json
-
-###
-
-GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=true
-Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-19T175049.200.json
-
-###
-
-GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=false
-Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-05-19T175037.200.json
-
-###
-

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupTeacherMapperDao.java

@@ -168,4 +168,6 @@ public interface ClassGroupTeacherMapperDao extends BaseDAO<Long, ClassGroupTeac
      * @param musicGroupIds 乐团编号
      */
     List<ClassGroupTeacherMapper> findAllByMusicGroupIds(@Param("musicGroupIds") List<String> musicGroupIds);
+
+    List<ClassGroupTeacherMapper> getByMusicGroupId(@Param("musicGroupId") String musicGroupId);
 }

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentManageService.java

@@ -133,6 +133,7 @@ public interface StudentManageService {
      * @param sysUser
      */
     void updateUser(SysUser sysUser);
+    void updateSchoolUser(SysUser sysUser);
 
     /**
      * 获取vip课班级列表

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

@@ -388,7 +388,7 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
             imGroup.setId(IdWorker.getIdStr());
             imGroup.setName("教学团队衔接群");
             imGroup.setIntroduce(imGroup.getName());
-            imGroup.setMemo(cooperationOrgan.getName());
+            imGroup.setMemo(imGroup.getName());
             imGroup.setMemberNum(0);
             imGroup.setImg(sysConfigService.findByParamName(SysConfigService.SCHOOL_IM_GROUP_IMG).getParanValue());
             imGroup.setType(ImGroup.GroupTypeEnum.SCHOOL.getCode());

+ 19 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImUserFriendServiceImpl.java

@@ -292,13 +292,27 @@ public class ImUserFriendServiceImpl extends BaseServiceImpl<Long, ImUserFriend>
     public List<ImUserFriendDto> queryFriendListByUserId(ImGroupWrapper.ImQuery query) {
 
         List<Integer> userIds = new ArrayList<>();
-        if (StringUtils.isNotBlank(query.getMusicGroupId()) && StringUtils.isNotBlank(query.getRoleType())) {
-            if (query.getRoleType().equals(EFriendRoleType.ORCHESTRA_MANAGER.name())) {
-                MusicGroup musicGroup = musicGroupDao.get(query.getMusicGroupId());
-                if (musicGroup != null) {
-                    userIds.add(musicGroup.getEducationalTeacherId());
+        if (StringUtils.isNotBlank(query.getMusicGroupId()) ) {
+            MusicGroup musicGroup = musicGroupDao.get(query.getMusicGroupId());
+
+            List<Integer> teacherIds = new ArrayList<>();
+            List<Integer> studentIds = new ArrayList<>();
+            List<ClassGroupTeacherMapper> classGroupTeacherMappers = classGroupTeacherMapperDao.getByMusicGroupId(query.getMusicGroupId());
+            if (CollectionUtils.isNotEmpty(classGroupTeacherMappers)) {
+                for (ClassGroupTeacherMapper classGroupTeacherMapper : classGroupTeacherMappers) {
+                    teacherIds.add(classGroupTeacherMapper.getUserId());
+                }
+            }
+
+            List<StudentRegistration> musicGroupStu = studentRegistrationDao.getMusicGroupStu(query.getMusicGroupId());
+            if (CollectionUtils.isNotEmpty(musicGroupStu)) {
+                for (StudentRegistration studentRegistration : musicGroupStu) {
+                    studentIds.add(studentRegistration.getUserId());
                 }
             }
+            userIds.add(musicGroup.getEducationalTeacherId());
+            userIds.addAll(teacherIds);
+            userIds.addAll(studentIds);
 
         }
         if (CollectionUtils.isNotEmpty(userIds)) {

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

@@ -738,6 +738,13 @@ public class SchoolStaffServiceImpl extends ServiceImpl<SchoolStaffMapper, Schoo
 
             schoolStaff.setUserType(schoolStaffUpdate.getUserType());
             this.updateById(schoolStaff);
+
+            // 解除im好友关联
+            imUserFriendDao.deleteByUserIdAndFriendId(schoolStaff.getUserId());
+
+            // 创建学校员工IM好友
+            imUserFriendService.refreshSchoolStaffFriend(schoolStaff.getSchoolId().intValue());
+
             if (schoolStaffUpdate.getUserType().equals(ESchoolStaffType.ORCHESTRA_LEADER)) {
                 addMusicGroup(SchoolStaffWrapper.SchoolStaff.builder()
                         .schoolId(schoolStaff.getSchoolId())

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

@@ -109,6 +109,9 @@ public class StudentManageServiceImpl implements StudentManageService {
     @Autowired
     private StudentTeacherMapperDao studentTeacherMapperDao;
 
+    @Autowired
+    private ImGroupDao imGroupDao;
+
     @Override
     public PageInfo<StudentManageListDto> findStudentsByOrganId(StudentManageQueryInfo queryInfo) {
         PageInfo<StudentManageListDto> pageInfo = new PageInfo<StudentManageListDto>(queryInfo.getPage(), queryInfo.getRows());
@@ -743,6 +746,18 @@ public class StudentManageServiceImpl implements StudentManageService {
         }
     }
 
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void updateSchoolUser(SysUser sysUser) {
+        studentManageDao.updateUser(sysUser);
+        if (StringUtils.isNotBlank(sysUser.getUsername())) {
+            imGroupDao.updateNickname(sysUser.getId(), sysUser.getUsername());
+            imGroupDao.updateUserFriendNickname(sysUser.getId(), sysUser.getUsername());
+            imFeignService.update(new ImUserModel(sysUser.getId().toString(), sysUser.getUsername(), sysUser.getAvatar()));
+        }
+    }
+
     @Override
     public PageInfo<StudentManageVipGroupClassDto> findStudentVipGroupClass(StudentManageVipClassQueryInfo queryInfo) {
         PageInfo<StudentManageVipGroupClassDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());

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

@@ -70,6 +70,8 @@ public class StudentPaymentOrderDetailServiceImpl extends BaseServiceImpl<Long,
     @Autowired
     private MusicGroupPaymentCalenderMemberDao musicGroupPaymentCalenderMemberDao;
 
+    @Autowired
+    private ImUserFriendService imUserFriendService;
     @Override
     public BaseDAO<Long, StudentPaymentOrderDetail> getDAO() {
         return studentPaymentOrderDetailDao;
@@ -675,6 +677,9 @@ public class StudentPaymentOrderDetailServiceImpl extends BaseServiceImpl<Long,
         }
         studentRegistrationDao.update(studentRegistration);
 
+        // 刷新im
+
+        imUserFriendService.refreshGroupImUserFriend(studentRegistration.getMusicGroupId(), null);
         //缴费项目详情
         MusicGroupPaymentCalenderDetail paymentCalenderDetail = musicGroupPaymentCalenderDetailService.addCalenderDetail(studentPaymentOrder);
 

+ 4 - 0
mec-biz/src/main/resources/config/mybatis/ClassGroupTeacherMapperMapper.xml

@@ -256,4 +256,8 @@
             #{musicGroupId}
         </foreach>
     </select>
+
+    <select id="getByMusicGroupId" resultMap="ClassGroupTeacherMapper">
+        SELECT * FROM class_group_teacher_mapper WHERE music_group_id_=#{musicGroupId}
+    </select>
 </mapper>

+ 0 - 4
mec-biz/src/main/resources/config/mybatis/ImUserFriendMapper.xml

@@ -177,10 +177,6 @@
         <if test="param.keyword != null and param.keyword != ''">
             and (iuf.friend_nickname_ like concat('%',#{param.keyword},'%'))
         </if>
-
-        <if test="param.musicGroupId != null and param.musicGroupId != ''">
-            and cgs.music_group_id_ = #{param.musicGroupId}
-        </if>
         <if test="param.roleType != null and param.roleType != ''">
             and iuf.role_type_ = #{param.roleType}
         </if>

+ 32 - 0
mec-web/src/main/java/com/ym/mec/web/controller/open/OpenSysConfigController.java

@@ -0,0 +1,32 @@
+package com.ym.mec.web.controller.open;
+
+import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/** 
+ * 系统配置控制层
+ */
+@RestController
+@Api(tags = "系统参数设置")
+@RequestMapping(value = "open/sysConfig")
+public class OpenSysConfigController extends BaseController {
+
+	@Autowired
+	private SysConfigService sysConfigService;
+
+	@ApiOperation(value = "查询参数")
+	@GetMapping(value = "queryByParamName")
+	public Object queryByParamName(String paramName) {
+		if(StringUtils.isBlank(paramName)){
+			return failed("参数不能为空");
+		}
+		return succeed(sysConfigService.findByParamName(paramName));
+	}
+}

+ 21 - 4
mec-web/src/main/java/com/ym/mec/web/controller/school/SchoolStaffController.java

@@ -10,10 +10,7 @@ import com.ym.mec.biz.dal.entity.CooperationOrgan;
 import com.ym.mec.biz.dal.entity.SchoolStaff;
 import com.ym.mec.biz.dal.enums.ParamEnum;
 import com.ym.mec.biz.dal.wrapper.SchoolStaffWrapper;
-import com.ym.mec.biz.service.CooperationOrganService;
-import com.ym.mec.biz.service.EmployeeService;
-import com.ym.mec.biz.service.OrganizationService;
-import com.ym.mec.biz.service.SchoolStaffService;
+import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
@@ -38,6 +35,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Objects;
 
@@ -61,6 +59,12 @@ public class SchoolStaffController extends BaseController {
     @Autowired
     private EmployeeService employeeService;
 
+    @Autowired
+    private SysUserService sysUserService;
+
+    @Autowired
+    private StudentManageService studentManageService;
+
 	@ApiOperation(value = "详情", notes = "学校员工-根据详情ID查询单条, 传入id")
     @PreAuthorize("@pcs.hasPermissions('schoolStaff/detail')")
     @GetMapping("/detail/{id}")
@@ -69,6 +73,19 @@ public class SchoolStaffController extends BaseController {
 
         return succeed(schoolStaffService.detail(id));
 	}
+
+
+
+    @ApiOperation(value = "修改用户")
+    @PostMapping("/updateSchoolUser")
+    public HttpResponseResult updateSchoolUser(SysUser sysUser) {
+        SysUser user = sysUserService.getUser();
+        Date date = new Date();
+        sysUser.setId(user.getId());
+        sysUser.setUpdateTime(date);
+        studentManageService.updateSchoolUser(sysUser);
+        return succeed();
+    }
     
     @ApiOperation(value = "查询分页", notes = "学校员工- 传入 SchoolStaffWrapper.SchoolStaffQuery") 
     @PreAuthorize("@pcs.hasPermissions('schoolStaff/page')")