| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.Custom; |
| | | import com.yuanchu.mom.pojo.Custom; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.CustomService; |
| | |
| | | map.put("token", jwtToken); |
| | | map.put("reToken", jwtReToken); |
| | | map.put("name", user.getName()); |
| | | map.put("userId", user.getId()); |
| | | map.put("power", powerService.selectPowerByRoleId(user.getRoleId())); |
| | | return Result.success("登录成功", map); |
| | | } |
| | |
| | | |
| | | @ValueClassify("用户管理") |
| | | @ApiOperation(value = "获取用户列表") |
| | | @PostMapping("/selectUserList2") |
| | | public Result selectUserList2(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | UserPageDto user = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), UserPageDto.class); |
| | | return Result.success(userService.selectUserList(page, user)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "获取用户列表(用于其他页面获取用户数据)") |
| | | @PostMapping("/selectUserList") |
| | | public Result selectUserList(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | |
| | | return Result.success(userService.selectUserList(page, user)); |
| | | } |
| | | |
| | | @ValueClassify("用户管理") |
| | | @ApiOperation(value = "资源要求-人员总览") |
| | | @ValueClassify("人员总览") |
| | | @ApiOperation(value = "查询人员总览") |
| | | @PostMapping("/selectPersonnelOverview") |
| | | public Result selectPersonnelOverview(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | |
| | | @ValueClassify("客户管理") |
| | | @ApiOperation(value = "删除客户信息") |
| | | @PostMapping("/delCustomById") |
| | | public Result<?> delCustomById(Integer id) { |
| | | return Result.success(customService.delCustomById(id)); |
| | | public Result<?> delCustomById(Long id) { |
| | | return Result.success(customService.removeById(id)); |
| | | } |
| | | @ValueClassify("客户管理") |
| | | @ApiOperation(value = "新增客户信息") |
| | | @PostMapping("/addCustom") |
| | | public Result<?> addCustom(@RequestBody Custom custom) { |
| | | return Result.success(customService.addCustom(custom)); |
| | | } |
| | | |
| | | @ValueClassify("客户管理") |
| | | @ApiOperation(value = "修改客户信息") |
| | | @PostMapping("/upCustom") |
| | | public Result<?> upCustom(@RequestBody Custom custom) { |
| | | return Result.success(customService.upCustom(custom)); |
| | | } |
| | | |
| | | //获取设备负责人 |
| | |
| | | return Result.success(userService.delUserDepardLimsId(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @GetMapping ("/selectCustomEnum") |
| | | @ApiOperation(value = "获取客户枚举") |
| | | public Result<?> selectCustomEnum(){ |
| | | return Result.success(customService.selectCustomEnum()); |
| | | } |
| | | |
| | | } |