Kaynağa Gözat

批量调整

yumeng 5 yıl önce
ebeveyn
işleme
da007c15a5

+ 4 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/BatchController.java

@@ -1604,13 +1604,12 @@ public class BatchController {
 
             if (createCount == 1) {
                 JSONObject createJson = batchService.createUnit(requestJson);
-                if (createJson.getInteger("code") != 0) {
-                    JSONObject errJson = new JSONObject();
-                    errJson.put("message", createJson.getString("message"));
-                    errJson.put("unitName", requestJson.getString("unitName"));
-                    failArr.add(errJson);
 
+                if (!Check.isNull(createJson)) {
+                    failArr = createJson.getJSONArray("fail");
                 }
+
+
             } else if (createCount > 1) {
                 QueryWrapper<KuaiShouGroup> queryWrapper = new QueryWrapper<>();
                 queryWrapper.eq("account_id", accountId);

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/BatchServiceImpl.java

@@ -676,7 +676,7 @@ public class BatchServiceImpl implements IBatchService {
                             @Override
                             public void run() {
                                 try {
-                                    copyCreative(group.getAccountId(), group.getUnitId(), copyUnitId);
+                                    copyCreative(group.getAccountId(), copyUnitId, group.getUnitId());
                                 } catch (Exception e) {
                                     e.printStackTrace();
                                 }