master
wangning 7 years ago
commit c3b20d0aff

@ -106,7 +106,7 @@ ALTER TABLE `sys_accounts`
MODIFY COLUMN `creator` varchar(50) NOT NULL COMMENT '开户者';
ALTER TABLE `sys_clients_audit_process`
MODIFY COLUMN `operator_id` varchar(50) NOT NULL ;
MODIFY COLUMN `operator_id` tinyint(1) NOT NULL ;
ALTER TABLE `pmt_refunds`
MODIFY COLUMN `operator_id` varchar(50) DEFAULT NULL COMMENT '退款操作者账号';
@ -117,5 +117,8 @@ ALTER TABLE `sys_clients_apply`
ALTER TABLE `cashback_draw_deposits`
MODIFY COLUMN `operator_id` varchar(50) NOT NULL ;
ALTER TABLE `sys_clients`
ADD COLUMN `local_merchant` tinyint(1) DEFAULT 0;

@ -477,4 +477,9 @@ public class PartnerManageController {
public void wechatCcompliancePermission(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchPermission(manager, clientMoniker, "wechat_compliance", pass.getBooleanValue("allow"));
}
@ManagerMapping(value = "/{clientMoniker}/local_merchant_permission",method = RequestMethod.PUT,role = {ManagerRole.OPERATOR,ManagerRole.ADMIN})
public void localMerchantPermission(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchPermission(manager, clientMoniker, "local_merchant", pass.getBooleanValue("allow"));
}
}

@ -378,7 +378,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}]);
app.controller('partnerDetailCtrl', ['$scope', '$http', '$state', '$uibModal', '$rootScope', 'Upload', 'commonDialog', 'partner', function ($scope, $http, $state, $uibModal, $rootScope, Upload, commonDialog, partner) {
$scope.init = {wechatcompliance: false};
$scope.init = {wechat_compliance: false,local_merchant:false};
$scope.partner = partner.data;
$scope.showDBUsers = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/bd_user').then(function (resp) {
@ -730,6 +730,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
})
};
$scope.changeLocalMerchant = function () {
if (!$scope.partner) {
return;
}
if (!$scope.init.local_merchant) {
$scope.init.local_merchant = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/local_merchant_permission', {allow: $scope.partner.local_merchant}).then(function () {
}, function (resp) {
commonDialog.alert({
title: 'failed to change local_merchant permission status',
content: resp.data.message,
type: 'error'
})
})
};
}]);
app.controller('partnerEditCtrl', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner',
function ($scope, $http, $state, Upload, commonDialog, timezone, partner) {

@ -357,6 +357,13 @@
<p class="form-control-static" ng-bind="partner.company_phone||'-'"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Local Merchant</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="partner.local_merchant" bs-switch
switch-change="changeLocalMerchant()">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Description</label>

Loading…
Cancel
Save