Kaynağa Gözat

增加例外设置

xueyiming 6 ay önce
ebeveyn
işleme
6917a4e41b

+ 11 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/AccountSpecialSettings.java

@@ -17,6 +17,8 @@ public class AccountSpecialSettings {
 
     private String excludeContentIndex;
 
+    private Integer isDelete;
+
     private Date createTime;
 
     private Date updateTime;
@@ -77,6 +79,14 @@ public class AccountSpecialSettings {
         this.excludeContentIndex = excludeContentIndex;
     }
 
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -106,6 +116,7 @@ public class AccountSpecialSettings {
         sb.append(", pushType=").append(pushType);
         sb.append(", publishNum=").append(publishNum);
         sb.append(", excludeContentIndex=").append(excludeContentIndex);
+        sb.append(", isDelete=").append(isDelete);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");

+ 60 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/AccountSpecialSettingsExample.java

@@ -576,6 +576,66 @@ public class AccountSpecialSettingsExample {
             return (Criteria) this;
         }
 
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             return (Criteria) this;

+ 11 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/PlanAccount.java

@@ -43,6 +43,8 @@ public class PlanAccount {
 
     private String sortStrategy;
 
+    private String excludeContentIndex;
+
     private Integer status;
 
     private Integer matchStatus;
@@ -219,6 +221,14 @@ public class PlanAccount {
         this.sortStrategy = sortStrategy;
     }
 
+    public String getExcludeContentIndex() {
+        return excludeContentIndex;
+    }
+
+    public void setExcludeContentIndex(String excludeContentIndex) {
+        this.excludeContentIndex = excludeContentIndex;
+    }
+
     public Integer getStatus() {
         return status;
     }
@@ -309,6 +319,7 @@ public class PlanAccount {
         sb.append(", miniStrategy=").append(miniStrategy);
         sb.append(", miniprogramUseType=").append(miniprogramUseType);
         sb.append(", sortStrategy=").append(sortStrategy);
+        sb.append(", excludeContentIndex=").append(excludeContentIndex);
         sb.append(", status=").append(status);
         sb.append(", matchStatus=").append(matchStatus);
         sb.append(", retryCount=").append(retryCount);

+ 70 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/PlanAccountExample.java

@@ -1426,6 +1426,76 @@ public class PlanAccountExample {
             return (Criteria) this;
         }
 
+        public Criteria andExcludeContentIndexIsNull() {
+            addCriterion("exclude_content_index is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexIsNotNull() {
+            addCriterion("exclude_content_index is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexEqualTo(String value) {
+            addCriterion("exclude_content_index =", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexNotEqualTo(String value) {
+            addCriterion("exclude_content_index <>", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexGreaterThan(String value) {
+            addCriterion("exclude_content_index >", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexGreaterThanOrEqualTo(String value) {
+            addCriterion("exclude_content_index >=", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexLessThan(String value) {
+            addCriterion("exclude_content_index <", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexLessThanOrEqualTo(String value) {
+            addCriterion("exclude_content_index <=", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexLike(String value) {
+            addCriterion("exclude_content_index like", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexNotLike(String value) {
+            addCriterion("exclude_content_index not like", value, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexIn(List<String> values) {
+            addCriterion("exclude_content_index in", values, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexNotIn(List<String> values) {
+            addCriterion("exclude_content_index not in", values, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexBetween(String value1, String value2) {
+            addCriterion("exclude_content_index between", value1, value2, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
+        public Criteria andExcludeContentIndexNotBetween(String value1, String value2) {
+            addCriterion("exclude_content_index not between", value1, value2, "excludeContentIndex");
+            return (Criteria) this;
+        }
+
         public Criteria andStatusIsNull() {
             addCriterion("`status` is null");
             return (Criteria) this;

+ 10 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/AccountService.java

@@ -0,0 +1,10 @@
+package com.tzld.piaoquan.longarticle.service.local;
+
+import com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings;
+
+import java.util.List;
+
+public interface AccountService {
+
+    List<AccountSpecialSettings> getAccountSpecialSettings();
+}

+ 2 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/PlanAccountService.java

@@ -32,4 +32,6 @@ public interface PlanAccountService {
     PlanAccount getPlanAccountById(Long id);
 
     void updateRetry(PlanAccount planAccount);
+
+    List<PlanAccount> getNormalPlanAccount(String accountId);
 }

+ 44 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/AccountServiceImpl.java

@@ -0,0 +1,44 @@
+package com.tzld.piaoquan.longarticle.service.local.impl;
+
+import com.tzld.piaoquan.longarticle.dao.mapper.AccountSpecialSettingsMapper;
+import com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings;
+import com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettingsExample;
+import com.tzld.piaoquan.longarticle.model.po.PlanAccount;
+import com.tzld.piaoquan.longarticle.model.po.PlanAccountExample;
+import com.tzld.piaoquan.longarticle.service.local.AccountService;
+import com.tzld.piaoquan.longarticle.utils.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+@Service
+public class AccountServiceImpl implements AccountService {
+
+    @Autowired
+    private AccountSpecialSettingsMapper accountSpecialSettingsMapper;
+
+    @Override
+    public List<AccountSpecialSettings> getAccountSpecialSettings() {
+        String dateString = DateUtil.getThatDayDateString();
+        AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
+        example.createCriteria().andEffectiveDateEqualTo(dateString);
+        return accountSpecialSettingsMapper.selectByExample(example);
+    }
+
+    public void saveOrUpdateAccountSpecialSettings(AccountSpecialSettings accountSpecialSettings) {
+        String dateString = DateUtil.getThatDayDateString();
+        AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
+        example.createCriteria().andEffectiveDateEqualTo(accountSpecialSettings.getAccountId())
+                .andEffectiveDateEqualTo(accountSpecialSettings.getEffectiveDate());
+        List<AccountSpecialSettings> accountSpecialSettingsList = accountSpecialSettingsMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(accountSpecialSettingsList)) {
+            accountSpecialSettingsMapper.insertSelective(accountSpecialSettings);
+        } else {
+            accountSpecialSettings.setId(accountSpecialSettingsList.get(0).getId());
+            accountSpecialSettings.setIsDelete(0);
+            accountSpecialSettingsMapper.updateByPrimaryKeySelective(accountSpecialSettings);
+        }
+    }
+}

+ 86 - 5
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -15,6 +15,7 @@ import com.tzld.piaoquan.longarticle.model.dto.MiniprogramCardRequest;
 import com.tzld.piaoquan.longarticle.model.dto.PublishArticleData;
 import com.tzld.piaoquan.longarticle.model.po.*;
 import com.tzld.piaoquan.longarticle.model.vo.*;
+import com.tzld.piaoquan.longarticle.service.local.AccountService;
 import com.tzld.piaoquan.longarticle.service.local.CoreService;
 import com.tzld.piaoquan.longarticle.service.local.PlanAccountService;
 import com.tzld.piaoquan.longarticle.service.remote.AigcService;
@@ -35,6 +36,7 @@ import java.math.BigDecimal;
 import java.time.LocalTime;
 import java.util.*;
 import java.util.concurrent.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 @Slf4j
@@ -71,9 +73,6 @@ public class CoreServiceImpl implements CoreService {
     @Autowired
     private PublishContentMapper publishContentMapper;
 
-    @Autowired
-    private RootSourceMapper rootSourceMapper;
-
     @Autowired
     private PublicContentServiceImpl publicContentService;
 
@@ -81,10 +80,19 @@ public class CoreServiceImpl implements CoreService {
     private RootSourceServiceImpl rootSourceService;
 
     @Autowired
-    private RedisTemplate<String, Object> redisTemplate;
+    private AccountService accountService;
 
     @Override
     public void initPlanAccount() {
+        //例外设置查询和存储
+        Map<String, AccountSpecialSettings> accountSpecialSettingsMap = null;
+        Map<String, List<PlanAccount>> planAccountMap = new HashMap<>();
+        List<AccountSpecialSettings> accountSpecialSettings = accountService.getAccountSpecialSettings();
+        if (!CollectionUtils.isEmpty(accountSpecialSettings)) {
+            accountSpecialSettingsMap = accountSpecialSettings.stream()
+                    .collect(Collectors.toMap(AccountSpecialSettings::getAccountId, Function.identity()));
+        }
+        //操作计划遍历
         List<Plan> planList = planAccountService.getPlanList();
         Set<String> planIdSet = planList.stream().map(Plan::getPlanId).collect(Collectors.toSet());
         List<LongArticleSystemPlan> allLongArticleSystemPlans = aigcService.getAllLongArticleSystemPlan();
@@ -144,7 +152,11 @@ public class CoreServiceImpl implements CoreService {
                     planAccount.setSortStrategy(sortStgMap.get(accountId));
                 }
                 planAccount.setPushType(longArticleSystemPlan.getPushType());
-                planAccountService.saveOrUpdatePlanAccount(planAccount);
+                if (accountSpecialSettingsMap != null && accountSpecialSettingsMap.containsKey(planAccount.getAccountId())) {
+                    planAccountMap.computeIfAbsent(planAccount.getAccountId(), k -> new ArrayList<>()).add(planAccount);
+                } else {
+                    planAccountService.saveOrUpdatePlanAccount(planAccount);
+                }
             }
             if (CollectionUtils.isEmpty(accountIdSet)) {
                 continue;
@@ -160,8 +172,77 @@ public class CoreServiceImpl implements CoreService {
         for (String planId : planIdSet) {
             planAccountService.delPlan(planId);
         }
+
+        //例外设置处理
+        if (!CollectionUtils.isEmpty(planAccountMap)) {
+            setSpecialAccount(planAccountMap, accountSpecialSettingsMap);
+        }
+    }
+
+    private void setSpecialAccount(Map<String, List<PlanAccount>> planAccountMap,
+                                   Map<String, AccountSpecialSettings> accountSpecialSettingsMap) {
+        for (Map.Entry<String, List<PlanAccount>> entry : planAccountMap.entrySet()) {
+            String accountId = entry.getKey();
+            List<PlanAccount> planAccounts = entry.getValue();
+            AccountSpecialSettings accountSpecialSettings = accountSpecialSettingsMap.get(accountId);
+            if (accountSpecialSettings == null) {
+                LarkRobotUtil.sendMessage("获取例外设置失败,accountId=" + accountId);
+                continue;
+            }
+            List<PlanAccount> normalPlanAccounts = planAccountService.getNormalPlanAccount(accountId);
+            if (CollectionUtils.isEmpty(normalPlanAccounts)) {
+                Optional<PlanAccount> firstAccount = planAccounts.stream().min((a1, a2) -> -a1.getPublishNum().compareTo(a2.getPublishNum()));
+                if (!firstAccount.isPresent()) {
+                    continue;
+                }
+                PlanAccount targetPlanAccount = firstAccount.get();
+                for (PlanAccount planAccount : planAccounts) {
+                    if (!Objects.equals(planAccount.getPlanId(), targetPlanAccount.getPlanId())) {
+                        planAccount.setPublishOpenFlag(0);
+                        planAccountService.saveOrUpdatePlanAccount(planAccount);
+                        continue;
+                    }
+                    planAccount.setPublishPushTime(accountSpecialSettings.getPublishPushTime());
+                    planAccount.setPushType(accountSpecialSettings.getPushType());
+                    planAccount.setPublishNum(accountSpecialSettings.getPublishNum());
+                    planAccount.setExcludeContentIndex(accountSpecialSettings.getExcludeContentIndex());
+                    planAccountService.saveOrUpdatePlanAccount(planAccount);
+                }
+            } else {
+                if (normalPlanAccounts.size() == 1) {
+                    boolean upadte = false;
+                    PlanAccount planAccount = normalPlanAccounts.get(0);
+                    if (!Objects.equals(planAccount.getPublishPushTime(), accountSpecialSettings.getPublishPushTime())) {
+                        planAccount.setPublishPushTime(accountSpecialSettings.getPublishPushTime());
+                        upadte = true;
+                    }
+                    if (!Objects.equals(planAccount.getPushType(), accountSpecialSettings.getPushType())) {
+                        planAccount.setPushType(accountSpecialSettings.getPushType());
+                        upadte = true;
+                    }
+                    if (!Objects.equals(planAccount.getPublishNum(), accountSpecialSettings.getPublishNum())) {
+                        planAccount.setPublishNum(accountSpecialSettings.getPublishNum());
+                        upadte = true;
+                    }
+                    if (!Objects.equals(planAccount.getExcludeContentIndex(), accountSpecialSettings.getExcludeContentIndex())) {
+                        planAccount.setExcludeContentIndex(accountSpecialSettings.getExcludeContentIndex());
+                        upadte = true;
+                    }
+                    if (upadte) {
+                        planAccountService.saveOrUpdatePlanAccount(planAccount);
+                    }
+                } else {
+                    LarkRobotUtil.sendMessage("存在多个生效计划,accountId=" + accountId);
+                    for (PlanAccount planAccount : planAccounts) {
+                        planAccount.setPublishOpenFlag(0);
+                        planAccountService.saveOrUpdatePlanAccount(planAccount);
+                    }
+                }
+            }
+        }
     }
 
+
     private Plan createPlan(LongArticleSystemPlan longArticleSystemPlan) {
         Plan plan = new Plan();
         plan.setPlanId(longArticleSystemPlan.getId());

+ 8 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/PlanAccountServiceImpl.java

@@ -146,5 +146,13 @@ public class PlanAccountServiceImpl implements PlanAccountService {
         planAccountMapper.updateByPrimaryKeySelective(updatePlanAccount);
     }
 
+    public List<PlanAccount> getNormalPlanAccount(String accountId) {
+        PlanAccountExample example = new PlanAccountExample();
+        example.createCriteria().andCreateTimeGreaterThan(DateUtil.getThatDayDate())
+                .andStatusEqualTo(0).andIsDeleteEqualTo(0).andPublishOpenFlagEqualTo(1)
+                .andAccountIdEqualTo(accountId);
+        return planAccountMapper.selectByExample(example);
+    }
+
 
 }

+ 6 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/utils/DateUtil.java

@@ -28,4 +28,10 @@ public class DateUtil {
         return localDateTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
     }
 
+    public static String getThatDayDateString() {
+        DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        LocalDate today = LocalDate.now();
+        return dateFormat.format(today);
+    }
+
 }

+ 20 - 5
long-article-server/src/main/resources/mapper/AccountSpecialSettingsMapper.xml

@@ -9,6 +9,7 @@
     <result column="push_type" jdbcType="INTEGER" property="pushType" />
     <result column="publish_num" jdbcType="INTEGER" property="publishNum" />
     <result column="exclude_content_index" jdbcType="VARCHAR" property="excludeContentIndex" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
@@ -72,7 +73,7 @@
   </sql>
   <sql id="Base_Column_List">
     id, effective_date, account_id, publish_push_time, push_type, publish_num, exclude_content_index, 
-    create_time, update_time
+    is_delete, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettingsExample" resultMap="BaseResultMap">
     select
@@ -110,12 +111,12 @@
   <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings">
     insert into long_articles_account_special_settings (id, effective_date, account_id, 
       publish_push_time, push_type, publish_num, 
-      exclude_content_index, create_time, update_time
-      )
+      exclude_content_index, is_delete, create_time, 
+      update_time)
     values (#{id,jdbcType=BIGINT}, #{effectiveDate,jdbcType=VARCHAR}, #{accountId,jdbcType=VARCHAR}, 
       #{publishPushTime,jdbcType=VARCHAR}, #{pushType,jdbcType=INTEGER}, #{publishNum,jdbcType=INTEGER}, 
-      #{excludeContentIndex,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
-      )
+      #{excludeContentIndex,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings">
     insert into long_articles_account_special_settings
@@ -141,6 +142,9 @@
       <if test="excludeContentIndex != null">
         exclude_content_index,
       </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -170,6 +174,9 @@
       <if test="excludeContentIndex != null">
         #{excludeContentIndex,jdbcType=VARCHAR},
       </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -208,6 +215,9 @@
       <if test="record.excludeContentIndex != null">
         exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
       </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -228,6 +238,7 @@
       push_type = #{record.pushType,jdbcType=INTEGER},
       publish_num = #{record.publishNum,jdbcType=INTEGER},
       exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
@@ -255,6 +266,9 @@
       <if test="excludeContentIndex != null">
         exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
       </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -272,6 +286,7 @@
       push_type = #{pushType,jdbcType=INTEGER},
       publish_num = #{publishNum,jdbcType=INTEGER},
       exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}

+ 25 - 8
long-article-server/src/main/resources/mapper/PlanAccountMapper.xml

@@ -22,6 +22,7 @@
     <result column="mini_strategy" jdbcType="VARCHAR" property="miniStrategy" />
     <result column="miniprogram_use_type" jdbcType="INTEGER" property="miniprogramUseType" />
     <result column="sort_strategy" jdbcType="VARCHAR" property="sortStrategy" />
+    <result column="exclude_content_index" jdbcType="VARCHAR" property="excludeContentIndex" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="match_status" jdbcType="INTEGER" property="matchStatus" />
     <result column="retry_count" jdbcType="INTEGER" property="retryCount" />
@@ -93,8 +94,8 @@
     id, plan_id, plan_name, account_id, account_name, gh_id, publish_rate, publish_date, 
     publish_window_start, publish_window_end, publish_time_interval, publish_num, publish_pre_num, 
     publish_pre_min_num, publish_push_time, push_type, miniprogram_insert_flag, mini_strategy, 
-    miniprogram_use_type, sort_strategy, `status`, match_status, retry_count, send_count, 
-    publish_open_flag, is_delete, create_time, update_time
+    miniprogram_use_type, sort_strategy, exclude_content_index, `status`, match_status, 
+    retry_count, send_count, publish_open_flag, is_delete, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.PlanAccountExample" resultMap="BaseResultMap">
     select
@@ -137,9 +138,10 @@
       publish_num, publish_pre_num, publish_pre_min_num, 
       publish_push_time, push_type, miniprogram_insert_flag, 
       mini_strategy, miniprogram_use_type, sort_strategy, 
-      `status`, match_status, retry_count, 
-      send_count, publish_open_flag, is_delete, 
-      create_time, update_time)
+      exclude_content_index, `status`, match_status, 
+      retry_count, send_count, publish_open_flag, 
+      is_delete, create_time, update_time
+      )
     values (#{id,jdbcType=BIGINT}, #{planId,jdbcType=VARCHAR}, #{planName,jdbcType=VARCHAR}, 
       #{accountId,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR}, #{ghId,jdbcType=VARCHAR}, 
       #{publishRate,jdbcType=INTEGER}, #{publishDate,jdbcType=VARCHAR}, #{publishWindowStart,jdbcType=VARCHAR}, 
@@ -147,9 +149,10 @@
       #{publishNum,jdbcType=INTEGER}, #{publishPreNum,jdbcType=INTEGER}, #{publishPreMinNum,jdbcType=INTEGER}, 
       #{publishPushTime,jdbcType=VARCHAR}, #{pushType,jdbcType=INTEGER}, #{miniprogramInsertFlag,jdbcType=INTEGER}, 
       #{miniStrategy,jdbcType=VARCHAR}, #{miniprogramUseType,jdbcType=INTEGER}, #{sortStrategy,jdbcType=VARCHAR}, 
-      #{status,jdbcType=INTEGER}, #{matchStatus,jdbcType=INTEGER}, #{retryCount,jdbcType=INTEGER}, 
-      #{sendCount,jdbcType=INTEGER}, #{publishOpenFlag,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+      #{excludeContentIndex,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{matchStatus,jdbcType=INTEGER}, 
+      #{retryCount,jdbcType=INTEGER}, #{sendCount,jdbcType=INTEGER}, #{publishOpenFlag,jdbcType=INTEGER}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.PlanAccount">
     insert into long_articles_plan_account
@@ -214,6 +217,9 @@
       <if test="sortStrategy != null">
         sort_strategy,
       </if>
+      <if test="excludeContentIndex != null">
+        exclude_content_index,
+      </if>
       <if test="status != null">
         `status`,
       </if>
@@ -300,6 +306,9 @@
       <if test="sortStrategy != null">
         #{sortStrategy,jdbcType=VARCHAR},
       </if>
+      <if test="excludeContentIndex != null">
+        #{excludeContentIndex,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
@@ -395,6 +404,9 @@
       <if test="record.sortStrategy != null">
         sort_strategy = #{record.sortStrategy,jdbcType=VARCHAR},
       </if>
+      <if test="record.excludeContentIndex != null">
+        exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
+      </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
       </if>
@@ -446,6 +458,7 @@
       mini_strategy = #{record.miniStrategy,jdbcType=VARCHAR},
       miniprogram_use_type = #{record.miniprogramUseType,jdbcType=INTEGER},
       sort_strategy = #{record.sortStrategy,jdbcType=VARCHAR},
+      exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
       match_status = #{record.matchStatus,jdbcType=INTEGER},
       retry_count = #{record.retryCount,jdbcType=INTEGER},
@@ -518,6 +531,9 @@
       <if test="sortStrategy != null">
         sort_strategy = #{sortStrategy,jdbcType=VARCHAR},
       </if>
+      <if test="excludeContentIndex != null">
+        exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
@@ -566,6 +582,7 @@
       mini_strategy = #{miniStrategy,jdbcType=VARCHAR},
       miniprogram_use_type = #{miniprogramUseType,jdbcType=INTEGER},
       sort_strategy = #{sortStrategy,jdbcType=VARCHAR},
+      exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       match_status = #{matchStatus,jdbcType=INTEGER},
       retry_count = #{retryCount,jdbcType=INTEGER},

+ 1 - 1
long-article-server/src/main/resources/mybatis-generator-config.xml

@@ -60,7 +60,7 @@
 <!--            <columnOverride column="cover_url" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
 <!--        </table>-->
 <!--        <table tableName="long_articles_root_source_id" domainObjectName="RootSource" alias=""/>-->
-        <table tableName="long_articles_account_special_settings" domainObjectName="AccountSpecialSettings" alias=""/>
+        <table tableName="long_articles_plan_account" domainObjectName="PlanAccount" alias=""/>
 <!--            <table tableName="long_articles_plan" domainObjectName="Plan" alias=""/>-->
 
 <!--                <table tableName="long_articles_publish_content" domainObjectName="PublishContent" alias=""/>-->