<?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.yssh.dao.YsshSuYuan200Mapper">
|
<resultMap id="YsshSuYuan200Result" type="com.yssh.entity.YsshSuYuanX00">
|
<id column="id" property="id" javaType="java.lang.String" />
|
<id column="name" property="name" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
<id column="vocs_name" property="vocsName" javaType="java.lang.String" jdbcType="VARCHAR" />
|
<id column="lon" property="lon" javaType="java.lang.Float" jdbcType="DOUBLE"/>
|
<id column="lat" property="lat" javaType="java.lang.Float" jdbcType="DOUBLE"/>
|
<id column="vocs_value" property="vocsValue" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
<id column="vocs_daily" property="vocsDaily" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
<id column="vocs_monthly" property="vocsMonthly" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
<id column="vocs_annual" property="vocsAnnual" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
<id column="info" property="info" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
</resultMap>
|
<select id="query" resultType="com.yssh.entity.YsshSuYuanX00">
|
select * from yssh_suyuan200 where 1=1
|
<if test="name != null and name != ''">
|
and name = #{name}
|
</if>
|
</select>
|
<select id="queryByIds" resultType="com.yssh.entity.YsshSuYuanX00">
|
select * from yssh_suyuan200 where id in
|
<foreach item="item" index="index" collection="list"
|
open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</select>
|
<select id="getAll" resultType="com.yssh.entity.YsshSuYuanX00">
|
select * from yssh_suyuan200 where 1=1
|
</select>
|
<insert id="insert" parameterType="com.yssh.entity.YsshSuYuanX00">
|
insert into yssh_suyuan200 (
|
name, vocs_name, lon, lat, vocs_value, vocs_daily, vocs_monthly, vocs_annual, info
|
)
|
values (
|
#{name},#{vocsName},#{lon},#{lat},#{vocsValue},#{vocsDaily},#{vocsMonthly},#{vocsAnnual},#{info}
|
)
|
</insert>
|
<delete id="delete">
|
delete from yssh_suyuan200 where id = #{id}
|
</delete>
|
|
<update id="update">
|
update yssh_suyuan200
|
<set >
|
<if test="name != null and name != ''">
|
name = #{name},
|
</if>
|
<if test="vocsName != null and vocsName != ''">
|
vocs_name = #{vocsName},
|
</if>
|
<if test="lon != null">
|
lon = #{lon},
|
</if>
|
<if test="lat != null">
|
lat = #{lat},
|
</if>
|
<if test="vocsValue != null and vocsValue != ''">
|
vocs_value = #{vocsValue},
|
</if>
|
<if test="vocsDaily != null and vocsDaily != ''">
|
vocs_daily = #{vocsDaily},
|
</if>
|
<if test="vocsMonthly != null and vocsMonthly != ''">
|
vocs_monthly = #{vocsMonthly},
|
</if>
|
<if test="vocsAnnual != null and vocsAnnual != ''">
|
vocs_annual = #{vocsAnnual},
|
</if>
|
<if test="info != null and info != ''">
|
info = #{info},
|
</if>
|
</set>
|
where id = #{id}
|
</update>
|
|
<update id="updateBatch">
|
update yssh_suyuan200
|
<set >
|
<if test="newName != null and newName != ''">
|
vocs_name = #{newName},
|
</if>
|
</set>
|
where id in
|
<foreach item="item" index="index" collection="ids"
|
open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</update>
|
|
<select id="queryMaxVlue" resultType="com.yssh.entity.YsshSuYuanX00">
|
select * from yssh_suyuan200 where 1=1
|
<if test="name != null and name != ''">
|
and name = #{name}
|
</if>
|
order by vocs_value desc limit 1
|
</select>
|
</mapper>
|