| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.Custom; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.CustomService; |
| | | import com.yuanchu.mom.service.PowerService; |
| | | import com.yuanchu.mom.service.UserService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | private PowerService powerService; |
| | | |
| | | private Jwt jwt; |
| | | |
| | | private CustomService customService; |
| | | |
| | | @ApiOperation(value = "登录") |
| | | @PostMapping("/enter") |
| | |
| | | return Result.success(userService.addUser(user)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取用户信息枚举") |
| | | @GetMapping("/getUserMenu") |
| | | @ValueAuth |
| | | public Result<?> getUserMenu() { |
| | | return Result.success(userService.getUserMenu()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取客户列表") |
| | | @PostMapping("/selectCustomPageList") |
| | | public Result selectCustomPageList(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | Custom custom = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Custom.class); |
| | | return Result.success(customService.selectCustomPageList(page, custom)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除客户信息") |
| | | @PostMapping("/delCustomById") |
| | | public Result<?> delCustomById(Integer id) { |
| | | return Result.success(customService.delCustomById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增客户信息") |
| | | @PostMapping("/addCustom") |
| | | public Result<?> addCustom(@RequestBody Custom custom) { |
| | | return Result.success(customService.addCustom(custom)); |
| | | } |
| | | |
| | | } |