master
wangning 7 years ago
commit 6616a10add

@ -20,4 +20,7 @@ public interface MerchantIdManageService {
void save(JSONObject record);
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.system.ClientMapper;
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.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.github.miemiedev.mybatis.paginator.domain.Order;
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.stereotype.Service;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMethod;
import sun.text.normalizer.NormalizerBase;
import javax.annotation.Resource;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@ -47,6 +58,8 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService {
@Resource
private MpPaymentApi mpPaymentApi;
private Logger logger = LoggerFactory.getLogger(getClass());
@Override
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")));
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);
}
@RequestMapping(method = RequestMethod.GET,value = "/trade")
@RequireManager(role = {ManagerRole.OPERATOR})
public JSONObject listNotTradeSubMerchantId(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
@ -72,4 +73,10 @@ public class MerchantIdManageController {
public void disableCommonSubMerchantId(@PathVariable String 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,90 +1,114 @@
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular) {
'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) {
$stateProvider.state('merchant_id_manage', {
url: '/merchant_id/manage',
url: '/merchant_id_manage',
templateUrl: '/static/payment/merchantid/templates/merchant_id_manage.html',
controller: 'merchantIdManageCtrl',
data: {label: '商户号列表'}
controller: 'merchantIdManageCtrl'
}).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) {
$scope.pagination = {};
$scope.params = {};
app.controller('merchantIdManageCtrl', ['$scope', '$state', '$http', function ($scope, $state, $http) {
$scope.isCollapsed = true;
$scope.toShow = false;
$scope.client_loading = true;
$scope.loadClient = function () {
$scope.client_loading = true;
$http.get('/sys/merchant_id').then(function (resp) {
$scope.clientsMap = resp.data;
$scope.client_loading = false;
});
$http.get('/sys/merchant_id').then(function (resp) {
$scope.clientsMap = resp.data;
$scope.client_loading = false;
});
};
$scope.loadClient();
$scope.loadNotTradeClient = function () {
$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.disable_button = true;
$http.get('/sys/merchant_id/trade').then(function (resp) {
$scope.notTradeClientsMap = resp.data.merchant_id_map;
$scope.refresh_time = resp.data.refresh_time;
$scope.disable_button = false;
});
};
$scope.loadNotTradeClient();
$scope.loadTempSubMerchantId = function () {
var params = angular.copy($scope.params);
if(!params.sub_merchant_id){
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.showClient = function (sub_merchant_id) {
$uibModal.open({
templateUrl: '/static/payment/merchantid/templates/client_sub_merchant_id.html',
controller: 'showClientsCtrl',
resolve: {
clients: ['$http', function ($http) {
return $http.get('/sys/merchant_id/'+sub_merchant_id);
}]
},
size: 'sm'
})
};
$scope.loadNotTradeClient();
$scope.refresh = function () {
$scope.disable_button = true;
$http.post('/sys/merchant_id/refresh').then(function (resp) {
$http.post('/sys/merchant_id/refresh').then(function () {
$scope.loadNotTradeClient();
});
};
$scope.save = function () {
$scope.showClient = function (sub_merchant_id) {
$uibModal.open({
templateUrl: '/static/payment/merchantid/templates/new_common_sub_merchant_id.html',
controller: 'newCommonSubMerchantIdCtrl'
}).result.then(function () {
$scope.loadTempSubMerchantId()
templateUrl: '/static/payment/merchantid/templates/client_sub_merchant_id.html',
controller: 'showClientsCtrl',
resolve: {
qrJson: ['$http', function ($http) {
return $http.put('/sys/merchant_id/qrcode/'+sub_merchant_id);
}]
},
size: 'sm'
})
}
$scope.disable = function (sub_merchant_id) {
$http.put('/sys/merchant_id/common_sub_merchant_id/'+sub_merchant_id).then(function (resp) {
commonDialog.alert({title: 'Success', content: 'Success', type: 'success'});
$scope.loadTempSubMerchantId();
},function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
}
};
}]);
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 = {};
app.controller('showClientsCtrl', ['$scope', '$http','clients', function ($scope, $http,clients) {
$scope.clients = clients.data;
$scope.loadTempSubMerchantId = function () {
var params = angular.copy($scope.params);
if(!params.sub_merchant_id){
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 () {
$uibModal.open({
templateUrl: '/static/payment/merchantid/templates/new_common_sub_merchant_id.html',
controller: 'newCommonSubMerchantIdCtrl'
}).result.then(function () {
$scope.loadTempSubMerchantId()
})
};
$scope.disable = function (sub_merchant_id) {
$http.put('/sys/merchant_id/common_sub_merchant_id/'+sub_merchant_id).then(function (resp) {
commonDialog.alert({title: 'Success', content: 'Success', type: 'success'});
$scope.loadTempSubMerchantId();
},function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
}
}]);
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.saveSubMerchantId = function () {
var params = angular.copy($scope.params);

@ -1,26 +1,3 @@
<style>
.padding-size{
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 class="modal-body">
<img ng-src="{{qrJson.qrcode_img}}" class="img-responsive">
</div>

@ -2,28 +2,52 @@
.cursor {
cursor: pointer;
}
.div-display{
.div-display {
display: none;
}
.i-rotate_90{
animation:rotate_90 1s forwards;
-webkit-animation:rotate_90 1s forwards; /* Safari and Chrome */
.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);}
}
@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);}
from {
-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>
<div ui-view>
<section class="content-header">
<h1>Merchant Id Manage</h1>
<ol class="breadcrumb">
@ -35,122 +59,98 @@
</section>
<div class="content">
<div class="box box-warning">
<div class="box-body">
<uib-tabset>
<uib-tab heading="商户号列表">
<loadingbar ng-if="client_loading"></loadingbar>
<div class="col-sm-12 col-xs-12">
<div style="margin-top: 5px">
<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 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 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="Using 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="Using 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>
</uib-tab>
<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">
<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="row">
<div class="col-sm-12">
<div class="nav-tabs-custom">
<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>
<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">
<div style="margin-top: 5px">
<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 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>
<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 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>
ng-click="showClient(client.sub_merchant_id);toShow=!toShow" ng-if="$index<60">
<span>
{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Using temp Sub Merchant ID"
ng-if="client.temp_sub_merchant"></i></span>
<span class="badge pull-right 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>
<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>
ng-click="showClient(client.sub_merchant_id);toShow=!toShow" ng-if="$index>59">
<span>
{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Using temp Sub Merchant ID"
ng-if="client.temp_sub_merchant"></i></span>
<span class="badge pull-right position_re" aria-hidden="true" title="show detail">
{{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>
</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>
</uib-tab>
</uib-tabset>
</div>
</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