Upd:运营端消费者排名排序

master
dulingling 5 years ago
parent 96b5139d97
commit 365516cb03

@ -37,8 +37,9 @@ public class AnalysisBean {
private String amount_to;
private String bd_name;
private String timezone;
private boolean orderAmountFlag;
private boolean orderOrdersFlag;
private String orderValue;
public JSONObject toParams(String timezone) {
JSONObject params = new JSONObject();
if (timezone != null) {
@ -91,8 +92,7 @@ public class AnalysisBean {
if (amount_from != null && amount_from.length() > 0){
params.put("amount_from", new BigDecimal(amount_from));
}
params.put("orderAmountFlag", orderAmountFlag);
params.put("orderOrdersFlag", orderOrdersFlag);
params.put("orderValue", orderValue);
return params;
}
@ -240,20 +240,11 @@ public class AnalysisBean {
this.timezone = timezone;
}
public boolean isOrderAmountFlag() {
return orderAmountFlag;
}
public void setOrderAmountFlag(boolean orderAmountFlag) {
this.orderAmountFlag = orderAmountFlag;
}
public boolean isOrderOrdersFlag() {
return orderOrdersFlag;
public String getOrderValue() {
return orderValue;
}
public void setOrderOrdersFlag(boolean orderOrdersFlag) {
this.orderOrdersFlag = orderOrdersFlag;
public void setOrderValue(String orderValue) {
this.orderValue = orderValue;
}
}

@ -109,11 +109,8 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService {
@Override
public JSONObject getCustomersRanking(JSONObject params, int page, int limit) {
PageList<JSONObject> logs = orderAnalysisMapper.listCustomersData(params, new PageBounds(page, limit,
Order.formString(
(params.getBoolean("orderAmountFlag")?"orders.desc":"amount.desc")
)
));
PageList<JSONObject> logs = orderAnalysisMapper.listCustomersData(params, new PageBounds(page, limit, Order.formString( params.getString("orderValue") )));
if (logs.size() > 0) {
for (JSONObject log : logs) {
generatorUserProfile(log, params);

@ -14,8 +14,9 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
}]);
app.controller('customersListCtrl', ['$scope', '$http','$filter', '$uibModal', 'commonDialog', 'orderService', 'refunder', function ($scope, $http,$filter, $uibModal, commonDialog, orderService, refunder) {
$scope.one_customer = {};
$scope.orderAmountFlag = true;
$scope.orderAmountFlag = false;
$scope.orderOrdersFlag = true;
var echartsConfig = function (graph) {
var categories = [];
var c = 0;
@ -68,6 +69,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
};
$scope.pagination = {};
$scope.params = {};
$scope.params.orderValue = "amount.desc";
$scope.params.openid_type = '0';
$scope.today = new Date();
@ -232,13 +234,15 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
refunder.refunded(order.order_id)
};
$scope.clickOrderAmount = function () {
$scope.params.orderAmountFlag = !$scope.orderAmountFlag;
$scope.params.orderOrdersFlag = true;
$scope.orderAmountFlag = !$scope.orderAmountFlag;
$scope.params.orderValue = "amount"+($scope.orderAmountFlag?".asc":".desc")
$scope.orderOrdersFlag = true;
$scope.listCustomers(1);
};
$scope.clickOrderOrders = function () {
$scope.params.orderOrdersFlag = !$scope.orderOrdersFlag;
$scope.params.orderAmountFlag = true;
$scope.orderOrdersFlag = !$scope.orderOrdersFlag;
$scope.params.orderValue = "orders"+($scope.orderOrdersFlag?".asc":".desc")
$scope.orderAmountFlag = true;
$scope.listCustomers(1);
}
}]);

@ -122,11 +122,11 @@
<th style="width: 200px">Nick Name</th>
<th>Customer openId</th>
<th ng-click="orderAmount()">Amount(AUD)
<i ng-click="clickOrderAmount()" ng-class="params.orderAmountFlag?'glyphicon glyphicon-chevron-up':'glyphicon glyphicon-chevron-down'"></i>
<i ng-click="clickOrderAmount()" ng-class="orderAmountFlag?'glyphicon glyphicon-chevron-up':'glyphicon glyphicon-chevron-down'"></i>
</th>
<!-- <th>Points</th>-->
<th >Orders
<i ng-click="clickOrderOrders()" ng-class="params.orderOrdersFlag?'glyphicon glyphicon-chevron-up':'glyphicon glyphicon-chevron-down'"></i>
<i ng-click="clickOrderOrders()" ng-class="orderOrdersFlag?'glyphicon glyphicon-chevron-up':'glyphicon glyphicon-chevron-down'"></i>
</th>
<th>Max Order(AUD)</th>
</tr>

Loading…
Cancel
Save