|
@@ -233,7 +233,7 @@ public class KuaishouLiveUserAccountServiceImpl implements IKuaishouLiveUserAcco
|
|
int i = kuaishouLiveUserAccountMapper.updateKuaishouLiveUserAccount(account);
|
|
int i = kuaishouLiveUserAccountMapper.updateKuaishouLiveUserAccount(account);
|
|
if (i > 0) {
|
|
if (i > 0) {
|
|
String collaboratorList = account.getCollaboratorList();
|
|
String collaboratorList = account.getCollaboratorList();
|
|
- if (Check.isNotNull(collaboratorList)) {
|
|
|
|
|
|
+ if (Check.isNotNull(collaboratorList) && "[]".equals(collaboratorList)) {
|
|
List<JSONObject> collaborators = JSONArray.parseArray(collaboratorList, JSONObject.class);
|
|
List<JSONObject> collaborators = JSONArray.parseArray(collaboratorList, JSONObject.class);
|
|
for (JSONObject obj : collaborators) {
|
|
for (JSONObject obj : collaborators) {
|
|
obj.put("ksId", account.getKsId());
|
|
obj.put("ksId", account.getKsId());
|
|
@@ -243,9 +243,12 @@ public class KuaishouLiveUserAccountServiceImpl implements IKuaishouLiveUserAcco
|
|
obj.put("createrId", account.getCreaterId());
|
|
obj.put("createrId", account.getCreaterId());
|
|
accountPartMapper.deleteByAccountId(account.getKsId(), account.getAccountId());
|
|
accountPartMapper.deleteByAccountId(account.getKsId(), account.getAccountId());
|
|
}
|
|
}
|
|
|
|
+
|
|
if (Check.isNotNull(collaborators)) {
|
|
if (Check.isNotNull(collaborators)) {
|
|
accountPartMapper.replaceBatch(collaborators);
|
|
accountPartMapper.replaceBatch(collaborators);
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ accountPartMapper.deleteKuaishouLiveUserAccountPartById(account.getKsId());
|
|
}
|
|
}
|
|
return ResultResponse.success();
|
|
return ResultResponse.success();
|
|
}
|
|
}
|