| | |
| | | import com.panzhihua.sangeshenbian.model.entity.SystemMenu; |
| | | import com.panzhihua.sangeshenbian.model.entity.SystemRoleMenu; |
| | | import com.panzhihua.sangeshenbian.model.entity.SystemUser; |
| | | import com.panzhihua.sangeshenbian.model.vo.RegionVO; |
| | | import com.panzhihua.sangeshenbian.service.ISystemMenuService; |
| | | import com.panzhihua.sangeshenbian.service.ISystemRoleMenuService; |
| | | import com.panzhihua.sangeshenbian.service.ISystemUserService; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | * @Date 2025/2/18 22:30 |
| | | */ |
| | | @Api |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/systemUser") |
| | | public class SystemUserController extends BaseController { |
| | |
| | | @ApiImplicitParam(name = "tier", value = "数据层级(2=区县,3=街道,4=社区)", required = true, dataType = "int"), |
| | | }) |
| | | @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取行政区划层级联动数据") |
| | | public R<List<Map<String, Object>>> getAdministrativeDivision(@PathVariable("id") String id, @PathVariable("tier") Integer tier){ |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | public R<List<RegionVO>> getAdministrativeDivision(@PathVariable("id") String id, @PathVariable("tier") Integer tier){ |
| | | List<RegionVO> list = new ArrayList<>(); |
| | | //区县 |
| | | if(2 == tier){ |
| | | list = systemUserService.getRegion("510400"); |
| | |
| | | if(4 == tier){ |
| | | list = systemUserService.getCommunity(id); |
| | | } |
| | | log.info("获取行政区划层级联动数据:{}", list); |
| | | return R.ok(list); |
| | | } |
| | | @GetMapping("/regionTree") |
| | | @ApiOperation(value = "获取区县-街道-社区树",tags = {"三个身边后台-人员管理"}) |
| | | public R<List<RegionVO>> regionTree(){ |
| | | SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian(); |
| | | List<RegionVO> list = systemUserService.getRegionTree(loginUserInfo); |
| | | return R.ok(list); |
| | | } |
| | | } |