| | |
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.exception.user.vip.UserVIPInfoException;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.wx.WXMPUserLoginService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisKeyEnum;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | |
| | |
|
| | | UserInfo lastUserInfo = null;
|
| | | if (!StringUtil.isNullOrEmpty(userData)) {
|
| | | String key = StringUtil.Md5("wxmp-user-login-" + acceptData.getAppId() + "-" + acceptData.getOpenId());
|
| | | String data = redisManager.getCommonString(key);
|
| | | String redisKey = RedisKeyEnum.getRedisKey(RedisKeyEnum.wxmpUserLogin, StringUtil.Md5(acceptData.getAppId() + "-" + acceptData.getOpenId()));
|
| | | String data = redisManager.getCommonString(redisKey);
|
| | | if (!StringUtil.isNullOrEmpty(data)) {
|
| | | lastUserInfo = new Gson().fromJson(data, UserInfo.class);
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | String key = StringUtil.Md5("wxmp-user-login-" + acceptData.getAppId() + "-" + acceptData.getOpenId());
|
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.wxmpUserLogin, StringUtil.Md5(acceptData.getAppId() + "-" + acceptData.getOpenId()));
|
| | |
|
| | | UserInfo user = new Gson().fromJson(redisManager.getCommonString(key), UserInfo.class);
|
| | | if (user == null) {
|
| | | out.print(JsonUtil.loadFalseResult("用户数据为空"));
|
| | |
| | | private void printWXMPLoginResult(String appId, String openId, WXMPLoginResult result, HttpServletRequest request,
|
| | | PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | String key = StringUtil.Md5("wxmp-user-login-" + appId + "-" + openId);
|
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.wxmpUserLogin, StringUtil.Md5(appId + "-" + openId));
|
| | |
|
| | | switch (result.getCode()) {
|
| | | case WXMPLoginResult.CODE_SUCCESS:
|
| | | UserInfo user = userInfoService.selectAvailableByPrimaryKey(result.getUser().getId());
|
| | |
| | | vo.setNickName(userInfo.getNickName());
|
| | | vo.setPortrait(userInfo.getPortrait());
|
| | | vo.setHelpLink(userVipConfigService.getValueByKey("help_link_vip_h5"));
|
| | | vo.setCsdLink(configService.get("customer_service_link"));
|
| | | vo.setCsdLink(configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
|
| | |
|
| | | Date now = new Date();
|
| | | Date start = new Date(0);
|