diff --git a/pom.xml b/pom.xml
index eef42473c..980a5eab5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
4.0.0
manage
- 1.3.62
+ 1.3.65
UTF-8
1.8.0
diff --git a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java
index 85e3afa83..5d7a07efa 100644
--- a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java
@@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.rservices.core.impl;
import au.com.royalpay.payment.core.TransactionService;
+import au.com.royalpay.payment.core.mappers.PmtOrderMapper;
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientIncrementalMapper;
@@ -64,6 +65,8 @@ public class RServicesApplyServiceImpl implements RServicesApplyService {
private MailService mailService;
@Resource
private ClientIncrementalMapper clientIncrementalMapper;
+ @Resource
+ private PmtOrderMapper pmtOrderMapper;
@Override
public JSONObject getServicesApply(RServicesApplyQuery applyQuery) {
@@ -157,6 +160,29 @@ public class RServicesApplyServiceImpl implements RServicesApplyService {
transaction.put("remark", applyInfo.getString("service_code") + ":" + applyInfo.getString("title"));
transaction.put("system_generate", 1);
transactionService.saveTransaction(transaction);
+ JSONObject order = new JSONObject();
+ order.put("order_id", orderId);
+ order.put("org_id", client.getIntValue("org_id"));
+ order.put("client_id", applyInfo.getIntValue("client_id"));
+ order.put("transaction_date", new Date());
+ order.put("order_description", applyInfo.getString("title"));
+ order.put("order_detail", applyInfo.getString("title"));
+ order.put("currency", "AUD");
+ order.put("display_amount", applyInfo.getBigDecimal("amount"));
+ order.put("total_amount", applyInfo.getBigDecimal("amount"));
+ order.put("coupon_payment_amount", 0);
+ order.put("customer_payment_amount", applyInfo.getBigDecimal("amount"));
+ order.put("refund_amount", applyInfo.getBigDecimal("amount"));
+ order.put("customer_ip", "0.0.0.0");
+ order.put("surcharge_rate", "0");
+ order.put("create_time", new Date());
+ order.put("expire_time", new Date());
+ order.put("confirm_time", new Date());
+ order.put("gateway", 0);
+ order.put("status", 7);
+ order.put("channel", "System");
+ pmtOrderMapper.save(order);
+
sendNotify(applyInfo, client);
}
diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/OrderMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/OrderMapper.xml
index bbcb11c6c..4777e7c9c 100644
--- a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/OrderMapper.xml
+++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/OrderMapper.xml
@@ -922,7 +922,8 @@
t.settle_amount,
t.clearing_status = 2 pre_auth
from pmt_orders o
- left join pmt_transactions t on t.order_id=o.order_id and t.channel!='Settlement' and t.system_generate=0
+ left join pmt_transactions t on t.order_id=o.order_id and t.channel!='Settlement'
+ AND (t.system_generate = 0 or (t.system_generate = 1 and t.remark like '%RYCBSM%'))
AND o.client_id IN