添加功能

This commit is contained in:
马宝龙
2026-07-03 18:47:55 +08:00
parent 174b92b7d1
commit 5e91e0f25a
12 changed files with 731 additions and 3 deletions

View File

@@ -0,0 +1,78 @@
<?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.ModelDemandMonitorMajorIndustryTrendMapper">
<insert id="insert" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend">
INSERT INTO model_demand_monitor_major_industry_trend (year_month, industry_code, industry_name, demand_count)
VALUES (#{yearMonth}, #{industryCode}, #{industryName}, #{demandCount})
</insert>
<insert id="update" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend">
UPDATE model_demand_monitor_major_industry_trend
SET year_month = #{yearMonth},
industry_code = #{industryCode},
industry_name = #{industryName},
demand_count = #{demandCount}
WHERE id = #{id}
</insert>
<delete id="deleteById" parameterType="java.lang.Long">
DELETE
FROM model_demand_monitor_major_industry_trend
WHERE id = #{id}
</delete>
<delete id="clear">
DELETE FROM model_demand_monitor_major_industry_trend
WHERE id IS NOT NULL;
</delete>
<select id="selectById" parameterType="java.lang.Long"
resultType="com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend">
SELECT id,
year_month AS yearMonth,
industry_code AS industryCode,
industry_name AS industryName,
demand_count AS demandCount
FROM model_demand_monitor_major_industry_trend
WHERE id = #{id}
</select>
<select id="findUnique" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend"
resultType="com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend">
SELECT id,
year_month AS yearMonth,
industry_code AS industryCode,
industry_name AS industryName,
demand_count AS demandCount
FROM model_demand_monitor_major_industry_trend
WHERE year_month = #{yearMonth}
AND industry_code = #{industryCode}
</select>
<select id="list" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend"
resultType="com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend">
SELECT id,
year_month AS yearMonth,
industry_code AS industryCode,
industry_name AS industryName,
demand_count AS demandCount
FROM model_demand_monitor_major_industry_trend
<where>
<if test="id != null">
AND id = #{id}
</if>
<if test="yearMonth != null and yearMonth != ''">
AND year_month = #{yearMonth}
</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_month DESC
</select>
</mapper>