<?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.xf.huludao.project.dao.ProjectSpongeCheckPointMapper"> <!-- 通用映射列 --> <resultMap id="BaseResultMap" type="com.xf.huludao.project.entity.ProjectSpongeCheckPoint"> <result column="id" property="id"/> <result column="check_area_code" property="checkAreaCode"/> <result column="check_area_name" property="checkAreaName"/> <result column="type" property="type"/> <result column="type_name" property="typeName"/> <result column="date_source_type" property="dateSourceType"/> <result column="date_source_name" property="dateSourceName"/> <result column="duty_user" property="dutyUser"/> <result column="duty_user_name" property="dutyUserName"/> <result column="duty_user_phone" property="dutyUserPhone"/> <result column="duty_user_unit" property="dutyUserUnit"/> <result column="lat" property="lat"/> <result column="lon" property="lon"/> <result column="address" property="address"/> <result column="description" property="description"/> <result column="create_user" property="createUser"/> <result column="create_dept" property="createDept"/> <result column="create_time" property="createTime"/> <result column="update_user" property="updateUser"/> <result column="update_time" property="updateTime"/> <result column="status" property="status"/> <result column="is_deleted" property="isDeleted"/> </resultMap> <!-- 通用数据库列 --> <sql id="Base_Column_List"> id, check_area_code, check_area_name, type, type_name, date_source_type, date_source_name, duty_user, duty_user_name, duty_user_phone, duty_user_unit, lat, lon, address, description, create_user, create_dept, create_time, update_user, update_time, status, is_deleted </sql> <sql id="Where_Condition"> <if test="request.id != null and request.id != ''"> and id = #{request.id} </if> <if test="request.checkAreaCode != null and request.checkAreaCode != ''"> and check_area_code = #{request.checkAreaCode} </if> <if test="request.checkAreaName != null and request.checkAreaName != ''"> and check_area_name like concat('%',#{request.checkAreaName},'%') </if> <if test="request.type != null and request.type != ''"> and type = #{request.type} </if> <if test="request.typeName != null and request.typeName != ''"> and type_name = #{request.typeName} </if> <if test="request.dateSourceType != null and request.dateSourceType != ''"> and date_source_type = #{request.dateSourceType} </if> <if test="request.dateSourceName != null and request.dateSourceName != ''"> and date_source_name = #{request.dateSourceName} </if> <if test="request.dutyUser != null and request.dutyUser != ''"> and duty_user = #{request.dutyUser} </if> <if test="request.dutyUserName != null and request.dutyUserName != ''"> and duty_user_name = #{request.dutyUserName} </if> <if test="request.dutyUserPhone != null and request.dutyUserPhone != ''"> and duty_user_phone = #{request.dutyUserPhone} </if> <if test="request.dutyUserUnit != null and request.dutyUserUnit != ''"> and duty_user_unit = #{request.dutyUserUnit} </if> <if test="request.lat != null and request.lat != ''"> and lat = #{request.lat} </if> <if test="request.lon != null and request.lon != ''"> and lon = #{request.lon} </if> <if test="request.address != null and request.address != ''"> and address = #{request.address} </if> <if test="request.description != null and request.description != ''"> and description = #{request.description} </if> <if test="request.createUser != null and request.createUser != ''"> and create_user = #{request.createUser} </if> <if test="request.createDept != null and request.createDept != ''"> and create_dept = #{request.createDept} </if> <if test="request.createTime != null and request.createTime != ''"> and create_time = #{request.createTime} </if> <if test="request.updateUser != null and request.updateUser != ''"> and update_user = #{request.updateUser} </if> <if test="request.updateTime != null and request.updateTime != ''"> and update_time = #{request.updateTime} </if> <if test="request.status != null and request.status != ''"> and status = #{request.status} </if> <if test="request.isDeleted != null and request.isDeleted != ''"> and is_deleted = #{request.isDeleted} </if> </sql> <select id="selectByCondition" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from project_sponge_check_point where is_deleted = 0 <include refid="Where_Condition"/> order by create_time desc </select> <select id="exportProjectSpongeCheckPoint" resultType="com.xf.huludao.project.entity.ProjectSpongeCheckPoint"> SELECT * FROM project_sponge_check_point ${ew.customSqlSegment} </select> </mapper>