|
|
|
@ -239,6 +239,7 @@ public class SignInController {
|
|
|
|
|
|
|
|
|
|
String statusKey = signInStatusManager.addVerifyCode(capText);
|
|
|
|
|
HttpUtils.setCookie(response, CommonConsts.CODE_KEY, statusKey);
|
|
|
|
|
HttpUtils.setCookie(response, "code_expire_time", (System.currentTimeMillis() + 150_000) + "", false);
|
|
|
|
|
|
|
|
|
|
BufferedImage bi = captchaProducer.createImage(capText);
|
|
|
|
|
ServletOutputStream out = response.getOutputStream();
|
|
|
|
@ -352,20 +353,20 @@ public class SignInController {
|
|
|
|
|
return signInStatusManager.customerQRCode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@WechatMapping(value = "/customer_wechat_qrcode/{codeId}", method = RequestMethod.GET,oauthType = WxOauthType.USERINFO)
|
|
|
|
|
@WechatMapping(value = "/customer_wechat_qrcode/{codeId}", method = RequestMethod.GET, oauthType = WxOauthType.USERINFO)
|
|
|
|
|
public ModelAndView scanCustomerQrcode(@PathVariable String codeId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject wechatUser) {
|
|
|
|
|
signInStatusManager.scanCustomerQrcode(codeId, wechatUser.getString("openid"));
|
|
|
|
|
return new ModelAndView("manager_bind_success");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/customer_wechat_qrcode/{codeId}/check", method = RequestMethod.GET)
|
|
|
|
|
public JSONObject getCustomerID(@PathVariable String codeId, HttpServletResponse response,@RequestParam(value = "pay_info",defaultValue = "false") boolean pay_info) {
|
|
|
|
|
public JSONObject getCustomerID(@PathVariable String codeId, HttpServletResponse response, @RequestParam(value = "pay_info", defaultValue = "false") boolean pay_info) {
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
String statusKey = signInStatusManager.getWechatCustomerId(codeId);
|
|
|
|
|
if(pay_info){
|
|
|
|
|
result = customerPaymentInfoService.selectPaymentInfoByOpenId(statusKey);
|
|
|
|
|
if (pay_info) {
|
|
|
|
|
result = customerPaymentInfoService.selectPaymentInfoByOpenId(statusKey);
|
|
|
|
|
}
|
|
|
|
|
HttpUtils.setCookie(response, "CustomerID", statusKey,false);
|
|
|
|
|
HttpUtils.setCookie(response, "CustomerID", statusKey, false);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|