添加功能
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
<?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.ModelSupplyMonitorPopulationMapper">
|
||||
|
||||
<insert id="insert" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorPopulation">
|
||||
INSERT INTO model_supply_monitor_population (year, age, male_count, female_count, total_count)
|
||||
VALUES (#{year}, #{age}, #{maleCount}, #{femaleCount}, #{totalCount})
|
||||
</insert>
|
||||
|
||||
<insert id="update" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorPopulation">
|
||||
UPDATE model_supply_monitor_population
|
||||
SET year = #{year},
|
||||
age = #{age},
|
||||
male_count = #{maleCount},
|
||||
female_count = #{femaleCount},
|
||||
total_count = #{totalCount}
|
||||
WHERE id = #{id}
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Long">
|
||||
DELETE
|
||||
FROM model_supply_monitor_population
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="clear" >
|
||||
DELETE FROM model_supply_monitor_population
|
||||
WHERE id IS NOT NULL;
|
||||
</delete>
|
||||
|
||||
<select id="selectById" parameterType="java.lang.Long"
|
||||
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorPopulation">
|
||||
SELECT id,
|
||||
year,
|
||||
age,
|
||||
male_count AS maleCount,
|
||||
female_count AS femaleCount,
|
||||
total_count AS totalCount
|
||||
FROM model_supply_monitor_population
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="findUnique" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorPopulation"
|
||||
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorPopulation">
|
||||
SELECT id,
|
||||
year,
|
||||
age,
|
||||
male_count AS maleCount,
|
||||
female_count AS femaleCount,
|
||||
total_count AS totalCount
|
||||
FROM model_supply_monitor_population
|
||||
WHERE year = #{year}
|
||||
AND age = #{age}
|
||||
</select>
|
||||
|
||||
<select id="list" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorPopulation"
|
||||
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorPopulation">
|
||||
SELECT id,
|
||||
year,
|
||||
age,
|
||||
male_count AS maleCount,
|
||||
female_count AS femaleCount,
|
||||
total_count AS totalCount
|
||||
FROM model_supply_monitor_population
|
||||
<where>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="year != null">
|
||||
AND year = #{year}
|
||||
</if>
|
||||
<if test="age != null">
|
||||
AND age = #{age}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY year DESC, age ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Binary file not shown.
Reference in New Issue
Block a user