master
wangning 7 years ago
commit 6616a10add

@ -20,4 +20,7 @@ public interface MerchantIdManageService {
void save(JSONObject record); void save(JSONObject record);
void disable(String sub_merchant_id); void disable(String sub_merchant_id);
JSONObject getClientQrCodeImg(JSONObject manager,String sub_merchant_id);
} }

@ -7,17 +7,28 @@ import au.com.royalpay.payment.manage.mappers.client.ClientSubMerchantIdMapper;
import au.com.royalpay.payment.manage.mappers.payment.CommonSubMerchantIdMapper; import au.com.royalpay.payment.manage.mappers.payment.CommonSubMerchantIdMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.merchantid.core.MerchantIdManageService; import au.com.royalpay.payment.manage.merchantid.core.MerchantIdManageService;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMethod;
import sun.text.normalizer.NormalizerBase;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -47,6 +58,8 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService {
@Resource @Resource
private MpPaymentApi mpPaymentApi; private MpPaymentApi mpPaymentApi;
private Logger logger = LoggerFactory.getLogger(getClass());
@Override @Override
public Map<String, List<JSONObject>> listSubMerchantId(JSONObject manager) { public Map<String, List<JSONObject>> listSubMerchantId(JSONObject manager) {
@ -130,4 +143,44 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService {
Map<String, List<JSONObject>> clientsMap = clients.stream().filter(t->t.containsKey("merchant_id")).filter(t->t.containsKey("sub_merchant_id")).collect(Collectors.groupingBy(t->t.getString("merchant_id"))); Map<String, List<JSONObject>> clientsMap = clients.stream().filter(t->t.containsKey("merchant_id")).filter(t->t.containsKey("sub_merchant_id")).collect(Collectors.groupingBy(t->t.getString("merchant_id")));
return clientsMap; return clientsMap;
} }
@Override
public JSONObject getClientQrCodeImg(JSONObject manager,String sub_merchant_id) {
List<JSONObject> clientMonikers = showClientMoniker(manager,sub_merchant_id);
if(clientMonikers.isEmpty()){
throw new BadRequestException("当前子商户号下暂无商户");
}
String partner_code = clientMonikers.get(0).getString("client_moniker");
String orderId = "Merchant" + DateFormatUtils.format(new Date(), "yyyyMMddHHmmss") + "_" + RandomStringUtils.random(5, true, true).toUpperCase();
JSONObject param = new JSONObject();
param.put("price", 10);
param.put("description", "order");
param.put("operator", "web");
param.put("currency","CNY");
String createUrl= "https://mpay.royalpay.com.au/api/v1.0/gateway/partners/" + partner_code + "/orders/" + orderId + "?" + queryParams(partner_code);
HttpRequestResult result = null;
try {
result = new HttpRequestGenerator(createUrl, RequestMethod.PUT).setJSONEntity(param).execute();
} catch (URISyntaxException e) {
e.printStackTrace();
}
if (result.isSuccess()) {
try {
return result.getResponseContentJSONObj();
} catch (IOException e) {
throw new ServerErrorException(e.getMessage(), e);
}
}
return null;
}
private String queryParams(String client_moniker) {
JSONObject client = clientMapper.findClientByMoniker(client_moniker);
long time = System.currentTimeMillis();
String nonceStr = RandomStringUtils.random(15, true, true);
String validStr = client_moniker + "&" + time + "&" + nonceStr + "&" + client.getString("credential_code");
String sign = DigestUtils.sha256Hex(validStr).toLowerCase();
return "time=" + time + "&nonce_str=" + nonceStr + "&sign=" + sign;
}
} }

@ -32,6 +32,7 @@ public class MerchantIdManageController {
return merchantIdManageService.listSubMerchantId(manager); return merchantIdManageService.listSubMerchantId(manager);
} }
@RequestMapping(method = RequestMethod.GET,value = "/trade") @RequestMapping(method = RequestMethod.GET,value = "/trade")
@RequireManager(role = {ManagerRole.OPERATOR}) @RequireManager(role = {ManagerRole.OPERATOR})
public JSONObject listNotTradeSubMerchantId(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public JSONObject listNotTradeSubMerchantId(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
@ -72,4 +73,10 @@ public class MerchantIdManageController {
public void disableCommonSubMerchantId(@PathVariable String sub_merchant_id) { public void disableCommonSubMerchantId(@PathVariable String sub_merchant_id) {
merchantIdManageService.disable(sub_merchant_id); merchantIdManageService.disable(sub_merchant_id);
} }
@RequestMapping(value = "/qrcode/{sub_merchant_id}", method = RequestMethod.PUT)
@RequireManager(role = {ManagerRole.OPERATOR})
public JSONObject getClientQrCodeImg(@PathVariable String sub_merchant_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return merchantIdManageService.getClientQrCodeImg(manager,sub_merchant_id);
}
} }

@ -1,28 +1,51 @@
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular) { define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular) {
'use strict'; 'use strict';
var app = angular.module('merchantIdManage', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload', 'ui.select']); var app = angular.module('merchantIdManage', ['ui.bootstrap', 'ui.router', 'ngFileUpload', 'ui.select']);
app.config(['$stateProvider', function ($stateProvider) { app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('merchant_id_manage', { $stateProvider.state('merchant_id_manage', {
url: '/merchant_id/manage', url: '/merchant_id_manage',
templateUrl: '/static/payment/merchantid/templates/merchant_id_manage.html', templateUrl: '/static/payment/merchantid/templates/merchant_id_manage.html',
controller: 'merchantIdManageCtrl', controller: 'merchantIdManageCtrl'
data: {label: '商户号列表'} }).state('merchant_id_manage.no_trace_list', {
url: '/no_trace_list',
templateUrl: '/static/payment/merchantid/templates/no_trade_sub_merchant_id.html',
controller: 'noTradeSubMerchantIdCtrl'
}).state('merchant_id_manage.temp_list', {
url: '/temp_list',
templateUrl: '/static/payment/merchantid/templates/temp_sub_merchant_id.html',
controller: 'tempSubMerchantId'
}) })
}]); }]);
app.controller('merchantIdManageCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', function ($scope, $state, $http,$uibModal,commonDialog) { app.controller('merchantIdManageCtrl', ['$scope', '$state', '$http', function ($scope, $state, $http) {
$scope.pagination = {};
$scope.params = {};
$scope.isCollapsed = true; $scope.isCollapsed = true;
$scope.toShow = false;
$scope.client_loading = true;
$scope.loadClient = function () { $scope.loadClient = function () {
$scope.client_loading = true;
$http.get('/sys/merchant_id').then(function (resp) { $http.get('/sys/merchant_id').then(function (resp) {
$scope.clientsMap = resp.data; $scope.clientsMap = resp.data;
$scope.client_loading = false; $scope.client_loading = false;
}); });
}; };
$scope.loadClient(); $scope.loadClient();
$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('noTradeSubMerchantIdCtrl', ['$scope', '$state', '$http','$uibModal', function ($scope, $state, $http,$uibModal) {
$scope.pagination = {};
$scope.params = {};
$scope.isCollapsed = true;
$scope.loadNotTradeClient = function () { $scope.loadNotTradeClient = function () {
$scope.disable_button = true;
$http.get('/sys/merchant_id/trade').then(function (resp) { $http.get('/sys/merchant_id/trade').then(function (resp) {
$scope.notTradeClientsMap = resp.data.merchant_id_map; $scope.notTradeClientsMap = resp.data.merchant_id_map;
$scope.refresh_time = resp.data.refresh_time; $scope.refresh_time = resp.data.refresh_time;
@ -31,36 +54,43 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}; };
$scope.loadNotTradeClient(); $scope.loadNotTradeClient();
$scope.loadTempSubMerchantId = function () { $scope.refresh = function () {
var params = angular.copy($scope.params); $scope.disable_button = true;
if(!params.sub_merchant_id){ $http.post('/sys/merchant_id/refresh').then(function () {
delete params.sub_merchant_id; $scope.loadNotTradeClient();
}
$http.get('/sys/merchant_id/common_sub_merchant_id',{params: params}).then(function (resp) {
$scope.subMerchantIdList= resp.data;
}); });
}; };
$scope.loadTempSubMerchantId();
$scope.showClient = function (sub_merchant_id) { $scope.showClient = function (sub_merchant_id) {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/merchantid/templates/client_sub_merchant_id.html', templateUrl: '/static/payment/merchantid/templates/client_sub_merchant_id.html',
controller: 'showClientsCtrl', controller: 'showClientsCtrl',
resolve: { resolve: {
clients: ['$http', function ($http) { qrJson: ['$http', function ($http) {
return $http.get('/sys/merchant_id/'+sub_merchant_id); return $http.put('/sys/merchant_id/qrcode/'+sub_merchant_id);
}] }]
}, },
size: 'sm' size: 'sm'
}) })
}; };
}]);
app.controller('showClientsCtrl', ['$scope', '$http','qrJson', function ($scope, $http,qrJson) {
$scope.qrJson = qrJson.data;
}]);
app.controller('tempSubMerchantId', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', function ($scope, $state, $http,$uibModal,commonDialog) {
$scope.pagination = {};
$scope.params = {};
$scope.refresh = function () { $scope.loadTempSubMerchantId = function () {
$scope.disable_button = true; var params = angular.copy($scope.params);
$http.post('/sys/merchant_id/refresh').then(function (resp) { if(!params.sub_merchant_id){
$scope.loadNotTradeClient(); delete params.sub_merchant_id;
}
$http.get('/sys/merchant_id/common_sub_merchant_id',{params: params}).then(function (resp) {
$scope.subMerchantIdList= resp.data;
}); });
}; };
$scope.loadTempSubMerchantId();
$scope.save = function () { $scope.save = function () {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/merchantid/templates/new_common_sub_merchant_id.html', templateUrl: '/static/payment/merchantid/templates/new_common_sub_merchant_id.html',
@ -68,7 +98,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}).result.then(function () { }).result.then(function () {
$scope.loadTempSubMerchantId() $scope.loadTempSubMerchantId()
}) })
} };
$scope.disable = function (sub_merchant_id) { $scope.disable = function (sub_merchant_id) {
$http.put('/sys/merchant_id/common_sub_merchant_id/'+sub_merchant_id).then(function (resp) { $http.put('/sys/merchant_id/common_sub_merchant_id/'+sub_merchant_id).then(function (resp) {
commonDialog.alert({title: 'Success', content: 'Success', type: 'success'}); commonDialog.alert({title: 'Success', content: 'Success', type: 'success'});
@ -77,14 +107,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
}); });
} }
}]);
app.controller('showClientsCtrl', ['$scope', '$http','clients', function ($scope, $http,clients) {
$scope.clients = clients.data;
}]); }]);
app.controller('newCommonSubMerchantIdCtrl', ['$scope', '$http','commonDialog','$state', function ($scope, $http,commonDialog,$state) { app.controller('newCommonSubMerchantIdCtrl', ['$scope', '$http','commonDialog', function ($scope, $http,commonDialog) {
$scope.params = {}; $scope.params = {};
$scope.saveSubMerchantId = function () { $scope.saveSubMerchantId = function () {
var params = angular.copy($scope.params); var params = angular.copy($scope.params);

@ -1,26 +1,3 @@
<style> <div class="modal-body">
.padding-size{ <img ng-src="{{qrJson.qrcode_img}}" class="img-responsive">
padding-top: 5px;
padding-right: 5px;
padding-bottom: 5px;
padding-left: 15px;
}
.padding-top-size{
padding-top: 10px;
}
</style>
<div class="modal-header padding-size">
<h5>Clients</h5>
</div>
<div class="modal-body" padding-top-size>
<div>
<a ng-repeat="client in clients track by $index" ng-show="$index<clients.length-1"
ui-sref="partners.detail({clientMoniker:client.client_moniker})">
{{client.client_moniker}}<span class="text-black">,</span>&nbsp;
</a>
<a ng-repeat="client in clients" ng-if="$last"
ui-sref="partners.detail({clientMoniker:client.client_moniker})">
{{client.client_moniker}}
</a>
</div>
</div> </div>

@ -2,6 +2,7 @@
.cursor { .cursor {
cursor: pointer; cursor: pointer;
} }
.div-display { .div-display {
display: none; display: none;
} }
@ -11,19 +12,42 @@
-webkit-animation: rotate_90 1s forwards; /* Safari and Chrome */ -webkit-animation: rotate_90 1s forwards; /* Safari and Chrome */
} }
@keyframes rotate_90 @keyframes rotate_90 {
{ from {
from {transform:rotate(0deg);} transform: rotate(0deg);
to {transform:rotate(90deg);} }
to {
transform: rotate(90deg);
}
} }
@-webkit-keyframes rotate_90 /* Safari and Chrome */ @-webkit-keyframes rotate_90 /* Safari and Chrome */
{ {
from {-webkit-transform:rotate(0deg);} from {
to {-webkit-transform:rotate(90deg);} -webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(90deg);
}
}
.popover-color{
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
color: black;
}
.popover-content button{
display: inline-block;
}
.position_re{
position: relative;
} }
.position_re .position_ab{
position: absolute;
top: 90%;
left: 90%;
}
</style> </style>
<div ui-view>
<section class="content-header"> <section class="content-header">
<h1>Merchant Id Manage</h1> <h1>Merchant Id Manage</h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
@ -35,121 +59,97 @@
</section> </section>
<div class="content"> <div class="content">
<div class="box box-warning"> <div class="row">
<div class="box-body"> <div class="col-sm-12">
<uib-tabset> <div class="nav-tabs-custom">
<uib-tab heading="商户号列表"> <ul class="nav nav-tabs">
<li ui-sref-active-eq="active">
<a ui-sref="merchant_id_manage">商户号列表</a>
</li>
<li ui-sref-active="active">
<a ui-sref=".no_trace_list">近25天未交易商户号</a>
</li>
<li ui-sref-active="active">
<a ui-sref=".temp_list">通用子商户号</a>
</li>
</ul>
<div class="tab-content" ui-view>
<div class="row">
<loadingbar ng-if="client_loading"></loadingbar> <loadingbar ng-if="client_loading"></loadingbar>
<div class="col-sm-12 col-xs-12"> <div class="col-sm-12 col-xs-12">
<div style="margin-top: 5px"> <div style="margin-top: 5px">
<div class="list-group col-sm-12 col-xs-12" ng-repeat="(key,clients) in clientsMap"> <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"> <a class="list-group-item active col-sm-12 col-xs-12">
{{key|choose_merchant_id}} {{key|choose_merchant_id}}
<span ng-show="clients.length>59" 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> <span ng-show="clients.length>59" 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>
<a class="list-group-item col-sm-2 col-xs-6 cursor" <a class="list-group-item col-sm-2 col-xs-6 cursor"
ng-repeat="client in clients | orderBy:'client_count':true" ng-repeat="client in clients | orderBy:'client_count':true"
ng--click="showClient(client.sub_merchant_id);" ng-if="$index<60"> ng-click="showClient(client.sub_merchant_id);toShow=!toShow" ng-if="$index<60">
<span> <span>
{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger" {{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Using temp Sub Merchant ID" title="Using temp Sub Merchant ID"
ng-if="client.temp_sub_merchant"></i></span> ng-if="client.temp_sub_merchant"></i></span>
<span class="badge" aria-hidden="true" title="show detail">{{client.client_count}}</span> <span class="badge pull-right position_re">
</a> {{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>
<a class="list-group-item col-sm-2 col-xs-6 cursor" ng-hide="isCollapsed" <a class="list-group-item col-sm-2 col-xs-6 cursor" ng-hide="isCollapsed"
ng-repeat="client in clients | orderBy:'client_count':true" ng-repeat="client in clients | orderBy:'client_count':true"
ng--click="showClient(client.sub_merchant_id);" ng-if="$index>59"> ng-click="showClient(client.sub_merchant_id);toShow=!toShow" ng-if="$index>59">
<span> <span>
{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger" {{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Using temp Sub Merchant ID" title="Using temp Sub Merchant ID"
ng-if="client.temp_sub_merchant"></i></span> ng-if="client.temp_sub_merchant"></i></span>
<span class="badge" aria-hidden="true" title="show detail">{{client.client_count}}</span> <span class="badge pull-right position_re" aria-hidden="true" title="show detail">
</a> {{client.client_count}}
</div> <div ng-if="sub_merchant_id==client.sub_merchant_id&&toShow" class="popover fade in position_ab"
</div> role="tooltip" style="display: block;">
</div> <div class="arrow"></div>
</uib-tab> <h3 class="popover-title popover-color">Clients</h3>
<uib-tab heading="近25天未交易商户号"> <div class="popover-content" style="width: 250px">
<div class="box-body"> <button type="button" class="btn btn-link"
<div class="col-sm-12 col-xs-12" style="padding-right: 30px;margin-bottom: 5px"> ng-repeat="client_moniker in client_monikers"
<div class="pull-right"> ng-show="$index<client_monikers.length-1"
<span ng-if="refresh_time"> ui-sref="partners.detail({clientMoniker:client_moniker.client_moniker})">
<span>上次刷新时间:</span><span><em><b>{{refresh_time}}</b></em></span> {{client_moniker.client_moniker}}<span class="text-black">,</span>&nbsp;
</span>&nbsp;&nbsp; </button>
<a role="button" class="btn btn-primary" title="refresh" ng-click="refresh()" ng-class="{disabled:disable_button}"> <button type="button" class="btn btn-link"
<i class="glyphicon glyphicon-refresh" ng-repeat="client_moniker in client_monikers" ng-if="$last"
title="refresh"></i> ui-sref="partners.detail({clientMoniker:client_moniker.client_moniker})">
</a> {{client_moniker.client_moniker}}
</button>
</div> </div>
</div> </div>
<div class="col-sm-12 col-xs-12"> </span>
<loadingbar ng-if="disable_button"></loadingbar>
<div>
<div class="list-group col-sm-12 col-xs-12"
ng-repeat="(key,clients) in notTradeClientsMap">
<a class="list-group-item active col-sm-12 col-xs-12">
{{key|choose_merchant_id}}
<span ng-show="clients.length>59" 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="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-hide="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>
<span class="badge" aria-hidden="true" title="show detail">{{client.client_count}}</span>
</a> </a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</uib-tab>
<uib-tab heading="通用子商户号">
<div class="box-body table-responsive">
<div class="col-sm-12 col-xs-6">
<a role="button" class="btn btn-primary pull-right" title="Add Sub Merchant Id" ng-click="save()">
<i class="fa fa-plus"></i>
Add
</a>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Merchant Id</th>
<th>Sub Merchant Id</th>
<th>Operator</th>
<th>Create Time</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<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>
</td>
<td ng-bind="client.operator"></td>
<td ng-bind="client.create_time"></td>
<td>
<a class="text-bold text-danger" role="button" ng-click="disable(client.sub_merchant_id)">Disable</a>
</td>
</tr>
</tbody>
</table>
</div> </div>
</uib-tab>
</uib-tabset>
</div> </div>
</div> </div>
</div> </div>

@ -0,0 +1,43 @@
<div class="row">
<div class="box-body">
<div class="col-sm-12 col-xs-12" style="padding-right: 30px;margin-bottom: 5px">
<div class="pull-right">
<span ng-if="refresh_time">
<span>上次刷新时间:</span><span><em><b>{{refresh_time}}</b></em></span>
</span>&nbsp;&nbsp;
<a role="button" class="btn btn-primary" title="refresh" ng-click="refresh()" ng-class="{disabled:disable_button}">
<i class="glyphicon glyphicon-refresh"
title="refresh"></i>
</a>
</div>
</div>
<div class="col-sm-12 col-xs-12">
<loadingbar ng-if="disable_button"></loadingbar>
<div>
<div class="list-group col-sm-12 col-xs-12"
ng-repeat="(key,clients) in notTradeClientsMap">
<a class="list-group-item active col-sm-12 col-xs-12">
{{key|choose_merchant_id}}
<span ng-show="clients.length>59" 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="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-hide="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>
<span class="badge" aria-hidden="true" title="show detail">{{client.client_count}}</span>
</a>
</div>
</div>
</div>
</div>
</div>

@ -0,0 +1,38 @@
<div class="row">
<div class="box-body table-responsive">
<div class="col-sm-12 col-xs-6">
<a role="button" class="btn btn-primary pull-right" title="Add Sub Merchant Id"
ng-click="save()">
<i class="fa fa-plus"></i>
Add
</a>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Merchant Id</th>
<th>Sub Merchant Id</th>
<th>Operator</th>
<th>Create Time</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<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>
</td>
<td ng-bind="client.operator"></td>
<td ng-bind="client.create_time"></td>
<td>
<a class="text-bold text-danger" role="button"
ng-click="disable(client.sub_merchant_id)">Disable</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
Loading…
Cancel
Save