Browse Source

微信第三方平台-刷新authorizer_access_token

dev_shibei_match
zxc 5 years ago
parent
commit
08ee702eb3
  1. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthorizerAccessTokenFormDTO.java
  2. 3
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  3. 1
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml

5
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthorizerAccessTokenFormDTO.java

@ -34,6 +34,11 @@ public class AuthorizerAccessTokenFormDTO implements Serializable {
*/
private String authAppid;
/**
* 客户端类型resi居民端work工作端
*/
private String clientType;
/**
* 客户ID
*/

3
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

@ -350,8 +350,9 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
formDTO.setExpiresInTime(expiresInTime);
formDTO.setCustomerId(customerId);
formDTO.setAuthAppid(authAppId);
formDTO.setClientType(clientType);
//先逻辑删除,在插入
authorizationInfoDao.updateOldAuthorizerAccessToken(willOverDueDTO.getCustomerId(),clientType);
authorizationInfoDao.updateOldAuthorizerAccessToken(customerId,clientType);
authorizationInfoDao.insertAuthorizerAccessToken(formDTO);
//缓存 refreshAuthorizerAccessToken

1
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml

@ -41,7 +41,6 @@
WHERE
del_flag = 0
AND (UNIX_TIMESTAMP(expires_in_time) - UNIX_TIMESTAMP(NOW())) <![CDATA[ <= ]]> 900
AND (UNIX_TIMESTAMP(expires_in_time) - UNIX_TIMESTAMP(NOW())) > 0
</select>
<!-- 插入 authorizer_access_token -->

Loading…
Cancel
Save