|
|
@ -1,44 +1,39 @@
|
|
|
|
package au.com.royalpay.payment.manage.signin.web;
|
|
|
|
package au.com.royalpay.payment.manage.signin.web;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.*;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.consumer.ConsumersAction;
|
|
|
|
|
|
|
|
import com.google.code.kaptcha.Producer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.customers.core.CustomerPaymentInfoService;
|
|
|
|
import au.com.royalpay.payment.manage.customers.core.CustomerPaymentInfoService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
|
|
|
|
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.ChangePwdBean;
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.FindPwdBean;
|
|
|
|
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.LoginInfo;
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.*;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
|
|
|
|
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.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.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.consumer.ConsumersAction;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
|
|
|
|
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.google.code.kaptcha.Producer;
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
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.annotation.Resource;
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
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.
|
|
|
|
* Created by yixian on 2016-06-29.
|
|
|
@ -191,7 +186,8 @@ public class SignInController {
|
|
|
|
@PartnerMapping(value = "/current_partner", method = RequestMethod.GET)
|
|
|
|
@PartnerMapping(value = "/current_partner", method = RequestMethod.GET)
|
|
|
|
public JSONObject partnerLoginStatus(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
|
|
|
|
public JSONObject partnerLoginStatus(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
|
|
|
|
partner.put("has_incremental_setvice",clientManager.partnerIncrementalService(partner.getString("client_moniker")).getJSONArray("all_service").size()>0);
|
|
|
|
partner.put("has_incremental_setvice",clientManager.partnerIncrementalService(partner.getString("client_moniker")).getJSONArray("all_service").size()>0);
|
|
|
|
partner.put("lessKycFiles",clientManager.isPartnerKycfilesComplete(partner.getString("client_moniker")));
|
|
|
|
boolean lessKycFiles = ("PINE".equals(partner.getString("client_moniker")) || "LEOH".equals(partner.getString("client_moniker"))) && clientManager.isPartnerKycfilesComplete(partner.getString("client_moniker"));
|
|
|
|
|
|
|
|
partner.put("lessKycFiles", lessKycFiles);
|
|
|
|
partner.put("lessComplianceFiles",signInAccountService.checkAuthFileStatus(partner.getJSONObject("client")).getBoolean("client_less_file") );
|
|
|
|
partner.put("lessComplianceFiles",signInAccountService.checkAuthFileStatus(partner.getJSONObject("client")).getBoolean("client_less_file") );
|
|
|
|
return partner;
|
|
|
|
return partner;
|
|
|
|
}
|
|
|
|
}
|
|
|
|