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