|
|
@@ -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(), ""); |