zhongrj
2024-01-27 e8455bcc0efa8909652adc0cf6a7dd7387f42617
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?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.entity.PlaceCheckEntity">
        <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"/>
    </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') &gt;= #{placeCheck.startTime}
        </if>
        <if test="placeCheck.endTime!=null and placeCheck.endTime!=''">
            and date_format(create_time,'%Y-%m-%d') &lt;= #{placeCheck.endTime}
        </if>
    </select>
 
 
</mapper>