banner添加国家选项
(cherry picked from commit 3462a14e0fb6232bb6dccb9d86663ca58ae6b3bb)
This commit is contained in:
@@ -30,6 +30,8 @@ public class RegionInfoService extends ServiceImpl<RegionInfoMapper, RegionInfo>
|
||||
@Autowired
|
||||
private JedisService jedisService;
|
||||
|
||||
public static final Integer ALL_REGION = 0;
|
||||
|
||||
public List<RegionInfo> listByUid(Long uid) {
|
||||
Users u = usersBaseService.getUsersByUid(uid);
|
||||
if (null == u){
|
||||
@@ -78,4 +80,19 @@ public class RegionInfoService extends ServiceImpl<RegionInfoMapper, RegionInfo>
|
||||
public List<RegionInfoVo> getAllList() {
|
||||
return baseMapper.getAllList();
|
||||
}
|
||||
|
||||
public List<RegionInfo> listByPartitionId(Integer partitionId) {
|
||||
return lambdaQuery().select(RegionInfo::getId, RegionInfo::getPartitionId,
|
||||
RegionInfo::getIcon,
|
||||
RegionInfo::getCode,
|
||||
RegionInfo::getName)
|
||||
.eq(RegionInfo::getPartitionId, partitionId)
|
||||
.orderByAsc(RegionInfo::getSeq)
|
||||
.list();
|
||||
}
|
||||
|
||||
public Map<Integer, String> getRegionName(){
|
||||
return getAllList().stream()
|
||||
.collect(Collectors.toMap(RegionInfo::getId, RegionInfo::getName));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user