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

     <!-- 通用映射列 -->
    <resultMap id="BaseResultMap" type="com.xf.huludao.project.entity.GisLayerLjxqhmhgzslTxq">
                    <result column="ID" property="id"/>
                    <result column="UserID" property="UserID"/>
                    <result column="objectid" property="objectid"/>
                    <result column="shape_leng" property="shapeLeng"/>
                    <result column="shape_area" property="shapeArea"/>
                    <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,
              objectid,
              shape_leng,
              shape_area,
              名称,
              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.objectid != null and request.objectid != ''">
                and objectid = #{request.objectid}
            </if>
                    <if test="request.shapeLeng != null and request.shapeLeng != ''">
                and shape_leng = #{request.shapeLeng}
            </if>
                    <if test="request.shapeArea != null and request.shapeArea != ''">
                and shape_area = #{request.shapeArea}
            </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_ljxqhmhgzsl_txq
        where is_deleted = 0
        <include refid="Where_Condition"/>
    </select>

    <select id="exportGisLayerLjxqhmhgzslTxq" resultType="com.xf.huludao.project.entity.GisLayerLjxqhmhgzslTxq">
        SELECT * FROM gis_layer_ljxqhmhgzsl_txq ${ew.customSqlSegment}
    </select>
</mapper>