|
|
@@ -1,17 +1,18 @@ |
|
|
|
package com.hp.user.service.impl;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
import com.hp.user.client.entity.AccountVO;
|
|
|
|
import com.hp.user.client.service.AccountService;
|
|
|
|
import com.hp.user.client.service.MessageService;
|
|
|
|
import com.hp.user.service.constants.UserConstants;
|
|
|
|
import com.hp.user.service.dao.AccountMapper;
|
|
|
|
import com.hp.user.service.entity.Account;
|
|
|
|
import com.hp.user.service.redis.RedisOperation;
|
|
|
|
|
|
|
|
import redis.clients.jedis.Jedis;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.codec.binary.StringUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
@@ -97,6 +98,7 @@ public class AccountServiceImpl implements AccountService { |
|
|
|
Account account = new Account();
|
|
|
|
account.setUserId(userId);
|
|
|
|
account.setWxNumber(wxNumber);
|
|
|
|
account.setWxNumber(wxNumber);
|
|
|
|
accountMapper.updateById(account);
|
|
|
|
}catch(Exception e) {
|
|
|
|
|
|
|
@@ -104,4 +106,29 @@ public class AccountServiceImpl implements AccountService { |
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void wxAuthorization() {
|
|
|
|
try {
|
|
|
|
String wxLoginAppid = "";
|
|
|
|
String wxLoginSecret = "";
|
|
|
|
String jsCode = "";
|
|
|
|
String wxLoginGrantType = "";
|
|
|
|
String wxLoginUrl = "";
|
|
|
|
// userVO.getCode()
|
|
|
|
Map<String, String> param = new HashMap<>();
|
|
|
|
param.put("appid", wxLoginAppid);
|
|
|
|
param.put("secret", wxLoginSecret);
|
|
|
|
param.put("js_code", jsCode);
|
|
|
|
param.put("grant_type", wxLoginGrantType);
|
|
|
|
// 发送请求
|
|
|
|
// String wxResult = HttpUtils.doGet(wxLoginUrl, param);
|
|
|
|
String wxResult = "";
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(wxResult);
|
|
|
|
}catch(Exception e) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|