78 lines
3.1 KiB
XML
78 lines
3.1 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.ModelDemandMonitorIndustryTrendMapper">
|
|
|
|
<insert id="insert" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend">
|
|
INSERT INTO model_demand_monitor_industry_trend (year_month, industry_code, industry_name, demand_count)
|
|
VALUES (#{yearMonth}, #{industryCode}, #{industryName}, #{demandCount})
|
|
</insert>
|
|
|
|
<insert id="update" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend">
|
|
UPDATE model_demand_monitor_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_industry_trend
|
|
WHERE id = #{id}
|
|
</delete>
|
|
|
|
<delete id="clear">
|
|
DELETE FROM model_demand_monitor_industry_trend
|
|
WHERE id IS NOT NULL;
|
|
</delete>
|
|
|
|
<select id="selectById" parameterType="java.lang.Long"
|
|
resultType="com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend">
|
|
SELECT id,
|
|
year_month AS yearMonth,
|
|
industry_code AS industryCode,
|
|
industry_name AS industryName,
|
|
demand_count AS demandCount
|
|
FROM model_demand_monitor_industry_trend
|
|
WHERE id = #{id}
|
|
</select>
|
|
|
|
<select id="findUnique" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend"
|
|
resultType="com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend">
|
|
SELECT id,
|
|
year_month AS yearMonth,
|
|
industry_code AS industryCode,
|
|
industry_name AS industryName,
|
|
demand_count AS demandCount
|
|
FROM model_demand_monitor_industry_trend
|
|
WHERE year_month = #{yearMonth}
|
|
AND industry_code = #{industryCode}
|
|
</select>
|
|
|
|
<select id="list" parameterType="com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend"
|
|
resultType="com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend">
|
|
SELECT id,
|
|
year_month AS yearMonth,
|
|
industry_code AS industryCode,
|
|
industry_name AS industryName,
|
|
demand_count AS demandCount
|
|
FROM model_demand_monitor_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> |