提交 8e49086e 编写于 作者: 1 1539136324@qq.com

修改客户列表分页BUG

上级 91032f33
......@@ -99,7 +99,7 @@ public class WeCorpAccount extends BaseEntity
@ApiModelProperty("微信公众号APPID")
private String appid;
private String appId;
@ApiModelProperty("微信公众号密钥")
......
......@@ -59,12 +59,12 @@ public class WeiXinAccessTokenInterceptor implements Interceptor {
if(null != loginUser && null != loginUser.getUser() && null != loginUser.getUser().getWeCorpAccount()){
WeCorpAccount weCorpAccount = loginUser.getUser().getWeCorpAccount();
if(StrUtil.isEmpty(weCorpAccount.getAppid()) && StrUtil.isEmpty(weCorpAccount.getSecret())){
if(StrUtil.isEmpty(weCorpAccount.getAppId()) && StrUtil.isEmpty(weCorpAccount.getSecret())){
//获取用户token
accessToken =redisCache.getCacheObject(WeConstans.WX_ACCESS_TOKEN);
if (StringUtils.isEmpty(accessToken)){
//当用户token失效,重新获取token
WxTokenDto wxTokenDto = wxCommonClient.getToken(grantType, weCorpAccount.getAppid(), weCorpAccount.getSecret());
WxTokenDto wxTokenDto = wxCommonClient.getToken(grantType, weCorpAccount.getAppId(), weCorpAccount.getSecret());
if(wxTokenDto != null && StringUtils.isNotEmpty(wxTokenDto.getAccessToken())){
redisCache.setCacheObject(WeConstans.WX_AUTH_ACCESS_TOKEN, wxTokenDto.getAccessToken(), wxTokenDto.getExpiresIn(), TimeUnit.SECONDS);
accessToken = wxTokenDto.getAccessToken();
......
......@@ -68,8 +68,8 @@ public class WeiXinAuthInterceptor implements Interceptor {
if(null != loginUser && null != loginUser.getUser() && null != loginUser.getUser().getWeCorpAccount()) {
WeCorpAccount weCorpAccount = loginUser.getUser().getWeCorpAccount();
if (StrUtil.isEmpty(weCorpAccount.getAppid())) {
wxTokenDto = wxAuthClient.refreshToken(weCorpAccount.getAppid(), grantType, refreshToken);
if (StrUtil.isEmpty(weCorpAccount.getAppId())) {
wxTokenDto = wxAuthClient.refreshToken(weCorpAccount.getAppId(), grantType, refreshToken);
if(wxTokenDto != null && StringUtils.isNotEmpty(wxTokenDto.getAccessToken())){
redisCache.setCacheObject(WeConstans.WX_AUTH_ACCESS_TOKEN+":"+ openId, wxTokenDto, wxTokenDto.getExpiresIn(), TimeUnit.SECONDS);
}
......
......@@ -36,7 +36,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</collection>
</collection>
</resultMap>
<resultMap id="weFlowerCustomerRelsMapper" type="com.linkwechat.wecom.domain.WeFlowerCustomerTagRel">
<result property="flowerCustomerRelId" column="flower_customer_rel_id" />
......@@ -75,8 +78,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and wt.status = 0
</sql>
<select id="selectWeCustomerList" parameterType="WeCustomer" resultMap="WeCustomerResult">
SELECT
SELECT
*
FROM
(
SELECT
DISTINCT wc.external_userid,
wc.`name`,
wc.avatar,
......@@ -157,7 +165,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND wc.is_open_chat=#{isOpenChat}
</if>
</where>
ORDER BY wfcr.create_time DESC
ORDER BY wfcr.create_time ASC
) aa GROUP BY aa.external_userid
</select>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册