微信小程序登录
This commit is contained in:
@@ -36,9 +36,10 @@ public enum ErrorCodeEnum {
|
||||
USER_NOT_EXIST(1021021,"用户不存在",null),
|
||||
USER_WAIT_AUDIT(1021018,"账号审核中,请联系企业管理员",null),
|
||||
OPERATION_OVER_TIME(1021019, "您的操作过于频繁,休息一下~", null),
|
||||
GET_APP_SECRET_ERROR(1021019, "获取secret异常", null),
|
||||
WX_SERVICE_ERROR(1021020, "调用微信服务异常", null),
|
||||
SESSION_KEY_ERROR(1021021, "sessionKey过期", null),
|
||||
GET_APP_SECRET_ERROR(1021020, "获取secret异常", null),
|
||||
WX_SERVICE_ERROR(1021021, "调用微信服务异常", null),
|
||||
SESSION_KEY_ERROR(1021022, "sessionKey过期", null),
|
||||
GET_WECHAT_USER_INFO_FAIL(1021023,"获取小程序用户信息失败", null)
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.wx.CodeSessionDTO;
|
||||
@@ -72,7 +71,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
log.info("解密用户信息:{}", decryptUser);
|
||||
MiniProgramUserVO miniProgramUser = JSON.parseObject(decryptUser, MiniProgramUserVO.class);
|
||||
if (Objects.isNull(miniProgramUser)) {
|
||||
throw new ServiceException("获取小程序用户信息失败");
|
||||
throw new ServiceException(ErrorCodeEnum.GET_WECHAT_USER_INFO_FAIL);
|
||||
}
|
||||
return miniProgramUser;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user