fix add app invoice

master
eason.qian 7 years ago
parent 518b0639b4
commit 470f5d191e

@ -4,6 +4,7 @@ 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;
@ -125,4 +126,5 @@ public interface RetailAppService {
void changeSurchargeEnable(JSONObject device, UpdateSurchargeDTO updateSurchargeDTO);
JSONObject getInvoiceData(JSONObject device, AppQueryBean appQueryBean) throws Exception;
}

@ -252,6 +252,22 @@ public class RetailAppServiceImp implements RetailAppService {
merchantInfoProvider.changeSurchargeEnable(device,updateSurchargeDTO);
}
@Override
public JSONObject getInvoiceData(JSONObject device, AppQueryBean appQueryBean) throws Exception {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
int client_id = device.getIntValue("client_id") ;
JSONObject client = clientManager.getClientInfo(client_id);
String timezone = client.getString("timezone");
appQueryBean.setTimezone(timezone);
JSONObject params = appQueryBean.toParams();
setAllClientIds(params, client_id);
clientManager.validateClients(client_id, params);
params.put("client_id", client_id);
JSONObject analysis = transactionMapper.analysisTransFlow(params);
return analysis;
}
@Override
public void updateClient(JSONObject device, AppClientBean appClientBean) {
String clientType = device.getString("client_type");

@ -15,6 +15,7 @@ import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
import au.com.royalpay.payment.manage.system.core.ClientContractService;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.device.advise.AppClientController;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -450,4 +451,9 @@ public class RetailAppController {
public void changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody UpdateSurchargeDTO updateSurchargeDTO) {
retailAppService.changeSurchargeEnable(device, updateSurchargeDTO);
}
@RequestMapping(value = "/invoice",method = RequestMethod.GET)
public JSONObject getInvoiceData(@ModelAttribute(RETAIL_DEVICE) JSONObject device,AppQueryBean appQueryBean) throws Exception {
return retailAppService.getInvoiceData(device,appQueryBean);
}
}

Loading…
Cancel
Save