diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ChannelsAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ChannelsAnalysisServiceImpl.java index 9878e525f..830e1aa01 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ChannelsAnalysisServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ChannelsAnalysisServiceImpl.java @@ -1,5 +1,6 @@ package au.com.royalpay.payment.manage.analysis.core.impls; +import au.com.royalpay.payment.core.mappers.MchChannelContractMapper; import au.com.royalpay.payment.manage.analysis.core.ChannelsAnalysisService; import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper; import com.alibaba.fastjson.JSONObject; @@ -28,6 +29,9 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService { @Resource private CustomerAndOrdersStatisticsMapper customerAndOrdersStatisticsMapper; + @Resource + private MchChannelContractMapper mchChannelContractMapper; + @Override public List getChannelMount(JSONObject params) { /*if (!params.containsKey("client_ids") && !params.containsKey("org_id")){ @@ -37,6 +41,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService { listChannel.add(putParam(params,"Wechat")); listChannel.add(putParam(params,"Alipay")); listChannel.add(putParam(params,"AlipayOnline")); + listChannel.add(putParam(params,"AlipayAps")); listChannel.add(putParam(params,"Rpay")); listChannel.add(putParam(params,"rpaypmt_card")); listChannel.add(putParam(params,"rpaypmt_dd")); @@ -50,7 +55,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService { } List list = new ArrayList<>(); Map analysisMap = new TreeMap<>(); - String[] channels = {"Wechat","Alipay","AlipayOnline","Rpay","rpaypmt_card","rpaypmt_dd"}; + String[] channels = {"Wechat","Alipay","AlipayOnline","Rpay","rpaypmt_card","rpaypmt_dd","AlipayAps"}; for (String channel:channels){ analysisChannelCustomers(params, analysisMap, channel); } @@ -136,7 +141,11 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService { params.put("gateway_alipay_online", 1); enablePartners = customerAndOrdersStatisticsMapper.countEnableChannel(params); params.remove("gateway_alipay_online"); - } else { + } + else if("AlipayAps".equals(name)){ + enablePartners=mchChannelContractMapper.sumEnablePartners(name); + } + else { params.put("enable_" + name.toLowerCase(), 1); enablePartners = customerAndOrdersStatisticsMapper.countEnableChannel(params); params.remove("enable_" + name.toLowerCase()); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index a299e427d..fffa36212 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -1066,8 +1066,15 @@ public class PartnerManageController { * @return */ @ManagerMapping(value = "/{clientMoniker}/apply_alipayplus", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public MerchantApplicationResult applyAlipayPlusMerchant(@PathVariable String clientMoniker, @RequestBody ApsMerchantApplication apsMerchantApplication, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - return clientManager.alipayPlusRegisterMerchant(clientMoniker,apsMerchantApplication,manager); + public JSONObject applyAlipayPlusMerchant(@PathVariable String clientMoniker, @RequestBody ApsMerchantApplication apsMerchantApplication, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + MerchantApplicationResult result= clientManager.alipayPlusRegisterMerchant(clientMoniker,apsMerchantApplication,manager); + JSONObject jsonObject=new JSONObject(); + if(result.isSuccess()){ + jsonObject.put("result",true); + }else{ + jsonObject.put("result",false); + } + return jsonObject; } @ManagerMapping(value = "/{clientMoniker}/query/alipay_aps_online", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml index 24eea92c2..c7c28353b 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml @@ -344,6 +344,9 @@ ifnull(sum(CASE WHEN s.channel = 'AlipayOnline' THEN s.total ELSE 0 END),0) alipayonlineamount, ifnull(sum(CASE WHEN s.channel = 'AlipayOnline' THEN s.orders ELSE 0 END),0) alipayonline_order_count, ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'AlipayOnline',TRUE,NULL)),0) alipayonline_client_count, + ifnull(sum(CASE WHEN s.channel = 'AlipayAps' THEN s.total ELSE 0 END),0) alipayapsamount, + ifnull(sum(CASE WHEN s.channel = 'AlipayAps' THEN s.orders ELSE 0 END),0) alipayaps_order_count, + ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'AlipayAps',TRUE,NULL)),0) alipayaps_client_count, ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.total ELSE 0 END),0) hfamount, ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.orders ELSE 0 END),0) hf_order_count, ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'hf',TRUE,NULL)),0) hf_client_count, diff --git a/src/main/ui/static/analysis/channels_analysis.js b/src/main/ui/static/analysis/channels_analysis.js index 3a14cdab3..e2f138993 100644 --- a/src/main/ui/static/analysis/channels_analysis.js +++ b/src/main/ui/static/analysis/channels_analysis.js @@ -173,7 +173,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' trigger: 'axis' }, legend: { - data: ['Alipay交易金额','AlipayOnline交易金额', 'Bestpay交易金额','Wechat交易金额',"JD Pay交易金额","HF Pay交易金额","Yeepay交易金额","LakalaPay交易金额","Card Payment交易金额","Direct Debit交易金额"], + data: ['Alipay交易金额','AlipayOnline交易金额', 'Bestpay交易金额','Wechat交易金额',"JD Pay交易金额","HF Pay交易金额","Yeepay交易金额","LakalaPay交易金额","Card Payment交易金额","Direct Debit交易金额","Alipay+交易金额"], bottom: 0, height: '15%', width: '80%', @@ -185,7 +185,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' type: 'value' } ], - color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec"] + color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec","#8f4b2e","#87843b","#f8aba6"] }, xAxis: { basic: {type: 'category', boundaryGap: false}, @@ -301,6 +301,17 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' yAxisIndex: 0 }, column: {key: 'rpaypmt_dd.total'} + }, + { + basic: { + name: 'Alipay+交易金额', + type: 'line', + label: {normal: {show: true}}, + showAllSymbols: true, + showSymbol: true, + yAxisIndex: 0 + }, + column: {key: 'AlipayAps.total'} } ] }; @@ -311,7 +322,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' trigger: 'axis' }, legend: { - data: ['Alipay交易订单','AlipayOnline交易订单', 'Bestpay交易订单','Wechat交易订单',"JD Pay交易订单","HF Pay交易订单","Yeepay交易订单","LakalaPay交易订单","Card Payment交易订单","Direct Debit交易订单"], + data: ['Alipay交易订单','AlipayOnline交易订单', 'Bestpay交易订单','Wechat交易订单',"JD Pay交易订单","HF Pay交易订单","Yeepay交易订单","LakalaPay交易订单","Card Payment交易订单","Direct Debit交易订单","Alipay+交易订单"], bottom: 0, height: '15%', width: '80%', @@ -323,7 +334,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' type: 'value' } ], - color: ['#00a0e9','00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec"] + color: ['#00a0e9','00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec","#8f4b2e","#87843b","#f8aba6"] }, xAxis: { basic: {type: 'category', boundaryGap: false}, @@ -439,6 +450,17 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' yAxisIndex: 0 }, column: {key: 'rpaypmt_dd.orders'} + }, + { + basic: { + name: 'Alipay+交易订单', + type: 'line', + label: {normal: {show: true}}, + showAllSymbols: true, + showSymbol: true, + yAxisIndex: 0 + }, + column: {key: 'AlipayAps.orders'} } ] }; @@ -448,7 +470,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' trigger: 'axis' }, legend: { - data: ['Alipay交易客单价','AlipayOnline交易客单价', 'Bestpay交易客单价','Wechat交易客单价',"JD Pay交易客单价","HF Pay交易客单价","Yeepay交易客单价","LakalaPay交易客单价","Card Payment交易客单价","Direct Debit交易客单价"], + data: ['Alipay交易客单价','AlipayOnline交易客单价', 'Bestpay交易客单价','Wechat交易客单价',"JD Pay交易客单价","HF Pay交易客单价","Yeepay交易客单价","LakalaPay交易客单价","Card Payment交易客单价","Direct Debit交易客单价","Alipay+交易客单价"], bottom: 0, }, yAxis: [ @@ -457,7 +479,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' type: 'value' } ], - color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec"] + color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec","#8f4b2e","#87843b","#f8aba6"] }, xAxis: { basic: {type: 'category', boundaryGap: false}, @@ -573,6 +595,17 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' yAxisIndex: 0 }, column: {key: 'rpaypmt_dd.single_amount'} + }, + { + basic: { + name: 'Alipay+交易客单价', + type: 'line', + label: {normal: {show: true}}, + showAllSymbols: true, + showSymbol: true, + yAxisIndex: 0 + }, + column: {key: 'AlipayAps.single_amount'} } ] }; diff --git a/src/main/ui/static/analysis/templates/channels_analysis.html b/src/main/ui/static/analysis/templates/channels_analysis.html index d709513bc..3303d188d 100644 --- a/src/main/ui/static/analysis/templates/channels_analysis.html +++ b/src/main/ui/static/analysis/templates/channels_analysis.html @@ -140,8 +140,10 @@ - + Alipay+ @@ -159,21 +161,21 @@
交易总金额变化趋势
-
订单数变化趋势
-
客单价变化趋势
-
diff --git a/src/main/ui/static/analysis/templates/manage_customers_orders.html b/src/main/ui/static/analysis/templates/manage_customers_orders.html index 3b58fe431..f7477b847 100644 --- a/src/main/ui/static/analysis/templates/manage_customers_orders.html +++ b/src/main/ui/static/analysis/templates/manage_customers_orders.html @@ -85,6 +85,8 @@ Ye