master
wangning 7 years ago
parent 9bf6dd5a27
commit 946b773031

@ -344,5 +344,5 @@ alter table act_app_list
;
alter table sys_clients add COLUMN `skip_contract` tinyint(1) DEFAULT '0' COMMENT '商户跳过签订新合同 1跳过 0不跳过';
alter table sys_clients add COLUMN `new_contract` tinyint(1) DEFAULT '1' COMMENT '商户跳过签订新合同 1跳过 0不跳过';

@ -245,7 +245,7 @@ public interface ClientManager {
void setSkipClearing(String clientMoniker, Boolean skip_clearing);
void setSkipContract(String clientMoniker, Boolean skip_contract);
void setSkipContract(String clientMoniker, Boolean new_contract);
void enableGatewayUpgrade(String clientMoniker, boolean gatewayUpgrade);

@ -2840,7 +2840,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public void setSkipContract(String clientMoniker, Boolean skip_contract) {
public void setSkipContract(String clientMoniker, Boolean new_contract) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -2848,7 +2848,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject update = new JSONObject();
int clientId = client.getIntValue("client_id");
update.put("client_id", clientId);
update.put("skip_contract", skip_contract);
update.put("new_contract", new_contract);
clientMapper.update(update);
clientInfoCacheSupport.clearClientCache(clientId);
}

@ -534,9 +534,9 @@ public class PartnerManageController {
clientContractService.confirmSourceAgreement(account.getIntValue("client_id"),account.getString("account_id"),"PC");
}
@ManagerMapping(value = "/{clientMoniker}/skip_contract", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.FINANCIAL_STAFF})
public void skipContract(@PathVariable String clientMoniker, @RequestBody JSONObject skip_contract) {
clientManager.setSkipContract(clientMoniker, skip_contract.getBooleanValue("skip_contract"));
@ManagerMapping(value = "/{clientMoniker}/new_contract", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.FINANCIAL_STAFF})
public void skipContract(@PathVariable String clientMoniker, @RequestBody JSONObject new_contract) {
clientManager.setSkipContract(clientMoniker, new_contract.getBooleanValue("new_contract"));
}
}

@ -157,7 +157,7 @@ public class ClientContractServiceImpl implements ClientContractService {
if (sysconfig != null && !sysconfig.getBoolean("sys_new_contract_on")) {
return defaultResult;
}
if(client.getBooleanValue("skip_contract")){
if(client.getBooleanValue("new_contract")){
return defaultResult;
}

@ -2353,7 +2353,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.setSkipContract = function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_contract',{skip_contract: $scope.partner.skip_contract}).then(function(){
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/new_contract',{new_contract: $scope.partner.new_contract}).then(function(){
})
};

@ -9,7 +9,7 @@
<label class="col-sm-7 control-label">Skip New Contract</label>
<div class="col-sm-5">
<input type="checkbox" ng-model="partner.skip_contract" bs-switch
<input type="checkbox" ng-model="partner.new_contract" bs-switch
switch-change="setSkipContract()">
</div>
</div>

Loading…
Cancel
Save