| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageInfo<PageChargingPileListDTO> pageChargingPileList(PageChargingPileList page) { |
| | | Set<Integer> siteIds = null; |
| | | public PageInfo<PageChargingPileListDTO> pageChargingPileList(PageChargingPileList page, SysUser sysUser) { |
| | | // 获取当前登录账号站点 |
| | | Set<Integer> siteIds = new HashSet<>(); |
| | | if(sysUser.getRoleType() != 1){ |
| | | siteIds.add(sysUser.getSiteId()); |
| | | } |
| | | PageInfo<PageChargingPileListDTO> pageInfo = new PageInfo<>(page.getPageCurr(), page.getPageSize()); |
| | | List<PageChargingPileListDTO> list = this.baseMapper.pageChargingPileList(pageInfo, page, siteIds); |
| | | return pageInfo.setRecords(list); |
| | |
| | | } |
| | | if(null == chargingPile.getSiteId()){ |
| | | return AjaxResult.error("归属电站不能为空"); |
| | | } |
| | | if(null == chargingPile.getPartnerId()){ |
| | | return AjaxResult.error("归属合作商不能为空"); |
| | | } |
| | | if(null == chargingPile.getRatedPower()){ |
| | | return AjaxResult.error("额定功率不能为空"); |