add mw报备信息展示

master
luoyang 5 years ago
parent 8a4a391853
commit 531485f5b3

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
@ -567,7 +568,7 @@ public interface ClientManager {
void changeExtParams(String clientMoniker,JSONObject manager, JSONObject params);
JSONObject applyMWMerchantId(String clientMoniker, JSONObject manager);
RPayMerchantEntity applyMWMerchantId(String clientMoniker, JSONObject manager);
JSONObject queryMWMerchantIdStatus(String clientMoniker, JSONObject manager);
RPayMerchantEntity queryMWMerchantIdStatus(String clientMoniker, JSONObject manager);
}

@ -6841,7 +6841,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public JSONObject applyMWMerchantId(String clientMoniker, JSONObject manager) {
public RPayMerchantEntity applyMWMerchantId(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -6850,29 +6850,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (result == null) {
throw new ServerErrorException("Failed To Apply For Merchant Warrior Sub Merchant ID");
}
RPayMerchantEntity existsEntity = rPayMerchantMapper.findMerchant(client.getIntValue("client_id"));
return new JSONObject(){{
put("card_sub_merchant_id", existsEntity.getRpMerchantId());
put("available", existsEntity.isAvailable());
put("pending", existsEntity.isPending());
}};
return rPayMerchantMapper.findMerchant(client.getIntValue("client_id"));
}
@Override
public JSONObject queryMWMerchantIdStatus(String clientMoniker, JSONObject manager) {
public RPayMerchantEntity queryMWMerchantIdStatus(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
RPayMerchantEntity result = rPayPaymentCardSvcApi.findMerchant(client);
if (result == null) {
return new JSONObject();
}
return new JSONObject(){{
put("card_sub_merchant_id", result.getRpMerchantId());
put("available", result.isAvailable());
put("pending", result.isPending());
}};
return rPayPaymentCardSvcApi.findMerchant(client);
}
private boolean isAddCardPaymentRate(JSONObject config, int clientId) {

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity;
import au.com.royalpay.payment.manage.dev.core.MerchantLocationService;
import au.com.royalpay.payment.manage.merchants.beans.*;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
@ -887,13 +888,13 @@ public class PartnerManageController {
}
@ManagerMapping(value = "/{clientMoniker}/applyMWMerchantId",method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public JSONObject applyMWMerchantId(@PathVariable("clientMoniker")String clientMoniker,
public RPayMerchantEntity applyMWMerchantId(@PathVariable("clientMoniker")String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
return clientManager.applyMWMerchantId(clientMoniker,manager);
}
@ManagerMapping(value = "/{clientMoniker}/queryMWMerchantIdStatus",method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public JSONObject queryMWMerchantIdStatus(@PathVariable("clientMoniker")String clientMoniker,
public RPayMerchantEntity queryMWMerchantIdStatus(@PathVariable("clientMoniker")String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
return clientManager.queryMWMerchantIdStatus(clientMoniker,manager);
}

@ -4891,6 +4891,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}]);
app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) {
$scope.showMoreMerchantInfo = false;
$scope.hideMerchantInfo = function () {
$scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo;
};
$scope.loadSubMerchantInfos = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_sub_applices', {params: {}}).then(function (resp) {
$scope.subMerchantInfos = resp.data;

@ -97,11 +97,11 @@
<div class="box-header">
<h3 class="box-title pull-left" >
Merchant Warrior Sub Merchant Id :
<span ng-if="partner.cardInfo.card_sub_merchant_id">
<span ng-if="partner.cardInfo.rpMerchantId">
<span ng-if="partner.cardInfo.available" style="color:green;">审核通过</span>
<span ng-if="!partner.cardInfo.available && partner.cardInfo.pending" style="color:#f39c12;">审核中</span>
<span ng-if="!partner.cardInfo.available && !partner.cardInfo.pending" style="color:red;">打回</span>
({{partner.cardInfo.card_sub_merchant_id}})</span>
({{partner.cardInfo.rpMerchantId}})</span>
<span ng-if="!partner.cardInfo">未申请</span>
</h3>
<button role="button" class="btn btn-info pull-right" title="Apply MW Sub Merchant Id"
@ -110,6 +110,87 @@
Apply Merchant Warrior Sub Merchant Id
</button>
</div>
<div class="box">
<div class="box-body col-sm-6">
<ul class="list-group ui_desk">
<li class="list-group-item list-group-item-success">
<b>Sub Merchant Id</b>
<b style="float: right">
{{partner.cardInfo.rpMerchantId}}</b>
</li>
<li class="list-group-item list-group-item-success">
Name
<span style="float: right" ng-bind="partner.cardInfo.name"></span>
</li>
<li class="list-group-item list-group-item-success">
Company Name
<span style="float:right;">{{partner.cardInfo.company_name}}</span>
</li>
<li class="list-group-item list-group-item-success">
Address
<span style="float: right">{{partner.cardInfo.address}}</span>
</li>
<li class="list-group-item list-group-item-success">
Suburb
<span style="float: right;">{{partner.cardInfo.suburb}}</span>
</li>
<li class="list-group-item list-group-item-success">
Postcode
<span style="float: right" ng-bind="partner.cardInfo.postcode"></span>
</li>
<li class="list-group-item list-group-item-success" style="text-align: center" ng-if="!showMoreMerchantInfo" ng-click="hideMerchantInfo()">
<span> More.....</span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
State
<span style="float: right" ng-bind="partner.cardInfo.state"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Abn
<span style="float: right" ng-bind="partner.cardInfo.abn"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Email
<span style="float: right" ng-bind="partner.cardInfo.email"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Contact Name
<span style="float: right" ng-bind="partner.cardInfo.contact_name"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Phone
<span style="float: right" ng-bind="partner.cardInfo.phone"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
BSB
<span style="float: right" ng-bind="partner.cardInfo.bsb"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Account No
<span style="float: right" ng-bind="partner.cardInfo.accountNo"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Account Name
<span style="float: right" ng-bind="partner.cardInfo.accountName"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Website
<span style="float: right" ng-bind="partner.cardInfo.website"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Timezone
<span style="float: right" ng-bind="partner.cardInfo.timezone"></span>
</li>
<li class="list-group-item list-group-item-success" ng-if="showMoreMerchantInfo">
Category
<span style="float: right" ng-bind="partner.cardInfo.category"></span>
</li>
<li class="list-group-item list-group-item-success" style="text-align: center" ng-if="showMoreMerchantInfo" ng-click="hideMerchantInfo()">
<span> Hide.....</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save