|
@@ -1,11 +1,18 @@
|
|
|
package com.platform.yijia.controller;
|
|
|
|
|
|
+import com.google.gson.Gson;
|
|
|
import com.platform.yijia.service.CustomerGradeServices;
|
|
|
+import com.platform.yijia.utils.CodeMsg;
|
|
|
+import com.platform.yijia.utils.ResultData;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -20,10 +27,19 @@ public class CustomerGradeController {
|
|
|
private CustomerGradeServices customerGradeServices;
|
|
|
|
|
|
//查询直降客户等级条件和优惠
|
|
|
- @RequestMapping("/getCustomerGradeList")
|
|
|
+ @RequestMapping(value = "/getCustomerGradeList", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public List<Map> getCustomerGradeList(){
|
|
|
- return customerGradeServices.getCustomerGradeList();
|
|
|
+ public String getCustomerGradeList(@RequestParam("stationId") String stationId){
|
|
|
+ Gson gson =new Gson();
|
|
|
+ ResultData resultData =null;
|
|
|
+ if(StringUtils.isNotBlank(stationId)){
|
|
|
+ Map params = new HashMap();
|
|
|
+ params.put("stationId", stationId);
|
|
|
+ resultData = ResultData.success(customerGradeServices.getCustomerGradeList(params));
|
|
|
+ }else {
|
|
|
+ resultData=ResultData.error(CodeMsg.SEARCH_FAIL);
|
|
|
+ }
|
|
|
+ return gson.toJson(resultData);
|
|
|
}
|
|
|
|
|
|
// 营销:立减方案
|