|  | @@ -2058,13 +2058,17 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
 | 
	
		
			
				|  |  |              //自定义年龄段
 | 
	
		
			
				|  |  |              if (!Check.isNull(templateTarget.getMax()) && !Check.isNull(templateTarget.getMin())) {
 | 
	
		
			
				|  |  |                  JSONObject ageJson = new JSONObject();
 | 
	
		
			
				|  |  | -                if (!Check.isNull(templateTarget.getMax())) {
 | 
	
		
			
				|  |  | -                    ageJson.put("max", templateTarget.getMax());
 | 
	
		
			
				|  |  | +                Integer max = templateTarget.getMax();
 | 
	
		
			
				|  |  | +                Integer min = templateTarget.getMin();
 | 
	
		
			
				|  |  | +                if (!Check.isNull(max) && max != -1) {
 | 
	
		
			
				|  |  | +                    ageJson.put("max", max);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if (!Check.isNull(templateTarget.getMin())) {
 | 
	
		
			
				|  |  | -                    ageJson.put("min", templateTarget.getMin());
 | 
	
		
			
				|  |  | +                if (!Check.isNull(min) && min != -1) {
 | 
	
		
			
				|  |  | +                    ageJson.put("min", min);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (!ageJson.isEmpty()) {
 | 
	
		
			
				|  |  | +                    target.put("age", ageJson);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                target.put("age", ageJson);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              // 固定年龄段
 | 
	
		
			
				|  |  |              JSONArray agesRange = JSONArray.parseArray(templateTarget.getAgesRange());
 | 
	
	
		
			
				|  | @@ -2178,31 +2182,27 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
 | 
	
		
			
				|  |  |              JSONObject behaviorInterest = new JSONObject();
 | 
	
		
			
				|  |  |              JSONObject behavior = new JSONObject();
 | 
	
		
			
				|  |  |              JSONObject interest = new JSONObject();
 | 
	
		
			
				|  |  | -            if (!Check.isNull(templateTarget.getKeyword())) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            String keyword = templateTarget.getKeyword();
 | 
	
		
			
				|  |  | +            if (!Check.isNull(keyword) && !keyword.isEmpty()) {
 | 
	
		
			
				|  |  |                  behavior.put("keyword", JSONArray.parseArray(templateTarget.getKeyword()));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(templateTarget.getLabel())) {
 | 
	
		
			
				|  |  | +            String label = templateTarget.getLabel();
 | 
	
		
			
				|  |  | +            if (!Check.isNull(label) && !label.isEmpty()) {
 | 
	
		
			
				|  |  |                  behavior.put("label", JSONArray.parseArray(templateTarget.getLabel()));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(templateTarget.getStrengthType())) {
 | 
	
		
			
				|  |  | -                behavior.put("strength_type", templateTarget.getStrengthType());
 | 
	
		
			
				|  |  | +            String interestLabel = templateTarget.getInterestLabel();
 | 
	
		
			
				|  |  | +            if (!Check.isNull(interestLabel) && !interestLabel.isEmpty()) {
 | 
	
		
			
				|  |  | +                interest.put("label", JSONArray.parseArray(interestLabel));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(templateTarget.getTimeType())) {
 | 
	
		
			
				|  |  | +            String sceneType = templateTarget.getSceneType();
 | 
	
		
			
				|  |  | +            if (!Check.isNull(templateTarget.getTimeType()) && !Check.isNull(sceneType) && !sceneType.isEmpty() && !Check.isNull(templateTarget.getInterestLabel())) {
 | 
	
		
			
				|  |  |                  behavior.put("time_type", templateTarget.getTimeType());
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(templateTarget.getSceneType())) {
 | 
	
		
			
				|  |  | -                behavior.put("scene_type", JSONArray.parseArray(templateTarget.getSceneType()));
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(templateTarget.getInterestLabel())) {
 | 
	
		
			
				|  |  | -                interest.put("label", JSONArray.parseArray(templateTarget.getInterestLabel()));
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(behavior) && !behavior.isEmpty()) {
 | 
	
		
			
				|  |  | +                behavior.put("scene_type", JSONArray.parseArray(sceneType));
 | 
	
		
			
				|  |  | +                behavior.put("strength_type", templateTarget.getStrengthType());
 | 
	
		
			
				|  |  |                  behaviorInterest.put("behavior", behavior);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(interest) && !interest.isEmpty()) {
 | 
	
		
			
				|  |  | +                interest.put("scene_type", JSONArray.parseArray(sceneType));
 | 
	
		
			
				|  |  |                  behaviorInterest.put("interest", interest);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            if (!Check.isNull(behaviorInterest) && !behaviorInterest.isEmpty()) {
 | 
	
		
			
				|  |  |                  target.put("behavior_interest", behaviorInterest);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              return target;
 |