RbMapper.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. package com.bofeng.dao;
  2. import com.baomidou.mybatisplus.mapper.BaseMapper;
  3. import com.baomidou.mybatisplus.mapper.Wrapper;
  4. import com.bofeng.entity.QzTask;
  5. import com.bofeng.entity.SysUptownHouse;
  6. import com.bofeng.entity.sysUptownUnit;
  7. import org.apache.ibatis.annotations.Mapper;
  8. import org.apache.ibatis.annotations.Param;
  9. import org.apache.ibatis.annotations.Select;
  10. import org.springframework.stereotype.Repository;
  11. import java.util.Date;
  12. import java.util.List;
  13. @Mapper
  14. @Repository
  15. public interface RbMapper extends BaseMapper<sysUptownUnit> {
  16. @Select("select a.doorplate as doorplate,c.report_id as reportId,c.ms_status as msStatus,b.unit_id as unitId from sys_uptown_house a " +
  17. "inner join sys_uptown_unit b on a.unit_id = b.unit_id " +
  18. "inner join sys_owner d on d.uptown_id = b.uptown_id " +
  19. "inner join sys_user_role e on e.property_id = d.owner_id and e.role_id = 2 " +
  20. "left join ms_report c on c.house_id = a.house_id and DATE_FORMAT(c.time_update,'%Y-%m-%d') = #{dateStr} " +
  21. "where b.unit_id = #{str}")
  22. List<SysUptownHouse> selectMp(@Param("str") Long str,@Param("dateStr") String dateStr);
  23. // and c.time_update = #{date}
  24. @Select("select c.ridgepole as ridgepole,c.unit as unit,c.unit_id as unitId from sys_user_role a " +
  25. "inner join sys_owner b on b.owner_id = a.property_id and a.role_id = 2 " +
  26. "inner join sys_uptown_unit c on c.uptown_id = b.uptown_id " +
  27. "where a.user_id = #{userId}")
  28. List<sysUptownUnit> selectDY(@Param("userId") Long userId);
  29. }