浏览代码

添加全民护河展示的时候展示出对应的手机号码

tags/V1.6.0
xiaoying 1年前
父节点
当前提交
09a5c8edb2
共有 2 个文件被更改,包括 16 次插入0 次删除
  1. +6
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/entity/vo/StreamInfoVo.java
  2. +10
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/service/impl/StreamServiceImpl.java

+ 6
- 0
tuoheng-api/src/main/java/com/tuoheng/api/entity/vo/StreamInfoVo.java 查看文件

@@ -170,4 +170,10 @@ public class StreamInfoVo {
* 巡检河流数量
*/
private Integer streamGisNumber;
/**
* 手机号码
*/
private String mobile;


}

+ 10
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/StreamServiceImpl.java 查看文件

@@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.api.entity.domain.Stream;
import com.tuoheng.api.entity.domain.User;
import com.tuoheng.api.entity.request.StreamQuery;
import com.tuoheng.api.entity.vo.CityInfoVo;
import com.tuoheng.api.entity.vo.StreamInfoVo;
import com.tuoheng.api.mapper.StreamMapper;
import com.tuoheng.api.mapper.UserMapper;
import com.tuoheng.api.service.ICityService;
import com.tuoheng.api.service.IStreamService;
import com.tuoheng.common.common.BaseServiceImpl;
@@ -34,6 +36,9 @@ public class StreamServiceImpl extends BaseServiceImpl<StreamMapper, Stream> imp
@Autowired
private ICityService cityService;

@Autowired
private UserMapper userMapper;

@Override
public JsonResult queryPage(StreamQuery query) {
if (null == query.getPage() || null == query.getLimit()) {
@@ -52,6 +57,11 @@ public class StreamServiceImpl extends BaseServiceImpl<StreamMapper, Stream> imp
pageData.convert(x -> {
StreamInfoVo streamInfoVo = Convert.convert(StreamInfoVo.class, x);
CityInfoVo cityInfoVo = null;
User user = userMapper.selectById(x.getStreamAdminId());
if (null!=user) {
streamInfoVo.setMobile(user.getMobile());
}

if (StringUtils.isNotEmpty(x.getVillageCode())) {
// 最后一级到村
cityInfoVo = cityService.getCityInfoByCode(x.getVillageCode(), "");

正在加载...
取消
保存