|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
package au.com.royalpay.payment.manage.apps.web;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.apps.bean.CustomerImpressionQuery;
|
|
|
|
|
import au.com.royalpay.payment.manage.apps.core.CustomerImpression;
|
|
|
|
|
import au.com.royalpay.payment.manage.apps.core.CustomerImpressionService;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
import au.com.royalpay.payment.tools.device.advise.AppClientController;
|
|
|
|
|
|
|
|
|
@ -20,25 +20,31 @@ import javax.annotation.Resource;
|
|
|
|
|
@RequestMapping(value = "/customers/impression")
|
|
|
|
|
public class CustomerImpressionController {
|
|
|
|
|
@Resource
|
|
|
|
|
private CustomerImpression customerImpression;
|
|
|
|
|
private CustomerImpressionService customerImpressionService;
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JSONObject list(CustomerImpressionQuery customerImpressionQuery,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
|
|
|
|
|
public JSONObject list(CustomerImpressionQuery customerImpressionQuery, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
|
|
|
|
|
customerImpressionQuery.setClient_id(app.getInteger("client_id"));
|
|
|
|
|
return customerImpression.listPageble(customerImpressionQuery);
|
|
|
|
|
return customerImpressionService.listPageble(customerImpressionQuery);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/{customer_id}", method = RequestMethod.GET)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JSONObject find(@PathVariable String customer_id,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
|
|
|
|
|
return customerImpression.findOne(app.getIntValue("client_id"),customer_id);
|
|
|
|
|
public JSONObject find(@PathVariable String customer_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
|
|
|
|
|
return customerImpressionService.findOne(app.getIntValue("client_id"), customer_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/{customer_id}", method = RequestMethod.PUT)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void modifyNameRemark(@PathVariable String customer_id, @RequestBody JSONObject customerInfo,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
|
|
|
|
|
customerImpression.modifyNameRemark(app.getIntValue("client_id"),customer_id,customerInfo.getString("name_remark"));
|
|
|
|
|
public void modifyNameRemark(@PathVariable String customer_id, @RequestBody JSONObject customerInfo,
|
|
|
|
|
@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
|
|
|
|
|
customerImpressionService.modifyNameRemark(app.getIntValue("client_id"), customer_id, customerInfo.getString("name_remark"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/gengrate", method = RequestMethod.PUT)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void generate(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
|
|
|
|
|
customerImpressionService.generate(app.getIntValue("client_id"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|