master
wangning 7 years ago
parent f01153e10d
commit ef8a137f1e

@ -4,17 +4,17 @@ import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppQueryBean;
import au.com.royalpay.payment.manage.notice.beans.NoticeInfo;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
/**
* Created by yishuqian on 28/03/2017.
@ -86,6 +86,8 @@ public interface RetailAppService {
JSONObject getClientInfo(JSONObject device);
JSONObject getClientInfoRealtime(JSONObject device);
JSONObject updateRetailConfig(JSONObject device, boolean paySurcharge);
JSONObject setRequireRemarkConfig(JSONObject device, boolean enabled);

@ -351,6 +351,13 @@ public class RetailAppServiceImp implements RetailAppService {
return res;
}
@Override
public JSONObject getClientInfoRealtime(JSONObject device) {
JSONObject clientWithConfig = clientManager.getClientInfo(device.getIntValue("client_id"));
clientWithConfig.putAll(clientConfigService.find(device.getIntValue("client_id")));
return clientWithConfig;
}
@Override
public JSONObject updateRetailConfig(JSONObject device, boolean clientPaySurcharge) {
JSONObject user = userInfo(device);

@ -476,7 +476,7 @@ public class RetailAppController {
@RequestMapping(value = "/surcharge", method = RequestMethod.GET)
public JSONObject changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
JSONObject client = retailAppService.getClientInfo(device);
JSONObject client = retailAppService.getClientInfoRealtime(device);
JSONObject result = new JSONObject();
result.put("qrcode_surcharge", client.getBooleanValue("qrcode_surcharge"));
result.put("retail_surcharge", client.getBooleanValue("retail_surcharge"));

Loading…
Cancel
Save