## 商品分类如果为空返回空对象;
This commit is contained in:
parent
f97aecfce3
commit
57b990c5f5
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzs.sale.product.controller.api;
|
package com.hzs.sale.product.controller.api;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.lang.tree.Tree;
|
import cn.hutool.core.lang.tree.Tree;
|
||||||
import cn.hutool.core.lang.tree.TreeNodeConfig;
|
import cn.hutool.core.lang.tree.TreeNodeConfig;
|
||||||
import cn.hutool.core.lang.tree.TreeUtil;
|
import cn.hutool.core.lang.tree.TreeUtil;
|
||||||
|
|
@ -35,6 +36,9 @@ public class ApiAreaClassifyController extends BaseController {
|
||||||
areaClassifyParam.setEnableState(EYesNo.YES.getIntValue());
|
areaClassifyParam.setEnableState(EYesNo.YES.getIntValue());
|
||||||
areaClassifyParam.setPkCountry(SecurityUtils.getPkCountry());
|
areaClassifyParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||||
List<AreaClassifyVo> list = iBdAreaClassifyService.selectByAreaClassifyList(areaClassifyParam);
|
List<AreaClassifyVo> list = iBdAreaClassifyService.selectByAreaClassifyList(areaClassifyParam);
|
||||||
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
|
list.add(new AreaClassifyVo());
|
||||||
|
}
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,12 @@
|
||||||
package com.hzs.sale.product.vo;
|
package com.hzs.sale.product.vo;
|
||||||
|
|
||||||
import com.hzs.common.core.web.domain.BaseEntity;
|
import com.hzs.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description:
|
|
||||||
* @Author: yuhui
|
|
||||||
* @Time: 2022/11/1 14:29
|
|
||||||
* @Classname: AreaClassifyVo
|
|
||||||
* @PackageName: com.hzs.sale.product.vo
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
public class AreaClassifyVo extends BaseEntity {
|
public class AreaClassifyVo extends BaseEntity {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue