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 fc527e582..1c38e76fd 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 @@ -41,7 +41,8 @@ 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,"ApsInStore")); + listChannel.add(putParam(params,"ApsCashier")); listChannel.add(putParam(params,"Rpay")); listChannel.add(putParam(params,"rpaypmt_card")); listChannel.add(putParam(params,"rpaypmt_dd")); @@ -55,7 +56,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService { } List list = new ArrayList<>(); Map analysisMap = new TreeMap<>(); - String[] channels = {"Wechat","Alipay","AlipayOnline","Rpay","rpaypmt_card","rpaypmt_dd","AlipayAps"}; + String[] channels = {"Wechat","Alipay","AlipayOnline","Rpay","rpaypmt_card","rpaypmt_dd","ApsCashier","ApsInStore"}; for (String channel:channels){ analysisChannelCustomers(params, analysisMap, channel); } @@ -142,7 +143,10 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService { enablePartners = customerAndOrdersStatisticsMapper.countEnableChannel(params); params.remove("gateway_alipay_online"); } - else if("AlipayAps".equals(name)){ + else if("ApsInStore".equals(name)){ + enablePartners=mchChannelContractMapper.sumEnablePartners(name); + } + else if("ApsCashier".equals(name)){ enablePartners=mchChannelContractMapper.sumEnablePartners(name); } else { diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index 2c034cf31..3b2640be1 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -992,9 +992,6 @@ public class RetailAppServiceImp implements RetailAppService { tradeDate = DateFormatUtils.format(calendar, "yyyy-MM-dd", calendar.getTimeZone()); tradeTime = DateFormatUtils.format(calendar, "HH:mm:ss", calendar.getTimeZone()); } - if("AlipayAps".equalsIgnoreCase(order.getString("channel"))){ - order.put("channel","Alipay+"); - } order.put("trade_date", tradeDate); order.put("trade_time", tradeTime); // todo diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 3abe3e0d0..82aa7edc2 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -7,11 +7,11 @@ spring: schema-name: royalpay username: rpaydev slave: - host: 192.168.0.84:3306 + host: 192.168.0.92:3306 jdbc-url: jdbc:mysql://${spring.datasource.slave.host}/${spring.datasource.slave.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false - password: rpayplus123 + password: SuTUUxyvzS0cLETi6Rzm schema-name: royalpay - username: root + username: rpaydev type: com.zaxxer.hikari.HikariDataSource #spring: # datasource: @@ -22,12 +22,11 @@ spring: # schema-name: royalpay # password: SuTUUxyvzS0cLETi6Rzm # slave: -# host: 192.168.0.84:3306 -# jdbc-url: jdbc:mysql://${spring.datasource.slave.host}/${spring.datasource.slave.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false -# password: rpayplus123 +# host: office.geekforbest.com:33306 +# jdbc-url: jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai +# username: rpaydev_out # schema-name: royalpay -# username: root -# type: com.zaxxer.hikari.HikariDataSource +# password: SuTUUxyvzS0cLETi6Rzm #spring: @@ -60,24 +59,24 @@ spring: # schema-name: royalpay_production # username: readonly # type: com.zaxxer.hikari.HikariDataSource - redis: - database: 1 - host: 127.0.0.1 - port: 6379 # redis: # database: 1 -# host: 192.168.0.84 +# host: 127.0.0.1 # port: 6379 + redis: + database: 1 + host: 192.168.0.84 + port: 6379 mail: host: smtp.exmail.qq.com port: 465 app: run-tasks: false host: - main: http://192.168.0.14:8888/ + main: http://dalong-au.dev.rpaygroup.com/ regions: - au: http://192.168.0.14:8888/ - cn: http://192.168.0.14:8888/ + au: http://dalong-au.dev.rpaygroup.com/ + cn: http://dalong-au.dev.rpaygroup.com/ mail: appid: 1 host: https://dev.mailsupport.hcqtech.com 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 c7c28353b..dea1108de 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,9 +344,12 @@ 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 = 'ApsInStore' THEN s.total ELSE 0 END),0) apsinstoreamount, + ifnull(sum(CASE WHEN s.channel = 'ApsInStore' THEN s.orders ELSE 0 END),0) apsinstore_order_count, + ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'ApsInStore',TRUE,NULL)),0) apsinstore_client_count, + ifnull(sum(CASE WHEN s.channel = 'ApsCashier' THEN s.total ELSE 0 END),0) apscashieramount, + ifnull(sum(CASE WHEN s.channel = 'ApsCashier' THEN s.orders ELSE 0 END),0) apscashier_order_count, + ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'ApsCashier',TRUE,NULL)),0) apscashier_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 e2f138993..8f00f77fb 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交易金额","Alipay+交易金额"], + data: ['Alipay交易金额','AlipayOnline交易金额', 'Bestpay交易金额','Wechat交易金额',"JD Pay交易金额","HF Pay交易金额","Yeepay交易金额","LakalaPay交易金额","Card Payment交易金额","Direct Debit交易金额","Alipay+交易金额","Alipay+(Online)交易金额"], bottom: 0, height: '15%', width: '80%', @@ -311,7 +311,18 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' showSymbol: true, yAxisIndex: 0 }, - column: {key: 'AlipayAps.total'} + column: {key: 'ApsInStore.total'} + }, + { + basic: { + name: 'Alipay+(Online)交易金额', + type: 'line', + label: {normal: {show: true}}, + showAllSymbols: true, + showSymbol: true, + yAxisIndex: 0 + }, + column: {key: 'ApsCashier.total'} } ] }; @@ -322,7 +333,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交易订单","Alipay+交易订单"], + data: ['Alipay交易订单','AlipayOnline交易订单', 'Bestpay交易订单','Wechat交易订单',"JD Pay交易订单","HF Pay交易订单","Yeepay交易订单","LakalaPay交易订单","Card Payment交易订单","Direct Debit交易订单","Alipay+交易订单","Alipay+(Online)交易订单"], bottom: 0, height: '15%', width: '80%', @@ -460,7 +471,18 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' showSymbol: true, yAxisIndex: 0 }, - column: {key: 'AlipayAps.orders'} + column: {key: 'ApsInStore.orders'} + }, + { + basic: { + name: 'Alipay+(Online)交易订单', + type: 'line', + label: {normal: {show: true}}, + showAllSymbols: true, + showSymbol: true, + yAxisIndex: 0 + }, + column: {key: 'ApsCashier.orders'} } ] }; @@ -470,7 +492,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交易客单价","Alipay+交易客单价"], + data: ['Alipay交易客单价','AlipayOnline交易客单价', 'Bestpay交易客单价','Wechat交易客单价',"JD Pay交易客单价","HF Pay交易客单价","Yeepay交易客单价","LakalaPay交易客单价","Card Payment交易客单价","Direct Debit交易客单价","Alipay+交易客单价","Alipay+(Online)交易客单价"], bottom: 0, }, yAxis: [ @@ -605,7 +627,18 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', ' showSymbol: true, yAxisIndex: 0 }, - column: {key: 'AlipayAps.single_amount'} + column: {key: 'ApsInStore.single_amount'} + }, + { + basic: { + name: 'Alipay+(Online)交易客单价', + type: 'line', + label: {normal: {show: true}}, + showAllSymbols: true, + showSymbol: true, + yAxisIndex: 0 + }, + column: {key: 'ApsCashier.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 3303d188d..021044d45 100644 --- a/src/main/ui/static/analysis/templates/channels_analysis.html +++ b/src/main/ui/static/analysis/templates/channels_analysis.html @@ -140,10 +140,12 @@ - - Alipay+ + Alipay+(Online) 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 f7477b847..db3d77c35 100644 --- a/src/main/ui/static/analysis/templates/manage_customers_orders.html +++ b/src/main/ui/static/analysis/templates/manage_customers_orders.html @@ -85,24 +85,18 @@ Ye