copy switch surcharge interface

master
wangning 7 years ago
parent 95e0d8c2cb
commit e0417057b5

@ -1,15 +1,16 @@
package au.com.royalpay.payment.manage.appclient.core; package au.com.royalpay.payment.manage.appclient.core;
import java.math.BigDecimal;
import java.util.List;
import com.alibaba.fastjson.JSONObject;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean; import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppQueryBean; import au.com.royalpay.payment.manage.appclient.beans.AppQueryBean;
import au.com.royalpay.payment.manage.notice.beans.NoticeInfo; import au.com.royalpay.payment.manage.notice.beans.NoticeInfo;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean; import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSONObject;
import java.math.BigDecimal;
import java.util.List;
/** /**
@ -121,4 +122,7 @@ public interface RetailAppService {
JSONObject getTradeCommonDateNew(JSONObject device, AppQueryBean appQueryBean); JSONObject getTradeCommonDateNew(JSONObject device, AppQueryBean appQueryBean);
JSONObject getQrcode(JSONObject device, QRCodeConfig config,int client_id); JSONObject getQrcode(JSONObject device, QRCodeConfig config,int client_id);
void changeSurchargeEnable(JSONObject device, UpdateSurchargeDTO updateSurchargeDTO);
} }

@ -42,6 +42,7 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.locale.LocaleSupport; import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole; import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.PageListUtils;
@ -246,6 +247,11 @@ public class RetailAppServiceImp implements RetailAppService {
return res; return res;
} }
@Override
public void changeSurchargeEnable(JSONObject device, UpdateSurchargeDTO updateSurchargeDTO) {
merchantInfoProvider.changeSurchargeEnable(device,updateSurchargeDTO);
}
@Override @Override
public void updateClient(JSONObject device, AppClientBean appClientBean) { public void updateClient(JSONObject device, AppClientBean appClientBean) {
String clientType = device.getString("client_type"); String clientType = device.getString("client_type");

@ -21,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.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -443,4 +444,10 @@ public class RetailAppController {
} }
return retailAppService.getQrcode(device,config,client_id); return retailAppService.getQrcode(device,config,client_id);
} }
@RequestMapping(value = "/surcharge", method = RequestMethod.PUT)
@ResponseBody
public void changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody UpdateSurchargeDTO updateSurchargeDTO) {
retailAppService.changeSurchargeEnable(device, updateSurchargeDTO);
}
} }

Loading…
Cancel
Save