|
|
|
@ -1,37 +1,54 @@
|
|
|
|
|
package au.com.royalpay.payment.manage.signin.web;
|
|
|
|
|
|
|
|
|
|
import com.google.code.kaptcha.Producer;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.customers.core.CustomerPaymentInfoService;
|
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.beans.WxOauthType;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.FindPwdBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.LoginInfo;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.*;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.ClientLoginLogRepository;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.ManagerLoginLogRepository;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.ManagerTodoNoticeProvider;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
|
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
|
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.beans.WxOauthType;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.google.code.kaptcha.Producer;
|
|
|
|
|
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.bind.annotation.CookieValue;
|
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import java.awt.image.BufferedImage;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.awt.image.BufferedImage;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by yixian on 2016-06-29.
|
|
|
|
@ -54,6 +71,8 @@ public class SignInController {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private MpWechatApiProvider mpWechatApiProvider;
|
|
|
|
|
@Resource
|
|
|
|
|
private CustomerPaymentInfoService customerPaymentInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/partner_signin", method = RequestMethod.POST)
|
|
|
|
@ -340,8 +359,13 @@ public class SignInController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/customer_wechat_qrcode/{codeId}/check", method = RequestMethod.GET)
|
|
|
|
|
public void getCustomerID(@PathVariable String codeId, HttpServletResponse response) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
HttpUtils.setCookie(response, "CustomerID", statusKey,false);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|