|
|
@ -1,13 +1,7 @@
|
|
|
|
package au.com.royalpay.payment.manage.merchants.web;
|
|
|
|
package au.com.royalpay.payment.manage.merchants.web;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.MerchantLocationService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.MerchantLocationService;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.*;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.ClientRateConfig;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.SubMerchantIdApply;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
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.RequireManager;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
|
|
|
@ -17,27 +11,16 @@ import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
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 java.io.IOException;
|
|
|
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Created by yixian on 2016-06-27.
|
|
|
|
* Created by yixian on 2016-06-27.
|
|
|
@ -536,164 +519,4 @@ public class PartnerManageController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//test
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/changebd/1",method = RequestMethod.GET,role = {ManagerRole.ADMIN})
|
|
|
|
|
|
|
|
public void changeBD1(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject managerJson) {
|
|
|
|
|
|
|
|
List<JSONObject> clients = clientManager.getClientsByBD("194");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String manager_id = "a1ffa1f6-3dc5-4dbe-bc00-ffc185c5ebc6";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clients.forEach(p -> {
|
|
|
|
|
|
|
|
JSONObject manager = new JSONObject();
|
|
|
|
|
|
|
|
manager.put("org_id", 1);
|
|
|
|
|
|
|
|
manager.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
String clientMoniker = p.getString("client_moniker");
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
|
|
jsonObject.put("type", "add");
|
|
|
|
|
|
|
|
jsonObject.put("start_date", new Date());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject user = new JSONObject();
|
|
|
|
|
|
|
|
user.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
user.put("display_name", "Melbourne-Zoe");
|
|
|
|
|
|
|
|
user.put("proportion", "0.5");
|
|
|
|
|
|
|
|
List<JSONObject> users = new ArrayList<>();
|
|
|
|
|
|
|
|
users.add(user);
|
|
|
|
|
|
|
|
jsonObject.put("users", users);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/changebd/2",method = RequestMethod.GET,role = {ManagerRole.ADMIN})
|
|
|
|
|
|
|
|
public void changeBD2(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject managerJson) {
|
|
|
|
|
|
|
|
String manager_id = "215";
|
|
|
|
|
|
|
|
List<JSONObject> clients = clientManager.getClientsByBD("110");
|
|
|
|
|
|
|
|
List<JSONObject> clients106 = clientManager.getClientsByBD("106");
|
|
|
|
|
|
|
|
List<JSONObject> clients240 = clientManager.getClientsByBD("240");
|
|
|
|
|
|
|
|
List<JSONObject> clients200 = clientManager.getClientsByBD("200");
|
|
|
|
|
|
|
|
clients.addAll(clients106);
|
|
|
|
|
|
|
|
clients.addAll(clients200);
|
|
|
|
|
|
|
|
clients.addAll(clients240);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clients.forEach(p -> {
|
|
|
|
|
|
|
|
JSONObject manager = new JSONObject();
|
|
|
|
|
|
|
|
manager.put("org_id", 1);
|
|
|
|
|
|
|
|
manager.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
String clientMoniker = p.getString("client_moniker");
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
|
|
jsonObject.put("type", "add");
|
|
|
|
|
|
|
|
jsonObject.put("start_date", new Date());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject user = new JSONObject();
|
|
|
|
|
|
|
|
user.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
user.put("display_name", "Sydney-Zoe");
|
|
|
|
|
|
|
|
user.put("proportion", "0.5");
|
|
|
|
|
|
|
|
List<JSONObject> users = new ArrayList<>();
|
|
|
|
|
|
|
|
users.add(user);
|
|
|
|
|
|
|
|
jsonObject.put("users", users);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/changebd/3",method = RequestMethod.GET,role = {ManagerRole.ADMIN})
|
|
|
|
|
|
|
|
public void changeBD3(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject managerJson) {
|
|
|
|
|
|
|
|
String arr[] = { "TOP3", "TOPR", "TOPM", "AZLX", "ACAB", "VWPA", "DPIP", "GJJY", "M7F8", "ISHO", "ISBE", "ISSP", "BENE", "JVUA", "LWZZ", "NDEG", "GHHD",
|
|
|
|
|
|
|
|
"YANQ", "MONV", "YTOE", "ATEP", "ILLS", "3571", "MECA", "TUYY", "TOP4", "SUCB", "SURS", "SUPT", "FDUP", "DAVI", "MTG1", "DLWH", "HJET", "CAYC",
|
|
|
|
|
|
|
|
"ORG1", "ORG3", "GES1", "YEST", "XNPL", "AAEC", "3GWP", "AASS", "KNOX", "GSPT", "LESA", "ISES", "SAUB", "AXKP", "SLIM", "SLI1", "AHAP", "AHHY",
|
|
|
|
|
|
|
|
"AHGK", "WLIT", "HAIK", "BSTM", "CEIN", "PE1T", "AEI0", "LLTA", "JQZL", "RO1G", "TBSK", "HDSD", "IGOG", "78RD", "AOEI", "DZJY", "GHDP", "HQYP",
|
|
|
|
|
|
|
|
"MN81", "EPSP", "FORU", "VCLG", "ETKS", "EEXP", "ASLK", "NBDP", "1SPH", "1STH", "YTPL", "XHD8", "FYAU", "EHUI", "EFAN", "MARS", "TPLS", "MHGF",
|
|
|
|
|
|
|
|
"MIDS", "OPPL", "IRWN", "PMEN", "VIV1", "DMLA", "GLAM", "FEEL", "SBUS", "428S", "EFN1", "EFN2", "AWCT", "ALB1", "HUAT", "WISH", "LALI", "MTTC",
|
|
|
|
|
|
|
|
"APAL", "IAOG", "RCPX", "LZZ1", "CSNA", "NEVC", "FCPT", "EKTD", "AUPR", "TYJN", "MAXS", "AHPB", "SOCT", "ALP1", "ALP2", "ALP3", "SHAJ", "PRAT",
|
|
|
|
|
|
|
|
"DAZH", "REG2", "QASI", "REG1", "NEW4", "NEW5", "NEW7", "NEW8", "NEW9", "NE10", "NEQ1", "NE12", "NE13", "NE14", "XXZY", "TRAL", "UIPL", "SNLK",
|
|
|
|
|
|
|
|
"LETH", "AABC", "XWL8", "ZEQI", "TRAS", "UIOT", "DDMS", "NEW1", "NEW3", "LTFM", "AUSF", "LMSM", "SHJY", "ZCME", "JMCD", "SSLL", "JLFG", "168P",
|
|
|
|
|
|
|
|
"C4KC", "FAMA", "CLIN", "GILD", "LMEC", "SHMI", "1X2J", "OZPA", "JOLP", "NKB1", "JYIT", "AIMR", "CNXN", "BEMB", "ZJAU", "BBYG", "WNLJ", "COOL",
|
|
|
|
|
|
|
|
"CROS", "CROU", "PLBX", "AUBE", "JADA", "ULIF", "FRJL", "PLVM", "FAST", "DCOB", "DCOC", "QSMP", "EHSE", "ASPD", "YEDC", "DCOE", "ATSP", "BOYT",
|
|
|
|
|
|
|
|
"SINO", "RECI", "ASOU", "ACEB", "ZXEC", "AUYD", "HESA", "HFNP", "WBJY", "CAMP", "SSPA", "SCUG", "GRAN", "YIHU", "SINA", "MINN", "AFI6", "NATI",
|
|
|
|
|
|
|
|
"ANGE", "RYBV", "ARKM", "NEVI", "BING", "PRIN", "SUNW", "ISKI", "JTHS", "GIQC", "CHAW", "HONE", "ISLE", "AGMC", "HOME", "TOPP", "DIYT", "TARE",
|
|
|
|
|
|
|
|
"2AUB", "MAYH", "M2CH", "YUZH", "ZNZA", "GREA", "SZKL", "WOOO", "KORA", "NESA", "PLVV", "BIGT", "YERI", "PLAN", "ANTO", "SEAL", "RJPL", "ATWO",
|
|
|
|
|
|
|
|
"GILA", "SYST", "DENT", "CRU2", "SYDT", "LOOK", "QAMW", "ASBG", "JLHB", "CCWT", "GLXL", "LIAN", "AUTT", "MJCR", "LVMJ", "PRCP", "VEMV", "KEJW",
|
|
|
|
|
|
|
|
"7UTO", "JASM", "IVYM", "NEEP", "HALI", "TADC", "MOLI", "QVPH", "TSGK", "KHCF", "YXRU", "LASA", "VAST", "HAAS", "ACOC", "ASTL", "BDBB", "CONI",
|
|
|
|
|
|
|
|
"HJCO", "AUTU", "BETV", "QQDG", "AWPT", "XFXD", "FANP", "MONO", "JWJY", "SNRL", "SURA", "HUXI", "YHKW", "3AAA", "ORAU", "NRED", "APGJ", "HNDG",
|
|
|
|
|
|
|
|
"MNTL", "BTLS", "ACIM", "QIRU", "EEPL", "DET1", "SCHI", "OO6S", "YWJX", "XFYL", "AULA", "VISM", "ROEE", "QINA", "AZDG", "DLZY", "AUGG", "PISC",
|
|
|
|
|
|
|
|
"DLBS", "MUYK", "MUVI", "SANY", "BARI", "BAR0", "BAR1", "TANA", "DDIT", "FFDT", "HAUT", "PWCL" };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String manager_id = "a1ffa1f6-3dc5-4dbe-bc00-ffc185c5ebc6";
|
|
|
|
|
|
|
|
for (String s : arr) {
|
|
|
|
|
|
|
|
JSONObject client = clientManager.getClientInfoByMoniker(s);
|
|
|
|
|
|
|
|
if (manager_id.equals(client.getString("bd_user")) || "215".equals(client.getString("bd_user"))) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject manager = new JSONObject();
|
|
|
|
|
|
|
|
manager.put("org_id", 1);
|
|
|
|
|
|
|
|
manager.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
String clientMoniker = s;
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
|
|
jsonObject.put("type", "add");
|
|
|
|
|
|
|
|
jsonObject.put("start_date", new Date());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject user = new JSONObject();
|
|
|
|
|
|
|
|
user.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
user.put("display_name", "Melbourne-Zoe");
|
|
|
|
|
|
|
|
user.put("proportion", "0.5");
|
|
|
|
|
|
|
|
List<JSONObject> users = new ArrayList<>();
|
|
|
|
|
|
|
|
users.add(user);
|
|
|
|
|
|
|
|
jsonObject.put("users", users);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/changebd/4",method = RequestMethod.GET,role = {ManagerRole.ADMIN})
|
|
|
|
|
|
|
|
public void changeBD4(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject managerJson) {
|
|
|
|
|
|
|
|
String arr[] = { "MDSH", "PALL", "XXXG", "GWPL", "NCME", "CHEN", "ONTR", "LTEA", "JMJZ", "KUNG", "DOTE", "EVOV", "FBPL", "LEQU", "VLPL", "MYTC", "BETY",
|
|
|
|
|
|
|
|
"JKGJ", "MODT", "OZHE", "P004", "LCAS", "AQUA", "CRWN", "HCST", "SOGA", "ETOU", "BAXI", "LILY", "OPAL", "ADOR", "EVER", "AECE", "PEAC", "JLGH",
|
|
|
|
|
|
|
|
"AMAC", "SYNX", "PETR", "EQUI", "MCKI", "PNCT", "TOPI", "YUAD", "CHAX", "BOYA", "DRIF", "TSAM", "JBUC", "KOLO", "SOAR", "ATWP", "ATW2", "MAST",
|
|
|
|
|
|
|
|
"MMBP", "PDSB", "SONB", "BSTP", "NEXU", "AUWT", "FLYW", "XUXU", "ROSA", "ALNA", "YELI", "VATA", "THAU", "ALLC", "SSPL", "IGAO", "IGAW", "17PR",
|
|
|
|
|
|
|
|
"BARO", "SOLE", "JACK", "VOLQ", "ANCP", "LBLM", "EVTP", "ONHV", "TTSP", "ANZC", "DFLX", "GOLI", "AUSI", "AUDR", "AOLE", "LSPA", "ZKSD", "YOYH",
|
|
|
|
|
|
|
|
"ORMT", "MMRG", "DHBM", "ITCA", "TYXA", "JAYL", "SASP", "CPTB", "AUCU", "TFZB", "TRIP", "VOLA", "HUIX", "JYLG", "AOMY", "TANH", "TOPH", "WMBT",
|
|
|
|
|
|
|
|
"XMWK", "ANMM", "QMKJ", "DION", "HUTA", "CJCE", "QIDI", "JHGP", "GLOB", "AOPP", "6PTS", "HOYU", "NYLP", "WLSM", "STAN", "NAAN", "LYKE", "CAOL",
|
|
|
|
|
|
|
|
"LPDE", "ZHON", "OLIV", "FFIM", "SDFS", "OZHO", "DXKO", "ACHE", "PHO3", "AHLB", "HMUS", "3AAT", "4RGC", "4ACT", "SYD3", "1YDZ", "WINW", "5ATR",
|
|
|
|
|
|
|
|
"SHLE", "AUDG", "NVOZ", "AUYO", "WHEW", "CARL", "AMQY", "XXLI", "OWWH", "LEON", "TRMA", "SUSX", "FPPL", "CONL", "AURE", "MAYS", "3CIT", "HOLY",
|
|
|
|
|
|
|
|
"ECWW", "6GWI", "LAZE" };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String manager_id = "215";
|
|
|
|
|
|
|
|
for (String s : arr) {
|
|
|
|
|
|
|
|
JSONObject client = clientManager.getClientInfoByMoniker(s);
|
|
|
|
|
|
|
|
if (manager_id.equals(client.getString("bd_user")) || "a1ffa1f6-3dc5-4dbe-bc00-ffc185c5ebc6".equals(client.getString("bd_user"))) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject manager = new JSONObject();
|
|
|
|
|
|
|
|
manager.put("org_id", 1);
|
|
|
|
|
|
|
|
manager.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
String clientMoniker = s;
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
|
|
jsonObject.put("type", "add");
|
|
|
|
|
|
|
|
jsonObject.put("start_date", new Date());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject user = new JSONObject();
|
|
|
|
|
|
|
|
user.put("manager_id", manager_id);
|
|
|
|
|
|
|
|
user.put("display_name", "Sydney-Zoe");
|
|
|
|
|
|
|
|
user.put("proportion", "0.5");
|
|
|
|
|
|
|
|
List<JSONObject> users = new ArrayList<>();
|
|
|
|
|
|
|
|
users.add(user);
|
|
|
|
|
|
|
|
jsonObject.put("users", users);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|