|
|
@ -287,11 +287,11 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/login/wechat_bind")
|
|
|
|
@PostMapping("/login/wechat_bind")
|
|
|
|
public JSONObject wechatLoginBind(@RequestBody JSONObject params){
|
|
|
|
public JSONObject wechatLoginBind(@RequestBody JSONObject params){
|
|
|
|
JSONObject wechatInfo = signInStatusManager.verifyClientLoginWechatBindCode(params.getString("wechat_openid"));
|
|
|
|
|
|
|
|
LoginInfo loginInfo = new LoginInfo();
|
|
|
|
LoginInfo loginInfo = new LoginInfo();
|
|
|
|
loginInfo.setLoginId(params.getString("loginId"));
|
|
|
|
loginInfo.setLoginId(params.getString("loginId"));
|
|
|
|
loginInfo.setPassword(params.getString("password"));
|
|
|
|
loginInfo.setPassword(params.getString("password"));
|
|
|
|
String signKey = signInStatusManager.verifyClientAccountLogin(loginInfo,"wechat");
|
|
|
|
String signKey = signInStatusManager.verifyClientAccountLogin(loginInfo,"wechat");
|
|
|
|
|
|
|
|
JSONObject wechatInfo = signInStatusManager.verifyClientLoginWechatBindCode(params.getString("wechat_openid"));
|
|
|
|
JSONObject account = signInStatusManager.getCurrentClient(signKey);
|
|
|
|
JSONObject account = signInStatusManager.getCurrentClient(signKey);
|
|
|
|
params.put("nick_name",wechatInfo.getString("nick_name"));
|
|
|
|
params.put("nick_name",wechatInfo.getString("nick_name"));
|
|
|
|
params.put("union_id",wechatInfo.getString("union_id"));
|
|
|
|
params.put("union_id",wechatInfo.getString("union_id"));
|
|
|
|