Explorar o código

Merge branch 'dev-xym-settings' of Server/long-article-manage into master

xueyiming hai 3 meses
pai
achega
377e7798a4
Modificáronse 22 ficheiros con 1803 adicións e 19 borrados
  1. 30 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/dao/mapper/AccountSpecialSettingsMapper.java
  2. 13 2
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/job/PlanAccountJob.java
  3. 1 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/dto/ArticleSortRequest.java
  4. 136 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/AccountSpecialSettings.java
  5. 922 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/AccountSpecialSettingsExample.java
  6. 11 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/PlanAccount.java
  7. 70 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/PlanAccountExample.java
  8. 15 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/vo/SpecialSettingAccountVO.java
  9. 29 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/vo/SpecialSettingVO.java
  10. 12 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/AccountService.java
  11. 2 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/CoreService.java
  12. 2 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/PlanAccountService.java
  13. 47 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/AccountServiceImpl.java
  14. 6 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/ContentServiceImpl.java
  15. 135 6
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java
  16. 7 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/PlanAccountServiceImpl.java
  17. 2 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/remote/AigcService.java
  18. 22 2
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/remote/impl/AigcServiceImpl.java
  19. 6 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/utils/DateUtil.java
  20. 309 0
      long-article-server/src/main/resources/mapper/AccountSpecialSettingsMapper.xml
  21. 25 8
      long-article-server/src/main/resources/mapper/PlanAccountMapper.xml
  22. 1 1
      long-article-server/src/main/resources/mybatis-generator-config.xml

+ 30 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/dao/mapper/AccountSpecialSettingsMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.longarticle.dao.mapper;
+
+import com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings;
+import com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettingsExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AccountSpecialSettingsMapper {
+    long countByExample(AccountSpecialSettingsExample example);
+
+    int deleteByExample(AccountSpecialSettingsExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AccountSpecialSettings record);
+
+    int insertSelective(AccountSpecialSettings record);
+
+    List<AccountSpecialSettings> selectByExample(AccountSpecialSettingsExample example);
+
+    AccountSpecialSettings selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") AccountSpecialSettings record, @Param("example") AccountSpecialSettingsExample example);
+
+    int updateByExample(@Param("record") AccountSpecialSettings record, @Param("example") AccountSpecialSettingsExample example);
+
+    int updateByPrimaryKeySelective(AccountSpecialSettings record);
+
+    int updateByPrimaryKey(AccountSpecialSettings record);
+}

+ 13 - 2
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/job/PlanAccountJob.java

@@ -1,6 +1,6 @@
 package com.tzld.piaoquan.longarticle.job;
 
-import com.tzld.piaoquan.longarticle.service.local.impl.CoreServiceImpl;
+import com.tzld.piaoquan.longarticle.service.local.CoreService;
 import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -16,11 +16,22 @@ import static com.tzld.piaoquan.longarticle.common.constants.RedisConstant.REDIS
 public class PlanAccountJob {
 
     @Autowired
-    private CoreServiceImpl coreService;
+    private CoreService coreService;
 
     @Autowired
     private RedisTemplate<String, Object> redisTemplate;
 
+    @XxlJob("initAccountSpecialSettingsJob")
+    public ReturnT<String> initAccountSpecialSettings(String param) {
+        try {
+            coreService.initAccountSpecialSettings();
+        } catch (Exception e) {
+            LarkRobotUtil.sendMessage("例外设置异常,请及时查看,@薛一鸣");
+            log.error("initPlanAccountJob error", e);
+        }
+        return ReturnT.SUCCESS;
+    }
+
 
     @XxlJob("initPlanAccountJob")
     public ReturnT<String> initPlanAccount(String param) {

+ 1 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/dto/ArticleSortRequest.java

@@ -19,4 +19,5 @@ public class ArticleSortRequest {
     private Integer pushType;
     private boolean excludeLog;
     private List<PublishArticleData> publishArticleList;
+    private List<Integer> excludeContentIndex;
 }

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

@@ -0,0 +1,136 @@
+package com.tzld.piaoquan.longarticle.model.po;
+
+import java.util.Date;
+
+public class AccountSpecialSettings {
+    private Long id;
+
+    private String specialSettingId;
+
+    private String effectiveDate;
+
+    private String accountId;
+
+    private String publishPushTime;
+
+    private Integer pushType;
+
+    private Integer publishNum;
+
+    private String excludeContentIndex;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getSpecialSettingId() {
+        return specialSettingId;
+    }
+
+    public void setSpecialSettingId(String specialSettingId) {
+        this.specialSettingId = specialSettingId;
+    }
+
+    public String getEffectiveDate() {
+        return effectiveDate;
+    }
+
+    public void setEffectiveDate(String effectiveDate) {
+        this.effectiveDate = effectiveDate;
+    }
+
+    public String getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(String accountId) {
+        this.accountId = accountId;
+    }
+
+    public String getPublishPushTime() {
+        return publishPushTime;
+    }
+
+    public void setPublishPushTime(String publishPushTime) {
+        this.publishPushTime = publishPushTime;
+    }
+
+    public Integer getPushType() {
+        return pushType;
+    }
+
+    public void setPushType(Integer pushType) {
+        this.pushType = pushType;
+    }
+
+    public Integer getPublishNum() {
+        return publishNum;
+    }
+
+    public void setPublishNum(Integer publishNum) {
+        this.publishNum = publishNum;
+    }
+
+    public String getExcludeContentIndex() {
+        return excludeContentIndex;
+    }
+
+    public void setExcludeContentIndex(String excludeContentIndex) {
+        this.excludeContentIndex = excludeContentIndex;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", specialSettingId=").append(specialSettingId);
+        sb.append(", effectiveDate=").append(effectiveDate);
+        sb.append(", accountId=").append(accountId);
+        sb.append(", publishPushTime=").append(publishPushTime);
+        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("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,922 @@
+package com.tzld.piaoquan.longarticle.model.po;
+
+import com.tzld.piaoquan.longarticle.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AccountSpecialSettingsExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public AccountSpecialSettingsExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdIsNull() {
+            addCriterion("special_setting_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdIsNotNull() {
+            addCriterion("special_setting_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdEqualTo(String value) {
+            addCriterion("special_setting_id =", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdNotEqualTo(String value) {
+            addCriterion("special_setting_id <>", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdGreaterThan(String value) {
+            addCriterion("special_setting_id >", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdGreaterThanOrEqualTo(String value) {
+            addCriterion("special_setting_id >=", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdLessThan(String value) {
+            addCriterion("special_setting_id <", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdLessThanOrEqualTo(String value) {
+            addCriterion("special_setting_id <=", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdLike(String value) {
+            addCriterion("special_setting_id like", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdNotLike(String value) {
+            addCriterion("special_setting_id not like", value, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdIn(List<String> values) {
+            addCriterion("special_setting_id in", values, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdNotIn(List<String> values) {
+            addCriterion("special_setting_id not in", values, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdBetween(String value1, String value2) {
+            addCriterion("special_setting_id between", value1, value2, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpecialSettingIdNotBetween(String value1, String value2) {
+            addCriterion("special_setting_id not between", value1, value2, "specialSettingId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateIsNull() {
+            addCriterion("effective_date is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateIsNotNull() {
+            addCriterion("effective_date is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateEqualTo(String value) {
+            addCriterion("effective_date =", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateNotEqualTo(String value) {
+            addCriterion("effective_date <>", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateGreaterThan(String value) {
+            addCriterion("effective_date >", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateGreaterThanOrEqualTo(String value) {
+            addCriterion("effective_date >=", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateLessThan(String value) {
+            addCriterion("effective_date <", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateLessThanOrEqualTo(String value) {
+            addCriterion("effective_date <=", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateLike(String value) {
+            addCriterion("effective_date like", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateNotLike(String value) {
+            addCriterion("effective_date not like", value, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateIn(List<String> values) {
+            addCriterion("effective_date in", values, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateNotIn(List<String> values) {
+            addCriterion("effective_date not in", values, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateBetween(String value1, String value2) {
+            addCriterion("effective_date between", value1, value2, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andEffectiveDateNotBetween(String value1, String value2) {
+            addCriterion("effective_date not between", value1, value2, "effectiveDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNull() {
+            addCriterion("account_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNotNull() {
+            addCriterion("account_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdEqualTo(String value) {
+            addCriterion("account_id =", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotEqualTo(String value) {
+            addCriterion("account_id <>", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThan(String value) {
+            addCriterion("account_id >", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThanOrEqualTo(String value) {
+            addCriterion("account_id >=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThan(String value) {
+            addCriterion("account_id <", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThanOrEqualTo(String value) {
+            addCriterion("account_id <=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLike(String value) {
+            addCriterion("account_id like", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotLike(String value) {
+            addCriterion("account_id not like", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIn(List<String> values) {
+            addCriterion("account_id in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotIn(List<String> values) {
+            addCriterion("account_id not in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdBetween(String value1, String value2) {
+            addCriterion("account_id between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotBetween(String value1, String value2) {
+            addCriterion("account_id not between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeIsNull() {
+            addCriterion("publish_push_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeIsNotNull() {
+            addCriterion("publish_push_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeEqualTo(String value) {
+            addCriterion("publish_push_time =", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeNotEqualTo(String value) {
+            addCriterion("publish_push_time <>", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeGreaterThan(String value) {
+            addCriterion("publish_push_time >", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeGreaterThanOrEqualTo(String value) {
+            addCriterion("publish_push_time >=", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeLessThan(String value) {
+            addCriterion("publish_push_time <", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeLessThanOrEqualTo(String value) {
+            addCriterion("publish_push_time <=", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeLike(String value) {
+            addCriterion("publish_push_time like", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeNotLike(String value) {
+            addCriterion("publish_push_time not like", value, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeIn(List<String> values) {
+            addCriterion("publish_push_time in", values, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeNotIn(List<String> values) {
+            addCriterion("publish_push_time not in", values, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeBetween(String value1, String value2) {
+            addCriterion("publish_push_time between", value1, value2, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishPushTimeNotBetween(String value1, String value2) {
+            addCriterion("publish_push_time not between", value1, value2, "publishPushTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeIsNull() {
+            addCriterion("push_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeIsNotNull() {
+            addCriterion("push_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeEqualTo(Integer value) {
+            addCriterion("push_type =", value, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeNotEqualTo(Integer value) {
+            addCriterion("push_type <>", value, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeGreaterThan(Integer value) {
+            addCriterion("push_type >", value, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("push_type >=", value, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeLessThan(Integer value) {
+            addCriterion("push_type <", value, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("push_type <=", value, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeIn(List<Integer> values) {
+            addCriterion("push_type in", values, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeNotIn(List<Integer> values) {
+            addCriterion("push_type not in", values, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeBetween(Integer value1, Integer value2) {
+            addCriterion("push_type between", value1, value2, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPushTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("push_type not between", value1, value2, "pushType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumIsNull() {
+            addCriterion("publish_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumIsNotNull() {
+            addCriterion("publish_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumEqualTo(Integer value) {
+            addCriterion("publish_num =", value, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumNotEqualTo(Integer value) {
+            addCriterion("publish_num <>", value, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumGreaterThan(Integer value) {
+            addCriterion("publish_num >", value, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumGreaterThanOrEqualTo(Integer value) {
+            addCriterion("publish_num >=", value, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumLessThan(Integer value) {
+            addCriterion("publish_num <", value, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumLessThanOrEqualTo(Integer value) {
+            addCriterion("publish_num <=", value, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumIn(List<Integer> values) {
+            addCriterion("publish_num in", values, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumNotIn(List<Integer> values) {
+            addCriterion("publish_num not in", values, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumBetween(Integer value1, Integer value2) {
+            addCriterion("publish_num between", value1, value2, "publishNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPublishNumNotBetween(Integer value1, Integer value2) {
+            addCriterion("publish_num not between", value1, value2, "publishNum");
+            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 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;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 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;

+ 15 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/vo/SpecialSettingAccountVO.java

@@ -0,0 +1,15 @@
+package com.tzld.piaoquan.longarticle.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class SpecialSettingAccountVO {
+    //账号ID")
+    private String id;
+    //账号名称")
+    private String name;
+    //公众号ID")
+    private String ghId;
+}

+ 29 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/vo/SpecialSettingVO.java

@@ -0,0 +1,29 @@
+package com.tzld.piaoquan.longarticle.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+@Data
+@ToString
+public class SpecialSettingVO {
+    //ID,更新时需要传")
+    private String id;
+    //计划名称")
+    private String name;
+    //生效账号")
+    private List<SpecialSettingAccountVO> accountList;
+    //生效日期 yyyy-MM-dd 格式")
+    private String effectiveDate;
+    //推送时间 HH:mm:ss 格式")
+    private String pushTime;
+    //推送方式(1-手动推送)")
+    private Integer pushType;
+    //推送条数")
+    private Integer pushNum;
+    //文章排除位置")
+    private List<String> excludeArticleIndexList;
+
+}
+

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

@@ -0,0 +1,12 @@
+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();
+
+    void saveOrUpdateAccountSpecialSettings(AccountSpecialSettings accountSpecialSettings);
+}

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

@@ -2,6 +2,8 @@ package com.tzld.piaoquan.longarticle.service.local;
 
 public interface CoreService {
 
+    void initAccountSpecialSettings();
+
     void initPlanAccount();
 
     void matchContent() throws InterruptedException;

+ 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> getPlanAccount(String accountId);
 }

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

@@ -0,0 +1,47 @@
+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.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@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) {
+        AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
+        example.createCriteria().andAccountIdEqualTo(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);
+        }
+    }
+
+
+}

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

@@ -175,6 +175,12 @@ public class ContentServiceImpl implements ContentService {
         }
         articleSortRequest.setPlanId(planAccount.getPlanId());
         articleSortRequest.setPushType(planAccount.getPushType());
+        if (StringUtils.isNotEmpty(planAccount.getExcludeContentIndex())) {
+            List<Integer> excludeContentIndexList = JSONArray.parseArray(planAccount.getExcludeContentIndex(), Integer.class);
+            if (!CollectionUtils.isEmpty(excludeContentIndexList)) {
+                articleSortRequest.setExcludeContentIndex(excludeContentIndexList);
+            }
+        }
         log.info("articleSortRequest={}", JSONObject.toJSONString(articleSortRequest));
         ArticleSortResponse articleSortResponse = sortService.publishArticleSort(articleSortRequest);
 

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

@@ -1,6 +1,7 @@
 package com.tzld.piaoquan.longarticle.service.local.impl;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.tzld.piaoquan.longarticle.common.constants.TimeConstant;
 import com.tzld.piaoquan.longarticle.common.enums.ContentStatusEnum;
 import com.tzld.piaoquan.longarticle.common.enums.PublishGzhPushTypeEnum;
@@ -15,6 +16,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 +37,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 +74,6 @@ public class CoreServiceImpl implements CoreService {
     @Autowired
     private PublishContentMapper publishContentMapper;
 
-    @Autowired
-    private RootSourceMapper rootSourceMapper;
-
     @Autowired
     private PublicContentServiceImpl publicContentService;
 
@@ -81,10 +81,47 @@ public class CoreServiceImpl implements CoreService {
     private RootSourceServiceImpl rootSourceService;
 
     @Autowired
-    private RedisTemplate<String, Object> redisTemplate;
+    private AccountService accountService;
+
+    public void initAccountSpecialSettings() {
+        List<SpecialSettingVO> specialSettings = aigcService.getSpecialSetting();
+        if (CollectionUtils.isEmpty(specialSettings)) {
+            return;
+        }
+        for (SpecialSettingVO specialSettingVO : specialSettings) {
+            if (CollectionUtils.isEmpty(specialSettingVO.getAccountList())) {
+                continue;
+            }
+            for (SpecialSettingAccountVO specialSettingAccountVO : specialSettingVO.getAccountList()) {
+                AccountSpecialSettings accountSpecialSettings = new AccountSpecialSettings();
+                accountSpecialSettings.setSpecialSettingId(specialSettingVO.getId());
+                accountSpecialSettings.setEffectiveDate(specialSettingVO.getEffectiveDate());
+                accountSpecialSettings.setAccountId(specialSettingAccountVO.getId());
+                accountSpecialSettings.setPublishPushTime(specialSettingVO.getPushTime());
+                accountSpecialSettings.setPushType(specialSettingVO.getPushType());
+                accountSpecialSettings.setPublishNum(specialSettingVO.getPushNum());
+                if (!CollectionUtils.isEmpty(specialSettingVO.getExcludeArticleIndexList())) {
+                    List<Integer> collect = specialSettingVO.getExcludeArticleIndexList().stream()
+                            .map(Integer::parseInt).collect(Collectors.toList());
+                    accountSpecialSettings.setExcludeContentIndex(JSON.toJSONString(collect));
+                }
+                accountService.saveOrUpdateAccountSpecialSettings(accountSpecialSettings);
+            }
+        }
+
+    }
 
     @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 +181,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 +201,92 @@ 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;
+            }
+            //根据例外设置账号判断,当天已经有发送成功的记录,确保不会生成新的例外操作计划
+            boolean isSend = false;
+            List<PlanAccount> planAccountList = planAccountService.getPlanAccount(accountId);
+            for (PlanAccount planAccount : planAccountList) {
+                int sendCount = publicContentService.getSendCount(planAccount.getId());
+                if (sendCount > 0) {
+                    isSend = true;
+                    break;
+                }
+            }
+            if (isSend) {
+                continue;
+            }
+
+            //例外设置的新增和更新
+            List<PlanAccount> normalPlanAccounts = planAccountList.stream().filter(e -> e.getIsDelete() == 0).filter(e -> e.getPublishOpenFlag() == 1).collect(Collectors.toList());
+            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;
+                    }
+                    updateAccountSetting(accountSpecialSettings, planAccount);
+                    planAccountService.saveOrUpdatePlanAccount(planAccount);
+                }
+            } else {
+                if (normalPlanAccounts.size() == 1) {
+                    PlanAccount planAccount = normalPlanAccounts.get(0);
+                    updateAccountSetting(accountSpecialSettings, planAccount);
+                    planAccountService.saveOrUpdatePlanAccount(planAccount);
+                } else {
+                    LarkRobotUtil.sendMessage("存在多个例外计划,accountId=" + accountId);
+                    for (PlanAccount planAccount : planAccounts) {
+                        planAccount.setPublishOpenFlag(0);
+                        planAccountService.saveOrUpdatePlanAccount(planAccount);
+                    }
+                }
+            }
+        }
     }
 
+    private void updateAccountSetting(AccountSpecialSettings accountSpecialSettings, PlanAccount planAccount) {
+        planAccount.setPushType(accountSpecialSettings.getPushType());
+        if (PublishGzhPushTypeEnum.manual_push.getVal().equals(accountSpecialSettings.getPushType())) {
+            planAccount.setPublishWindowStart(accountSpecialSettings.getPublishPushTime());
+            //保证手动推送的结束时间在推送开始时间之后
+            planAccount.setPublishWindowEnd("23:00:00");
+        } else {
+            planAccount.setPublishPushTime(accountSpecialSettings.getPublishPushTime());
+        }
+        planAccount.setPublishPreNum(accountSpecialSettings.getPublishNum());
+        planAccount.setPublishNum(accountSpecialSettings.getPublishNum());
+        int size = 0;
+        if (StringUtils.isNotEmpty(accountSpecialSettings.getExcludeContentIndex())) {
+            size = JSONArray.parseArray(accountSpecialSettings.getExcludeContentIndex(), Integer.class).size();
+        }
+        if (planAccount.getPublishPreMinNum() > accountSpecialSettings.getPublishNum() - size) {
+            planAccount.setPublishPreMinNum(accountSpecialSettings.getPublishNum() - size);
+        }
+        planAccount.setExcludeContentIndex(accountSpecialSettings.getExcludeContentIndex());
+    }
+
+
     private Plan createPlan(LongArticleSystemPlan longArticleSystemPlan) {
         Plan plan = new Plan();
         plan.setPlanId(longArticleSystemPlan.getId());
@@ -390,11 +515,15 @@ public class CoreServiceImpl implements CoreService {
             }
         }
         Integer publishNum = planAccount.getPublishNum();
+        int size = 0;
+        if (StringUtils.isNotEmpty(planAccount.getExcludeContentIndex())) {
+            size = JSONArray.parseArray(planAccount.getExcludeContentIndex(), Integer.class).size();
+        }
         if (publishNum == null || publishNum == 0) {
             LarkRobotUtil.sendMessage("发布数量设置为0 planAccountId=" + planAccount.getId());
             return false;
         }
-        if (sendCount >= publishNum) {
+        if (sendCount >= publishNum - size) {
             return false;
         }
 

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

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

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

@@ -25,4 +25,6 @@ public interface AigcService {
     String pushCover(String coverUrl, String publishContentId);
 
     List<PushRecordVO> getTodayPushRecords(PushRecordParam param);
+
+    List<SpecialSettingVO> getSpecialSetting();
 }

+ 22 - 2
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/remote/impl/AigcServiceImpl.java

@@ -170,7 +170,7 @@ public class AigcServiceImpl implements AigcService {
         }
         int retey = 0;
         while (retey < 3) {
-            String apiUrl = "http://aigc-api.cybertogether.net/aigc//publish/LongArticleSystem/uploadMiniprogramCover";
+            String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/uploadMiniprogramCover";
             try {
                 JSONObject param = new JSONObject();
                 param.put("coverUrl", coverUrl);
@@ -192,7 +192,7 @@ public class AigcServiceImpl implements AigcService {
     }
 
     public List<PushRecordVO> getTodayPushRecords(PushRecordParam param) {
-        String apiUrl = "http://aigc-api.cybertogether.net//aigc/publish/LongArticleSystem/getTodayPushRecords";
+        String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/getTodayPushRecords";
         try {
             String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl, JSONObject.toJSONString(param));
             JSONObject jsonObject = JSON.parseObject(res);
@@ -211,4 +211,24 @@ public class AigcServiceImpl implements AigcService {
         return null;
     }
 
+    public List<SpecialSettingVO> getSpecialSetting() {
+        String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/getSpecialSettingList";
+        try {
+            String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl);
+            JSONObject jsonObject = JSON.parseObject(res);
+            Integer code = jsonObject.getInteger("code");
+            if (code == 0) {
+                JSONArray data = jsonObject.getJSONArray("data");
+                if (CollectionUtils.isEmpty(data)) {
+                    return null;
+                }
+                return data.toJavaList(SpecialSettingVO.class);
+            }
+            return null;
+        } catch (Exception e) {
+            log.error("getSpecialSetting error", e);
+        }
+        return null;
+    }
+
 }

+ 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);
+    }
+
 }

+ 309 - 0
long-article-server/src/main/resources/mapper/AccountSpecialSettingsMapper.xml

@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.longarticle.dao.mapper.AccountSpecialSettingsMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="special_setting_id" jdbcType="VARCHAR" property="specialSettingId" />
+    <result column="effective_date" jdbcType="VARCHAR" property="effectiveDate" />
+    <result column="account_id" jdbcType="VARCHAR" property="accountId" />
+    <result column="publish_push_time" jdbcType="VARCHAR" property="publishPushTime" />
+    <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>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, special_setting_id, effective_date, account_id, publish_push_time, push_type, 
+    publish_num, exclude_content_index, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettingsExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from long_articles_account_special_settings
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from long_articles_account_special_settings
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from long_articles_account_special_settings
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettingsExample">
+    delete from long_articles_account_special_settings
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings">
+    insert into long_articles_account_special_settings (id, special_setting_id, effective_date, 
+      account_id, publish_push_time, push_type, 
+      publish_num, exclude_content_index, is_delete, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{specialSettingId,jdbcType=VARCHAR}, #{effectiveDate,jdbcType=VARCHAR}, 
+      #{accountId,jdbcType=VARCHAR}, #{publishPushTime,jdbcType=VARCHAR}, #{pushType,jdbcType=INTEGER}, 
+      #{publishNum,jdbcType=INTEGER}, #{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
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="specialSettingId != null">
+        special_setting_id,
+      </if>
+      <if test="effectiveDate != null">
+        effective_date,
+      </if>
+      <if test="accountId != null">
+        account_id,
+      </if>
+      <if test="publishPushTime != null">
+        publish_push_time,
+      </if>
+      <if test="pushType != null">
+        push_type,
+      </if>
+      <if test="publishNum != null">
+        publish_num,
+      </if>
+      <if test="excludeContentIndex != null">
+        exclude_content_index,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="specialSettingId != null">
+        #{specialSettingId,jdbcType=VARCHAR},
+      </if>
+      <if test="effectiveDate != null">
+        #{effectiveDate,jdbcType=VARCHAR},
+      </if>
+      <if test="accountId != null">
+        #{accountId,jdbcType=VARCHAR},
+      </if>
+      <if test="publishPushTime != null">
+        #{publishPushTime,jdbcType=VARCHAR},
+      </if>
+      <if test="pushType != null">
+        #{pushType,jdbcType=INTEGER},
+      </if>
+      <if test="publishNum != null">
+        #{publishNum,jdbcType=INTEGER},
+      </if>
+      <if test="excludeContentIndex != null">
+        #{excludeContentIndex,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettingsExample" resultType="java.lang.Long">
+    select count(*) from long_articles_account_special_settings
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update long_articles_account_special_settings
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.specialSettingId != null">
+        special_setting_id = #{record.specialSettingId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.effectiveDate != null">
+        effective_date = #{record.effectiveDate,jdbcType=VARCHAR},
+      </if>
+      <if test="record.accountId != null">
+        account_id = #{record.accountId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.publishPushTime != null">
+        publish_push_time = #{record.publishPushTime,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pushType != null">
+        push_type = #{record.pushType,jdbcType=INTEGER},
+      </if>
+      <if test="record.publishNum != null">
+        publish_num = #{record.publishNum,jdbcType=INTEGER},
+      </if>
+      <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>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update long_articles_account_special_settings
+    set id = #{record.id,jdbcType=BIGINT},
+      special_setting_id = #{record.specialSettingId,jdbcType=VARCHAR},
+      effective_date = #{record.effectiveDate,jdbcType=VARCHAR},
+      account_id = #{record.accountId,jdbcType=VARCHAR},
+      publish_push_time = #{record.publishPushTime,jdbcType=VARCHAR},
+      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">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings">
+    update long_articles_account_special_settings
+    <set>
+      <if test="specialSettingId != null">
+        special_setting_id = #{specialSettingId,jdbcType=VARCHAR},
+      </if>
+      <if test="effectiveDate != null">
+        effective_date = #{effectiveDate,jdbcType=VARCHAR},
+      </if>
+      <if test="accountId != null">
+        account_id = #{accountId,jdbcType=VARCHAR},
+      </if>
+      <if test="publishPushTime != null">
+        publish_push_time = #{publishPushTime,jdbcType=VARCHAR},
+      </if>
+      <if test="pushType != null">
+        push_type = #{pushType,jdbcType=INTEGER},
+      </if>
+      <if test="publishNum != null">
+        publish_num = #{publishNum,jdbcType=INTEGER},
+      </if>
+      <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>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.AccountSpecialSettings">
+    update long_articles_account_special_settings
+    set special_setting_id = #{specialSettingId,jdbcType=VARCHAR},
+      effective_date = #{effectiveDate,jdbcType=VARCHAR},
+      account_id = #{accountId,jdbcType=VARCHAR},
+      publish_push_time = #{publishPushTime,jdbcType=VARCHAR},
+      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}
+  </update>
+</mapper>

+ 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_publish_match_content" domainObjectName="PublishMatchContent" alias=""/>
+        <table tableName="long_articles_account_special_settings" domainObjectName="AccountSpecialSettings" alias=""/>
 <!--            <table tableName="long_articles_plan" domainObjectName="Plan" alias=""/>-->
 
 <!--                <table tableName="long_articles_publish_content" domainObjectName="PublishContent" alias=""/>-->