| 1234567891011121314151617181920212223242526272829 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.management.platform.mapper.BustripProjectMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.management.platform.entity.BustripProject">
- <id column="id" property="id" />
- <result column="bustrip_id" property="bustripId" />
- <result column="project_id" property="projectId" />
- <result column="start_date" property="startDate" />
- <result column="end_date" property="endDate" />
- <result column="degree_id" property="degreeId" />
- <result column="degree_name" property="degreeName" />
- </resultMap>
- <!-- 通用查询结果列 -->
- <sql id="Base_Column_List">
- id, bustrip_id, project_id, start_date, end_date, degree_id, degree_name
- </sql>
- <select id="getByDate" resultType="com.management.platform.entity.BustripProject">
- select bp.*
- from bustrip_project bp
- left join business_trip bt on bp.bustrip_id = bt.id
- where bt.owner_id = #{userId}
- and bp.start_date < str_to_date(#{date},'%Y-%m-%d')
- and bp.end_date > str_to_date(#{date},'%Y-%m-%d')
- </select>
- </mapper>
|