gongfuzhu 1 rok temu
rodzic
commit
8c7fee66ce

+ 5 - 2
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/service/XiaoJuService.java

@@ -55,10 +55,13 @@ public class XiaoJuService {
 
         XiaoJuStore byStoreId = xiaoJuStoreDao.findByStoreId(xiaoJuStore.getStoreId());
         if (byStoreId != null) {
-            BeanUtils.copyProperties(oilRequest, byStoreId, "updateTime");
+            BeanUtils.copyProperties(byStoreId, xiaoJuStore, "id","updateTime");
+            xiaoJuStoreDao.save(byStoreId);
+        }else {
+            xiaoJuStoreDao.save(xiaoJuStore);
         }
 
-        xiaoJuStoreDao.save(xiaoJuStore);
+
 
 
         String data = SecurityService.genEncodeData("{\"success\":true,\"msg\":\"ok\"}", oilConfig.getDataSecret(), oilConfig.getDataSecretIV());