add select_nap

master
luoyang 6 years ago
parent 80049f966e
commit 93719ed319

@ -78,6 +78,7 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService {
PageList<JSONObject> logs = orderAnalysisMapper.listCustomersData(params, new PageBounds(page, limit, Order.formString("amount.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs);
result.put("analysis", orderAnalysisMapper.listCustomersDataAnalysis(params));
result.put("openid_type", params.getIntValue("openid_type"));
return result;
}

@ -197,10 +197,16 @@
</select>
<select id="listCustomersData" resultType="com.alibaba.fastjson.JSONObject">
SELECT o.customer_id,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount,
SELECT r.nickname,r.headimg,o.customer_id,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount,
COUNT(DISTINCT o.order_id) orders,max(t.clearing_amount) max_order
FROM pmt_orders o
INNER JOIN pmt_transactions t on t.order_id=o.order_id and t.system_generate=0 and (t.transaction_type='Credit' or t.transaction_type>0)
<if test="openid_type==4">
LEFT JOIN sys_customer_relation r on r.globalpay_openid = o.customer_id
</if>
<if test="openid_type==0 or openid_type==1">
LEFT JOIN sys_customer_relation r on r.wechat_openid = o.customer_id
</if>
<where>
<if test="begin!=null">and o.create_time &gt;= #{begin}</if>
<if test="end!=null">and o.create_time &lt; #{end}</if>
@ -216,6 +222,9 @@
<if test="openid_type==3">
and o.channel='Bestpay'
</if>
<if test="openid_type==4">
AND o.customer_id LIKE 'olH%' and o.channel='Wechat'
</if>
<if test="customer_id!=null">
and o.customer_id=#{customer_id}
</if>
@ -245,6 +254,9 @@
<if test="openid_type==3">
and o.channel='Bestpay'
</if>
<if test="openid_type==4">
AND customer_id LIKE 'olH%'
</if>
<if test="customer_id!=null">
and o.customer_id=#{customer_id}
</if>

@ -77,6 +77,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
$http.get('/analysis/customers/ranking/'+$scope.params.openid_type, {params: params}).then(function (resp) {
$scope.customer_loading = false;
$scope.customers = resp.data.data;
$scope.customers_type = resp.data.openid_type;
$scope.customers_analysis = resp.data.analysis;
$scope.pagination = resp.data.pagination;
if($scope.customers.length>0){

@ -22,6 +22,7 @@
<option value='1'>白RoyalPay</option>
<option value='2'>Alipay</option>
<option value='3'>Bestpay</option>
<option value='4'>Nap</option>
</select>
</div>
<div class="form-group col-xs-4 form-inline">
@ -99,6 +100,7 @@
<table class="table table-striped">
<thead>
<tr>
<th style="width: 200px">Nick Name</th>
<th>Customer openId</th>
<th>Amount(AUD)</th>
<!-- <th>Points</th>-->
@ -110,6 +112,26 @@
<tr ng-repeat="customer in customers"
ng-class="{'selectRow':order_params.customer_id==customer.customer_id}"
ng-click="order_params.customer_id=customer.customer_id;listCustomerOrders()">
<td style="width: 60px" ng-if="customers_type ==0 || customers_type==1">
<span>
<img style="height: 30px;width: 30px" class="img-circle" ng-src="{{customer.headimg||'static/images/royalpay_sign_ln.png'}}" />
{{customer.nickname}}
</span></td>
<td style="width: 60px" ng-if="customers_type ==2">
<span>
<img style="height: 30px;width: 30px" class="img-circle" ng-src="{{customer.headimg||'static/images/alipay_sign.png'}}" />
{{customer.nickname}}
</span></td>
<td style="width: 60px" ng-if="customers_type ==3">
<span>
<img style="height: 30px;width: 30px" class="img-circle" ng-src="{{customer.headimg||'static/images/bestpay_sign.png'}}" />
{{customer.nickname}}
</span></td>
<td style="width: 60px" ng-if="customers_type ==4">
<span>
<img style="height: 30px;width: 30px" class="img-circle" ng-src="{{customer.headimg||'static/images/nap.png'}}" />
{{customer.nickname}}
</span></td>
<td ng-bind="customer.customer_id"></td>
<td ng-bind="customer.amount"></td>
<!-- <td ng-bind="customer.points"></td>-->

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Loading…
Cancel
Save