| | |
| | | import com.ruoyi.chargingPile.mapper.TAccountingStrategyMapper; |
| | | import com.ruoyi.chargingPile.service.TAccountingStrategyService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.feignClient.OtherClient; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class TAccountingStrategyServiceImpl extends ServiceImpl<TAccountingStrategyMapper, TAccountingStrategy> implements TAccountingStrategyService { |
| | | |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @Override |
| | | public PageInfo<TAccountingStrategyVO> pageList(TAccountingStrategyQuery query) { |
| | | PageInfo<TAccountingStrategyVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TAccountingStrategyVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | for (TAccountingStrategyVO tAccountingStrategyVO : list) { |
| | | SysUser data = sysUserClient.getSysUser(tAccountingStrategyVO.getUserId()).getData(); |
| | | tAccountingStrategyVO.setUserName(data.getNickName()); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |