添加功能

This commit is contained in:
马宝龙
2026-07-03 13:15:14 +08:00
parent fbf2b2da0e
commit 631c4fdc21
10 changed files with 629 additions and 1 deletions

View File

@@ -0,0 +1,82 @@
<?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.ModelSupplyMonitorIndustryPopulationMapper">
<insert id="insert" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation">
INSERT INTO model_supply_monitor_industry_population (year, industry_code, industry_name, male_count, female_count)
VALUES (#{year}, #{industryCode}, #{industryName}, #{maleCount}, #{femaleCount})
</insert>
<insert id="update" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation">
UPDATE model_supply_monitor_industry_population
SET year = #{year},
industry_code = #{industryCode},
industry_name = #{industryName},
male_count = #{maleCount},
female_count = #{femaleCount}
WHERE id = #{id}
</insert>
<delete id="deleteById" parameterType="java.lang.Long">
DELETE
FROM model_supply_monitor_industry_population
WHERE id = #{id}
</delete>
<delete id="clear">
DELETE FROM model_supply_monitor_industry_population
WHERE id IS NOT NULL;
</delete>
<select id="selectById" parameterType="java.lang.Long"
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation">
SELECT id,
year,
industry_code AS industryCode,
industry_name AS industryName,
male_count AS maleCount,
female_count AS femaleCount
FROM model_supply_monitor_industry_population
WHERE id = #{id}
</select>
<select id="findUnique" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation"
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation">
SELECT id,
year,
industry_code AS industryCode,
industry_name AS industryName,
male_count AS maleCount,
female_count AS femaleCount
FROM model_supply_monitor_industry_population
WHERE year = #{year}
AND industry_code = #{industryCode}
</select>
<select id="list" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation"
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation">
SELECT id,
year,
industry_code AS industryCode,
industry_name AS industryName,
male_count AS maleCount,
female_count AS femaleCount
FROM model_supply_monitor_industry_population
<where>
<if test="id != null">
AND id = #{id}
</if>
<if test="year != null">
AND year = #{year}
</if>
<if test="industryCode != null and industryCode != ''">
AND industry_code = #{industryCode}
</if>
<if test="industryName != null and industryName != ''">
AND industry_name LIKE '%'||#{industryName}||'%'
</if>
</where>
ORDER BY year DESC
</select>
</mapper>