Commit 7a6eb6ee by tyfanchz

修改产品及类型获取逻辑

1 parent 46b706e2
package com.glsx.api.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.glsx.api.constant.Constant;
import com.glsx.api.pojo.request.ProductReq;
import com.glsx.api.remote.ProductFeignClient;
......@@ -39,4 +40,15 @@ public class ProductController {
return R.ok().data(productFeignClient.getListByCondition(req));
}
/**
* 获取结构化的产品数据。
*
* @return 结果
*/
@RequestMapping(value = "/getProductAndCategory", method = {RequestMethod.GET, RequestMethod.POST})
public R getProductAndCategory() {
log.info("$$$$ /product/getProductAndCategory...");
JSONObject result = productFeignClient.getProductAndCategory();
return R.ok().data(result);
}
}
package com.glsx.api.controller;
import com.alibaba.fastjson.JSONObject;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.glsx.api.pojo.request.DeviceOrderReq;
import com.glsx.api.pojo.request.ScenceSupstatusReq;
import com.glsx.api.pojo.response.DeviceOrderResp;
......@@ -15,11 +18,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* <p>Description:
* <p>Project: chejia-smart
......@@ -42,18 +40,6 @@ public class ProductTypeController {
private ProductContentFeignClient contentFeignClient;
/**
* 获取结构化的产品类型。
*
* @return 结果
*/
@RequestMapping(value = "/getTypeAndCategory", method = {RequestMethod.GET, RequestMethod.POST})
public R getTypeAndCategory() {
log.info("$$$$ /productType/getTypeAndCategory...");
JSONObject result = productTypeFeignClient.getTypeAndCategory();
return R.ok().data(result);
}
/**
* 获取类型指令条件列表
*
* @return 结果
......
package com.glsx.api.remote;
import java.util.List;
import com.alibaba.fastjson.JSONObject;
import com.glsx.api.pojo.request.ProductReq;
import com.glsx.api.pojo.response.ProductResp;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -8,8 +10,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>Description:
* <p>Project: chejia-smart
......@@ -24,5 +24,7 @@ public interface ProductFeignClient {
@RequestMapping(value = "/product/getListByCondition", method = {RequestMethod.POST})
List<ProductResp> getListByCondition(@RequestBody ProductReq req);
@RequestMapping(value = "/product/getProductAndCategory", method = {RequestMethod.GET})
@ResponseBody
JSONObject getProductAndCategory();
}
package com.glsx.api.remote;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
import com.glsx.api.pojo.response.ProductTypeResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -8,8 +8,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>Description:
* <p>Project: chejia-smart
......@@ -21,10 +19,6 @@ import java.util.List;
public interface ProductTypeFeignClient {
@ResponseBody
@RequestMapping(value = "/productType/getTypeAndCategory", method = {RequestMethod.GET})
JSONObject getTypeAndCategory();
@ResponseBody
@RequestMapping(value = "/productType/getListAndCondition", method = {RequestMethod.POST})
List<ProductTypeResp> getListAndCondition(@RequestBody List<Long> list);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!