Ver Fonte

定向包~修改兴趣行为定向非空判断

zhaoxian há 4 anos atrás
pai
commit
3ad6c258ec

+ 12 - 12
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/KuaishouDirectionalPackageServiceImpl.java

@@ -295,13 +295,13 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
             if (!Check.isNull(requestJson.getJSONArray("interestLabel"))) {
                 interest.put("label", requestJson.getJSONArray("interestLabel"));
             }
-            if (!Check.isNull(behavior)) {
+            if (!behavior.isEmpty()) {
                 behaviorInterest.put("behavior", behavior);
             }
-            if (!Check.isNull(interest)) {
+            if (!interest.isEmpty()) {
                 behaviorInterest.put("interest", interest);
             }
-            if (!Check.isNull(behaviorInterest)) {
+            if (!behaviorInterest.isEmpty()) {
                 targetJson.put("behavior_interest", behaviorInterest);
             }
             if (!Check.isNull(targetJson)) {
@@ -317,8 +317,8 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
                     kuaishouTemplateService.getTemplateByAccountId(accountId, oauthToken.getAccessToken(), 1);
-                }else{
-                    log.error("修改账户定向失败,"+resultJson.getString("message"));
+                } else {
+                    log.error("修改账户定向失败," + resultJson.getString("message"));
                 }
             }
         } catch (Exception e) {
@@ -338,14 +338,14 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
     }
 
     @Override
-    public Result<Object> getRelatedAccountGroup(String id, Integer type,Long accountId, Integer pageNo, Integer pageSize) {
+    public Result<Object> getRelatedAccountGroup(String id, Integer type, Long accountId, Integer pageNo, Integer pageSize) {
         PageInfo pageInfo = null;
         if (1 == type) {
             PageHelper.startPage(pageNo, pageSize);
             pageInfo = new PageInfo(packageMapper.getRelatedAccount(id));
         } else {
             PageHelper.startPage(pageNo, pageSize);
-            pageInfo = new PageInfo(packageMapper.getRelatedGroup(id,accountId));
+            pageInfo = new PageInfo(packageMapper.getRelatedGroup(id, accountId));
         }
         return Result.ok(pageInfo);
     }
@@ -493,13 +493,13 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
             if (!Check.isNull(data.getJSONArray("interestLabel"))) {
                 interest.put("label", data.getJSONArray("interestLabel"));
             }
-            if (!Check.isNull(behavior)) {
+            if (!behavior.isEmpty()) {
                 behaviorInterest.put("behavior", behavior);
             }
-            if (!Check.isNull(interest)) {
+            if (!interest.isEmpty()) {
                 behaviorInterest.put("interest", interest);
             }
-            if (!Check.isNull(behaviorInterest)) {
+            if (!behaviorInterest.isEmpty()) {
                 targetJson.put("behavior_interest", behaviorInterest);
             }
             if (!Check.isNull(targetJson)) {
@@ -535,8 +535,8 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
     }
 
     @Override
-    public Result<Object> queryPushResults(String id, JSONArray accountIds,String status) {
-        List<JSONObject> list = relMapper.queryPushResults(id, accountIds,status);
+    public Result<Object> queryPushResults(String id, JSONArray accountIds, String status) {
+        List<JSONObject> list = relMapper.queryPushResults(id, accountIds, status);
         return Result.ok(new PageInfo<>(list));
     }
 

+ 12 - 12
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/BatchServiceImpl.java

@@ -390,13 +390,13 @@ public class BatchServiceImpl implements IBatchService {
             if (!Check.isNull(requestJson.getJSONArray("interestLabel"))) {
                 interest.put("label", requestJson.getJSONArray("interestLabel"));
             }
-            if (!Check.isNull(behavior)) {
+            if (!behavior.isEmpty()) {
                 behaviorInterest.put("behavior", behavior);
             }
-            if (!Check.isNull(interest)) {
+            if (!interest.isEmpty()) {
                 behaviorInterest.put("interest", interest);
             }
-            if (!Check.isNull(behaviorInterest)) {
+            if (!behaviorInterest.isEmpty()) {
                 targetJson.put("behavior_interest", behaviorInterest);
             }
         }
@@ -727,13 +727,13 @@ public class BatchServiceImpl implements IBatchService {
                 if (!Check.isNull(requestJson.getJSONArray("interestLabel"))) {
                     interest.put("label", requestJson.getJSONArray("interestLabel"));
                 }
-                if (!Check.isNull(behavior)) {
+                if (!behavior.isEmpty()) {
                     behaviorInterest.put("behavior", behavior);
                 }
-                if (!Check.isNull(interest)) {
+                if (!interest.isEmpty()) {
                     behaviorInterest.put("interest", interest);
                 }
-                if (!Check.isNull(behaviorInterest)) {
+                if (!behaviorInterest.isEmpty()) {
                     targetJson.put("behavior_interest", behaviorInterest);
                 }
             }
@@ -1051,13 +1051,13 @@ public class BatchServiceImpl implements IBatchService {
                         if (!Check.isNull(groupTarget.getInterestLabel())) {
                             interest.put("label", JSONArray.parseArray(groupTarget.getInterestLabel()));
                         }
-                        if (!Check.isNull(behavior)) {
+                        if (!behavior.isEmpty()) {
                             behaviorInterest.put("behavior", behavior);
                         }
-                        if (!Check.isNull(interest)) {
+                        if (!interest.isEmpty()) {
                             behaviorInterest.put("interest", interest);
                         }
-                        if (!Check.isNull(behaviorInterest)) {
+                        if (!behaviorInterest.isEmpty()) {
                             targetJson.put("behavior_interest", behaviorInterest);
                         }
                     }
@@ -1958,13 +1958,13 @@ public class BatchServiceImpl implements IBatchService {
             if (!Check.isNull(requestJson.getJSONArray("interestLabel"))) {
                 interest.put("label", requestJson.getJSONArray("interestLabel"));
             }
-            if (!Check.isNull(behavior)) {
+            if (!behavior.isEmpty()) {
                 behaviorInterest.put("behavior", behavior);
             }
-            if (!Check.isNull(interest)) {
+            if (!interest.isEmpty()) {
                 behaviorInterest.put("interest", interest);
             }
-            if (!Check.isNull(behaviorInterest)) {
+            if (!behaviorInterest.isEmpty()) {
                 targetJson.put("behavior_interest", behaviorInterest);
             }
             unitJson.put("target", targetJson);

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouCampaignCopyDataServiceImpl.java

@@ -398,13 +398,13 @@ public class KuaishouCampaignCopyDataServiceImpl extends ServiceImpl<KuaishouCam
                     if (!Check.isNull(target.getJSONArray("interestLabel"))) {
                         interest.put("label", target.getJSONArray("interestLabel"));
                     }
-                    if (!Check.isNull(behavior)) {
+                    if (!behavior.isEmpty()) {
                         behaviorInterest.put("behavior", behavior);
                     }
-                    if (!Check.isNull(interest)) {
+                    if (!interest.isEmpty()) {
                         behaviorInterest.put("interest", interest);
                     }
-                    if (!Check.isNull(behaviorInterest)) {
+                    if (!behaviorInterest.isEmpty()) {
                         targetJson.put("behavior_interest", behaviorInterest);
                     }
                     unitJson.put("target", targetJson);

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouStrategyServiceImpl.java

@@ -491,13 +491,13 @@ public class KuaishouStrategyServiceImpl extends ServiceImpl<KuaishouStrategyMap
         if (!Check.isNull(groupJson.getJSONArray("interestLabel"))) {
             interest.put("label", groupJson.getJSONArray("interestLabel"));
         }
-        if (!Check.isNull(behavior)) {
+        if (!behavior.isEmpty()) {
             behaviorInterest.put("behavior", behavior);
         }
-        if (!Check.isNull(interest)) {
+        if (!interest.isEmpty()) {
             behaviorInterest.put("interest", interest);
         }
-        if (!Check.isNull(behaviorInterest)) {
+        if (!behaviorInterest.isEmpty()) {
             targetJson.put("behavior_interest", behaviorInterest);
         }
         unitJson.put("target", targetJson);