74 lines
2.8 KiB
XML
74 lines
2.8 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.cms.mapper.ModelWarningIndicatorDataMapper">
|
||
|
|
|
||
|
|
<insert id="insert" parameterType="com.ruoyi.cms.domain.ModelWarningIndicatorData">
|
||
|
|
INSERT INTO model_warning_indicator_data (indicator_code, data_value, year, month, region_code, region_name, remark)
|
||
|
|
VALUES (#{indicatorCode}, #{dataValue}, #{year}, #{month}, #{regionCode}, #{regionName}, #{remark})
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
|
||
|
|
<insert id="update" parameterType="com.ruoyi.cms.domain.ModelWarningIndicatorData">
|
||
|
|
UPDATE
|
||
|
|
model_warning_indicator_data
|
||
|
|
SET indicator_code = #{indicatorCode},
|
||
|
|
data_value = #{dataValue},
|
||
|
|
year = #{year},
|
||
|
|
month = #{month},
|
||
|
|
region_code = #{regionCode},
|
||
|
|
region_name = #{regionName},
|
||
|
|
remark = #{remark}
|
||
|
|
WHERE id = #{id}
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<insert id="deleteById" parameterType="java.lang.Long">
|
||
|
|
DELETE
|
||
|
|
FROM model_warning_indicator_data
|
||
|
|
WHERE id = #{id}
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<select id="selectById" parameterType="com.ruoyi.cms.domain.ModelWarningIndicatorData"
|
||
|
|
resultType="com.ruoyi.cms.domain.ModelWarningIndicatorData">
|
||
|
|
SELECT *
|
||
|
|
FROM model_warning_indicator_data
|
||
|
|
WHERE id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="findUnique" parameterType="com.ruoyi.cms.domain.ModelWarningIndicatorData"
|
||
|
|
resultType="com.ruoyi.cms.domain.ModelWarningIndicatorData">
|
||
|
|
SELECT *
|
||
|
|
FROM model_warning_indicator_data
|
||
|
|
WHERE indicator_code = #{indicatorCode}
|
||
|
|
AND year = #{year}
|
||
|
|
AND month = #{month}
|
||
|
|
AND region_code = #{regionCode}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="list" parameterType="com.ruoyi.cms.domain.ModelWarningIndicatorData"
|
||
|
|
resultType="com.ruoyi.cms.domain.ModelWarningIndicatorData">
|
||
|
|
SELECT *
|
||
|
|
FROM model_warning_indicator_data
|
||
|
|
<where>
|
||
|
|
<if test="id != null ">
|
||
|
|
AND id = #{id}
|
||
|
|
</if>
|
||
|
|
<if test="indicatorCode != null and indicatorCode != ''">
|
||
|
|
AND indicator_code = #{indicatorCode}
|
||
|
|
</if>
|
||
|
|
<if test="year != null">
|
||
|
|
AND year = #{year}
|
||
|
|
</if>
|
||
|
|
<if test="month != null">
|
||
|
|
AND month = #{month}
|
||
|
|
</if>
|
||
|
|
<if test="regionCode != null and regionCode != ''">
|
||
|
|
AND region_code = #{regionCode}
|
||
|
|
</if>
|
||
|
|
<if test="regionName != null and regionName != ''">
|
||
|
|
AND region_name LIKE '%'||#{regionName}||'%'
|
||
|
|
</if>
|
||
|
|
</where>
|
||
|
|
ORDER BY year DESC, month DESC, indicator_code
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|