|
|
|
@@ -15,6 +15,7 @@ import com.iformall.service.MallRolePermissionService; |
|
|
|
import com.iformall.service.MallUserInfoService; |
|
|
|
import com.iformall.service.MallUserRoleService; |
|
|
|
import com.iformall.service.WxAppinfoService; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import me.chanjar.weixin.common.error.WxErrorException; |
|
|
|
@@ -135,7 +136,7 @@ public class WxInfoController extends BaseController { |
|
|
|
} else { |
|
|
|
// 检查token是否已过期, 小时就重新获取 |
|
|
|
Date curDate = new Date(); |
|
|
|
if(curDate.getTime() > wxAppinfo.getLastTokenTime().getTime() + 3600000) { |
|
|
|
if(curDate.getTime() > wxAppinfo.getLastTokenTime().getTime() + Constant.C_EXPIRE) { |
|
|
|
try { |
|
|
|
String accessToken = wxMaService.getAccessToken(true); |
|
|
|
wxAppinfo.setAccessToken(accessToken); |
|
|
|
|