| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.SafeMaterialClassifyAddReq; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.SafeMaterialClassifyModReq; |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/list") |
| | | public ResultVO<List<SafeMaterialClassifyDto>> list(Authentication authentication, @RequestBody SafeMaterialClassifyQuery query){ |
| | | public ResultVO<List<SafeMaterialClassifyDto>> list(Authentication authentication){ |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return materialClassifyService.list(query); |
| | | return new ResultVO<>(ResultCodes.OK,materialClassifyService.list()); |
| | | |
| | | } |
| | | |
| | |
| | | @PostMapping(value = "queryById") |
| | | public ResultVO<SafeMaterialClassifyDto> queryById(Authentication authentication, @RequestBody JSONObject jsonObject){ |
| | | Long id = jsonObject.getLong("id"); |
| | | return materialClassifyService.queryById(id); |
| | | return new ResultVO<>(ResultCodes.OK,materialClassifyService.queryById(id)); |
| | | } |
| | | } |