12345678910111213141516171819202122232425262728293031323334 |
- package com.bofeng.dao;
- import com.baomidou.mybatisplus.mapper.BaseMapper;
- import com.baomidou.mybatisplus.mapper.Wrapper;
- import com.bofeng.entity.QzTask;
- import com.bofeng.entity.SysUptownHouse;
- import com.bofeng.entity.sysUptownUnit;
- 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.Date;
- import java.util.List;
- @Mapper
- @Repository
- public interface RbMapper extends BaseMapper<sysUptownUnit> {
- @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 " +
- "inner join sys_uptown_unit b on a.unit_id = b.unit_id " +
- "inner join sys_owner d on d.uptown_id = b.uptown_id " +
- "inner join sys_user_role e on e.property_id = d.owner_id and e.role_id = 2 " +
- "left join ms_report c on c.house_id = a.house_id and DATE_FORMAT(c.time_update,'%Y-%m-%d') = #{dateStr} " +
- "where b.unit_id = #{str}")
- List<SysUptownHouse> selectMp(@Param("str") Long str,@Param("dateStr") String dateStr);
- // and c.time_update = #{date}
- @Select("select c.ridgepole as ridgepole,c.unit as unit,c.unit_id as unitId from sys_user_role a " +
- "inner join sys_owner b on b.owner_id = a.property_id and a.role_id = 2 " +
- "inner join sys_uptown_unit c on c.uptown_id = b.uptown_id " +
- "where a.user_id = #{userId}")
- List<sysUptownUnit> selectDY(@Param("userId") Long userId);
- }
|