后台-用户信息管理-手机区号
This commit is contained in:
@@ -26,4 +26,6 @@ public interface AreaInfoService extends IService<AreaInfo> {
|
||||
* 根据id查询AreaInfo
|
||||
*/
|
||||
AreaInfo getAreaInfoById(Long id);
|
||||
|
||||
List<String> listPhoneAreaCode();
|
||||
}
|
@@ -8,6 +8,7 @@ import com.accompany.core.mybatismapper.AreaInfoMapper;
|
||||
import com.accompany.core.service.common.JedisService;
|
||||
import com.accompany.core.service.phone.AreaInfoService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -74,4 +75,11 @@ public class AreaInfoServiceImpl extends ServiceImpl<AreaInfoMapper, AreaInfo> i
|
||||
queryWrapper.lambda().eq(AreaInfo::getId, id);
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listPhoneAreaCode() {
|
||||
return list(Wrappers.<AreaInfo>lambdaQuery().select(AreaInfo::getPhoneAreaCode).orderByAsc(AreaInfo::getSeq))
|
||||
.stream().map(AreaInfo::getPhoneAreaCode)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user