|
|
|
@ -10,25 +10,8 @@ import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper
|
|
|
|
|
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientApplyMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAuditProcessMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.ActivityPosterBuilder;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
|
|
|
|
|
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.mappers.system.*;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.*;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientComplyValidator;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.MailService;
|
|
|
|
@ -56,22 +39,16 @@ import au.com.royalpay.payment.tools.merchants.qrboard.QRBoard;
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.qrboard.QRBoardProvider;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.ImageUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.PasswordUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.PdfUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.QRCodeUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.*;
|
|
|
|
|
import au.com.royalpay.payment.tools.websocket.notify.PartnerPageEvent;
|
|
|
|
|
|
|
|
|
|
import cn.yixblog.platform.http.HttpRequestGenerator;
|
|
|
|
|
import cn.yixblog.platform.http.HttpRequestResult;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
|
import com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -93,34 +70,22 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
import org.thymeleaf.context.Context;
|
|
|
|
|
import org.thymeleaf.spring4.SpringTemplateEngine;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
import java.awt.image.BufferedImage;
|
|
|
|
|
import java.io.ByteArrayInputStream;
|
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
import java.io.*;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
import java.util.zip.ZipEntry;
|
|
|
|
|
import java.util.zip.ZipOutputStream;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import cn.yixblog.platform.http.HttpRequestGenerator;
|
|
|
|
|
import cn.yixblog.platform.http.HttpRequestResult;
|
|
|
|
|
|
|
|
|
|
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -327,8 +292,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
params.put("bd_user", manager.getString("manager_id"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(params.getString("org_id") != null){
|
|
|
|
|
if(params.getString("org_ids") == null){
|
|
|
|
|
orgIds(params,Integer.parseInt(params.getString("org_id")));
|
|
|
|
|
}else {
|
|
|
|
|
params.put("org_id",params.getString("org_ids"));
|
|
|
|
|
params.remove("org_ids");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
JSONObject org = null;
|
|
|
|
|
if (params.getString("org_id") != null) {
|
|
|
|
|
JSONObject org = orgMapper.findOne(params.getIntValue("org_id"));
|
|
|
|
|
org = orgMapper.findOne(params.getIntValue("org_id"));
|
|
|
|
|
if (org.getIntValue("type") == 1) {
|
|
|
|
|
params.put("referrer_id", org.getString("org_id"));
|
|
|
|
|
params.remove("org_id");
|
|
|
|
@ -336,7 +311,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
int orgId = manager.getIntValue("org_id");
|
|
|
|
|
if (orgId > 0) {
|
|
|
|
|
params.put("org_id", orgId);
|
|
|
|
|
if(params.getString("org_ids") == null){
|
|
|
|
|
JSONObject org2 = orgMapper.findOne(orgId);
|
|
|
|
|
if(org2.getString("parent_org_id") != null){
|
|
|
|
|
params.put("org_id",orgId);
|
|
|
|
|
}else {
|
|
|
|
|
params.put("org_id",orgId);
|
|
|
|
|
orgIds(params,orgId);
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
params.put("org_id", params.getIntValue("org_ids"));
|
|
|
|
|
params.remove("org_ids");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String tempSubMchId = sysConfigManager.getSysConfig().getString("temp_sub_mch_id");
|
|
|
|
|
String tempSubMchSource = sysConfigManager.getSysConfig().getString("temp_sub_mch_id_source");
|
|
|
|
@ -361,6 +347,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
return PageListUtils.buildPageListResult(partners);
|
|
|
|
|
}
|
|
|
|
|
private void orgIds(JSONObject params,int orgId){
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
|
|
param.put("parent_org_id",params.getString("org_id"));
|
|
|
|
|
param.put("type",0);
|
|
|
|
|
List<Integer> orgIds = new ArrayList<>();
|
|
|
|
|
List<JSONObject> childOrgs = orgMapper.listOrgsWithChid(param);
|
|
|
|
|
if(childOrgs.size() > 0){
|
|
|
|
|
for(JSONObject object : childOrgs ){
|
|
|
|
|
orgIds.add(object.getIntValue("org_id"));
|
|
|
|
|
}
|
|
|
|
|
orgIds.add(orgId);
|
|
|
|
|
params.put("org_ids",orgIds);
|
|
|
|
|
params.remove("org_id");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> listPartners(JSONObject manager, PartnerQuery query) {
|
|
|
|
|