diff --git a/src/main/java/com/msdw/tms/controller/SysRoleController.java b/src/main/java/com/msdw/tms/controller/SysRoleController.java deleted file mode 100644 index 76cef81..0000000 --- a/src/main/java/com/msdw/tms/controller/SysRoleController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.msdw.tms.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; - -/** - *
- * 用户角色表 前端控制器 - *
- * - * @author Qyq - * @since 2021-02-24 - */ -@RestController -@RequestMapping("/sys-role") -public class SysRoleController { - -} diff --git a/src/main/java/com/msdw/tms/controller/SysRolePermissionController.java b/src/main/java/com/msdw/tms/controller/SysRolePermissionController.java deleted file mode 100644 index c678b79..0000000 --- a/src/main/java/com/msdw/tms/controller/SysRolePermissionController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.msdw.tms.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; - -/** - *- * 角色权限中间表 前端控制器 - *
- * - * @author Qyq - * @since 2021-02-24 - */ -@RestController -@RequestMapping("/sys-role-permission") -public class SysRolePermissionController { - -} diff --git a/src/main/java/com/msdw/tms/controller/SysUserRoleController.java b/src/main/java/com/msdw/tms/controller/SysUserRoleController.java deleted file mode 100644 index fb47650..0000000 --- a/src/main/java/com/msdw/tms/controller/SysUserRoleController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.msdw.tms.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; - -/** - *- * 用户角色中间表 前端控制器 - *
- * - * @author Qyq - * @since 2021-02-24 - */ -@RestController -@RequestMapping("/sys-user-role") -public class SysUserRoleController { - -} diff --git a/src/main/java/com/msdw/tms/controller/SystemSettingController.java b/src/main/java/com/msdw/tms/controller/SystemSettingController.java index 1a9989c..93331e6 100644 --- a/src/main/java/com/msdw/tms/controller/SystemSettingController.java +++ b/src/main/java/com/msdw/tms/controller/SystemSettingController.java @@ -154,4 +154,15 @@ public class SystemSettingController implements SystemSetttingApi { R result = systemSetttingService.queryAccount(account,schoolId); return result; } + + /** + * 重置密码 + * @param userId + * @return + */ + @GetMapping("/resetPwd") + public R resetPwd(@RequestParam Integer userId,String newPwd){ + R r = systemSetttingService.resetPwd(userId,newPwd); + return r; + } } diff --git a/src/main/java/com/msdw/tms/service/SystemSetttingService.java b/src/main/java/com/msdw/tms/service/SystemSetttingService.java index 6bd9838..7b0d6e6 100644 --- a/src/main/java/com/msdw/tms/service/SystemSetttingService.java +++ b/src/main/java/com/msdw/tms/service/SystemSetttingService.java @@ -34,4 +34,6 @@ public interface SystemSetttingService { void downloadFiles(HttpServletResponse response) throws IOException; R queryAccount(String account,Integer schoolId); + + R resetPwd(Integer userId,String newPwd); } diff --git a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java index 879d031..0c7db4e 100644 --- a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java @@ -2,6 +2,7 @@ package com.msdw.tms.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -497,4 +498,18 @@ public class SystemSettingServiceImpl implements SystemSetttingService { } return R.ok(); } + + @Override + @Transactional + public R resetPwd(Integer userId,String newPwd) { + UserInfoEntity user = new UserInfoEntity(); + user.setPassword(newPwd); + int count = userInfoDao.update(user, new QueryWrapper