|
@@ -62,7 +62,7 @@ public class AiKuaishouAdvertiserStrategyController {
|
|
QueryWrapper<AiKuaishouAdvertiserStrategy> queryWrapper = QueryGenerator.initQueryWrapper(aiKuaishouAdvertiserStrategy, req.getParameterMap());
|
|
QueryWrapper<AiKuaishouAdvertiserStrategy> queryWrapper = QueryGenerator.initQueryWrapper(aiKuaishouAdvertiserStrategy, req.getParameterMap());
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(user.getId());
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(user.getId());
|
|
- if(!CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode)){
|
|
|
|
|
|
+ if (!CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode)) {
|
|
queryWrapper.eq("user_id", user.getId());
|
|
queryWrapper.eq("user_id", user.getId());
|
|
}
|
|
}
|
|
Page<AiKuaishouAdvertiserStrategy> page = new Page<>(pageNo, pageSize);
|
|
Page<AiKuaishouAdvertiserStrategy> page = new Page<>(pageNo, pageSize);
|
|
@@ -98,22 +98,25 @@ public class AiKuaishouAdvertiserStrategyController {
|
|
try {
|
|
try {
|
|
Long accountId = aiKuaishouAdvertiserStrategy.getAccountId();
|
|
Long accountId = aiKuaishouAdvertiserStrategy.getAccountId();
|
|
AiKuaishouAdvertiserStrategy getEntity = aiKuaishouAdvertiserStrategyService.getByAccountId(accountId);
|
|
AiKuaishouAdvertiserStrategy getEntity = aiKuaishouAdvertiserStrategyService.getByAccountId(accountId);
|
|
- if(null!=getEntity){
|
|
|
|
|
|
+ if (null != getEntity) {
|
|
result.error500("该账户配置信息已经被创建");
|
|
result.error500("该账户配置信息已经被创建");
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
UserAllocation allocation = allocationService.getByAccountId(accountId);
|
|
UserAllocation allocation = allocationService.getByAccountId(accountId);
|
|
- if(null!=allocation){
|
|
|
|
|
|
+ if (null != allocation) {
|
|
aiKuaishouAdvertiserStrategy.setUserId(allocation.getUserId());
|
|
aiKuaishouAdvertiserStrategy.setUserId(allocation.getUserId());
|
|
}
|
|
}
|
|
aiKuaishouAdvertiserStrategy.setDescription(aiKuaishouAdvertiserStrategy.getDescription().trim());
|
|
aiKuaishouAdvertiserStrategy.setDescription(aiKuaishouAdvertiserStrategy.getDescription().trim());
|
|
Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
|
|
Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
|
|
if (null != singleAppId && singleAppId == 1) {
|
|
if (null != singleAppId && singleAppId == 1) {
|
|
- Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));
|
|
|
|
- aiKuaishouAdvertiserStrategy.setAppId(appId);
|
|
|
|
|
|
+ if (aiKuaishouAdvertiserStrategy.getCampaignType() == 2 || aiKuaishouAdvertiserStrategy.getCampaignType() == 7) {
|
|
|
|
+ Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));
|
|
|
|
+ aiKuaishouAdvertiserStrategy.setAppId(appId);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
aiKuaishouAdvertiserStrategyService.save(aiKuaishouAdvertiserStrategy);
|
|
aiKuaishouAdvertiserStrategyService.save(aiKuaishouAdvertiserStrategy);
|
|
- Thread thread = new Thread(){
|
|
|
|
|
|
+ Thread thread = new Thread() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
kuaishouVideoRelateCreativesService.videoRelateCreatives(aiKuaishouAdvertiserStrategy.getAccountId());
|
|
kuaishouVideoRelateCreativesService.videoRelateCreatives(aiKuaishouAdvertiserStrategy.getAccountId());
|
|
@@ -127,6 +130,7 @@ public class AiKuaishouAdvertiserStrategyController {
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 编辑
|
|
* 编辑
|
|
*
|
|
*
|
|
@@ -261,12 +265,12 @@ public class AiKuaishouAdvertiserStrategyController {
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = "testCreate")
|
|
@GetMapping(value = "testCreate")
|
|
- public Map<String,Object> testCreate(Long accountId){
|
|
|
|
|
|
+ public Map<String, Object> testCreate(Long accountId) {
|
|
return aiKuaishouAdvertiserStrategyService.testCreate(accountId);
|
|
return aiKuaishouAdvertiserStrategyService.testCreate(accountId);
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = "aiHistoricalMissingMaterial")
|
|
@GetMapping(value = "aiHistoricalMissingMaterial")
|
|
- public Map<String,Object> aiHistoricalMissingMaterial(Long accountId){
|
|
|
|
|
|
+ public Map<String, Object> aiHistoricalMissingMaterial(Long accountId) {
|
|
return aiKuaishouAdvertiserStrategyService.aiHistoricalMissingMaterial(accountId);
|
|
return aiKuaishouAdvertiserStrategyService.aiHistoricalMissingMaterial(accountId);
|
|
}
|
|
}
|
|
}
|
|
}
|