Преглед изворни кода

账户2.0——导入账户 bug修复

zhaoxian пре 3 година
родитељ
комит
6086589521

+ 5 - 5
ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveUserAccountServiceImpl.java

@@ -118,13 +118,13 @@ public class KuaishouLiveUserAccountServiceImpl implements IKuaishouLiveUserAcco
      */
     @Override
     public ResultResponse insertKuaishouLiveUserAccount(KuaishouLiveUserAccount account) {
+        if (Check.isNull(account.getAccountId())) {
+            account.setAccountId(System.currentTimeMillis());
+        }
         KuaishouLiveUserAccount one = kuaishouLiveUserAccountMapper.getOne(account);
         if (one != null) {
             return ResultResponse.error("快手ID:" + account.getKsId() + "下已存在该账户ID,请重新填写!");
         }
-        if (Check.isNull(account.getAccountId())) {
-            account.setAccountId(System.currentTimeMillis());
-        }
         String collaboratorList = account.getCollaboratorList();
         if (collaboratorList != null) {
             List<JSONObject> collaborators = JSONArray.parseArray(collaboratorList, JSONObject.class);
@@ -244,11 +244,11 @@ public class KuaishouLiveUserAccountServiceImpl implements IKuaishouLiveUserAcco
                 }
 
                 if (Check.isNotNull(collaborators)) {
-                    accountPartMapper.deleteByAccountId(account.getKsId(), account.getAccountId(),null);
+                    accountPartMapper.deleteByAccountId(account.getKsId(), account.getAccountId(), null);
                     accountPartMapper.replaceBatch(collaborators);
                 }
             } else {
-                accountPartMapper.deleteByAccountId(account.getKsId(), account.getAccountId(),null);
+                accountPartMapper.deleteByAccountId(account.getKsId(), account.getAccountId(), null);
             }
             return ResultResponse.success();
         }