| | |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | | * @since 2023-07-11 |
| | | */ |
| | | @Api(tags = "标准库-->1、⭐⭐⭐") |
| | | @Api(tags = "标准库-->⭐⭐⭐") |
| | | @RestController |
| | | @RequestMapping("/standards") |
| | | public class StandardsController { |
| | |
| | | @Autowired |
| | | private StandardsService standardsService; |
| | | |
| | | @ApiOperation("添加标准") |
| | | @ApiOperation("标准库-->添加标准") |
| | | @PostMapping("/add") |
| | | public Result<?> addStandardsInformation(@RequestHeader("X-Token") String token, @RequestBody Standards standards) throws Exception { |
| | | Object object = RedisUtil.get(token); |
| | |
| | | return Result.fail("添加【"+ standards.getName() +"】失败!"); |
| | | } |
| | | |
| | | @ApiOperation("侧边栏查询所有标准数据") |
| | | @ApiOperation("标准库-->侧边栏查询所有标准数据") |
| | | @GetMapping("/list") |
| | | public Result<?> listStandardsInformation(){ |
| | | List<Map<String, Object>> list = standardsService.listStandardsInformation(); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | @ApiOperation("点击全部:分页查询所有标准数据") |
| | | @ApiOperation("标准库-->点击全部:分页查询所有标准数据") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageNo", value = "起始页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "pageSize", value = "每一页数量", dataTypeClass = Integer.class, required = true), |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation("根据Id修改参数") |
| | | @ApiOperation("标准库-->根据Id修改参数") |
| | | @PutMapping("/update") |
| | | public Result<?> updateStandardsInformation(@RequestHeader("X-Token") String token, @RequestBody Standards standards) throws Exception { |
| | | Object object = RedisUtil.get(token); |
| | |
| | | return Result.fail("更新失败!"); |
| | | } |
| | | |
| | | @ApiOperation("根据ID删除数据") |
| | | @ApiOperation("标准库-->根据ID删除数据") |
| | | @DeleteMapping("/delete") |
| | | public Result<?> deleteStandardsInformation(String standardsId) { |
| | | Integer isDeleteSuccess = standardsService.deleteStandardsInformation(standardsId); |