Commit 4383af65 by xub

erp品类修改

parent a9f67393
......@@ -3,8 +3,11 @@ package com.gic.plug.web.controller.goods;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.goods.api.dto.CategoryDTO;
import com.gic.goods.api.dto.ErrorCode;
import com.gic.goods.api.util.Constant;
import com.gic.plug.web.vo.goods.CategoryVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -25,8 +28,12 @@ public class GoodsCategoryController {
* @author xub
*/
@GetMapping("list-parent-category")
public RestResponse listParentCord(Long goodsDomainId) {
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listParentAll(goodsDomainId);
public RestResponse listParentCord(String channelCode, Long goodsDomainId) {
if (goodsDomainId == null || StringUtils.isBlank(channelCode)) {
return RestResponse.failure(ErrorCode.UNKNOW_ERROR.getCode(), "参数不全");
}
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listParentAll(channelCode, goodsDomainId);
List<CategoryDTO> result = serviceResponse.getResult();
if (CollectionUtils.isEmpty(result)) {
return RestResponse.success();
......@@ -40,8 +47,12 @@ public class GoodsCategoryController {
* @author xub
*/
@GetMapping("list-child-category")
public RestResponse listChildAll(Long specParentId) {
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listChildAll(specParentId);
public RestResponse listChildAll(String channelCode, Long specParentId) {
if (specParentId == null || StringUtils.isBlank(channelCode)) {
return RestResponse.failure(ErrorCode.UNKNOW_ERROR.getCode(), "参数不全");
}
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listChildAll(channelCode, specParentId);
List<CategoryDTO> result = serviceResponse.getResult();
if (CollectionUtils.isEmpty(result)) {
return RestResponse.success();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment