| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.carManage.CarEnforcecar"> |
| | | <id column="id" property="id" /> |
| | | <result column="car_number" property="carNumber" /> |
| | | <result column="owner_name" property="ownerName" /> |
| | | <result column="vehicle_user" property="vehicleUser" /> |
| | | <result column="contact" property="contact" /> |
| | | <result column="trajectory" property="trajectory" /> |
| | | <result column="group" property="group" /> |
| | | <id column="id" property="id"/> |
| | | <result column="car_number" property="carNumber"/> |
| | | <result column="owner_name" property="ownerName"/> |
| | | <result column="vehicle_user" property="vehicleUser"/> |
| | | <result column="contact" property="contact"/> |
| | | <result column="trajectory" property="trajectory"/> |
| | | <result column="depart_id" property="departId"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="VoMap" type="com.ycl.dto.carManage.CarEnforcecarVo"> |
| | | <result column="depart_name" property="departName" jdbcType="VARCHAR"/> |
| | | <result column="p_depart_name" property="pDepartName" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, car_number, owner_name, vehicle_user, contact, trajectory, group |
| | | id |
| | | , car_number, owner_name, vehicle_user, contact, trajectory, group |
| | | </sql> |
| | | <select id="searchEnforceCar" resultType="com.ycl.dto.carManage.CarEnforcecarVo"> |
| | | SELECT ce.*,IF(p.depart_name is null ,'',d.depart_name) depart_name,IFNULL(p.depart_name,d.depart_name) |
| | | p_depart_name |
| | | FROM ums_car_enforcecar ce |
| | | LEFT JOIN ums_depart d on ce.depart_id = d.id |
| | | LEFT JOIN ums_depart p on d.parent_id = p.id |
| | | <where> |
| | | <if test="carNum!=null"> |
| | | ce.car_number like CONCAT('%',#{carNum},'%') |
| | | </if> |
| | | </where> |
| | | order by ce.id desc |
| | | LIMIT #{offset}, #{size} |
| | | </select> |
| | | |
| | | </mapper> |