|
|
@ -1,5 +1,69 @@
|
|
|
|
package au.com.royalpay.payment.manage.merchants.core.impls;
|
|
|
|
package au.com.royalpay.payment.manage.merchants.core.impls;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import java.util.zip.ZipEntry;
|
|
|
|
|
|
|
|
import java.util.zip.ZipOutputStream;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
|
|
|
import org.dom4j.Element;
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
|
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
|
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
|
|
|
|
|
import org.springframework.context.ApplicationEventPublisherAware;
|
|
|
|
|
|
|
|
import org.springframework.context.MessageSource;
|
|
|
|
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
|
|
|
import org.thymeleaf.context.Context;
|
|
|
|
|
|
|
|
import org.thymeleaf.spring4.SpringTemplateEngine;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
|
|
|
@ -77,6 +141,7 @@ import au.com.royalpay.payment.manage.notice.core.MailService;
|
|
|
|
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.ManagerTodoNoticeProvider;
|
|
|
|
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.SignInAccountService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.support.sms.SmsSender;
|
|
|
|
import au.com.royalpay.payment.manage.system.core.ClientContractService;
|
|
|
|
import au.com.royalpay.payment.manage.system.core.ClientContractService;
|
|
|
|
import au.com.royalpay.payment.manage.system.core.MailGunService;
|
|
|
|
import au.com.royalpay.payment.manage.system.core.MailGunService;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
@ -109,74 +174,9 @@ import au.com.royalpay.payment.tools.utils.QRCodeUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
|
|
|
|
import au.com.royalpay.payment.tools.websocket.notify.PartnerPageEvent;
|
|
|
|
import au.com.royalpay.payment.tools.websocket.notify.PartnerPageEvent;
|
|
|
|
|
|
|
|
|
|
|
|
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.github.qcloudsms.SmsSingleSender;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
|
|
|
import org.dom4j.Element;
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
|
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
|
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
|
|
|
|
|
import org.springframework.context.ApplicationEventPublisherAware;
|
|
|
|
|
|
|
|
import org.springframework.context.MessageSource;
|
|
|
|
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
|
|
|
import org.thymeleaf.context.Context;
|
|
|
|
|
|
|
|
import org.thymeleaf.spring4.SpringTemplateEngine;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import java.util.zip.ZipEntry;
|
|
|
|
|
|
|
|
import java.util.zip.ZipOutputStream;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
|
|
|
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.HttpRequestGenerator;
|
|
|
|
import cn.yixblog.platform.http.HttpRequestResult;
|
|
|
|
import cn.yixblog.platform.http.HttpRequestResult;
|
|
|
|
|
|
|
|
|
|
|
|
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* partner manage Created by yixian on 2016-06-28.
|
|
|
|
* partner manage Created by yixian on 2016-06-28.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -294,7 +294,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
private PermissionClientModuleMapper permissionClientModuleMapper;
|
|
|
|
private PermissionClientModuleMapper permissionClientModuleMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private PermissionPartnerManagerImpl permissionPartnerManagerImpl;
|
|
|
|
private PermissionPartnerManagerImpl permissionPartnerManagerImpl;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private SmsSender smsSender;
|
|
|
|
private static final String SOURCE_AGREE_FILE = "source_agree_file";
|
|
|
|
private static final String SOURCE_AGREE_FILE = "source_agree_file";
|
|
|
|
private static final String CLIENT_BANK_FILE = "client_bank_file";
|
|
|
|
private static final String CLIENT_BANK_FILE = "client_bank_file";
|
|
|
|
private static final String CLIENT_ID_FILE = "client_id_file";
|
|
|
|
private static final String CLIENT_ID_FILE = "client_id_file";
|
|
|
@ -308,21 +309,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
@Value("${app.agreetemplate.aggregate.path}")
|
|
|
|
@Value("${app.agreetemplate.aggregate.path}")
|
|
|
|
private String aggregateAgreetemplatePdfPath;
|
|
|
|
private String aggregateAgreetemplatePdfPath;
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${royalpay.sms.appid:1400094878}")
|
|
|
|
|
|
|
|
private static int appId;
|
|
|
|
|
|
|
|
@Value("${royalpay.sms.appkey:43390d81e20c5191c278fbf4cd275be2}")
|
|
|
|
|
|
|
|
private static String appKey;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private MpWechatApiProvider mpWechatApiProvider;
|
|
|
|
private MpWechatApiProvider mpWechatApiProvider;
|
|
|
|
|
|
|
|
|
|
|
|
private final int REFUSE_CLIENT_TEMPLID = 166108;
|
|
|
|
private final int REFUSE_CLIENT_TEMPLID = 166108;
|
|
|
|
private SmsSingleSender sender = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
@PostConstruct
|
|
|
|
public void init() {
|
|
|
|
public void init() {
|
|
|
|
tags.add("account");
|
|
|
|
tags.add("account");
|
|
|
|
sender = new SmsSingleSender(1400094878, "43390d81e20c5191c278fbf4cd275be2");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -3066,7 +3061,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
ArrayList<String> param = new ArrayList<>();
|
|
|
|
ArrayList<String> param = new ArrayList<>();
|
|
|
|
param.add(refuse_remark);
|
|
|
|
param.add(refuse_remark);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
sender.sendWithParam("61", contact_phone.replace("+61", ""), REFUSE_CLIENT_TEMPLID, param, "RoyalPay", "", "");
|
|
|
|
smsSender.getSender().sendWithParam("61", contact_phone.replace("+61", ""), REFUSE_CLIENT_TEMPLID, param, "RoyalPay", "", "");
|
|
|
|
} catch (Exception ignore) {
|
|
|
|
} catch (Exception ignore) {
|
|
|
|
throw new ServerErrorException("Phone number is wrong :" + contact_phone);
|
|
|
|
throw new ServerErrorException("Phone number is wrong :" + contact_phone);
|
|
|
|
}
|
|
|
|
}
|
|
|
|