Browse Source

复制修改

yumeng 5 years ago
parent
commit
a2caea6df6

+ 5 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -101,20 +101,20 @@ public class TestController {
         for (MaterialInfo info : list) {
 
             QueryWrapper<MaterialTag> tagQueryWrapper = new QueryWrapper<>();
-            tagQueryWrapper.eq("material_id", info.getId());
+            tagQueryWrapper.eq("material_id", String.valueOf(info.getId()));
             MaterialTag updateTag = new MaterialTag();
             updateTag.setMaterialId(info.getCode());
             tagService.update(updateTag, tagQueryWrapper);
 
             QueryWrapper<MaterialAscription> materialAscriptionQuery = new QueryWrapper<>();
-            materialAscriptionQuery.eq("material_id", info.getId());
+            materialAscriptionQuery.eq("material_id", String.valueOf(info.getId()));
             MaterialAscription updateMaterialAscription = new MaterialAscription();
             updateMaterialAscription.setMaterialId(info.getCode());
             ascriptionService.update(updateMaterialAscription, materialAscriptionQuery);
 
 
             QueryWrapper<MaterialParameter> parameterQueryWrapper = new QueryWrapper<>();
-            parameterQueryWrapper.eq("material_id", info.getId());
+            parameterQueryWrapper.eq("material_id", String.valueOf(info.getId()));
             MaterialParameter updateMaterialParameter = new MaterialParameter();
             updateMaterialParameter.setMaterialId(info.getCode());
             parameterService.update(updateMaterialParameter, parameterQueryWrapper);
@@ -124,7 +124,7 @@ public class TestController {
         List<MaterialImageInfo> list1 = iMaterialImageInfoService.list();
         for (MaterialImageInfo imageInfo : list1) {
             QueryWrapper<MaterialParameter> parameterQueryWrapper = new QueryWrapper<>();
-            parameterQueryWrapper.eq("material_id", imageInfo.getId());
+            parameterQueryWrapper.eq("material_id", String.valueOf(imageInfo.getId()));
             MaterialParameter updateMaterialParameter = new MaterialParameter();
             updateMaterialParameter.setMaterialId(imageInfo.getCode());
             parameterService.update(updateMaterialParameter, parameterQueryWrapper);
@@ -145,7 +145,7 @@ public class TestController {
                             continue;
                         }
                         MaterialImageInfo materialImageInfo = list2.get(j);
-                        iMaterialImageInfoService.removeById(materialImageInfo.getId());
+                        iMaterialImageInfoService.removeById(String.valueOf(materialImageInfo.getId()));
                     }
 
                 }