master
yuan 7 years ago
parent 86e1b7b03c
commit fc65cfea0e

@ -35,6 +35,4 @@ public interface ClientAnalysisMapper {
List<JSONObject> countClientsTypes(JSONObject params);
List<JSONObject> notTradeSubMerchantId();
List<JSONObject> listNotTradeClients(@Param("sub_merchant_id") String sub_merchant_id);
}

@ -17,8 +17,6 @@ public interface MerchantIdManageService {
List<JSONObject> showClientMoniker(JSONObject manager,String sub_merchant_id);
List<JSONObject> showNotTradeClientMoniker(JSONObject manager,String sub_merchant_id);
void save(JSONObject record);
void disable(String sub_merchant_id);

@ -95,11 +95,6 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService {
return clientMapper.listBySubMerchantId(sub_merchant_id);
}
@Override
public List<JSONObject> showNotTradeClientMoniker(JSONObject manager, String sub_merchant_id) {
return clientAnalysisMapper.listNotTradeClients(sub_merchant_id);
}
@Override
public void save(JSONObject record) {
JSONObject sub_merchant_id = commonSubMerchantIdMapper.find(record.getString("sub_merchant_id"));

@ -50,11 +50,6 @@ public class MerchantIdManageController {
return merchantIdManageService.showClientMoniker(manager,sub_merchant_id);
}
@RequestMapping(method = RequestMethod.GET,value = "/not_trade/{sub_merchant_id}")
@RequireManager(role = {ManagerRole.OPERATOR})
public List<JSONObject> showNotTradeClientMoniker(@PathVariable() String sub_merchant_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return merchantIdManageService.showNotTradeClientMoniker(manager,sub_merchant_id);
}
@RequestMapping(value = "/common_sub_merchant_id", method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.OPERATOR})

@ -142,25 +142,10 @@
FROM sys_clients c
WHERE c.sub_merchant_id not in
(SELECT p.sub_merchant_id FROM sys_clients p INNER JOIN pmt_orders o ON o.client_id = p.client_id AND o.status >4 AND o.confirm_time IS NOT NULL
WHERE datediff(now(), o.create_time) <= 30 AND p.sub_merchant_id is not null GROUP BY p.sub_merchant_id) AND c.sub_merchant_id IS not null AND c.merchant_id IS NOT NULL
WHERE datediff(now(), o.create_time) <= 25 AND p.sub_merchant_id is not null GROUP BY p.sub_merchant_id) AND c.sub_merchant_id IS not null AND c.merchant_id IS NOT NULL
AND (c.approve_result = 1 OR c.approve_result= 2) AND c.is_valid = 1
]]>
GROUP by c.sub_merchant_id
</select>
<select id="listNotTradeClients" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT
c.client_moniker,
c.sub_merchant_id,
c.merchant_id
FROM sys_clients c
WHERE c.sub_merchant_id not in
(SELECT p.sub_merchant_id FROM sys_clients p INNER JOIN pmt_orders o ON o.client_id = p.client_id AND o.status >4 AND o.confirm_time IS NOT NULL
WHERE datediff(now(), o.create_time) <= 30 AND p.sub_merchant_id is not null GROUP BY p.sub_merchant_id) AND c.sub_merchant_id IS not null AND c.merchant_id IS NOT NULL
and (c.approve_result = 1 OR c.approve_result= 2) AND c.is_valid = 1
]]>
<if test="sub_merchant_id!=null">and c.sub_merchant_id=#{sub_merchant_id}</if>
</select>
</mapper>

@ -54,18 +54,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
})
};
$scope.showNotTradeClient = function (sub_merchant_id) {
$uibModal.open({
templateUrl: '/static/payment/merchantid/templates/client_sub_merchant_id.html',
controller: 'showNotTradeClientsCtrl',
resolve: {
clients: ['$http', function ($http) {
return $http.get('/sys/merchant_id/not_trade/'+sub_merchant_id);
}]
},
size: 'sm'
})
};
$scope.refresh = function () {
$scope.disable_button = true;
$http.post('/sys/merchant_id/refresh').then(function (resp) {
@ -96,9 +84,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
app.controller('showClientsCtrl', ['$scope', '$http','clients', function ($scope, $http,clients) {
$scope.clients = clients.data;
}]);
app.controller('showNotTradeClientsCtrl', ['$scope', '$http','clients', function ($scope, $http,clients) {
$scope.clients = clients.data;
}]);
app.controller('newCommonSubMerchantIdCtrl', ['$scope', '$http','commonDialog','$state', function ($scope, $http,commonDialog,$state) {
$scope.params = {};
$scope.saveSubMerchantId = function () {

@ -6,6 +6,22 @@
display: none;
}
.i-rotate_90{
animation:rotate_90 1s forwards;
-webkit-animation:rotate_90 1s forwards; /* Safari and Chrome */
}
@keyframes rotate_90
{
from {transform:rotate(0deg);}
to {transform:rotate(90deg);}
}
@-webkit-keyframes rotate_90 /* Safari and Chrome */
{
from {-webkit-transform:rotate(0deg);}
to {-webkit-transform:rotate(90deg);}
}
</style>
<div ui-view>
<section class="content-header">
@ -29,7 +45,7 @@
<div class="list-group col-sm-12 col-xs-12" ng-repeat="(key,clients) in clientsMap">
<a class="list-group-item active col-sm-12 col-xs-12">
{{key|choose_merchant_id}}
<span href="#" class="small-box-footer cursor pull-right" ng-click="isCollapsed = !isCollapsed">更多 <i class="fa fa-arrow-circle-right"></i></span>
<span class="small-box-footer cursor pull-right" ng-click="isCollapsed = !isCollapsed"><span ng-if="clients.length>59">更多 <i class="fa fa-arrow-circle-right" ng-class="{'i-rotate_90':!isCollapsed}"></i></span></span>
</a>
<a class="list-group-item col-sm-2 col-xs-6 cursor"
ng-repeat="client in clients | orderBy:'client_count':true"
@ -54,7 +70,7 @@
</div>
</div>
</uib-tab>
<uib-tab heading="三十天未交易商户号">
<uib-tab heading="近25天未交易商户号">
<div class="box-body">
<div class="col-sm-12 col-xs-12" style="padding-right: 30px;margin-bottom: 5px">
<div class="pull-right">
@ -74,10 +90,19 @@
ng-repeat="(key,clients) in notTradeClientsMap">
<a class="list-group-item active col-sm-12 col-xs-12">
{{key|choose_merchant_id}}
<span class="small-box-footer cursor pull-right" ng-click="isCollapsed = !isCollapsed">更多 <i class="fa fa-arrow-circle-right" ng-class="{'i-rotate_90':!isCollapsed}"></i></span>
</a>
<a class="list-group-item col-sm-2 col-xs-6 cursor"
ng-repeat="client in clients | orderBy:'client_count':true"
ng--click="showNotTradeClient(client.sub_merchant_id)">
ng--click="showClient(client.sub_merchant_id)" ng-if="$index<60">
<span>{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Temp Sub Merchant ID"
ng-if="client.temp_sub_merchant"></i></span>
<span class="badge" aria-hidden="true" title="show detail">{{client.client_count}}</span>
</a>
<a class="list-group-item col-sm-2 col-xs-6 cursor" ng-class="{'div-display':isCollapsed}"
ng-repeat="client in clients | orderBy:'client_count':true"
ng--click="showClient(client.sub_merchant_id)" ng-if="$index>59">
<span>{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Temp Sub Merchant ID"
ng-if="client.temp_sub_merchant"></i></span>

Loading…
Cancel
Save