|
@@ -2,6 +2,8 @@ package com.tzld.piaoquan.api.service.contentplatform.impl;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
|
|
import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
|
|
|
|
|
+import com.tzld.piaoquan.api.common.enums.contentplatform.AccountStatusEnum;
|
|
|
|
|
+import com.tzld.piaoquan.api.common.enums.contentplatform.PlanStatusEnum;
|
|
|
import com.tzld.piaoquan.api.common.exception.CommonException;
|
|
import com.tzld.piaoquan.api.common.exception.CommonException;
|
|
|
import com.tzld.piaoquan.api.component.AigcApiService;
|
|
import com.tzld.piaoquan.api.component.AigcApiService;
|
|
|
import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformGzhAccountMapper;
|
|
import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformGzhAccountMapper;
|
|
@@ -115,7 +117,7 @@ public class ContentPlatformCooperateAccountServiceImpl implements ContentPlatfo
|
|
|
gzhAccountMapper.insertSelective(account);
|
|
gzhAccountMapper.insertSelective(account);
|
|
|
} else {
|
|
} else {
|
|
|
account.setId(param.getId());
|
|
account.setId(param.getId());
|
|
|
- account.setStatus(1);
|
|
|
|
|
|
|
+ account.setStatus(AccountStatusEnum.NORMAL.getVal());
|
|
|
gzhAccountMapper.updateByPrimaryKeySelective(account);
|
|
gzhAccountMapper.updateByPrimaryKeySelective(account);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -168,7 +170,7 @@ public class ContentPlatformCooperateAccountServiceImpl implements ContentPlatfo
|
|
|
}
|
|
}
|
|
|
ContentPlatformGzhAccount gzhAccount = new ContentPlatformGzhAccount();
|
|
ContentPlatformGzhAccount gzhAccount = new ContentPlatformGzhAccount();
|
|
|
gzhAccount.setId(id);
|
|
gzhAccount.setId(id);
|
|
|
- gzhAccount.setStatus(0);
|
|
|
|
|
|
|
+ gzhAccount.setStatus(AccountStatusEnum.FORBIDDEN.getVal());
|
|
|
gzhAccount.setUpdateTimestamp(System.currentTimeMillis());
|
|
gzhAccount.setUpdateTimestamp(System.currentTimeMillis());
|
|
|
gzhAccountMapper.updateByPrimaryKeySelective(gzhAccount);
|
|
gzhAccountMapper.updateByPrimaryKeySelective(gzhAccount);
|
|
|
}
|
|
}
|
|
@@ -195,7 +197,8 @@ public class ContentPlatformCooperateAccountServiceImpl implements ContentPlatfo
|
|
|
@Override
|
|
@Override
|
|
|
public List<ContentPlatformGzhAccount> getCooperateAccountListByGhIds(Long loginAccountId, List<String> ghIds) {
|
|
public List<ContentPlatformGzhAccount> getCooperateAccountListByGhIds(Long loginAccountId, List<String> ghIds) {
|
|
|
ContentPlatformGzhAccountExample gzhAccountExample = new ContentPlatformGzhAccountExample();
|
|
ContentPlatformGzhAccountExample gzhAccountExample = new ContentPlatformGzhAccountExample();
|
|
|
- gzhAccountExample.createCriteria().andCreateAccountIdEqualTo(loginAccountId).andGhIdIn(ghIds).andStatusEqualTo(1);
|
|
|
|
|
|
|
+ gzhAccountExample.createCriteria().andCreateAccountIdEqualTo(loginAccountId).andGhIdIn(ghIds)
|
|
|
|
|
+ .andStatusEqualTo(AccountStatusEnum.NORMAL.getVal());
|
|
|
return gzhAccountMapper.selectByExample(gzhAccountExample);
|
|
return gzhAccountMapper.selectByExample(gzhAccountExample);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -248,7 +251,7 @@ public class ContentPlatformCooperateAccountServiceImpl implements ContentPlatfo
|
|
|
@Override
|
|
@Override
|
|
|
public ContentPlatformGzhAccount getGzhAccount(String ghId) {
|
|
public ContentPlatformGzhAccount getGzhAccount(String ghId) {
|
|
|
ContentPlatformGzhAccountExample example = new ContentPlatformGzhAccountExample();
|
|
ContentPlatformGzhAccountExample example = new ContentPlatformGzhAccountExample();
|
|
|
- example.createCriteria().andGhIdEqualTo(ghId).andStatusEqualTo(1);
|
|
|
|
|
|
|
+ example.createCriteria().andGhIdEqualTo(ghId).andStatusEqualTo(PlanStatusEnum.NORMAL.getVal());
|
|
|
List<ContentPlatformGzhAccount> accountList = gzhAccountMapper.selectByExample(example);
|
|
List<ContentPlatformGzhAccount> accountList = gzhAccountMapper.selectByExample(example);
|
|
|
if (CollectionUtils.isNotEmpty(accountList)) {
|
|
if (CollectionUtils.isNotEmpty(accountList)) {
|
|
|
return accountList.get(0);
|
|
return accountList.get(0);
|
|
@@ -259,7 +262,7 @@ public class ContentPlatformCooperateAccountServiceImpl implements ContentPlatfo
|
|
|
@Override
|
|
@Override
|
|
|
public List<ContentPlatformGzhAccount> getAccountListByCreatorId(Long creatorId) {
|
|
public List<ContentPlatformGzhAccount> getAccountListByCreatorId(Long creatorId) {
|
|
|
ContentPlatformGzhAccountExample example = new ContentPlatformGzhAccountExample();
|
|
ContentPlatformGzhAccountExample example = new ContentPlatformGzhAccountExample();
|
|
|
- example.createCriteria().andCreateAccountIdEqualTo(creatorId).andStatusEqualTo(1);
|
|
|
|
|
|
|
+ example.createCriteria().andCreateAccountIdEqualTo(creatorId).andStatusEqualTo(PlanStatusEnum.NORMAL.getVal());
|
|
|
return gzhAccountMapper.selectByExample(example);
|
|
return gzhAccountMapper.selectByExample(example);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|