| | |
| | | } |
| | | |
| | | /** |
| | | * 删除用户信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "delete") |
| | | @SsoPowerAop(power = "10100011") //登录与权限同时验证 |
| | | @Log("删除用户") |
| | | public BaseResponse<Boolean> delete(Long id) { |
| | | int count; |
| | | try { |
| | | BaUser po = new BaUser(); |
| | | po.id = id; |
| | | po.deleted = true; |
| | | count = this.sv.update(po); |
| | | } catch (Exception e) { |
| | | log.error("删除用户异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库存储失败"); |
| | | } else { |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改密码 |
| | | * @param id 用户ID |
| | | * @return 是否成功 |