<?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="org.springblade.modules.place.mapper.PlaceCheckMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="placeCheckResultMap" type="org.springblade.modules.place.vo.PlaceCheckVO">
|
<result column="id" property="id"/>
|
<result column="house_code" property="houseCode"/>
|
<result column="remark" property="remark"/>
|
<result column="image_urls" property="imageUrls"/>
|
<result column="signature_path" property="signaturePath"/>
|
<result column="create_user" property="createUser"/>
|
<result column="create_time" property="createTime"/>
|
<result column="is_deleted" property="isDeleted"/>
|
|
<collection property="patrolRecordVOList" column="id" select="selectTaskRepairStepList"
|
javaType="java.util.List" ofType="org.springblade.modules.patrol.entity.PatrolRecord"
|
autoMapping="true">
|
<id property="placeCheckId" column="id"/>
|
</collection>
|
</resultMap>
|
|
<!--自定义分页查询-->
|
<select id="selectPlaceCheckPage" resultMap="placeCheckResultMap">
|
select * from jczz_place_check where is_deleted = 0
|
<if test="placeCheck.houseCode!=null and placeCheck.houseCode!=''">
|
and house_code = #{placeCheck.houseCode}
|
</if>
|
<if test="placeCheck.startTime!=null and placeCheck.startTime!=''">
|
and date_format(create_time,'%Y-%m-%d') >= #{placeCheck.startTime}
|
</if>
|
<if test="placeCheck.endTime!=null and placeCheck.endTime!=''">
|
and date_format(create_time,'%Y-%m-%d') <= #{placeCheck.endTime}
|
</if>
|
</select>
|
|
|
<!-- <resultMap type="org.springblade.modules.dto.PlaceCheckDTO" id="PlaceCheckDTOResult">-->
|
<!-- <result property="id" column="id" />-->
|
<!-- <result property="houseCode" column="house_code" />-->
|
<!-- <result property="remark" column="remark" />-->
|
<!-- <result property="signaturePath" column="signature_path" />-->
|
<!-- <result property="createUser" column="create_user" />-->
|
<!-- <result property="createTime" column="create_time" />-->
|
<!-- <result property="isDeleted" column="is_deleted" />-->
|
<!-- </resultMap>-->
|
|
<sql id="selectPlaceCheck">
|
select
|
id,
|
house_code,
|
remark,
|
signature_path,
|
create_user,
|
create_time,
|
is_deleted
|
from
|
jczz_place_check
|
</sql>
|
|
<!-- <select id="selectPlaceCheckById" parameterType="long" resultMap="PlaceCheckDTOResult">-->
|
<!-- <include refid="selectPlaceCheck"/>-->
|
<!-- where-->
|
<!-- id = #{id}-->
|
<!-- </select>-->
|
|
<!-- <select id="selectPlaceCheckList" parameterType="org.springblade.modules.dto.PlaceCheckDTO" resultMap="PlaceCheckDTOResult">-->
|
<!-- <include refid="selectPlaceCheck"/>-->
|
<!-- <where>-->
|
<!-- <if test="id != null "> and id = #{id}</if>-->
|
<!-- <if test="houseCode != null and houseCode != ''"> and house_code = #{houseCode}</if>-->
|
<!-- <if test="remark != null and remark != ''"> and remark = #{remark}</if>-->
|
<!-- <if test="signaturePath != null and signaturePath != ''"> and signature_path = #{signaturePath}</if>-->
|
<!-- <if test="createUser != null "> and create_user = #{createUser}</if>-->
|
<!-- <if test="createTime != null "> and create_time = #{createTime}</if>-->
|
<!-- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>-->
|
<!-- </where>-->
|
<!-- </select>-->
|
|
|
|
</mapper>
|