|
@@ -31,12 +31,17 @@ public class CommodityApiController {
|
|
|
|
|
|
@ApiOperation(value="商品列表")
|
|
@ApiOperation(value="商品列表")
|
|
@RequestMapping(value = "commodityList",method = RequestMethod.POST)
|
|
@RequestMapping(value = "commodityList",method = RequestMethod.POST)
|
|
- public MessageResult<List<Map>> commodityList(){
|
|
|
|
|
|
+ public MessageResult<List<Map>> commodityList(String cataloguesId, String parentId){
|
|
MessageResult<List<Map>> msgResult = new MessageResult<>();
|
|
MessageResult<List<Map>> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
try {
|
|
Map<String, Object> searchParams = new HashMap<>();
|
|
Map<String, Object> searchParams = new HashMap<>();
|
|
- searchParams.put("parentId", "6b91395e-d5f5-47c2-bca2-1a79b1f1e646");
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(cataloguesId)) {
|
|
|
|
+ searchParams.put("id", cataloguesId);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(parentId)) {
|
|
|
|
+ searchParams.put("parentId", parentId);
|
|
|
|
+ }
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
List<Sort> sortList = new ArrayList<>();
|
|
sortList.add(new Sort("sort_", "asc"));
|
|
sortList.add(new Sort("sort_", "asc"));
|