|
|
@ -115,9 +115,9 @@ public class RetailAppController {
|
|
|
|
return retailAppService.getClientSettlementLog(device, appQueryBean);
|
|
|
|
return retailAppService.getClientSettlementLog(device, appQueryBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/transaction_log/{clearing_detail_id}")
|
|
|
|
@RequestMapping("/transaction_log/{clearing_detail_id}")
|
|
|
|
public JSONObject getTransactionLogByClearingDetailId(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable int clearing_detail_id, @RequestParam(required = false) String timezone) {
|
|
|
|
public JSONObject getTransactionLogByClearingDetailId(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable int clearing_detail_id,
|
|
|
|
|
|
|
|
@RequestParam(required = false) String timezone) {
|
|
|
|
return retailAppService.getTransactionLogsByClearingDetailId(device, clearing_detail_id, timezone);
|
|
|
|
return retailAppService.getTransactionLogsByClearingDetailId(device, clearing_detail_id, timezone);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -128,7 +128,8 @@ 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");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -141,10 +142,10 @@ public class RetailAppController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* 消息模块end */
|
|
|
|
/* 消息模块end */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 我的页面begin */
|
|
|
|
/* 我的页面begin */
|
|
|
|
@RequestMapping(value = "/partner_password/{account_id}", method = RequestMethod.PUT)
|
|
|
|
@RequestMapping(value = "/partner_password/{account_id}", method = RequestMethod.PUT)
|
|
|
|
public void changePassword(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String account_id, @RequestBody @Valid ChangePwdBean change, Errors errors) {
|
|
|
|
public void changePassword(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String account_id,
|
|
|
|
|
|
|
|
@RequestBody @Valid ChangePwdBean change, Errors errors) {
|
|
|
|
HttpUtils.handleValidErrors(errors);
|
|
|
|
HttpUtils.handleValidErrors(errors);
|
|
|
|
retailAppService.changeAccountPassword(device, change, account_id);
|
|
|
|
retailAppService.changeAccountPassword(device, change, account_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -205,16 +206,19 @@ public class RetailAppController {
|
|
|
|
return retailAppService.getClientInfo(device);
|
|
|
|
return retailAppService.getClientInfo(device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/check", method = RequestMethod.GET)
|
|
|
|
|
|
|
|
public JSONObject getCheckClientInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
|
|
|
return retailAppService.getCheckClientInfo(device);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client", method = RequestMethod.PUT)
|
|
|
|
@RequestMapping(value = "/client", method = RequestMethod.PUT)
|
|
|
|
public void updateClient(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody AppClientBean appClientBean) {
|
|
|
|
public void updateClient(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody AppClientBean appClientBean) {
|
|
|
|
retailAppService.updateClient(device, appClientBean);
|
|
|
|
retailAppService.updateClient(device, appClientBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@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,
|
|
|
|
@RequestParam(defaultValue = "false") boolean thisdevice, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
|
|
|
return retailAppService.listDailyTransactions(dateStr, timezone, thisdevice, device);
|
|
|
|
return retailAppService.listDailyTransactions(dateStr, timezone, thisdevice, device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -264,7 +268,8 @@ 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");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -276,11 +281,11 @@ public class RetailAppController {
|
|
|
|
signInStatusManager.clientQRCodeAppSignIn(device, codeId);
|
|
|
|
signInStatusManager.clientQRCodeAppSignIn(device, codeId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 优惠券Begin */
|
|
|
|
/* 优惠券Begin */
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/coupon/used", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/coupon/used", method = RequestMethod.GET)
|
|
|
|
public JSONObject getCoupons(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam(value = "page", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int limit) {
|
|
|
|
public JSONObject getCoupons(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam(value = "page", defaultValue = "1") int page,
|
|
|
|
|
|
|
|
@RequestParam(value = "limit", defaultValue = "10") int limit) {
|
|
|
|
return retailAppService.getCoupons(device, page, limit);
|
|
|
|
return retailAppService.getCoupons(device, page, limit);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -295,7 +300,6 @@ public class RetailAppController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* 优惠券End */
|
|
|
|
/* 优惠券End */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 广告位
|
|
|
|
* 广告位
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -309,28 +313,31 @@ public class RetailAppController {
|
|
|
|
return retailAppService.getAdDetail(device, article_id);
|
|
|
|
return retailAppService.getAdDetail(device, article_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/{bill_id}", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/bills/{bill_id}", method = RequestMethod.GET)
|
|
|
|
public JSONObject getBill(@PathVariable("bill_id") String bill_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
public JSONObject getBill(@PathVariable("bill_id") String bill_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
return billService.getBillDetail(bill_id, device.getIntValue("client_id"));
|
|
|
|
return billService.getBillDetail(bill_id, device.getIntValue("client_id"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/list", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/bills/list", method = RequestMethod.GET)
|
|
|
|
public JSONObject getBills(QueryBillBean queryBillBean, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
public JSONObject getBills(QueryBillBean queryBillBean, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
return billService.queryBills(device.getIntValue("client_id"), queryBillBean);
|
|
|
|
return billService.queryBills(device.getIntValue("client_id"), queryBillBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills", method = RequestMethod.PUT)
|
|
|
|
@RequestMapping(value = "/bills", method = RequestMethod.PUT)
|
|
|
|
public JSONObject addBill(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody NewBillBean newBillBean) {
|
|
|
|
public JSONObject addBill(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody NewBillBean newBillBean) {
|
|
|
|
JSONObject result = billService.save(device.getIntValue("client_id"), newBillBean);
|
|
|
|
JSONObject result = billService.save(device.getIntValue("client_id"), newBillBean);
|
|
|
|
result.remove("bill");
|
|
|
|
result.remove("bill");
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/{bill_id}/close", method = RequestMethod.POST)
|
|
|
|
@RequestMapping(value = "/bills/{bill_id}/close", method = RequestMethod.POST)
|
|
|
|
public void closeBill(@PathVariable("bill_id") String bill_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
public void closeBill(@PathVariable("bill_id") String bill_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
billService.updateBillStatus(bill_id, "2", device.getIntValue("client_id"));
|
|
|
|
billService.updateBillStatus(bill_id, "2", device.getIntValue("client_id"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/orders/{bill_id}", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "/bills/orders/{bill_id}", method = RequestMethod.GET)
|
|
|
|
public JSONObject getBillOrders(@PathVariable("bill_id")String bill_id, QueryBillOrderBean queryBillOrderBean,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device){
|
|
|
|
public JSONObject getBillOrders(@PathVariable("bill_id") String bill_id, QueryBillOrderBean queryBillOrderBean,
|
|
|
|
|
|
|
|
@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
JSONObject result = billOrderService.query(bill_id, device.getIntValue("client_id"), queryBillOrderBean);
|
|
|
|
JSONObject result = billOrderService.query(bill_id, device.getIntValue("client_id"), queryBillOrderBean);
|
|
|
|
result.put("analysis", billOrderService.analysis(bill_id, device.getIntValue("client_id"), queryBillOrderBean));
|
|
|
|
result.put("analysis", billOrderService.analysis(bill_id, device.getIntValue("client_id"), queryBillOrderBean));
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|