|
|
|
@ -12,6 +12,7 @@ import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
|
|
|
|
@ -140,6 +141,8 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
private ClientContractService clientContractService;
|
|
|
|
|
@Resource
|
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
|
@Resource
|
|
|
|
|
private NoticePartnerMapper noticePartnerMapper;
|
|
|
|
|
|
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
@ -422,14 +425,14 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
switch (order.getString("channel")) {
|
|
|
|
|
case "Alipay":
|
|
|
|
|
JSONObject alipayUser = customerRelationAlipayMapper.findCustomerByUserId(customer_id);
|
|
|
|
|
if (alipayUser!=null){
|
|
|
|
|
if (alipayUser != null) {
|
|
|
|
|
order.put("nickname", alipayUser.getString("nickname"));
|
|
|
|
|
order.put("headimg", alipayUser.getString("headimg"));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "Wechat":
|
|
|
|
|
JSONObject weUser = customerMapper.findCustomerByOpenId(customer_id);
|
|
|
|
|
if (weUser!=null){
|
|
|
|
|
if (weUser != null) {
|
|
|
|
|
order.put("nickname", weUser.getString("nickname"));
|
|
|
|
|
order.put("headimg", weUser.getString("headimg"));
|
|
|
|
|
}
|
|
|
|
@ -442,12 +445,12 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
String trade_time = DateFormatUtils.format(calendar, "HH:mm:ss");
|
|
|
|
|
order.put("trade_date", trade_date);
|
|
|
|
|
order.put("trade_time", trade_time);
|
|
|
|
|
//todo
|
|
|
|
|
if ("Debit".equals(order.getString("transaction_type"))){
|
|
|
|
|
order.put("currency","AUD");
|
|
|
|
|
// todo
|
|
|
|
|
if ("Debit".equals(order.getString("transaction_type"))) {
|
|
|
|
|
order.put("currency", "AUD");
|
|
|
|
|
}
|
|
|
|
|
if ("CNY".equals(order.getString("currency"))){
|
|
|
|
|
order.put("clearing_amount",order.getBigDecimal("total_amount"));
|
|
|
|
|
if ("CNY".equals(order.getString("currency"))) {
|
|
|
|
|
order.put("clearing_amount", order.getBigDecimal("total_amount"));
|
|
|
|
|
}
|
|
|
|
|
if (!date_contains.contains(trade_date)) {
|
|
|
|
|
String re_date = trade_date.replaceAll("-", "");
|
|
|
|
@ -869,6 +872,28 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> getLatestNotice(int client_id) {
|
|
|
|
|
JSONObject notice = new JSONObject();
|
|
|
|
|
JSONObject lastNotice = noticeManage.getLatestWindowNotice(client_id);
|
|
|
|
|
if(lastNotice!=null){
|
|
|
|
|
lastNotice.put("id",lastNotice.getString("notice_id"));
|
|
|
|
|
lastNotice.remove("notice_id");
|
|
|
|
|
}
|
|
|
|
|
notice.put("data",lastNotice);
|
|
|
|
|
JSONObject unReadParams = new JSONObject();
|
|
|
|
|
unReadParams.put("client_id",client_id);
|
|
|
|
|
unReadParams.put("status",0);
|
|
|
|
|
int counts = noticePartnerMapper.countNoticePartner(unReadParams);
|
|
|
|
|
notice.put("unReadCounts",counts);
|
|
|
|
|
notice.put("type","notice");
|
|
|
|
|
List<JSONObject> result = new ArrayList<>();
|
|
|
|
|
result.add(notice);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void changeAccountPassword(JSONObject device, ChangePwdBean change, String account_id) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
@ -1345,6 +1370,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
public JSONObject getCheckClientInfo(JSONObject device) {
|
|
|
|
|
return clientManager.getCheckClientInfo(device.getIntValue("client_id"), device.getString("account_id"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static boolean mathchLetterorNum(String str) {
|
|
|
|
|
String regex = "[A-Za-z0-9]{8}";
|
|
|
|
|
return str.matches(regex);
|
|
|
|
|