123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <?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.zhyc.xps.goaf.mapper.GoafMapFlayerMapper">
- <resultMap id="GoafMapDtoMapper" type="com.zhyc.xps.goaf.dto.GoafMapDto">
- <id column="goaflayer_id" property="goaflayerId" jdbcType="BIGINT"/>
- <result column="oc_id" property="ocId" jdbcType="BIGINT"/>
- <result column="goaf_id" property="goafId" jdbcType="BIGINT"/>
- <result column="goaf_name" property="goafName" jdbcType="VARCHAR"/>
- <result column="map_id" property="mapId" jdbcType="BIGINT"/>
- <result column="layer_id" property="layerId" jdbcType="BIGINT"/>
- <result column="layer_cat_id" property="layerCatId" jdbcType="BIGINT"/>
- <result column="layer_title" property="layerTitle" jdbcType="VARCHAR"/>
- <result column="layer_marker" property="layerMarker" jdbcType="VARCHAR"/>
- <result column="layer_vector" property="layerVector" jdbcType="VARCHAR"/>
- <result column="layer_vector_type" property="layerVectorType" jdbcType="BIGINT"/>
- </resultMap>
- <select id="getByList" parameterType="java.util.Map" resultMap="GoafMapDtoMapper">
- SELECT A.goaflayer_id,
- A.oc_id,
- A.goaf_id,
- A.goaf_name,
- A.map_id,
- A.layer_id,
- B.layer_cat_id,
- B.layer_title,
- B.layer_marker,
- B.layer_vector,
- B.layer_vector_type
- FROM goaf_map_layer AS A
- left join ent_map_layer AS B ON B.layer_id = A.layer_id
- WHERE A.oc_id = #{ocId, jdbcType=BIGINT}
- <if test="mapId !=null">
- AND A.map_id = #{mapId ,jdbcType=BIGINT}
- </if>
- <if test="goafId !=null">
- AND A.goaf_id = #{goafId ,jdbcType=BIGINT}
- </if>
- <if test="layerId !=null">
- AND A.layer_id = #{layerId ,jdbcType=BIGINT}
- </if>
- <if test="goafName !=null and goafName != ''">
- AND A.goaf_name = #{goafName ,jdbcType=VARCHAR}
- </if>
- </select>
- <!--分页查询-->
- <select id="getByPage" parameterType="java.util.Map" resultMap="GoafMapDtoMapper">
- SELECT A.goaflayer_id,
- A.oc_id,
- A.goaf_id,
- A.goaf_name,
- A.map_id,
- A.layer_id,
- B.layer_cat_id,
- B.layer_title,
- B.layer_marker,
- B.layer_vector,
- B.layer_vector_type
- FROM goaf_map_layer AS A
- left join ent_map_layer AS B ON B.layer_id = A.layer_id
- WHERE A.oc_id = #{ocId, jdbcType=BIGINT}
- <if test="mapId !=null">
- AND A.map_id = #{mapId ,jdbcType=BIGINT}
- </if>
- <if test="goafId !=null">
- AND A.goaf_id = #{goafId ,jdbcType=BIGINT}
- </if>
- <if test="layerId !=null">
- AND A.layer_id = #{layerId ,jdbcType=BIGINT}
- </if>
- <if test="goafName !=null and goafName != ''">
- AND A.goaf_name = #{goafName ,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="getById" resultMap="GoafMapDtoMapper">
- SELECT A.goaflayer_id,
- A.oc_id,
- A.goaf_id,
- A.goaf_name,
- A.map_id,
- A.layer_id,
- B.layer_cat_id,
- B.layer_title,
- B.layer_marker,
- B.layer_vector,
- B.layer_vector_type
- FROM goaf_map_layer AS A
- left join ent_map_layer AS B ON B.layer_id = A.layer_id
- WHERE A.goaflayer_id = #{goaflayerId, jdbcType=BIGINT}
- </select>
- <insert id="create" parameterType="com.zhyc.xps.goaf.entity.GoafMapFlayer">
- insert into goaf_map_layer
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="goaflayerId != null">
- goaflayer_id,
- </if>
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="goafId != null">
- goaf_id,
- </if>
- <if test="goafName != null and goafName != ''">
- goaf_name,
- </if>
- <if test="mapId != null">
- map_id,
- </if>
- <if test="layerId != null">
- layer_id,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="goaflayerId != null">
- #{goaflayerId, jdbcType=BIGINT},
- </if>
- <if test="ocId != null">
- #{ocId, jdbcType=BIGINT},
- </if>
- <if test="goafId != null">
- #{goafId, jdbcType=BIGINT},
- </if>
- <if test="goafName != null and goafName != ''">
- #{goafName, jdbcType=VARCHAR},
- </if>
- <if test="mapId != null">
- #{mapId, jdbcType=BIGINT},
- </if>
- <if test="layerId != null">
- #{layerId, jdbcType=BIGINT},
- </if>
- </trim>
- </insert>
- <!--Update更新-->
- <update id="update" parameterType="com.zhyc.xps.goaf.entity.GoafMapFlayer">
- UPDATE goaf_map_layer
- <trim suffixOverrides=",">
- <set>
- <if test="goafId != null">
- goaf_id = #{goafId, jdbcType=BIGINT},
- </if>
- <if test="goafName != null and goafName != ''">
- goaf_name = #{goafName, jdbcType=VARCHAR},
- </if>
- <if test="mapId != null">
- map_id = #{mapId, jdbcType=BIGINT},
- </if>
- <if test="layerId != null">
- layer_id = #{layerId, jdbcType=BIGINT},
- </if>
- </set>
- </trim>
- WHERE goaflayer_id = #{goaflayerId, jdbcType=BIGINT}
- </update>
- <delete id="delete" >
- DELETE FROM goaf_map_layer
- WHERE goaflayer_id = #{goaflayerId, jdbcType=BIGINT}
- </delete>
- </mapper>
|