|
|
|
@ -22,22 +22,31 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
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.UpdateSurchargeDTO;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
|
|
import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -461,4 +470,16 @@ public class RetailAppController {
|
|
|
|
|
public void getInvoiceFile(@ModelAttribute(RETAIL_DEVICE) JSONObject device,AppQueryBean appQueryBean,HttpServletResponse httpResponse) throws Exception {
|
|
|
|
|
retailAppService.getInvoiceFile(device,appQueryBean,httpResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/surcharge", method = RequestMethod.GET)
|
|
|
|
|
public JSONObject changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
JSONObject client = retailAppService.getClientInfo(device);
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
result.put("qrcode_surcharge", client.getBooleanValue("qrcode_surcharge"));
|
|
|
|
|
result.put("retail_surcharge", client.getBooleanValue("retail_surcharge"));
|
|
|
|
|
result.put("api_surcharge", client.getBooleanValue("api_surcharge"));
|
|
|
|
|
result.put("require_custinfo", client.getBooleanValue("require_custinfo"));
|
|
|
|
|
result.put("require_remark", client.getBooleanValue("require_remark"));
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|