打印机 contentType固定local

This commit is contained in:
2024-04-07 11:21:34 +08:00
parent 78fc29fb0f
commit 55c0b270a0

View File

@@ -104,7 +104,6 @@ public class TbPrintPCMachineService {
public Result insert(PrintMachineDto resources) { public Result insert(PrintMachineDto resources) {
TbPrintPCMachine tbPrintMachine = new TbPrintPCMachine(); TbPrintPCMachine tbPrintMachine = new TbPrintPCMachine();
tbPrintMachine.setCreatedAt(Instant.now().toEpochMilli()); tbPrintMachine.setCreatedAt(Instant.now().toEpochMilli());
tbPrintMachine.setContentType("local");
if (resources.getConfig() != null) { if (resources.getConfig() != null) {
if (CollectionUtils.isEmpty(resources.getConfig().getCategoryList())) { if (CollectionUtils.isEmpty(resources.getConfig().getCategoryList())) {
resources.getConfig().setCategoryList(null); resources.getConfig().setCategoryList(null);
@@ -112,6 +111,7 @@ public class TbPrintPCMachineService {
tbPrintMachine.setConfig(JSONUtil.toJSONString(resources.getConfig(), true)); tbPrintMachine.setConfig(JSONUtil.toJSONString(resources.getConfig(), true));
} }
BeanUtils.copyProperties(resources, tbPrintMachine); BeanUtils.copyProperties(resources, tbPrintMachine);
tbPrintMachine.setContentType("local");
tbPrintMachineMapper.insert(tbPrintMachine); tbPrintMachineMapper.insert(tbPrintMachine);
return Result.success(CodeEnum.SUCCESS); return Result.success(CodeEnum.SUCCESS);
} }