| @@ -3,6 +3,7 @@ | |||
| <mapper namespace="com.iformall.mapper.WxWeappAuditStatusMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxWeappAuditStatus"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="app_id" jdbcType="VARCHAR" property="appId" /> | |||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||
| <result column="user_version" jdbcType="VARCHAR" property="userVersion" /> | |||
| @@ -14,14 +15,17 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`app_id`,`type`,`user_version`,`version_desc`, `audit_status`,`audit_err_code`,`audit_time` | |||
| `id`,`tenant_id`,`app_id`,`type`,`user_version`,`version_desc`, `audit_status`,`audit_err_code`,`audit_time` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != appId "> | |||
| and `app_id` = #{appId} | |||
| </if> | |||
| @@ -77,6 +81,7 @@ | |||
| <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappAuditStatusVo"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="app_id" jdbcType="VARCHAR" property="appId" /> | |||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||
| <result column="user_version" jdbcType="VARCHAR" property="userVersion" /> | |||
| @@ -88,7 +93,7 @@ | |||
| </resultMap> | |||
| <sql id="allVoColumns"> | |||
| c.`id`,c.`app_id`,c.`type`,c.`user_version`,`version_desc`, | |||
| c.`id`,c.`tenant_id`,c.`app_id`,c.`type`,c.`user_version`,`version_desc`, | |||
| c.`audit_status`,c.`audit_err_code`,c.`audit_time`, | |||
| a.`name` | |||
| </sql> | |||
| @@ -98,6 +103,9 @@ | |||
| <if test=" null != id "> | |||
| and c.`id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and c.`tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != appId "> | |||
| and c.`app_id` = #{appId} | |||
| </if> | |||
| @@ -3,6 +3,7 @@ | |||
| <mapper namespace="com.iformall.mapper.WxWeappCodeStatusMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxWeappCodeStatus"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="app_id" jdbcType="VARCHAR" property="appId" /> | |||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||
| <result column="user_version" jdbcType="VARCHAR" property="userVersion" /> | |||
| @@ -13,14 +14,17 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`app_id`,`type`,`user_version`,`version_desc`,`code_status`,`code_err_code`,`code_time` | |||
| `id`,`tenant_id`,`app_id`,`type`,`user_version`,`version_desc`,`code_status`,`code_err_code`,`code_time` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != appId "> | |||
| and `app_id` = #{appId} | |||
| </if> | |||
| @@ -69,6 +73,7 @@ | |||
| <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappCodeStatusVo"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="app_id" jdbcType="VARCHAR" property="appId" /> | |||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||
| <result column="user_version" jdbcType="VARCHAR" property="userVersion" /> | |||
| @@ -88,6 +93,9 @@ | |||
| <if test=" null != id "> | |||
| and c.`id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and c.`tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != appId "> | |||
| and c.`app_id` = #{appId} | |||
| </if> | |||
| @@ -3,6 +3,7 @@ | |||
| <mapper namespace="com.iformall.mapper.WxWeappReleaseStatusMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxWeappReleaseStatus"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="app_id" jdbcType="VARCHAR" property="appId" /> | |||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||
| <result column="user_version" jdbcType="VARCHAR" property="userVersion" /> | |||
| @@ -13,15 +14,18 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`app_id`,`type`,`user_version`,`version_desc`,`release_status`,`release_err_code`,`release_time` | |||
| `id`,`tenant_id`,`app_id`,`type`,`user_version`,`version_desc`,`release_status`,`release_err_code`,`release_time` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != appId "> | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != appId "> | |||
| and `app_id` = #{appId} | |||
| </if> | |||
| <if test=" null != type "> | |||
| @@ -69,6 +73,7 @@ | |||
| <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappReleaseStatusVo"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="app_id" jdbcType="VARCHAR" property="appId" /> | |||
| <result column="type" jdbcType="INTEGER" property="type" /> | |||
| <result column="user_version" jdbcType="VARCHAR" property="userVersion" /> | |||
| @@ -90,6 +95,9 @@ | |||
| <if test=" null != id "> | |||
| and c.`id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != appId "> | |||
| and c.`app_id` = #{appId} | |||
| </if> | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.service.wechat; | |||
| import com.iformall.mapper.WxAuthorizerInfoMapper; | |||
| import com.iformall.mapper.WxComponentVerifyTicketMapper; | |||
| import me.chanjar.weixin.open.api.impl.WxOpenInMemoryConfigStorage; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| @@ -30,7 +31,10 @@ public class WxOpenInRedisDBConfigStorage extends WxOpenInMemoryConfigStorage { | |||
| private String cardApiTicket; | |||
| @Autowired | |||
| WxComponentVerifyTicketMapper wxComponentVerifyTicketMapper; | |||
| private WxComponentVerifyTicketMapper wxComponentVerifyTicketMapper; | |||
| @Autowired | |||
| private WxAuthorizerInfoMapper wxAuthorizerInfoMapper; | |||
| public WxOpenInRedisDBConfigStorage(Pool<Jedis> jedisPool) { | |||
| this.jedisPool = jedisPool; | |||
| @@ -70,7 +74,6 @@ public class WxOpenInRedisDBConfigStorage extends WxOpenInMemoryConfigStorage { | |||
| try (Jedis jedis = this.jedisPool.getResource()) { | |||
| jedis.set(this.componentVerifyTicketKey, componentVerifyTicket); | |||
| } | |||
| // TODO update to DB | |||
| } | |||
| @Override | |||
| @@ -117,6 +120,7 @@ public class WxOpenInRedisDBConfigStorage extends WxOpenInMemoryConfigStorage { | |||
| public void setAuthorizerRefreshToken(String appId, String authorizerRefreshToken) { | |||
| try (Jedis jedis = this.jedisPool.getResource()) { | |||
| jedis.set(this.getKey(this.authorizerRefreshTokenKey, appId), authorizerRefreshToken); | |||
| } | |||
| // TODO update to DB | |||
| } | |||
| @@ -140,7 +144,6 @@ public class WxOpenInRedisDBConfigStorage extends WxOpenInMemoryConfigStorage { | |||
| try (Jedis jedis = this.jedisPool.getResource()) { | |||
| jedis.expire(this.getKey(this.authorizerAccessTokenKey, appId), 0); | |||
| } | |||
| // TODO update to DB | |||
| } | |||
| @Override | |||
| @@ -148,18 +151,7 @@ public class WxOpenInRedisDBConfigStorage extends WxOpenInMemoryConfigStorage { | |||
| try (Jedis jedis = this.jedisPool.getResource()) { | |||
| jedis.setex(this.getKey(this.authorizerAccessTokenKey, appId), expiresInSeconds - 200, authorizerAccessToken); | |||
| } | |||
| // TODO update to DB | |||
| } | |||
| /* | |||
| @Override | |||
| public void changeAuthorizationStatus(String appId) { | |||
| try (Jedis jedis = this.jedisPool.getResource()) { | |||
| jedis.expire(this.getKey(this.authorizerAccessTokenKey, appId), 0); | |||
| } | |||
| // TODO update to DB | |||
| } | |||
| */ | |||
| @Override | |||
| public String getJsapiTicket(String appId) { | |||
| @@ -24,6 +24,7 @@ public class WxOpenService extends WxOpenServiceImpl { | |||
| private WechatOpenProperties wechatProperties; | |||
| @Autowired | |||
| private RedisProperies redisProperies; | |||
| private static JedisPool pool; | |||
| private WxOpenMessageRouter wxOpenMessageRouter; | |||