Newer
Older
huludao / src / main / resources / mapper / project / GisLayerLjxqgzptjcssxm20201Mapper.xml
<?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.GisLayerLjxqgzptjcssxm20201Mapper">

     <!-- 通用映射列 -->
    <resultMap id="BaseResultMap" type="com.xf.huludao.project.entity.GisLayerLjxqgzptjcssxm20201">
                    <result column="ID" property="id"/>
                    <result column="UserID" property="UserID"/>
                    <result column="地块名" property="地块名"/>
                    <result column="first_分" property="first分"/>
                    <result column="sum_shape_" property="sumShape"/>
                    <result column="first_类" property="first类"/>
                    <result column="分区" property="分区"/>
                    <result column="备注" property="备注"/>
                    <result column="geometrys" property="geometrys"/>
                    <result column="project_no" property="projectNo"/>
                    <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,
              UserID,
              地块名,
              first_分,
              sum_shape_,
              first_类,
              分区,
              备注,
              ST_AsText(geometrys) as geometrys,
              project_no,
              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.UserID != null and request.UserID != ''">
                and UserID = #{request.UserID}
            </if>
                    <if test="request.地块名 != null and request.地块名 != ''">
                and 地块名 = #{request.地块名}
            </if>
                    <if test="request.first分 != null and request.first分 != ''">
                and first_分 = #{request.first分}
            </if>
                    <if test="request.sumShape != null and request.sumShape != ''">
                and sum_shape_ = #{request.sumShape}
            </if>
                    <if test="request.first类 != null and request.first类 != ''">
                and first_类 = #{request.first类}
            </if>
                    <if test="request.分区 != null and request.分区 != ''">
                and 分区 = #{request.分区}
            </if>
                    <if test="request.备注 != null and request.备注 != ''">
                and 备注 = #{request.备注}
            </if>
                    <if test="request.geometrys != null and request.geometrys != ''">
                and geometrys = #{request.geometrys}
            </if>
                    <if test="request.projectNo != null and request.projectNo != ''">
                and project_no = #{request.projectNo}
            </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 gis_layer_ljxqgzptjcssxm_2020_1
        where is_deleted = 0
        <include refid="Where_Condition"/>
    </select>

    <select id="exportGisLayerLjxqgzptjcssxm20201" resultType="com.xf.huludao.project.entity.GisLayerLjxqgzptjcssxm20201">
        SELECT * FROM gis_layer_ljxqgzptjcssxm_2020_1 ${ew.customSqlSegment}
    </select>
</mapper>