Commit 29ff02f9 authored by fangxinjiang's avatar fangxinjiang

目录调整

parent 525141e3
......@@ -18,9 +18,11 @@ package com.yifu.cloud.plus.v1.yifu.admin.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaMap;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysAreaService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -29,8 +31,10 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <p>
......@@ -100,5 +104,24 @@ public class AreaController {
vo.setSysAreaList(aList);
return vo;
}
/**
* @param
* @Description: 获取所有区域list
* @Author: hyc
* @Date: 2022-7-21 19:45:24
**/
@Inner
@PostMapping("/inner/getAreaMap")
public AreaMap getAreaMap() {
List<SysArea> aList = sysAreaService.list(Wrappers.<SysArea>query().lambda()
.eq(SysArea::getStatus, CommonConstants.ZERO_INT).orderByAsc(SysArea::getParentId));
AreaMap map = new AreaMap();
Map<String,String> m = null;
if (Common.isNotNull(aList)){
aList.stream().collect(Collectors.toMap(SysArea::get));
}
map.setAreaMap(m);
return map;
}
}
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