保存
(@RequestBody UserEntity user)
| 141 | * 保存 |
| 142 | */ |
| 143 | @PostMapping("/save") |
| 144 | public R save(@RequestBody UserEntity user){ |
| 145 | // ValidatorUtils.validateEntity(user); |
| 146 | if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) { |
| 147 | return R.error("用户已存在"); |
| 148 | } |
| 149 | userService.insert(user); |
| 150 | return R.ok(); |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * 修改 |
nothing calls this directly
no test coverage detected