Browse Source

例外设置修改

xueyiming 1 day ago
parent
commit
ac3017851d

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

@@ -19,6 +19,8 @@ public class AccountSpecialSettings {
 
 
     private String excludeContentIndex;
     private String excludeContentIndex;
 
 
+    private Integer openStatus;
+
     private Integer isDelete;
     private Integer isDelete;
 
 
     private Date createTime;
     private Date createTime;
@@ -89,6 +91,14 @@ public class AccountSpecialSettings {
         this.excludeContentIndex = excludeContentIndex;
         this.excludeContentIndex = excludeContentIndex;
     }
     }
 
 
+    public Integer getOpenStatus() {
+        return openStatus;
+    }
+
+    public void setOpenStatus(Integer openStatus) {
+        this.openStatus = openStatus;
+    }
+
     public Integer getIsDelete() {
     public Integer getIsDelete() {
         return isDelete;
         return isDelete;
     }
     }
@@ -127,6 +137,7 @@ public class AccountSpecialSettings {
         sb.append(", pushType=").append(pushType);
         sb.append(", pushType=").append(pushType);
         sb.append(", publishNum=").append(publishNum);
         sb.append(", publishNum=").append(publishNum);
         sb.append(", excludeContentIndex=").append(excludeContentIndex);
         sb.append(", excludeContentIndex=").append(excludeContentIndex);
+        sb.append(", openStatus=").append(openStatus);
         sb.append(", isDelete=").append(isDelete);
         sb.append(", isDelete=").append(isDelete);
         sb.append(", createTime=").append(createTime);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append(", updateTime=").append(updateTime);

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

@@ -646,6 +646,66 @@ public class AccountSpecialSettingsExample {
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
+        public Criteria andOpenStatusIsNull() {
+            addCriterion("open_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusIsNotNull() {
+            addCriterion("open_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusEqualTo(Integer value) {
+            addCriterion("open_status =", value, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusNotEqualTo(Integer value) {
+            addCriterion("open_status <>", value, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusGreaterThan(Integer value) {
+            addCriterion("open_status >", value, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("open_status >=", value, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusLessThan(Integer value) {
+            addCriterion("open_status <", value, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("open_status <=", value, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusIn(List<Integer> values) {
+            addCriterion("open_status in", values, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusNotIn(List<Integer> values) {
+            addCriterion("open_status not in", values, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusBetween(Integer value1, Integer value2) {
+            addCriterion("open_status between", value1, value2, "openStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("open_status not between", value1, value2, "openStatus");
+            return (Criteria) this;
+        }
+
         public Criteria andIsDeleteIsNull() {
         public Criteria andIsDeleteIsNull() {
             addCriterion("is_delete is null");
             addCriterion("is_delete is null");
             return (Criteria) this;
             return (Criteria) this;

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

@@ -24,6 +24,7 @@ public class SpecialSettingVO {
     private Integer pushNum;
     private Integer pushNum;
     //文章排除位置")
     //文章排除位置")
     private List<String> excludeArticleIndexList;
     private List<String> excludeArticleIndexList;
+    private Integer openStatus;
 
 
 }
 }
 
 

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

@@ -21,14 +21,16 @@ public class AccountServiceImpl implements AccountService {
     public List<AccountSpecialSettings> getAccountSpecialSettings() {
     public List<AccountSpecialSettings> getAccountSpecialSettings() {
         String dateString = DateUtil.getThatDayDateString();
         String dateString = DateUtil.getThatDayDateString();
         AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
         AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
-        example.createCriteria().andEffectiveDateEqualTo(dateString).andIsDeleteEqualTo(0);
+        example.createCriteria().andEffectiveDateEqualTo(dateString).andIsDeleteEqualTo(0)
+                .andOpenStatusEqualTo(1);
         return accountSpecialSettingsMapper.selectByExample(example);
         return accountSpecialSettingsMapper.selectByExample(example);
     }
     }
 
 
     public List<AccountSpecialSettings> getSendAccountSpecialSettings() {
     public List<AccountSpecialSettings> getSendAccountSpecialSettings() {
         String dateString = DateUtil.getTomorrowDateString();
         String dateString = DateUtil.getTomorrowDateString();
         AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
         AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
-        example.createCriteria().andEffectiveDateEqualTo(dateString).andIsDeleteEqualTo(0);
+        example.createCriteria().andEffectiveDateEqualTo(dateString).andIsDeleteEqualTo(0)
+                .andOpenStatusEqualTo(1);
         return accountSpecialSettingsMapper.selectByExample(example);
         return accountSpecialSettingsMapper.selectByExample(example);
     }
     }
 
 
@@ -51,7 +53,7 @@ public class AccountServiceImpl implements AccountService {
         String dateString = DateUtil.getTomorrowDateString();
         String dateString = DateUtil.getTomorrowDateString();
         AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
         AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
         example.createCriteria().andEffectiveDateEqualTo(dateString)
         example.createCriteria().andEffectiveDateEqualTo(dateString)
-                .andAccountIdEqualTo(accountId).andIsDeleteEqualTo(0);
+                .andAccountIdEqualTo(accountId).andIsDeleteEqualTo(0).andOpenStatusEqualTo(1);
         return accountSpecialSettingsMapper.countByExample(example) > 0;
         return accountSpecialSettingsMapper.countByExample(example) > 0;
     }
     }
 
 

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

@@ -93,6 +93,7 @@ public class CoreServiceImpl implements CoreService {
                 accountSpecialSettings.setPublishPushTime(specialSettingVO.getPushTime());
                 accountSpecialSettings.setPublishPushTime(specialSettingVO.getPushTime());
                 accountSpecialSettings.setPushType(specialSettingVO.getPushType());
                 accountSpecialSettings.setPushType(specialSettingVO.getPushType());
                 accountSpecialSettings.setPublishNum(specialSettingVO.getPushNum());
                 accountSpecialSettings.setPublishNum(specialSettingVO.getPushNum());
+                accountSpecialSettings.setOpenStatus(specialSettingVO.getOpenStatus());
                 if (!CollectionUtils.isEmpty(specialSettingVO.getExcludeArticleIndexList())) {
                 if (!CollectionUtils.isEmpty(specialSettingVO.getExcludeArticleIndexList())) {
                     List<Integer> collect = specialSettingVO.getExcludeArticleIndexList().stream()
                     List<Integer> collect = specialSettingVO.getExcludeArticleIndexList().stream()
                             .map(Integer::parseInt).collect(Collectors.toList());
                             .map(Integer::parseInt).collect(Collectors.toList());

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

@@ -10,6 +10,7 @@
     <result column="push_type" jdbcType="INTEGER" property="pushType" />
     <result column="push_type" jdbcType="INTEGER" property="pushType" />
     <result column="publish_num" jdbcType="INTEGER" property="publishNum" />
     <result column="publish_num" jdbcType="INTEGER" property="publishNum" />
     <result column="exclude_content_index" jdbcType="VARCHAR" property="excludeContentIndex" />
     <result column="exclude_content_index" jdbcType="VARCHAR" property="excludeContentIndex" />
+    <result column="open_status" jdbcType="INTEGER" property="openStatus" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
@@ -74,7 +75,7 @@
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
     id, special_setting_id, effective_date, account_id, publish_push_time, push_type, 
     id, special_setting_id, effective_date, account_id, publish_push_time, push_type, 
-    publish_num, exclude_content_index, is_delete, create_time, update_time
+    publish_num, exclude_content_index, open_status, is_delete, create_time, update_time
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AccountSpecialSettingsExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AccountSpecialSettingsExample" resultMap="BaseResultMap">
     select
     select
@@ -112,12 +113,14 @@
   <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AccountSpecialSettings">
   <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AccountSpecialSettings">
     insert into long_articles_account_special_settings (id, special_setting_id, effective_date, 
     insert into long_articles_account_special_settings (id, special_setting_id, effective_date, 
       account_id, publish_push_time, push_type, 
       account_id, publish_push_time, push_type, 
-      publish_num, exclude_content_index, is_delete, 
-      create_time, update_time)
+      publish_num, exclude_content_index, open_status, 
+      is_delete, create_time, update_time
+      )
     values (#{id,jdbcType=BIGINT}, #{specialSettingId,jdbcType=VARCHAR}, #{effectiveDate,jdbcType=VARCHAR}, 
     values (#{id,jdbcType=BIGINT}, #{specialSettingId,jdbcType=VARCHAR}, #{effectiveDate,jdbcType=VARCHAR}, 
       #{accountId,jdbcType=VARCHAR}, #{publishPushTime,jdbcType=VARCHAR}, #{pushType,jdbcType=INTEGER}, 
       #{accountId,jdbcType=VARCHAR}, #{publishPushTime,jdbcType=VARCHAR}, #{pushType,jdbcType=INTEGER}, 
-      #{publishNum,jdbcType=INTEGER}, #{excludeContentIndex,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+      #{publishNum,jdbcType=INTEGER}, #{excludeContentIndex,jdbcType=VARCHAR}, #{openStatus,jdbcType=INTEGER}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AccountSpecialSettings">
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AccountSpecialSettings">
     insert into long_articles_account_special_settings
     insert into long_articles_account_special_settings
@@ -146,6 +149,9 @@
       <if test="excludeContentIndex != null">
       <if test="excludeContentIndex != null">
         exclude_content_index,
         exclude_content_index,
       </if>
       </if>
+      <if test="openStatus != null">
+        open_status,
+      </if>
       <if test="isDelete != null">
       <if test="isDelete != null">
         is_delete,
         is_delete,
       </if>
       </if>
@@ -181,6 +187,9 @@
       <if test="excludeContentIndex != null">
       <if test="excludeContentIndex != null">
         #{excludeContentIndex,jdbcType=VARCHAR},
         #{excludeContentIndex,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="openStatus != null">
+        #{openStatus,jdbcType=INTEGER},
+      </if>
       <if test="isDelete != null">
       <if test="isDelete != null">
         #{isDelete,jdbcType=INTEGER},
         #{isDelete,jdbcType=INTEGER},
       </if>
       </if>
@@ -225,6 +234,9 @@
       <if test="record.excludeContentIndex != null">
       <if test="record.excludeContentIndex != null">
         exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
         exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="record.openStatus != null">
+        open_status = #{record.openStatus,jdbcType=INTEGER},
+      </if>
       <if test="record.isDelete != null">
       <if test="record.isDelete != null">
         is_delete = #{record.isDelete,jdbcType=INTEGER},
         is_delete = #{record.isDelete,jdbcType=INTEGER},
       </if>
       </if>
@@ -249,6 +261,7 @@
       push_type = #{record.pushType,jdbcType=INTEGER},
       push_type = #{record.pushType,jdbcType=INTEGER},
       publish_num = #{record.publishNum,jdbcType=INTEGER},
       publish_num = #{record.publishNum,jdbcType=INTEGER},
       exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
       exclude_content_index = #{record.excludeContentIndex,jdbcType=VARCHAR},
+      open_status = #{record.openStatus,jdbcType=INTEGER},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
@@ -280,6 +293,9 @@
       <if test="excludeContentIndex != null">
       <if test="excludeContentIndex != null">
         exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
         exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="openStatus != null">
+        open_status = #{openStatus,jdbcType=INTEGER},
+      </if>
       <if test="isDelete != null">
       <if test="isDelete != null">
         is_delete = #{isDelete,jdbcType=INTEGER},
         is_delete = #{isDelete,jdbcType=INTEGER},
       </if>
       </if>
@@ -301,6 +317,7 @@
       push_type = #{pushType,jdbcType=INTEGER},
       push_type = #{pushType,jdbcType=INTEGER},
       publish_num = #{publishNum,jdbcType=INTEGER},
       publish_num = #{publishNum,jdbcType=INTEGER},
       exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
       exclude_content_index = #{excludeContentIndex,jdbcType=VARCHAR},
+      open_status = #{openStatus,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
       update_time = #{updateTime,jdbcType=TIMESTAMP}

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

@@ -56,7 +56,7 @@
 <!--        <table tableName="long_articles_text" domainObjectName="LongArticlesText" alias="">-->
 <!--        <table tableName="long_articles_text" domainObjectName="LongArticlesText" alias="">-->
 <!--            <columnOverride column="article_text" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
 <!--            <columnOverride column="article_text" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
 <!--        </table>-->
 <!--        </table>-->
-        <table tableName="long_articles_new_video_cover" domainObjectName="NewVideoCover" alias=""/>
+        <table tableName="long_articles_account_special_settings" domainObjectName="AccountSpecialSettings" alias=""/>
 <!--            <columnOverride column="video_url" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
 <!--            <columnOverride column="video_url" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
 <!--            <columnOverride column="cover_url" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
 <!--            <columnOverride column="cover_url" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
 <!--        </table>-->
 <!--        </table>-->