songjinsheng 854afa033d 更新
2022-08-16 08:36:53 +08:00

111 lines
4.3 KiB
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.ruoyi.system.mapper_yada.ThematicMapMapper">
<resultMap id="RM_ThematicMap" type="com.ruoyi.system.domain_yada.ThematicMapDomain">
<result property="id" column="id"/>
<result property="pictureZh" column="picture_zh"/>
<result property="pictureCode" column="picture_code"/>
<result property="pictureTypeOne" column="picture_type_one"/>
<result property="pictureTypeTwo" column="picture_type_two"/>
<result property="pictureEn" column="picture_en"/>
<result property="pictureName" column="picture_name"/>
<result property="pictureType" column="picture_type"/>
<result property="pictureTime" column="picture_time"/>
<result property="picturePath" column="picture_path"/>
<result property="remarks" column="remarks"/>
<result property="year" column="year"/>
<result property="createdBy" column="created_by"/>
<result property="createdTime" column="created_time"/>
</resultMap>
<resultMap id="RM_MapServices" type="com.ruoyi.system.domain_yada.MapServicesVO">
<result property="id" column="id"/>
<result property="chartName" column="chart_name"/>
<result property="chartType" column="chart_type"/>
<result property="particularYear" column="particular_year"/>
<result property="layer" column="layer"/>
<result property="resolvingPower" column="resolving_power"/>
<result property="serviceType" column="service_type"/>
</resultMap>
<sql id="columns">
<![CDATA[
id,picture_zh,year,picture_code,picture_type_one,picture_type_two,picture_en,picture_name,picture_type,picture_time,picture_path,picture_time,remarks,created_by,created_time
]]>
</sql>
<sql id="cloumns_Map">
<![CDATA[
id,chart_name,chart_type,particular_year,layer,resolving_power,service_type
]]>
</sql>
<select id="selMapServers" resultMap="RM_MapServices">
SELECT <include refid="cloumns_Map"/> FROM map_Services
WHERE 1=1
<if test="chartType!= null and chartType !=''">
AND chart_Type = #{chartType}
</if>
<if test="chartName!= null and chartName !=''">
AND chart_name = #{chartName}
</if>
<if test="particularYear!= null and particularYear !=''">
AND particular_year = #{particularYear}
</if>
</select>
<select id="selectAllThematicMap" resultMap="RM_ThematicMap">
SELECT <include refid="columns"/> FROM thematic_map
WHERE 1=1
<if test="pictureType!= null and pictureType !=''">
AND picture_type = #{pictureType}
</if>
<if test="pictureTypeOne!= null and pictureTypeOne !=''">
AND picture_type_one = #{pictureTypeOne}
</if>
<if test="pictureTypeTwo!= null and pictureTypeTwo !=''">
AND picture_type_two = #{pictureTypeTwo}
</if>
</select>
<delete id="deleteThematicMap">
DELETE FROM thematic_map
WHERE ID=#{id}
</delete>
<insert id="saveThematicMap">
<![CDATA[
INSERT INTO thematic_map (
id ,
picture_zh ,
picture_en ,
picture_name ,
picture_type ,
picture_type_one,
picture_type_two,
picture_code,
picture_time ,
picture_path,
remarks,
created_by ,
created_time
) VALUES (
#{id,jdbcType=BIGINT},
#{pictureZh,jdbcType=VARCHAR}},
#{pictureEn,jdbcType=VARCHAR}},
#{pictureName,jdbcType=VARCHAR}},
#{pictureType,jdbcType=VARCHAR}},
#{pictureTypeOne,jdbcType=VARCHAR}},
#{pictureTypeTwo,jdbcType=VARCHAR}},
#{pictureCode,jdbcType=VARCHAR}},
#{pictureTime,jdbcType=TIMESTAMP},
#{picturePath,jdbcType=VARCHAR},
#{remarks,jdbcType=VARCHAR},
#{createdBy,jdbcType=VARCHAR},
#{createdTime,jdbcType=TIMESTAMP}
)
]]>
</insert>
</mapper>