Merge branch 'develop'

master
taylor.dang 6 years ago
commit cc61a3fb47

@ -7,6 +7,7 @@ import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean; import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport; import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping; import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequirePartner; import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
import au.com.royalpay.payment.manage.support.wechatclients.KangaLandWechatApiImpl; import au.com.royalpay.payment.manage.support.wechatclients.KangaLandWechatApiImpl;
@ -20,6 +21,7 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole; import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping; import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
@ -164,6 +166,14 @@ public class PartnerViewController {
clientManager.toggleAccountReceiveNotice(account.getString("client_moniker"), account.getString("account_id"), enable.getBooleanValue("enable")); clientManager.toggleAccountReceiveNotice(account.getString("client_moniker"), account.getString("account_id"), enable.getBooleanValue("enable"));
} }
@PartnerMapping(value = "/{clientMoniker}/order_expiry_config", method = RequestMethod.PUT)
@ResponseBody
public void setOrderExpiryConfig(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.setOrderExpiryConfig(account,clientMoniker, config.getString("order_expiry_config"));
}
@PartnerMapping(value = "/{clientMoniker}/surcharge_account", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER}) @PartnerMapping(value = "/{clientMoniker}/surcharge_account", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody @ResponseBody
public JSONObject surchargeAccount(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker) { public JSONObject surchargeAccount(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {

@ -594,6 +594,13 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
}; };
$scope.ctrl = {}; $scope.ctrl = {};
$scope.reloadQRCode(); $scope.reloadQRCode();
$scope.clientSaveOrderExpiryConfig = function (config) {
$http.put('/client/partner_info/' + $scope.partner.client_moniker + '/order_expiry_config', {order_expiry_config: config}).then(function () {
$scope.ctrl.editOrderExpiryConfig = false;
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
};
$scope.changePaymentPage = function () { $scope.changePaymentPage = function () {
if (!$scope.paymentInfo) { if (!$scope.paymentInfo) {
return; return;

@ -84,6 +84,31 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Order Expiry Config</label>
<div class="col-sm-10">
<p ng-if="!ctrl.editOrderExpiryConfig" class="form-control-static">
{{paymentInfo.order_expiry_config||'Not Configure'}}
<a role="button" ng-click="ctrl.editOrderExpiryConfig=true" ng-if="'01'|withRole"><i
class="fa fa-edit"></i></a> <span style="font-size:9px;padding-left: 40px">示例5m(5分钟,最大支持1440m) / 1h(1小时,最大24小时)</span>
</p>
<div class="input-group" ng-if="ctrl.editOrderExpiryConfig">
<input type="text" class="form-control" ng-model="paymentInfo.order_expiry_config"
title="Prevent not enough refund">
<div class="input-group-btn">
<button class="btn btn-success"
ng-click="clientSaveOrderExpiryConfig(paymentInfo.order_expiry_config)">
<i class="fa fa-check"></i>
</button>
</div>
<div class="input-group-btn">
<button class="btn btn-danger" ng-click="ctrl.editOrderExpiryConfig=false">
<i class="fa fa-remove"></i>
</button>
</div>
</div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Gateway Credential</label> <label class="control-label col-sm-2">Gateway Credential</label>
<div class="col-sm-10"> <div class="col-sm-10">

@ -156,7 +156,7 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="('100000000'|withRole)"> <div class="form-group">
<label class="col-sm-3 control-label">Order Expiry Config</label> <label class="col-sm-3 control-label">Order Expiry Config</label>
<div class="col-sm-9"> <div class="col-sm-9">
<p ng-if="!ctrl.editOrderExpiryConfig" class="form-control-static"> <p ng-if="!ctrl.editOrderExpiryConfig" class="form-control-static">

Loading…
Cancel
Save