| | |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.UserEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertUser", produces = "application/json; charset=UTF-8") |
| | | @SuppressWarnings("AlibabaRemoveCommentedCode") |
| | | public ResponseMsg<Integer> insertUser(@RequestBody UserEntity entity, HttpServletRequest req) { |
| | | try { |
| | | String str = userService.validateNewPwd(entity); |
| | | /*String str = userService.validateNewPwd(entity); |
| | | if (str != null) { |
| | | return fail(str, -1); |
| | | } |
| | | }*/ |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "List<UserEntity>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertUsers", produces = "application/json; charset=UTF-8") |
| | | @SuppressWarnings("AlibabaRemoveCommentedCode") |
| | | public ResponseMsg<Integer> insertUsers(@RequestBody List<UserEntity> list, HttpServletRequest req) { |
| | | try { |
| | | if (list == null || list.isEmpty()) { |
| | |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | for (UserEntity entity : list) { |
| | | String str = userService.validateNewPwd(entity); |
| | | /*String str = userService.validateNewPwd(entity); |
| | | if (str != null) { |
| | | return fail(str, -1); |
| | | } |
| | | }*/ |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateUser", produces = "application/json; charset=UTF-8") |
| | | @SuppressWarnings("AlibabaRemoveCommentedCode") |
| | | public ResponseMsg<Integer> updateUser(@RequestBody UserEntity entity, HttpServletRequest req) { |
| | | try { |
| | | String str = userService.validateOldPwd(entity); |
| | | /*String str = userService.validateOldPwd(entity); |
| | | if (str != null) { |
| | | return fail(str, -1); |
| | | } |
| | | }*/ |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |