| | |
| | | import com.panzhihua.sangeshenbian.warpper.SystemUserListVo; |
| | | import com.panzhihua.sangeshenbian.warpper.TokenVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | BeanUtils.copyProperties(systemUser, systemUserVo); |
| | | return R.ok(systemUserVo); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getAdministrativeDivision/{id}/{tier}") |
| | | @ApiOperation(value = "获取行政区划层级联动数据", tags = {"三个身边后台-人员管理"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "上级id", required = false, dataType = "string"), |
| | | @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<>(); |
| | | //区县 |
| | | if(2 == tier){ |
| | | list = systemUserService.getRegion("510400"); |
| | | } |
| | | //街道 |
| | | if(3 == tier){ |
| | | list = systemUserService.getStreet(id); |
| | | } |
| | | //社区 |
| | | if(4 == tier){ |
| | | list = systemUserService.getCommunity(id); |
| | | } |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | } |