|
|
|
|
@ -45,8 +45,8 @@ public class PrinterConfigController {
|
|
|
|
|
@PostMapping("/create")
|
|
|
|
|
@Operation(summary = "创建打印机配置")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('printer:config:create')")
|
|
|
|
|
public CommonResult<Integer> createConfig(@Valid @RequestBody PrinterConfigSaveReqVO createReqVO) {
|
|
|
|
|
Integer config = configService.createConfig(createReqVO);
|
|
|
|
|
public CommonResult<Long> createConfig(@Valid @RequestBody PrinterConfigSaveReqVO createReqVO) {
|
|
|
|
|
Long config = configService.createConfig(createReqVO);
|
|
|
|
|
if(config ==null){
|
|
|
|
|
return error(500,"该主机名对应的打印机");
|
|
|
|
|
}
|
|
|
|
|
@ -65,7 +65,7 @@ public class PrinterConfigController {
|
|
|
|
|
@Operation(summary = "删除打印机配置")
|
|
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('printer:config:delete')")
|
|
|
|
|
public CommonResult<Boolean> deleteConfig(@RequestParam("id") Integer id) {
|
|
|
|
|
public CommonResult<Boolean> deleteConfig(@RequestParam("id") Long id) {
|
|
|
|
|
configService.deleteConfig(id);
|
|
|
|
|
return success(true);
|
|
|
|
|
}
|
|
|
|
|
@ -74,7 +74,7 @@ public class PrinterConfigController {
|
|
|
|
|
@Operation(summary = "获得打印机配置")
|
|
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('printer:config:query')")
|
|
|
|
|
public CommonResult<PrinterConfigRespVO> getConfig(@RequestParam("id") Integer id) {
|
|
|
|
|
public CommonResult<PrinterConfigRespVO> getConfig(@RequestParam("id") Long id) {
|
|
|
|
|
PrinterConfigDO config = configService.getConfig(id);
|
|
|
|
|
return success(BeanUtils.toBean(config, PrinterConfigRespVO.class));
|
|
|
|
|
}
|
|
|
|
|
|