| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Result; |
| | | import org.apache.ibatis.annotations.Results; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.apache.ibatis.type.JdbcType; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | public interface AreaMapper extends BaseMapper<Area> { |
| | | |
| | | @Select("SELECT a.*,b.username as temp FROM t_area a LEFT JOIN t_user b ON a.user_id=b.id ${ew.customSqlSegment} ") |
| | | @Results({@Result(column="temp", property="userName", jdbcType = JdbcType.VARCHAR)}) |
| | | @Select("SELECT a.*,b.car_no as temp FROM t_area a LEFT JOIN t_car b ON a.car_id=b.id ${ew.customSqlSegment} ") |
| | | @Results({@Result(column="temp", property="carNo", jdbcType = JdbcType.VARCHAR)}) |
| | | IPage<Area> page2(Page initMpPage, @Param(Constants.WRAPPER) QueryWrapper<Area> wrapper); |
| | | |
| | | @Select("SELECT * FROM t_area order by name asc") |
| | | @Results({@Result(column="id", property="children", many = @Many(select = "cn.exrick.xboot.your.mapper.AreaSectionMapper.getListByParentId"))}) |
| | | List<Area> list2(); |
| | | |
| | | @Select("SELECT b.id FROM t_area a,t_car b where a.user_id=b.follow_user_id and a.id=#{arg0}") |
| | | String getCarId(String areaId); |
| | | } |