通用子商户号使用数量

master
yangkai 6 years ago
parent dda910806a
commit 7a44fa30c4

@ -2,10 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.payment.CommonSubMerchantIdMapper">
<select id="list" resultType="com.alibaba.fastjson.JSONObject">
select * from pmt_sub_merchant_id
where is_valid = #{is_valid}
select p.*, count(c.client_id) client_count from pmt_sub_merchant_id p
left join sys_clients c on p.sub_merchant_id = c.sub_merchant_id
where p.is_valid = #{is_valid}
<if test="sub_merchant_id!=null">
and sub_merchant_id = #{sub_merchant_id}
and p.sub_merchant_id = #{sub_merchant_id}
</if>
GROUP BY p.sub_merchant_id
</select>
</mapper>

@ -195,7 +195,16 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
},function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
}
};
$scope.showClient = function (sub_merchant_id) {
if($scope.sub_merchant_id == sub_merchant_id){
return;
}
$http.get('/sys/merchant_id/'+sub_merchant_id).then(function (resp) {
$scope.client_monikers= resp.data;
$scope.sub_merchant_id = sub_merchant_id;
});
};
}]);
app.controller('newCommonSubMerchantIdCtrl', ['$scope', '$http','commonDialog', function ($scope, $http,commonDialog) {
$scope.params = {};

@ -33,9 +33,34 @@
<tr ng-repeat="client in subMerchantIdList">
<td ng-bind="client.merchant_id"></td>
<td>
{{client.sub_merchant_id}}
<i class="fa fa-clock-o text-danger"
title="Temp Sub Merchant ID"></i>
<a ng-click="showClient(client.sub_merchant_id); toShow = !toShow" class="cursor">
{{client.sub_merchant_id}}
<i class="fa fa-clock-o text-danger"
title="Temp Sub Merchant ID"></i>
<span class="badge position_re">
{{client.client_count}}
<div ng-if="sub_merchant_id==client.sub_merchant_id&&toShow"
class="popover fade in position_ab"
role="tooltip" style="display: block;">
<div class="arrow"></div>
<h3 class="popover-title popover-color">Clients</h3>
<div class="popover-content" style="width: 250px">
<button type="button" class="btn btn-link"
ng-repeat="client_moniker in client_monikers"
ng-show="$index<client_monikers.length-1"
ui-sref="partners.detail({clientMoniker:client_moniker.client_moniker})">
{{client_moniker.client_moniker}}
<span class="text-black">,</span>&nbsp;
</button>
<button type="button" class="btn btn-link"
ng-repeat="client_moniker in client_monikers" ng-if="$last"
ui-sref="partners.detail({clientMoniker:client_moniker.client_moniker})">
{{client_moniker.client_moniker}}
</button>
</div>
</div>
</span>
</a>
</td>
<td ng-bind="client.operator"></td>
<td ng-bind="client.create_time"></td>

Loading…
Cancel
Save