yumeng 5 rokov pred
rodič
commit
fb24aade11

+ 3 - 2
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/CtopOauthTokenMapper.xml

@@ -11,12 +11,13 @@
         <result column="refresh_token" property="refreshToken" jdbcType="VARCHAR"/>
         <result column="access_token_expires_in" property="accessTokenExpiresIn" jdbcType="TIMESTAMP"/>
         <result column="refresh_token_expires_in" property="refreshTokenExpiresIn" jdbcType="TIMESTAMP"/>
+        <result column="agent_type" property="agentType" jdbcType="INTEGER"/>
         <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
         <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
     </resultMap>
 
     <sql id="Base_Column_List">
-        id,media_id,advertiser_id,account_id,access_token,refresh_token,access_token_expires_in,refresh_token_expires_in,create_time,update_time
+        id,media_id,advertiser_id,account_id,access_token,refresh_token,access_token_expires_in,refresh_token_expires_in,agent_type,create_time,update_time
    </sql>
 
     <select id="selectAll" resultMap="BaseResultMap">
@@ -87,7 +88,7 @@
     </select>
 
     <select id="selectToutiaoToken" resultType="cn.com.ctop.common.module.entity.CtopOauthToken">
-        select  t1.*
+        select t1.*
         from ctop_oauth_token t1
         left join ctop_user_allocation t2
         on t1.account_id = t2.account_id

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/service/impl/CtopOauthTokenServiceImpl.java

@@ -107,10 +107,10 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
         Map<String, String> headers = new HashMap<String, String>();
         headers.put("Content-Type", " application/json");
         Map<String, Object> param = new HashMap<String, Object>();
-        if (agentType.equals(1)) {
+        if (agentType == 1) {
             param.put("app_id", PropertiesUtils.getConfig("kuaishou_appid"));
             param.put("secret", PropertiesUtils.getConfig("kuaishou_secret"));
-        } else if (agentType.equals(0)) {
+        } else if (agentType == 0) {
             param.put("app_id", PropertiesUtils.getConfig("kuaishou_third_appid"));
             param.put("secret", PropertiesUtils.getConfig("kuaishou_third_secret"));
         }