Merge remote-tracking branch 'origin/develop' into develop

master
yangkai 6 years ago
commit 7284a1393a

@ -391,9 +391,9 @@ public class ManageAppServiceImp implements ManageAppService {
JSONObject manager = managerMapper.findById(device.getString("manager_id")); JSONObject manager = managerMapper.findById(device.getString("manager_id"));
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
if (manager.getIntValue("org_id") == 1) { if (manager.getIntValue("org_id") == 1) {
result.put("url", "http://192.168.0.49:9002/app/rules/bd"); result.put("url", PlatformEnvironment.getEnv().concatUrl("/app/rules/bd"));
} else { } else {
result.put("url", "http://192.168.0.49:9002/app/rules/org"); result.put("url", PlatformEnvironment.getEnv().concatUrl("/app/rules/org"));
} }
return result; return result;
} }

@ -335,7 +335,7 @@ public class TestController implements ApplicationEventPublisherAware {
} }
JSONObject order = orderMapper.find(refundOrder.getString("order_id")); JSONObject order = orderMapper.find(refundOrder.getString("order_id"));
Assert.notNull(order); Assert.notNull(order);
String channel = order.getString("channel"); String channel = order.getString("order_channel");
JSONObject res = new JSONObject(); JSONObject res = new JSONObject();
TradeType type = TradeType.fromGatewayNumber(order.getIntValue("gateway")); TradeType type = TradeType.fromGatewayNumber(order.getIntValue("gateway"));
switch (channel) { switch (channel) {

@ -5,6 +5,7 @@ import au.com.royalpay.payment.manage.mappers.ofei.TopUpOrderMapper;
import au.com.royalpay.payment.manage.ofei.core.OfeiClient; import au.com.royalpay.payment.manage.ofei.core.OfeiClient;
import au.com.royalpay.payment.manage.ofei.enums.OfeiType; import au.com.royalpay.payment.manage.ofei.enums.OfeiType;
import au.com.royalpay.payment.tools.codec.MD5Hash; import au.com.royalpay.payment.tools.codec.MD5Hash;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.fixing.FixedDocumentHelper; import au.com.royalpay.payment.tools.fixing.FixedDocumentHelper;
@ -84,7 +85,7 @@ public class OfeiClientImpl implements OfeiClient {
params.add(new BasicNameValuePair("sporder_id", orderId)); params.add(new BasicNameValuePair("sporder_id", orderId));
params.add(new BasicNameValuePair("sporder_time", DateFormatUtils.format(now, "yyyyMMddHHmmss"))); params.add(new BasicNameValuePair("sporder_time", DateFormatUtils.format(now, "yyyyMMddHHmmss")));
params.add(new BasicNameValuePair("game_userid", phoneNumber)); params.add(new BasicNameValuePair("game_userid", phoneNumber));
params.add(new BasicNameValuePair("ret_url", "https://mpay.royalpay.com.au/ofei/notice/"+orderId)); params.add(new BasicNameValuePair("ret_url", PlatformEnvironment.getEnv().concatUrl("/ofei/notice/"+orderId)));
saveOrder(orderId, now, OfeiType.PHONE.getMask(), price, phoneNumber); saveOrder(orderId, now, OfeiType.PHONE.getMask(), price, phoneNumber);
HttpRequestGenerator req = initRequest(topUPUrl, signAndEncryptForm(params), RequestMethod.GET); HttpRequestGenerator req = initRequest(topUPUrl, signAndEncryptForm(params), RequestMethod.GET);
@ -220,11 +221,11 @@ public class OfeiClientImpl implements OfeiClient {
params.add(new BasicNameValuePair("sporder_id", orderId)); params.add(new BasicNameValuePair("sporder_id", orderId));
params.add(new BasicNameValuePair("sporder_time", DateFormatUtils.format(now, "yyyyMMddHHmmss"))); params.add(new BasicNameValuePair("sporder_time", DateFormatUtils.format(now, "yyyyMMddHHmmss")));
params.add(new BasicNameValuePair("game_userid", qqNumber)); params.add(new BasicNameValuePair("game_userid", qqNumber));
params.add(new BasicNameValuePair("ret_url", "https://mpay.royalpay.com.au/ofei/notice/"+orderId)); params.add(new BasicNameValuePair("ret_url", PlatformEnvironment.getEnv().concatUrl("/ofei/notice/" + orderId)));
saveOrder(orderId, now, OfeiType.QB.getMask(), price, qqNumber); saveOrder(orderId, now, OfeiType.QB.getMask(), price, qqNumber);
HttpRequestGenerator req = initRequest(qbTopUpUrl, signAndEncryptForm(params), RequestMethod.POST); HttpRequestGenerator req = initRequest(qbTopUpUrl, signAndEncryptForm(params), RequestMethod.POST);
Element respXml = executeRequestXML(req, "ofei QB top up fail"); Element respXml = executeRequestXML(req, "ofei QB top up fail");
handleResponse(orderId, respXml,qqNumber); handleResponse(orderId, respXml, qqNumber);
} }

@ -13,6 +13,7 @@ import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.WechatRedpack; import au.com.royalpay.payment.tools.connections.mpsupport.beans.WechatRedpack;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException; import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.PageListUtils;
@ -190,7 +191,7 @@ public class ActRedPackServiceImpl implements ActRedPackService {
JSONObject prizeDetail = actRedPacketsCustomerOrdersMapper.findLockedPrize(lock, paymentOpenId); JSONObject prizeDetail = actRedPacketsCustomerOrdersMapper.findLockedPrize(lock, paymentOpenId);
BigDecimal luckyMoeny = prizeDetail.getBigDecimal("red_packet_amount"); BigDecimal luckyMoeny = prizeDetail.getBigDecimal("red_packet_amount");
String redPackOrderId = prizeDetail.getString("red_packet_order_id"); String redPackOrderId = prizeDetail.getString("red_packet_order_id");
String notifyUrl = "https://mpay.royalpay.com.au/sys/lucky_money/customer/redpacks/" + redPackOrderId + "/notify"; String notifyUrl = PlatformEnvironment.getEnv().concatUrl("/sys/lucky_money/customer/redpacks/" + redPackOrderId + "/notify");
JSONObject customerRelation = customerMapper.findCustomerByOpenId(paymentOpenId); JSONObject customerRelation = customerMapper.findCustomerByOpenId(paymentOpenId);
if (customerRelation == null) { if (customerRelation == null) {
customerRelation = customerMapper.findCustomerGlobalpayByOpenId(paymentOpenId); customerRelation = customerMapper.findCustomerGlobalpayByOpenId(paymentOpenId);

@ -8,6 +8,7 @@ import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery; import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.manage.redpack.beans.ActTypeEnum; import au.com.royalpay.payment.manage.redpack.beans.ActTypeEnum;
import au.com.royalpay.payment.manage.redpack.beans.RedpackQuery; import au.com.royalpay.payment.manage.redpack.beans.RedpackQuery;
@ -263,7 +264,7 @@ public class PartnerLMServiceImp implements PartnerLMService {
String sendName = "RoyalPay"; String sendName = "RoyalPay";
String actName = act.getString("act_name"); String actName = act.getString("act_name");
String wishing = "恭喜获得ROYALPAY红包奖励"; String wishing = "恭喜获得ROYALPAY红包奖励";
String notifyUrl = "https://mpay.royalpay.com.au/sys/lucky_money/partner/" + red_packet_order_id + "notify"; String notifyUrl = PlatformEnvironment.getEnv().concatUrl("/sys/lucky_money/partner/" + red_packet_order_id + "notify");
WechatRedpack wechatRedpack = new WechatRedpack(); WechatRedpack wechatRedpack = new WechatRedpack();
JSONObject customerRelation = customerMapper.findCustomerByOpenId(open_id); JSONObject customerRelation = customerMapper.findCustomerByOpenId(open_id);

@ -13,6 +13,7 @@ import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.AlipayRedpack; import au.com.royalpay.payment.tools.connections.mpsupport.beans.AlipayRedpack;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.WechatRedpack; import au.com.royalpay.payment.tools.connections.mpsupport.beans.WechatRedpack;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils; import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.PageListUtils;
@ -410,7 +411,7 @@ public class RedpackServiceImpl implements RedpackService {
String red_packet_order_id = prizeDetail.getString("red_packet_order_id"); String red_packet_order_id = prizeDetail.getString("red_packet_order_id");
String sendName = "RoyalPay皇家支付"; String sendName = "RoyalPay皇家支付";
String wishing = "恭喜获得ROYALPAY店长福利红包"; String wishing = "恭喜获得ROYALPAY店长福利红包";
String notifyUrl = "https://mpay.royalpay.com.au/sys/lucky_money/partner/" + red_packet_order_id + "notify"; String notifyUrl = PlatformEnvironment.getEnv().concatUrl("/sys/lucky_money/partner/" + red_packet_order_id + "notify");
WechatRedpack wechatRedpack = new WechatRedpack(); WechatRedpack wechatRedpack = new WechatRedpack();
JSONObject customerRelation = customerMapper.findCustomerByOpenId(open_id); JSONObject customerRelation = customerMapper.findCustomerByOpenId(open_id);

@ -804,11 +804,11 @@
<select id="getClientTransaction" resultType="com.alibaba.fastjson.JSONObject"> <select id="getClientTransaction" resultType="com.alibaba.fastjson.JSONObject">
select SELECT
IFNULL(sum(if(l.transaction_type='credit',l.clearing_amount,0)),0) trade_amount, IFNULL(sum(if(l.transaction_type='Credit',l.clearing_amount,0)),0) trade_amount,
ifnull(sum(if(l.refund_id>0,l.clearing_amount,0)),0) refund_amount, IFNULL(sum(if(l.transaction_type='Debit',l.clearing_amount,0)),0) refund_amount,
ifnull(sum(if(l.transaction_type='Credit',1,0)),0) trade_count, IFNULL(sum(if(l.transaction_type='Credit',1,0)),0) trade_count,
ifnull(sum(if(l.refund_id>0,1,0)),0) refund_orders IFNULL(sum(if(l.transaction_type='Debit',1,0)),0) refund_orders
FROM pmt_transactions l FROM pmt_transactions l
where l.channel!='Settlement' and l.system_generate=0 where l.channel!='Settlement' and l.system_generate=0
<if test="client_ids!=null"> <if test="client_ids!=null">

@ -1107,9 +1107,8 @@
pmt_transactions t pmt_transactions t
LEFT JOIN pmt_orders o ON o.order_id = t.order_id LEFT JOIN pmt_orders o ON o.order_id = t.order_id
LEFT JOIN pmt_refunds r ON r.refund_id = t.refund_id LEFT JOIN pmt_refunds r ON r.refund_id = t.refund_id
LEFT JOIN log_clearing_detail_analysis a ON a.clearing_detail_id = t.clearing_order LEFT JOIN log_clearing_detail_analysis a ON a.clearing_detail_id = t.clearing_order AND t.channel = a.channel
LEFT JOIN sys_clients c ON c.client_id = t.client_id LEFT JOIN sys_clients c ON c.client_id = t.client_id
AND t.channel = a.channel
WHERE t.channel != 'Settlement' WHERE t.channel != 'Settlement'
]]> ]]>
<if test="clientOrders!=null"> <if test="clientOrders!=null">

Loading…
Cancel
Save