| | |
| | | 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; |
| | |
| | | @NonDS |
| | | //@ApiIgnore |
| | | @RestController |
| | | @RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME+"/user") |
| | | @RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/user") |
| | | @AllArgsConstructor |
| | | @Api(value = "用户管理", tags = "用户管理") |
| | | public class UserController { |
| | |
| | | public R<UserVO> detail(User user) { |
| | | User detail = userService.getOne(Condition.getQueryWrapper(user)); |
| | | 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)); |
| | | } |
| | | |
| | | } |