添加功能
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?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.ModelSupplyMonitorLaborJoinRateMapper">
|
||||
|
||||
<insert id="insert" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorLaborJoinRate">
|
||||
INSERT INTO model_supply_monitor_labor_join_rate (year, age, male_labor_join_rate, female_labor_join_rate)
|
||||
VALUES (#{year}, #{age}, #{maleLaborJoinRate}, #{femaleLaborJoinRate})
|
||||
</insert>
|
||||
|
||||
<insert id="update" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorLaborJoinRate">
|
||||
UPDATE model_supply_monitor_labor_join_rate
|
||||
SET year = #{year},
|
||||
age = #{age},
|
||||
male_labor_join_rate = #{maleLaborJoinRate},
|
||||
female_labor_join_rate = #{femaleLaborJoinRate}
|
||||
WHERE id = #{id}
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Long">
|
||||
DELETE
|
||||
FROM model_supply_monitor_labor_join_rate
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="clear">
|
||||
DELETE
|
||||
FROM model_supply_monitor_labor_join_rate
|
||||
WHERE id IS NOT NULL;
|
||||
</delete>
|
||||
|
||||
<select id="selectById" parameterType="java.lang.Long"
|
||||
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorLaborJoinRate">
|
||||
SELECT id, year, age, male_labor_join_rate AS maleLaborJoinRate, female_labor_join_rate AS femaleLaborJoinRate
|
||||
FROM model_supply_monitor_labor_join_rate
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="findUnique" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorLaborJoinRate"
|
||||
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorLaborJoinRate">
|
||||
SELECT id, year, age, male_labor_join_rate AS maleLaborJoinRate, female_labor_join_rate AS femaleLaborJoinRate
|
||||
FROM model_supply_monitor_labor_join_rate
|
||||
WHERE year = #{year}
|
||||
and age = #{age}
|
||||
</select>
|
||||
|
||||
<select id="list" parameterType="com.ruoyi.cms.domain.ModelSupplyMonitorLaborJoinRate"
|
||||
resultType="com.ruoyi.cms.domain.ModelSupplyMonitorLaborJoinRate">
|
||||
SELECT id,
|
||||
year,
|
||||
age,
|
||||
male_labor_join_rate AS maleLaborJoinRate,
|
||||
female_labor_join_rate AS femaleLaborJoinRate
|
||||
FROM model_supply_monitor_labor_join_rate
|
||||
<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>
|
||||
Reference in New Issue
Block a user