| | |
| | | import api.bean.LampEntity; |
| | | import api.bean.SinglelampDataEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | /**超级管理员查找全部*/ |
| | | List<SinglelampDataEntity> selectAll(); |
| | | /**普通管理员按公司查找*/ |
| | | List<SinglelampDataEntity> selectByCompany(Long userId); |
| | | List<SinglelampDataEntity> selectByCompany(@Param("page") Integer page, @Param("size") Integer size,@Param("userId") Long userId); |
| | | /**用户查找*/ |
| | | //List<SinglelampDataEntity> selectByUserId(Long userId); |
| | | /**单个灯杆数据*/ |
| | | List<SinglelampDataEntity> selectByStreetlightId(String mac); |
| | | |
| | | @Select("select count(*) from pole_streetlight ps where ps.streetlight_id in(select pus.streetlight_id from pole_user_streetlight pus where pus.company_id in(select suc.company_id from sys_user_company suc where suc.user_id=#{userId}))") |
| | | Integer countByCompany(@Param("userId") Long userId); |
| | | } |