|
@@ -464,7 +464,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdCity())){
|
|
|
String[] city = strategy.getAdCity().split(",");
|
|
|
- if(null != city&&city.length>0){
|
|
|
+ if(city.length>0){
|
|
|
params.put("city",city);
|
|
|
}
|
|
|
}
|
|
@@ -522,11 +522,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
if(!Check.isNull(strategy.getAdActionScene())){
|
|
|
String[] actionScene = strategy.getAdActionScene().split(",");
|
|
|
if(actionScene.length>0){
|
|
|
- JSONArray actionSceneArray = new JSONArray();
|
|
|
- for(int i=0;i<actionScene.length;i++){
|
|
|
- actionSceneArray.add(actionScene[i]);
|
|
|
- }
|
|
|
- params.put("action_scene",actionSceneArray);
|
|
|
+ params.put("action_scene",actionScene);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdActionDays())){
|
|
@@ -535,81 +531,49 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
if(!Check.isNull(strategy.getAdActionCategories())){
|
|
|
String[] actionCategories = strategy.getAdActionCategories().split(",");
|
|
|
if(actionCategories.length>0){
|
|
|
- JSONArray actionCategoriesArray = new JSONArray();
|
|
|
- for(int i=0;i<actionCategories.length;i++){
|
|
|
- actionCategoriesArray.add(actionCategories[i]);
|
|
|
- }
|
|
|
- params.put("action_categories",actionCategoriesArray);
|
|
|
+ params.put("action_categories",actionCategories);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdActionWords())){
|
|
|
String[] actionWords = strategy.getAdActionWords().split(",");
|
|
|
if(actionWords.length>0){
|
|
|
- JSONArray actionWordsArray = new JSONArray();
|
|
|
- for(int i=0;i<actionWords.length;i++){
|
|
|
- actionWordsArray.add(actionWords[i]);
|
|
|
- }
|
|
|
- params.put("action_words",actionWordsArray);
|
|
|
+ params.put("action_words",actionWords);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdInterestCategories())){
|
|
|
String[] interestCategories = strategy.getAdInterestCategories().split(",");
|
|
|
if(interestCategories.length>0){
|
|
|
- JSONArray interestCategoriesArray = new JSONArray();
|
|
|
- for(int i=0;i<interestCategories.length;i++){
|
|
|
- interestCategoriesArray.add(interestCategories[i]);
|
|
|
- }
|
|
|
- params.put("interest_categories",interestCategoriesArray);
|
|
|
+ params.put("interest_categories",interestCategories);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdInterestWords())){
|
|
|
String[] interestWords = strategy.getAdInterestWords().split(",");
|
|
|
if(interestWords.length>0){
|
|
|
- JSONArray interestWordsArray = new JSONArray();
|
|
|
- for(int i=0;i<interestWords.length;i++){
|
|
|
- interestWordsArray.add(interestWords[i]);
|
|
|
- }
|
|
|
- params.put("interest_words",interestWordsArray);
|
|
|
+ params.put("interest_words",interestWords);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdAwemeFanBehaviors())){
|
|
|
String[] awemeFanBehaviors = strategy.getAdAwemeFanBehaviors().split(",");
|
|
|
if(awemeFanBehaviors.length>0){
|
|
|
- JSONArray awemeFanBehaviorsArray = new JSONArray();
|
|
|
- for(int i=0;i<awemeFanBehaviors.length;i++){
|
|
|
- awemeFanBehaviorsArray.add(awemeFanBehaviors[i]);
|
|
|
- }
|
|
|
- params.put("aweme_fan_behaviors",awemeFanBehaviorsArray);
|
|
|
+ params.put("aweme_fan_behaviors",awemeFanBehaviors);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdAwemeFanCategories())){
|
|
|
String[] awemeFanCategories = strategy.getAdAwemeFanCategories().split(",");
|
|
|
if(awemeFanCategories.length>0){
|
|
|
- JSONArray awemeFanCategoriesArray = new JSONArray();
|
|
|
- for(int i=0;i<awemeFanCategories.length;i++){
|
|
|
- awemeFanCategoriesArray.add(awemeFanCategories[i]);
|
|
|
- }
|
|
|
- params.put("aweme_fan_categories",awemeFanCategoriesArray);
|
|
|
+ params.put("aweme_fan_categories",awemeFanCategories);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdAwemeFanAccounts())){
|
|
|
String[] awemeFanAccount = strategy.getAdAwemeFanAccounts().split(",");
|
|
|
if(awemeFanAccount.length>0){
|
|
|
- JSONArray awemeFanAccountArray = new JSONArray();
|
|
|
- for(int i=0;i<awemeFanAccount.length;i++){
|
|
|
- awemeFanAccountArray.add(awemeFanAccount[i]);
|
|
|
- }
|
|
|
- params.put("aweme_fan_accounts",awemeFanAccountArray);
|
|
|
+ params.put("aweme_fan_accounts",awemeFanAccount);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdAwemeFansNumbers())){
|
|
|
String[] awemeFansNumbers = strategy.getAdAwemeFansNumbers().split(",");
|
|
|
if(awemeFansNumbers.length>0){
|
|
|
- JSONArray awemeFansNumbersArray = new JSONArray();
|
|
|
- for(int i=0;i<awemeFansNumbers.length;i++){
|
|
|
- awemeFansNumbersArray.add(awemeFansNumbers[i]);
|
|
|
- }
|
|
|
- params.put("aweme_fans_numbers",awemeFansNumbersArray);
|
|
|
+ params.put("aweme_fans_numbers",awemeFansNumbers);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdFilterAwemeAbnormalActive())){
|
|
@@ -627,31 +591,19 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
if(!Check.isNull(strategy.getAdFlowPackage())){
|
|
|
String[] flowPackage = strategy.getAdFlowPackage().split(",");
|
|
|
if(flowPackage.length>0){
|
|
|
- JSONArray flowPackageArray = new JSONArray();
|
|
|
- for(int i=0;i<flowPackage.length;i++){
|
|
|
- flowPackageArray.add(flowPackage[i]);
|
|
|
- }
|
|
|
- params.put("flow_package",flowPackageArray);
|
|
|
+ params.put("flow_package",flowPackage);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdExcludeFlowPackage())){
|
|
|
String[] excludeFlowPackage = strategy.getAdExcludeFlowPackage().split(",");
|
|
|
if(excludeFlowPackage.length>0){
|
|
|
- JSONArray excludeFlowPackageArray = new JSONArray();
|
|
|
- for(int i=0;i<excludeFlowPackage.length;i++){
|
|
|
- excludeFlowPackageArray.add(excludeFlowPackage[i]);
|
|
|
- }
|
|
|
- params.put("exclude_flow_package",excludeFlowPackageArray);
|
|
|
+ params.put("exclude_flow_package",excludeFlowPackage);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdPlatform())){
|
|
|
String[] platform = strategy.getAdPlatform().split(",");
|
|
|
if(platform.length>0){
|
|
|
- JSONArray platformArray = new JSONArray();
|
|
|
- for(int i=0;i<platform.length;i++){
|
|
|
- platformArray.add(platform[i]);
|
|
|
- }
|
|
|
- params.put("platform",platformArray);
|
|
|
+ params.put("platform",platform);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -693,11 +645,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
if(!Check.isNull(strategy.getAdDeviceType())){
|
|
|
String[] deviceType = strategy.getAdDeviceType().split(",");
|
|
|
if(deviceType.length>0){
|
|
|
- JSONArray deviceTypeArray = new JSONArray();
|
|
|
- for(int i=0;i<deviceType.length;i++){
|
|
|
- deviceTypeArray.add(deviceType[i]);
|
|
|
- }
|
|
|
- params.put("device_type",deviceTypeArray);
|
|
|
+ params.put("device_type",deviceType);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -714,41 +662,25 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
if(!Check.isNull(strategy.getAdActivateType())){
|
|
|
String[] activateType = strategy.getAdActivateType().split(",");
|
|
|
if(activateType.length>0){
|
|
|
- JSONArray activateTypeArray = new JSONArray();
|
|
|
- for(int i=0;i<activateType.length;i++){
|
|
|
- activateTypeArray.add(activateType[i]);
|
|
|
- }
|
|
|
- params.put("activate_type",activateTypeArray);
|
|
|
+ params.put("activate_type",activateType);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdArticleCategory())){
|
|
|
String[] articleCategory = strategy.getAdArticleCategory().split(",");
|
|
|
if(articleCategory.length>0){
|
|
|
- JSONArray articleCategoryArray = new JSONArray();
|
|
|
- for(int i=0;i<articleCategory.length;i++){
|
|
|
- articleCategoryArray.add(articleCategory[i]);
|
|
|
- }
|
|
|
- params.put("article_category",articleCategoryArray);
|
|
|
+ params.put("article_category",articleCategory);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdDeviceBrand())){
|
|
|
String[] deviceBrand = strategy.getAdDeviceBrand().split(",");
|
|
|
if(deviceBrand.length>0){
|
|
|
- JSONArray deviceBrandArray = new JSONArray();
|
|
|
- for(int i=0;i<deviceBrand.length;i++){
|
|
|
- deviceBrandArray.add(deviceBrand[i]);
|
|
|
- }
|
|
|
- params.put("device_brand",deviceBrandArray);
|
|
|
+ params.put("device_brand",deviceBrand);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdLaunchPrice())){
|
|
|
String[] launchPrice = strategy.getAdLaunchPrice().split(",");
|
|
|
if(launchPrice.length>0){
|
|
|
- JSONArray launchPriceArray = new JSONArray();
|
|
|
- for(int i=0;i<launchPrice.length;i++){
|
|
|
- launchPriceArray.add(launchPrice[i]);
|
|
|
- }
|
|
|
- params.put("launch_price",launchPriceArray);
|
|
|
+ params.put("launch_price",launchPrice);
|
|
|
}
|
|
|
}
|
|
|
if(!Check.isNull(strategy.getAdAutoExtendEnabled())){
|
|
@@ -757,11 +689,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
if(!Check.isNull(strategy.getAdAutoExtendTargets())){
|
|
|
String[] autoExtendTargets = strategy.getAdAutoExtendTargets().split(",");
|
|
|
if(autoExtendTargets.length>0){
|
|
|
- JSONArray autoExtendTargetsArray = new JSONArray();
|
|
|
- for(int i=0;i<autoExtendTargets.length;i++){
|
|
|
- autoExtendTargetsArray.add(autoExtendTargets[i]);
|
|
|
- }
|
|
|
- params.put("auto_extend_targets",autoExtendTargetsArray);
|
|
|
+ params.put("auto_extend_targets",autoExtendTargets);
|
|
|
}
|
|
|
}
|
|
|
//预算与出价
|
|
@@ -923,6 +851,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @param
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Override
|
|
|
@Transactional
|
|
|
public Result updStaById(String id,String state,String accountId) {
|
|
|
//开启
|
|
@@ -948,6 +877,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @param updAdStaOrCpaOrBudget
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Override
|
|
|
public Result updStaOrCpaOrBudgetById(UpdAdStaOrCpaOrBudget updAdStaOrCpaOrBudget) {
|
|
|
Result updResult = new Result();
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(updAdStaOrCpaOrBudget.getAccountId());
|
|
@@ -975,7 +905,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @return org.jeecg.common.api.vo.Result
|
|
|
* @author zianY
|
|
|
*/
|
|
|
- public Result getIndustryList(String accountId,String type) throws Exception {
|
|
|
+ @Override
|
|
|
+ public Result getIndustryList(String accountId, String type) throws Exception {
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(accountId);
|
|
|
if (null == token) {
|
|
|
log.info("token获取失败=>accountId:{}", token.getAccountId());
|
|
@@ -1041,7 +972,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @return: org.jeecg.common.api.vo.Result
|
|
|
* @author: zianY
|
|
|
*/
|
|
|
- public Result getCampaignGroup(String accountId,List<AdGroupSearchVo> adGroupSearchVoList, Integer pageNo, Integer pageSize) {
|
|
|
+ @Override
|
|
|
+ public Result getCampaignGroup(String accountId, List<AdGroupSearchVo> adGroupSearchVoList, Integer pageNo, Integer pageSize) {
|
|
|
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(accountId);
|
|
|
if (null == token) {
|
|
@@ -1067,6 +999,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @return org.jeecg.common.api.vo.Result
|
|
|
* @author zianY
|
|
|
*/
|
|
|
+ @Override
|
|
|
public Result getCampaignPlan(String accountId, List<PlanSearchVo> adGroupSearchVoList, Integer pageNo, Integer pageSize) {
|
|
|
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(accountId);
|
|
@@ -1089,6 +1022,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @return: org.jeecg.common.api.vo.Result
|
|
|
* @author: zianY
|
|
|
*/
|
|
|
+ @Override
|
|
|
public Result creativeReadInfo(String accountId, String adId) {
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(accountId);
|
|
|
if (null == token) {
|
|
@@ -1108,7 +1042,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @return: org.jeecg.common.api.vo.Result
|
|
|
* @author: zianY
|
|
|
*/
|
|
|
- public Result updateADCreative(AiBytedanceAdvertiserStrategy strategy,String groupModifyTime,String planModifyTime) {
|
|
|
+ @Override
|
|
|
+ public Result updateADCreative(AiBytedanceAdvertiserStrategy strategy, String groupModifyTime, String planModifyTime) {
|
|
|
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(strategy.getAccountId()+"");
|
|
|
if (null == token) {
|
|
@@ -1141,6 +1076,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @return: org.jeecg.common.api.vo.Result
|
|
|
* @author: zianY
|
|
|
*/
|
|
|
+ @Override
|
|
|
public Result getToolConvert(AdConvertQueryVo adConvertQueryVo) {
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(adConvertQueryVo.getAdvertiserId());
|
|
|
if (null == token) {
|
|
@@ -1159,6 +1095,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* @return: org.jeecg.common.api.vo.Result
|
|
|
* @author: zianY
|
|
|
*/
|
|
|
+ @Override
|
|
|
public Result addBytedanceStrategy(AiBytedanceAdvertiserStrategy aiBytedanceAdvertiserStrategy) {
|
|
|
// 数据入库 string[] 转 string
|
|
|
//商品卖点
|