Sfoglia il codice sorgente

自动回复secret 存db

wangyunpeng 3 settimane fa
parent
commit
16f8aa8f99

+ 22 - 11
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformAccount.java

@@ -9,6 +9,8 @@ public class ContentPlatformAccount {
 
     private String channel;
 
+    private String layerType;
+
     private String contactName;
 
     private String telNum;
@@ -21,6 +23,8 @@ public class ContentPlatformAccount {
 
     private Long tokenExpireTimestamp;
 
+    private String replySecret;
+
     private Integer status;
 
     private String createAccount;
@@ -31,8 +35,6 @@ public class ContentPlatformAccount {
 
     private Long updateTimestamp;
 
-    private String layerType;
-
     public Long getId() {
         return id;
     }
@@ -65,6 +67,14 @@ public class ContentPlatformAccount {
         this.channel = channel;
     }
 
+    public String getLayerType() {
+        return layerType;
+    }
+
+    public void setLayerType(String layerType) {
+        this.layerType = layerType;
+    }
+
     public String getContactName() {
         return contactName;
     }
@@ -113,6 +123,14 @@ public class ContentPlatformAccount {
         this.tokenExpireTimestamp = tokenExpireTimestamp;
     }
 
+    public String getReplySecret() {
+        return replySecret;
+    }
+
+    public void setReplySecret(String replySecret) {
+        this.replySecret = replySecret;
+    }
+
     public Integer getStatus() {
         return status;
     }
@@ -153,14 +171,6 @@ public class ContentPlatformAccount {
         this.updateTimestamp = updateTimestamp;
     }
 
-    public String getLayerType() {
-        return layerType;
-    }
-
-    public void setLayerType(String layerType) {
-        this.layerType = layerType;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -171,18 +181,19 @@ public class ContentPlatformAccount {
         sb.append(", name=").append(name);
         sb.append(", identity=").append(identity);
         sb.append(", channel=").append(channel);
+        sb.append(", layerType=").append(layerType);
         sb.append(", contactName=").append(contactName);
         sb.append(", telNum=").append(telNum);
         sb.append(", price=").append(price);
         sb.append(", password=").append(password);
         sb.append(", token=").append(token);
         sb.append(", tokenExpireTimestamp=").append(tokenExpireTimestamp);
+        sb.append(", replySecret=").append(replySecret);
         sb.append(", status=").append(status);
         sb.append(", createAccount=").append(createAccount);
         sb.append(", createTimestamp=").append(createTimestamp);
         sb.append(", updateAccount=").append(updateAccount);
         sb.append(", updateTimestamp=").append(updateTimestamp);
-        sb.append(", layerType=").append(layerType);
         sb.append("]");
         return sb.toString();
     }

+ 140 - 70
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformAccountExample.java

@@ -375,6 +375,76 @@ public class ContentPlatformAccountExample {
             return (Criteria) this;
         }
 
+        public Criteria andLayerTypeIsNull() {
+            addCriterion("layer_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeIsNotNull() {
+            addCriterion("layer_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeEqualTo(String value) {
+            addCriterion("layer_type =", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeNotEqualTo(String value) {
+            addCriterion("layer_type <>", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeGreaterThan(String value) {
+            addCriterion("layer_type >", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("layer_type >=", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeLessThan(String value) {
+            addCriterion("layer_type <", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeLessThanOrEqualTo(String value) {
+            addCriterion("layer_type <=", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeLike(String value) {
+            addCriterion("layer_type like", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeNotLike(String value) {
+            addCriterion("layer_type not like", value, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeIn(List<String> values) {
+            addCriterion("layer_type in", values, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeNotIn(List<String> values) {
+            addCriterion("layer_type not in", values, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeBetween(String value1, String value2) {
+            addCriterion("layer_type between", value1, value2, "layerType");
+            return (Criteria) this;
+        }
+
+        public Criteria andLayerTypeNotBetween(String value1, String value2) {
+            addCriterion("layer_type not between", value1, value2, "layerType");
+            return (Criteria) this;
+        }
+
         public Criteria andContactNameIsNull() {
             addCriterion("contact_name is null");
             return (Criteria) this;
@@ -785,6 +855,76 @@ public class ContentPlatformAccountExample {
             return (Criteria) this;
         }
 
+        public Criteria andReplySecretIsNull() {
+            addCriterion("reply_secret is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretIsNotNull() {
+            addCriterion("reply_secret is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretEqualTo(String value) {
+            addCriterion("reply_secret =", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretNotEqualTo(String value) {
+            addCriterion("reply_secret <>", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretGreaterThan(String value) {
+            addCriterion("reply_secret >", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretGreaterThanOrEqualTo(String value) {
+            addCriterion("reply_secret >=", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretLessThan(String value) {
+            addCriterion("reply_secret <", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretLessThanOrEqualTo(String value) {
+            addCriterion("reply_secret <=", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretLike(String value) {
+            addCriterion("reply_secret like", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretNotLike(String value) {
+            addCriterion("reply_secret not like", value, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretIn(List<String> values) {
+            addCriterion("reply_secret in", values, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretNotIn(List<String> values) {
+            addCriterion("reply_secret not in", values, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretBetween(String value1, String value2) {
+            addCriterion("reply_secret between", value1, value2, "replySecret");
+            return (Criteria) this;
+        }
+
+        public Criteria andReplySecretNotBetween(String value1, String value2) {
+            addCriterion("reply_secret not between", value1, value2, "replySecret");
+            return (Criteria) this;
+        }
+
         public Criteria andStatusIsNull() {
             addCriterion("`status` is null");
             return (Criteria) this;
@@ -1104,76 +1244,6 @@ public class ContentPlatformAccountExample {
             addCriterion("update_timestamp not between", value1, value2, "updateTimestamp");
             return (Criteria) this;
         }
-
-        public Criteria andLayerTypeIsNull() {
-            addCriterion("layer_type is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeIsNotNull() {
-            addCriterion("layer_type is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeEqualTo(String value) {
-            addCriterion("layer_type =", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeNotEqualTo(String value) {
-            addCriterion("layer_type <>", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeGreaterThan(String value) {
-            addCriterion("layer_type >", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeGreaterThanOrEqualTo(String value) {
-            addCriterion("layer_type >=", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeLessThan(String value) {
-            addCriterion("layer_type <", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeLessThanOrEqualTo(String value) {
-            addCriterion("layer_type <=", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeLike(String value) {
-            addCriterion("layer_type like", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeNotLike(String value) {
-            addCriterion("layer_type not like", value, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeIn(List<String> values) {
-            addCriterion("layer_type in", values, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeNotIn(List<String> values) {
-            addCriterion("layer_type not in", values, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeBetween(String value1, String value2) {
-            addCriterion("layer_type between", value1, value2, "layerType");
-            return (Criteria) this;
-        }
-
-        public Criteria andLayerTypeNotBetween(String value1, String value2) {
-            addCriterion("layer_type not between", value1, value2, "layerType");
-            return (Criteria) this;
-        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 3 - 2
api-module/src/main/java/com/tzld/piaoquan/api/service/GhAccessTokenService.java

@@ -1,6 +1,6 @@
 package com.tzld.piaoquan.api.service;
 
-import com.tzld.piaoquan.api.common.enums.SecretEnum;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount;
 import com.tzld.piaoquan.api.model.vo.AccessTokenParam;
 import com.tzld.piaoquan.api.model.vo.AccessTokenVo;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
@@ -11,6 +11,7 @@ public interface GhAccessTokenService {
 
     boolean validateAccessToken(String accessToken);
 
-    SecretEnum getSecretEnum(String accessToken);
+    ContentPlatformAccount getAccountByAccessToken(String accessToken);
 
+    ContentPlatformAccount getAccountBySecret(String secret);
 }

+ 24 - 6
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhAccessTokenServiceImpl.java

@@ -1,6 +1,8 @@
 package com.tzld.piaoquan.api.service.impl;
 
-import com.tzld.piaoquan.api.common.enums.SecretEnum;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformAccountMapper;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccountExample;
 import com.tzld.piaoquan.api.model.vo.AccessTokenParam;
 import com.tzld.piaoquan.api.model.vo.AccessTokenVo;
 import com.tzld.piaoquan.api.service.GhAccessTokenService;
@@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
@@ -24,6 +27,8 @@ public class GhAccessTokenServiceImpl implements GhAccessTokenService {
 
     @Autowired
     private RedisTemplate<String, String> stringRedisTemplate;
+    @Autowired
+    private ContentPlatformAccountMapper contentPlatformAccountMapper;
 
 
     @Override
@@ -31,7 +36,8 @@ public class GhAccessTokenServiceImpl implements GhAccessTokenService {
         if (param == null || StringUtils.isEmpty(param.getSecret())) {
             return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "未找到 secret");
         }
-        if (!SecretEnum.contains(param.getSecret())) {
+        ContentPlatformAccount account = getAccountBySecret(param.getSecret());
+        if (account == null) {
             return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "secret 不存在");
         }
         AccessTokenVo accessTokenVo = new AccessTokenVo();
@@ -77,11 +83,23 @@ public class GhAccessTokenServiceImpl implements GhAccessTokenService {
     }
 
     @Override
-    public SecretEnum getSecretEnum(String accessToken) {
-        String secret = (String) stringRedisTemplate.opsForValue().get(accessToken);
-        if(StringUtils.isEmpty(secret)){
+    public ContentPlatformAccount getAccountByAccessToken(String accessToken) {
+        String secret = stringRedisTemplate.opsForValue().get(accessToken);
+        if (StringUtils.isEmpty(secret)) {
             return null;
         }
-        return SecretEnum.get(secret);
+        return getAccountBySecret(secret);
     }
+
+    @Override
+    public ContentPlatformAccount getAccountBySecret(String secret) {
+        ContentPlatformAccountExample example = new ContentPlatformAccountExample();
+        example.createCriteria().andReplySecretEqualTo(secret);
+        List<ContentPlatformAccount> list = contentPlatformAccountMapper.selectByExample(example);
+        if (list.isEmpty()) {
+            return null;
+        }
+        return list.get(0);
+    }
+
 }

+ 9 - 9
api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/impl/ThirdPartyServiceImpl.java

@@ -4,17 +4,17 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.aliyun.odps.data.Record;
 import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
-import com.tzld.piaoquan.api.common.enums.SecretEnum;
 import com.tzld.piaoquan.api.dao.mapper.GhDetailExtMapper;
 import com.tzld.piaoquan.api.model.bo.*;
 import com.tzld.piaoquan.api.model.po.GhDetailExt;
 import com.tzld.piaoquan.api.model.po.GhDetailExtExample;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount;
 import com.tzld.piaoquan.api.model.vo.PushMessageParam;
 import com.tzld.piaoquan.api.model.vo.PushMessageVo;
 import com.tzld.piaoquan.api.model.vo.ReportUvVo;
 import com.tzld.piaoquan.api.service.GhAccessTokenService;
-import com.tzld.piaoquan.api.service.wecom.ThirdPartyService;
 import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.api.service.wecom.ThirdPartyService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import com.tzld.piaoquan.growth.common.common.constant.TimeConstant;
 import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
@@ -80,11 +80,11 @@ public class ThirdPartyServiceImpl implements ThirdPartyService {
         if (!ghAccessTokenService.validateAccessToken(param.getAccessToken())) {
             return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "accessToken错误或者已失效");
         }
-        SecretEnum secretEnum = ghAccessTokenService.getSecretEnum(param.getAccessToken());
-        if (secretEnum == null) {
+        ContentPlatformAccount account = ghAccessTokenService.getAccountByAccessToken(param.getAccessToken());
+        if (account == null) {
             return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "获取secret失败");
         }
-        log.info("getPushMessage param={} secretEnum desc={}", param, secretEnum.desc);
+        log.info("getPushMessage param={} secretEnum desc={}", param, account.getName());
         GhDetailExample example = new GhDetailExample();
         example.createCriteria().andTypeEqualTo(GhTypeEnum.THIRD_PARTY_GH.type).andGhIdEqualTo(param.getGhId())
                 .andIsDeleteEqualTo(0);
@@ -98,7 +98,7 @@ public class ThirdPartyServiceImpl implements ThirdPartyService {
             LarkRobotUtil.sendMessage("channel不存在,请查看详情 ghId=", param.getGhId());
             return CommonResponse.create(404, "ghId异常,请联系管理员检查");
         }
-        if (!Objects.equals(secretEnum.channel, channel)) {
+        if (!Objects.equals(account.getChannel(), channel)) {
 //            LarkRobotUtil.sendMessage(String.format("channel异常 secretEnum.channel=%s ghDetail.channel=%s ghId=%s",
 //                    secretEnum.channel, channel, param.getGhId()));
             return CommonResponse.create(404, "ghId异常,请联系管理员检查");
@@ -140,8 +140,8 @@ public class ThirdPartyServiceImpl implements ThirdPartyService {
         if (!ghAccessTokenService.validateAccessToken(accessToken)) {
             return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "accessToken错误或者已失效");
         }
-        SecretEnum secretEnum = ghAccessTokenService.getSecretEnum(accessToken);
-        if (secretEnum == null) {
+        ContentPlatformAccount account = ghAccessTokenService.getAccountByAccessToken(accessToken);
+        if (account == null) {
             return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "获取secret失败");
         }
         if (!DateUtil.isValidDate(canViewReportDate)) {
@@ -151,7 +151,7 @@ public class ThirdPartyServiceImpl implements ThirdPartyService {
         long nowTimestamp = System.currentTimeMillis() / 1000;
         long limitTime = nowTimestamp - 34L * TimeConstant.HOUR;
         long targetTime = DateUtil.dateStrToTimestamp(date, "yyyy-MM-dd");
-        String desc = secretEnum.desc;
+        String desc = account.getName();
         if (targetTime > limitTime) {
             return CommonResponse.create(500, "数据不存在");
         }

+ 47 - 34
api-module/src/main/resources/mapper/contentplatform/ContentPlatformAccountMapper.xml

@@ -6,18 +6,19 @@
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="identity" jdbcType="INTEGER" property="identity" />
     <result column="channel" jdbcType="VARCHAR" property="channel" />
+    <result column="layer_type" jdbcType="VARCHAR" property="layerType" />
     <result column="contact_name" jdbcType="VARCHAR" property="contactName" />
     <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
     <result column="price" jdbcType="VARCHAR" property="price" />
     <result column="password" jdbcType="VARCHAR" property="password" />
     <result column="token" jdbcType="VARCHAR" property="token" />
     <result column="token_expire_timestamp" jdbcType="BIGINT" property="tokenExpireTimestamp" />
+    <result column="reply_secret" jdbcType="VARCHAR" property="replySecret" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_account" jdbcType="VARCHAR" property="createAccount" />
     <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
     <result column="update_account" jdbcType="VARCHAR" property="updateAccount" />
     <result column="update_timestamp" jdbcType="BIGINT" property="updateTimestamp" />
-    <result column="layer_type" jdbcType="VARCHAR" property="layerType" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -78,9 +79,9 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, `name`, `identity`, channel, contact_name, tel_num, price, `password`, token,
-    token_expire_timestamp, `status`, create_account, create_timestamp, update_account,
-    update_timestamp, layer_type
+    id, `name`, `identity`, channel, layer_type, contact_name, tel_num, price, `password`, 
+    token, token_expire_timestamp, reply_secret, `status`, create_account, create_timestamp, 
+    update_account, update_timestamp
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccountExample" resultMap="BaseResultMap">
     select
@@ -116,20 +117,18 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount">
-    insert into content_platform_account (id, `name`, `identity`,
-      channel, contact_name, tel_num,
-      price, `password`, token,
-      token_expire_timestamp, `status`, create_account,
-      create_timestamp, update_account, update_timestamp,
-      layer_type
-      )
-    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{identity,jdbcType=INTEGER},
-      #{channel,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, #{telNum,jdbcType=VARCHAR},
-      #{price,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR},
-      #{tokenExpireTimestamp,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR},
-      #{createTimestamp,jdbcType=BIGINT}, #{updateAccount,jdbcType=VARCHAR}, #{updateTimestamp,jdbcType=BIGINT},
-      #{layerType,jdbcType=VARCHAR}
-      )
+    insert into content_platform_account (id, `name`, `identity`, 
+      channel, layer_type, contact_name, 
+      tel_num, price, `password`, 
+      token, token_expire_timestamp, reply_secret, 
+      `status`, create_account, create_timestamp, 
+      update_account, update_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{identity,jdbcType=INTEGER}, 
+      #{channel,jdbcType=VARCHAR}, #{layerType,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, 
+      #{telNum,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
+      #{token,jdbcType=VARCHAR}, #{tokenExpireTimestamp,jdbcType=BIGINT}, #{replySecret,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR}, #{createTimestamp,jdbcType=BIGINT}, 
+      #{updateAccount,jdbcType=VARCHAR}, #{updateTimestamp,jdbcType=BIGINT})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount">
     insert into content_platform_account
@@ -146,6 +145,9 @@
       <if test="channel != null">
         channel,
       </if>
+      <if test="layerType != null">
+        layer_type,
+      </if>
       <if test="contactName != null">
         contact_name,
       </if>
@@ -164,6 +166,9 @@
       <if test="tokenExpireTimestamp != null">
         token_expire_timestamp,
       </if>
+      <if test="replySecret != null">
+        reply_secret,
+      </if>
       <if test="status != null">
         `status`,
       </if>
@@ -179,9 +184,6 @@
       <if test="updateTimestamp != null">
         update_timestamp,
       </if>
-      <if test="layerType != null">
-        layer_type,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -196,6 +198,9 @@
       <if test="channel != null">
         #{channel,jdbcType=VARCHAR},
       </if>
+      <if test="layerType != null">
+        #{layerType,jdbcType=VARCHAR},
+      </if>
       <if test="contactName != null">
         #{contactName,jdbcType=VARCHAR},
       </if>
@@ -214,6 +219,9 @@
       <if test="tokenExpireTimestamp != null">
         #{tokenExpireTimestamp,jdbcType=BIGINT},
       </if>
+      <if test="replySecret != null">
+        #{replySecret,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
@@ -229,9 +237,6 @@
       <if test="updateTimestamp != null">
         #{updateTimestamp,jdbcType=BIGINT},
       </if>
-      <if test="layerType != null">
-        #{layerType,jdbcType=VARCHAR},
-      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccountExample" resultType="java.lang.Long">
@@ -255,6 +260,9 @@
       <if test="record.channel != null">
         channel = #{record.channel,jdbcType=VARCHAR},
       </if>
+      <if test="record.layerType != null">
+        layer_type = #{record.layerType,jdbcType=VARCHAR},
+      </if>
       <if test="record.contactName != null">
         contact_name = #{record.contactName,jdbcType=VARCHAR},
       </if>
@@ -273,6 +281,9 @@
       <if test="record.tokenExpireTimestamp != null">
         token_expire_timestamp = #{record.tokenExpireTimestamp,jdbcType=BIGINT},
       </if>
+      <if test="record.replySecret != null">
+        reply_secret = #{record.replySecret,jdbcType=VARCHAR},
+      </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
       </if>
@@ -288,9 +299,6 @@
       <if test="record.updateTimestamp != null">
         update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
       </if>
-      <if test="record.layerType != null">
-        layer_type = #{record.layerType,jdbcType=VARCHAR},
-      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -302,18 +310,19 @@
       `name` = #{record.name,jdbcType=VARCHAR},
       `identity` = #{record.identity,jdbcType=INTEGER},
       channel = #{record.channel,jdbcType=VARCHAR},
+      layer_type = #{record.layerType,jdbcType=VARCHAR},
       contact_name = #{record.contactName,jdbcType=VARCHAR},
       tel_num = #{record.telNum,jdbcType=VARCHAR},
       price = #{record.price,jdbcType=VARCHAR},
       `password` = #{record.password,jdbcType=VARCHAR},
       token = #{record.token,jdbcType=VARCHAR},
       token_expire_timestamp = #{record.tokenExpireTimestamp,jdbcType=BIGINT},
+      reply_secret = #{record.replySecret,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
       create_account = #{record.createAccount,jdbcType=VARCHAR},
       create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
       update_account = #{record.updateAccount,jdbcType=VARCHAR},
-      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
-      layer_type = #{record.layerType,jdbcType=VARCHAR}
+      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -330,6 +339,9 @@
       <if test="channel != null">
         channel = #{channel,jdbcType=VARCHAR},
       </if>
+      <if test="layerType != null">
+        layer_type = #{layerType,jdbcType=VARCHAR},
+      </if>
       <if test="contactName != null">
         contact_name = #{contactName,jdbcType=VARCHAR},
       </if>
@@ -348,6 +360,9 @@
       <if test="tokenExpireTimestamp != null">
         token_expire_timestamp = #{tokenExpireTimestamp,jdbcType=BIGINT},
       </if>
+      <if test="replySecret != null">
+        reply_secret = #{replySecret,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
@@ -363,9 +378,6 @@
       <if test="updateTimestamp != null">
         update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
       </if>
-      <if test="layerType != null">
-        layer_type = #{layerType,jdbcType=VARCHAR},
-      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -374,18 +386,19 @@
     set `name` = #{name,jdbcType=VARCHAR},
       `identity` = #{identity,jdbcType=INTEGER},
       channel = #{channel,jdbcType=VARCHAR},
+      layer_type = #{layerType,jdbcType=VARCHAR},
       contact_name = #{contactName,jdbcType=VARCHAR},
       tel_num = #{telNum,jdbcType=VARCHAR},
       price = #{price,jdbcType=VARCHAR},
       `password` = #{password,jdbcType=VARCHAR},
       token = #{token,jdbcType=VARCHAR},
       token_expire_timestamp = #{tokenExpireTimestamp,jdbcType=BIGINT},
+      reply_secret = #{replySecret,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       create_account = #{createAccount,jdbcType=VARCHAR},
       create_timestamp = #{createTimestamp,jdbcType=BIGINT},
       update_account = #{updateAccount,jdbcType=VARCHAR},
-      update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
-      layer_type = #{layerType,jdbcType=VARCHAR}
+      update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>