|
|
|
@ -14,6 +14,7 @@ import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
import au.com.royalpay.payment.tools.device.advise.AppClientController;
|
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
|
|
|
|
|
@ -51,6 +52,8 @@ public class RetailAppController {
|
|
|
|
|
private BillService billService;
|
|
|
|
|
@Resource
|
|
|
|
|
private AppFileService appFileService;
|
|
|
|
|
@Resource
|
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/token", method = RequestMethod.PUT)
|
|
|
|
|
public void updateDevToken(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject token) {
|
|
|
|
@ -194,9 +197,14 @@ public class RetailAppController {
|
|
|
|
|
public JSONObject getClientInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getClientInfo(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/check", method = RequestMethod.GET)
|
|
|
|
|
public JSONObject getCheckClientInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getClientRateExpire(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject result = retailAppService.getClientRateExpire(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject file = appFileService.getOrGenerateSourceAgreement(device.getIntValue("client_id"));
|
|
|
|
|
result.put("file_url", file.getString("file_value"));
|
|
|
|
|
result.put("contract_info",sysConfigManager.getSysConfig().getString("contract_info"));
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client", method = RequestMethod.PUT)
|
|
|
|
@ -331,14 +339,6 @@ public class RetailAppController {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/file/agree", method = RequestMethod.PUT)
|
|
|
|
|
public JSONObject generateSourceAgreeFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
JSONObject file = appFileService.getOrGenerateSourceAgreement(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
result.put("file_value",file.getString("file_value"));
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/file/agree/confirm", method = RequestMethod.POST)
|
|
|
|
|
public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
appFileService.confirmSourceAgreement(device.getIntValue("client_id"));
|
|
|
|
|