添加功能
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<?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.ModelWarningIndicatorMapper">
|
||||
|
||||
<insert id="insert" parameterType="com.ruoyi.cms.domain.ModelWarningIndicator">
|
||||
INSERT INTO model_warning_indicator (indicator_name, indicator_code, indicator_type, sort_order)
|
||||
VALUES (#{indicatorName}, #{indicatorCode}, #{indicatorType}, #{sortOrder})
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="update" parameterType="com.ruoyi.cms.domain.ModelWarningIndicator">
|
||||
UPDATE
|
||||
model_warning_indicator
|
||||
SET indicator_name = #{indicatorName},
|
||||
indicator_code = #{indicatorCode},
|
||||
indicator_type = #{indicatorType},
|
||||
sort_order = #{sortOrder}
|
||||
WHERE id = #{id}
|
||||
</insert>
|
||||
|
||||
<insert id="deleteById" parameterType="java.lang.Long">
|
||||
DELETE
|
||||
FROM model_warning_indicator
|
||||
WHERE id = #{id}
|
||||
</insert>
|
||||
|
||||
<select id="selectById" parameterType="com.ruoyi.cms.domain.ModelWarningIndicator"
|
||||
resultType="com.ruoyi.cms.domain.ModelWarningIndicator">
|
||||
SELECT *
|
||||
FROM model_warning_indicator
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="findUnique" parameterType="com.ruoyi.cms.domain.ModelWarningIndicator"
|
||||
resultType="com.ruoyi.cms.domain.ModelWarningIndicator">
|
||||
SELECT *
|
||||
FROM model_warning_indicator
|
||||
WHERE indicator_code = #{indicatorCode}
|
||||
AND indicator_type = #{indicatorType}
|
||||
</select>
|
||||
|
||||
<select id="list" parameterType="com.ruoyi.cms.domain.ModelWarningIndicator"
|
||||
resultType="com.ruoyi.cms.domain.ModelWarningIndicator">
|
||||
SELECT *
|
||||
FROM model_warning_indicator
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="indicatorName != null and indicatorName != ''">
|
||||
AND indicator_name LIKE '%'||#{indicatorName} || '%'
|
||||
</if>
|
||||
<if test="indicatorCode != null and indicatorCode != ''">
|
||||
AND indicator_code = #{indicatorCode}
|
||||
</if>
|
||||
<if test="indicatorType != null and indicatorType != ''">
|
||||
AND indicator_type = #{indicatorType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sort_order
|
||||
</select>
|
||||
|
||||
<select id="tree" parameterType="java.lang.Integer"
|
||||
resultType="com.ruoyi.cms.domain.vo.TreeVo">
|
||||
SELECT id,
|
||||
indicator_name as "desc",
|
||||
indicator_code as code
|
||||
FROM model_warning_indicator
|
||||
WHERE indicator_type = #{indicatorType}
|
||||
ORDER BY sort_order
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user