| | |
| | | package cn.flightfeather.supervision.lightshare.web |
| | | |
| | | import cn.flightfeather.supervision.config.IgnoreResponseAdvice |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Userinfo |
| | | import cn.flightfeather.supervision.lightshare.service.UserinfoService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | |
| | | @CrossOrigin |
| | | @RequestMapping("/userinfo") |
| | | class UserinfoController(val userinfoService: UserinfoService) { |
| | | @IgnoreResponseAdvice |
| | | @GetMapping("") |
| | | fun getAll() = userinfoService.findAll() |
| | | |
| | | @IgnoreResponseAdvice |
| | | @GetMapping("/{id}") |
| | | fun getById(@PathVariable id: String) = userinfoService.findOne(id) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @ApiOperation(value = "按用户类型搜索用户信息") |
| | | @GetMapping("/type/get") |
| | | fun getUserByTypeId( |
| | |
| | | @ApiParam("用户是否可用", required = false, defaultValue = "true") @RequestParam(required = false) enable: Boolean? |
| | | ) = userinfoService.findByType(typeId, enable) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PutMapping("") |
| | | fun add(@RequestBody userinfo: Userinfo) = userinfoService.save(userinfo) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PostMapping("") |
| | | fun update(@RequestBody userinfo: Userinfo) = userinfoService.update(userinfo) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @DeleteMapping("/{id}") |
| | | fun delete(@PathVariable id: String) = userinfoService.delete(id) |
| | | |
| | |
| | | perPage: Int?, |
| | | ) = resPack { userinfoService.search(areaVo, keyword, userType, page, perPage) } |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PostMapping("/login") |
| | | fun getByName(@RequestBody userinfo: Userinfo) = userinfoService.findOneByName(userinfo) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PostMapping("/create") |
| | | fun createAccount(sceneId: String) = userinfoService.createAccount(sceneId) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @GetMapping("/scene/get") |
| | | fun findByScene(sceneId: String) = userinfoService.findByScene(sceneId) |
| | | } |