<?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.ruoyi.chargingPile.mapper.TRepairMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TRepair">
|
<id column="id" property="id" />
|
<result column="repairman" property="repairman" />
|
<result column="site_id" property="siteId" />
|
<result column="charging_pile_id" property="chargingPileId" />
|
<result column="content" property="content" />
|
<result column="repair_time" property="repairTime" />
|
<result column="create_time" property="createTime" />
|
<result column="del_flag" property="delFlag" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, repairman, site_id, charging_pile_id, content, repair_time, create_time, del_flag
|
</sql>
|
|
|
|
<select id="getRepairList" resultType="com.ruoyi.chargingPile.api.model.TRepair">
|
select
|
a.*,
|
b.name as chargingPileName,
|
c.name as siteName
|
from t_repair a
|
left join t_charging_pile b on (a.charging_pile_id = b.id)
|
left join t_site c on (a.site_id = c.id)
|
where a.del_flag = 0
|
<if test="null != name and '' != name">
|
and a.repairman like CONCAT('%', #{name}, '%')
|
</if>
|
<if test="null != siteId">
|
and a.site_id = #{siteId}
|
</if>
|
order by a.create_time desc
|
</select>
|
</mapper>
|