master
wangning 7 years ago
parent ba8ec57049
commit fe26434e11

@ -199,7 +199,7 @@ public interface ClientManager {
void setClientTaxInSurcharge(JSONObject account,String clientMoniker, boolean taxInSurcharge); void setClientTaxInSurcharge(JSONObject account,String clientMoniker, boolean taxInSurcharge);
void setClientCustomerTaxFree(String clientMoniker, boolean customerTaxFree); void setClientCustomerTaxFree(JSONObject account,String clientMoniker, boolean customerTaxFree);
List<JSONObject> listClientsForSettlement(); List<JSONObject> listClientsForSettlement();

@ -2317,17 +2317,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
@Override @Override
public void setClientCustomerTaxFree(String clientMoniker, boolean customerTaxFree) { public void setClientCustomerTaxFree(JSONObject account,String clientMoniker, boolean customerTaxFree) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
JSONObject update = new JSONObject(); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,clientMoniker,"customer_tax_free",customerTaxFree));
int clientId = client.getIntValue("client_id");
update.put("client_id", clientId);
update.put("customer_tax_free", customerTaxFree);
clientMapper.update(update);
clientInfoCacheSupport.clearClientCache(clientId);
} }
@Override @Override

@ -196,8 +196,8 @@ public class PartnerManageController {
} }
@ManagerMapping(value = "/{clientMoniker}/customer_tax_free", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR}) @ManagerMapping(value = "/{clientMoniker}/customer_tax_free", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR})
public void setClientCustomerTaxFree(@PathVariable String clientMoniker, @RequestBody JSONObject config) { public void setClientCustomerTaxFree(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.setClientCustomerTaxFree(clientMoniker, config.getBooleanValue("customer_tax_free")); clientManager.setClientCustomerTaxFree(manager,clientMoniker, config.getBooleanValue("customer_tax_free"));
} }
@ManagerMapping(value = "/{clientMoniker}/credential_code", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER}) @ManagerMapping(value = "/{clientMoniker}/credential_code", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})

Loading…
Cancel
Save