package com.ruoyi.system.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.basic.PageInfo; import com.ruoyi.system.mapper.TLeaveMapper; import com.ruoyi.system.mapper.TLocationMapper; import com.ruoyi.system.mapper.TLocationTypeMapper; import com.ruoyi.system.model.TLocation; import com.ruoyi.system.model.TLocationType; import com.ruoyi.system.query.LocationTypeListQuery; import com.ruoyi.system.service.TLocationTypeService; import com.ruoyi.system.vo.system.LocationTypeListVO; import com.ruoyi.system.vo.system.ProjectDeptListVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** *

* 点位类型 服务实现类 *

* * @author xiaochen * @since 2025-05-28 */ @Service public class TLocationTypeServiceImpl extends ServiceImpl implements TLocationTypeService { @Autowired private TLocationMapper locationMapper; @Override public PageInfo pageList(LocationTypeListQuery query) { PageInfo pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); List list = this.baseMapper.pageList(query,pageInfo); for (LocationTypeListVO locationTypeListVO : list) { locationTypeListVO.setLocationCount(locationMapper.selectCount(new LambdaQueryWrapper() .eq(TLocation::getLocationType,locationTypeListVO.getId()))+""); } pageInfo.setRecords(list); return pageInfo; } }