| | |
| | | package org.springblade.modules.system.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.PropertyNamingStrategy; |
| | | import com.alibaba.fastjson.serializer.SerializeConfig; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | return R.data(UserWrapper.build().entityVO(detail)); |
| | | } |
| | | |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "查看详情返回String", notes = "传入id") |
| | | @GetMapping("/details") |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<String> details(User user) { |
| | | UserVO detail = userService.getuserById(user.getId()); |
| | | SerializeConfig config = new SerializeConfig(); |
| | | config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase; |
| | | String json1 = JSON.toJSONString(detail, config); |
| | | return R.data(json1); |
| | | } |
| | | |
| | | /** |
| | | * 查询单条 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 按条件查询用户信息 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | return R.data(userService.getUserInfo(AuthUtil.getUserId())); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @GetMapping("/getUserInfoByCode") |
| | | @ApiOperation(value = "查询人员", notes = "houseCode") |
| | | public R getUserInfoByCode(@RequestParam("houseCode") String houseCode, @RequestParam(value = "type",defaultValue = "2") String type) { |
| | | return R.data(userService.getUserInfoByCode(houseCode,type)); |
| | | } |
| | | |
| | | } |