|
|
@ -116,7 +116,7 @@ public class RetailAppController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/notice/{noticeId}", method = RequestMethod.PUT)
|
|
|
|
@RequestMapping(value = "/notice/{noticeId}", method = RequestMethod.PUT)
|
|
|
|
public void updateNoticePartnerHasRead(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String noticeId, @RequestBody JSONObject account_param) {
|
|
|
|
public void updateNoticePartnerHasRead(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String noticeId, @RequestBody JSONObject account_param) {
|
|
|
|
if (!device.getString("account_id").equals(account_param.getString("account_id"))){
|
|
|
|
if (!device.getString("account_id").equals(account_param.getString("account_id"))) {
|
|
|
|
throw new ForbiddenException("You have no permission");
|
|
|
|
throw new ForbiddenException("You have no permission");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
retailAppService.updateReadStatus(device, noticeId);
|
|
|
|
retailAppService.updateReadStatus(device, noticeId);
|
|
|
@ -200,8 +200,9 @@ public class RetailAppController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/daily_transactions/date/{dateStr}", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/daily_transactions/date/{dateStr}", method = RequestMethod.GET)
|
|
|
|
public JSONObject listDailyTransactions(@PathVariable String dateStr, @RequestParam(defaultValue = "Australia/Melbourne") String timezone,
|
|
|
|
public JSONObject listDailyTransactions(@PathVariable String dateStr, @RequestParam(defaultValue = "Australia/Melbourne") String timezone,
|
|
|
|
|
|
|
|
@RequestParam(defaultValue = "false") boolean thisdevice,
|
|
|
|
@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
return retailAppService.listDailyTransactions(dateStr, timezone, device);
|
|
|
|
return retailAppService.listDailyTransactions(dateStr, timezone, thisdevice, device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/modify/retail_surcharge", method = RequestMethod.PUT)
|
|
|
|
@RequestMapping(value = "/modify/retail_surcharge", method = RequestMethod.PUT)
|
|
|
@ -250,11 +251,11 @@ public class RetailAppController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cash_back/clean_info", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/cash_back/clean_info", method = RequestMethod.GET)
|
|
|
|
public JSONObject getCashbackCleanInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestParam(value = "client_id",required = false) String client_id) {
|
|
|
|
public JSONObject getCashbackCleanInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam(value = "client_id", required = false) String client_id) {
|
|
|
|
if (client_id==null){
|
|
|
|
if (client_id == null) {
|
|
|
|
client_id=device.getString("client_id");
|
|
|
|
client_id = device.getString("client_id");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return retailAppService.getCashbackCleanInfo(device,client_id);
|
|
|
|
return retailAppService.getCashbackCleanInfo(device, client_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/partner_signin_app_qrcode/{codeId}", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/partner_signin_app_qrcode/{codeId}", method = RequestMethod.GET)
|
|
|
@ -289,9 +290,10 @@ public class RetailAppController {
|
|
|
|
public JSONObject getAd(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
public JSONObject getAd(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
return retailAppService.getAd(device);
|
|
|
|
return retailAppService.getAd(device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/ads/{article_id}", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/ads/{article_id}", method = RequestMethod.GET)
|
|
|
|
public JSONObject getAdDetail(@PathVariable String article_id,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
public JSONObject getAdDetail(@PathVariable String article_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
return retailAppService.getAdDetail(device,article_id);
|
|
|
|
return retailAppService.getAdDetail(device, article_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|