|
|
|
@ -3,9 +3,11 @@ package au.com.royalpay.payment.manage.apps.web;
|
|
|
|
|
import au.com.royalpay.payment.manage.apps.AppController;
|
|
|
|
|
import au.com.royalpay.payment.manage.apps.bean.CustomerImpressionQuery;
|
|
|
|
|
import au.com.royalpay.payment.manage.apps.core.CustomerImpression;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
@ -22,20 +24,21 @@ public class CustomerImpressionController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JSONObject list(CustomerImpressionQuery customerImpressionQuery) {
|
|
|
|
|
public JSONObject list(CustomerImpressionQuery customerImpressionQuery,@ModelAttribute(CommonConsts.APP_INFO) JSONObject app) {
|
|
|
|
|
customerImpressionQuery.setClient_id(app.getInteger("client_id"));
|
|
|
|
|
return customerImpression.listPageble(customerImpressionQuery);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/{client_id}/{customer_id}", method = RequestMethod.GET)
|
|
|
|
|
@RequestMapping(value = "/{customer_id}", method = RequestMethod.GET)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JSONObject find(@PathVariable int client_id,@PathVariable String customer_id) {
|
|
|
|
|
return customerImpression.findOne(client_id,customer_id);
|
|
|
|
|
public JSONObject find(@PathVariable String customer_id,@ModelAttribute(CommonConsts.APP_INFO) JSONObject app) {
|
|
|
|
|
return customerImpression.findOne(app.getIntValue("client_id"),customer_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/{client_id}/{customer_id}", method = RequestMethod.PUT)
|
|
|
|
|
@RequestMapping(value = "/{customer_id}", method = RequestMethod.PUT)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void modifyNameRemark(@PathVariable int client_id, @PathVariable String customer_id, @RequestBody JSONObject customerInfo) {
|
|
|
|
|
customerImpression.modifyNameRemark(client_id,customer_id,customerInfo.getString("name_remark"));
|
|
|
|
|
public void modifyNameRemark(@PathVariable String customer_id, @RequestBody JSONObject customerInfo,@ModelAttribute(CommonConsts.APP_INFO) JSONObject app) {
|
|
|
|
|
customerImpression.modifyNameRemark(app.getIntValue("client_id"),customer_id,customerInfo.getString("name_remark"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|