Commit 91ec8ab6 by 黄森林

微信登录修改

parent 523af857
...@@ -599,9 +599,8 @@ public class DankuanController { ...@@ -599,9 +599,8 @@ public class DankuanController {
private static JSONObject getSaleId(String productId, String currentTimeStr) throws Exception { private static JSONObject getSaleId(String productId, String currentTimeStr) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
Map<String, String> signMap = new HashMap<String, String>();//待签名参数 Map<String, String> signMap = new HashMap<String, String>();//待签名参数
HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000)
.setConnectTimeout(500000).setConnectionRequestTimeout(500000).setProxy(proxy).build(); .setConnectTimeout(500000).setConnectionRequestTimeout(500000).build();
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig) CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig)
.build(); .build();
......
...@@ -476,9 +476,8 @@ public class RongHeController { ...@@ -476,9 +476,8 @@ public class RongHeController {
private static JSONObject getSaleId(String productId, String currentTimeStr) throws Exception { private static JSONObject getSaleId(String productId, String currentTimeStr) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
Map<String, String> signMap = new HashMap<String, String>();//待签名参数 Map<String, String> signMap = new HashMap<String, String>();//待签名参数
HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000)
.setConnectTimeout(500000).setConnectionRequestTimeout(500000).setProxy(proxy).build(); .setConnectTimeout(500000).setConnectionRequestTimeout(500000).build();
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig) CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig)
.build(); .build();
...@@ -537,9 +536,8 @@ public class RongHeController { ...@@ -537,9 +536,8 @@ public class RongHeController {
*/ */
private static JSONObject getOrderInfo(Map<String, Object> schoolMap, OrderView orderView, String currentTimeStr, String productId, String saleId1, String saleId2, String ORDERSEQ, String UPTRANSEQ, String ORDERAMOUNT, String ORDERREQTRANSEQ) throws Exception { private static JSONObject getOrderInfo(Map<String, Object> schoolMap, OrderView orderView, String currentTimeStr, String productId, String saleId1, String saleId2, String ORDERSEQ, String UPTRANSEQ, String ORDERAMOUNT, String ORDERREQTRANSEQ) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000)
.setConnectTimeout(500000).setConnectionRequestTimeout(500000).setProxy(proxy).build(); .setConnectTimeout(500000).setConnectionRequestTimeout(500000).build();
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig) CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig)
.build(); .build();
HttpEntity entity = null; HttpEntity entity = null;
......
...@@ -127,7 +127,7 @@ public class GetPhoneCodeController extends BaseController { ...@@ -127,7 +127,7 @@ public class GetPhoneCodeController extends BaseController {
}else { }else {
verificationCode = String.valueOf((int) ((Math.random() * 9 + 1) * 100000)); verificationCode = String.valueOf((int) ((Math.random() * 9 + 1) * 100000));
} }
log.info(verificationCode);
Long expire = stringRedisTemplate.getExpire(code); Long expire = stringRedisTemplate.getExpire(code);
//验证码 有效时间是五分钟倒计时 //验证码 有效时间是五分钟倒计时
if (expire>(60*4)){ if (expire>(60*4)){
......
...@@ -74,6 +74,8 @@ public class LoginPwdController extends BaseController { ...@@ -74,6 +74,8 @@ public class LoginPwdController extends BaseController {
//登录验证码标识 //登录验证码标识
private static String GETPHONECODE = "getPhoneCode"; private static String GETPHONECODE = "getPhoneCode";
@Autowired @Autowired
public LoginPwdController(SysUserMapper sysUserMapper, IUserService userService, StringRedisTemplate stringRedisTemplate, public LoginPwdController(SysUserMapper sysUserMapper, IUserService userService, StringRedisTemplate stringRedisTemplate,
HhrUserMapper hhrUserMapper,SchoolMapper schoolMapper) { HhrUserMapper hhrUserMapper,SchoolMapper schoolMapper) {
...@@ -217,6 +219,7 @@ public class LoginPwdController extends BaseController { ...@@ -217,6 +219,7 @@ public class LoginPwdController extends BaseController {
*/ */
@RequestMapping("bindingAccount") @RequestMapping("bindingAccount")
public ResponseData<String> bindingAccount(String openid,String accessToken, String username, String verificationCode) { public ResponseData<String> bindingAccount(String openid,String accessToken, String username, String verificationCode) {
log.info(accessToken+":"+openid+":"+":"+username+":"+verificationCode);
if (StringUtils.isBlank(accessToken) || StringUtils.isBlank(openid) || StringUtils.isBlank(username) || StringUtils.isBlank(verificationCode)) { if (StringUtils.isBlank(accessToken) || StringUtils.isBlank(openid) || StringUtils.isBlank(username) || StringUtils.isBlank(verificationCode)) {
return ResponseData.error("绑定失败,授权失效或账号验证码为空!"); return ResponseData.error("绑定失败,授权失效或账号验证码为空!");
} }
......
...@@ -704,5 +704,4 @@ public class BonusController extends BaseController { ...@@ -704,5 +704,4 @@ public class BonusController extends BaseController {
} }
} }
} }
...@@ -73,11 +73,11 @@ public class PersonalCenterController extends BaseController { ...@@ -73,11 +73,11 @@ public class PersonalCenterController extends BaseController {
return ResponseData.error("当前登录账户异常!"); return ResponseData.error("当前登录账户异常!");
} }
if (StringUtils.isBlank(openid)) { if (StringUtils.isBlank(openid)) {
return ResponseData.error("解绑失败,当前登录无权解绑,请退出登录,在登录页面解绑!"); return ResponseData.error("解绑失败,当前登录账号无权解绑,请退出登录,在登录页面解绑!");
} }
HhrUser hhrUser = hhrUserMapper.selectById(partner); HhrUser hhrUser = hhrUserMapper.selectById(partner);
if(!hhrUser.getOpenId().equals(openid)){ if(!hhrUser.getOpenId().equals(openid)){
return ResponseData.error("解绑失败,当前登录无权解绑,请退出登录,在登录页面解绑!"); return ResponseData.error("解绑失败,当前登录账号无权解绑,请退出登录,在登录页面解绑!");
} }
Wrapper<HhrUser> wrapper = new EntityWrapper<>(); Wrapper<HhrUser> wrapper = new EntityWrapper<>();
wrapper.eq("id", user.getId()); wrapper.eq("id", user.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment