93 lines
5.0 KiB
XML
93 lines
5.0 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.os.mapper.HealthcareOsConventionalValueMapper">
|
||
|
|
||
|
<resultMap type="HealthcareOsConventionalValue" id="HealthcareOsConventionalValueResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="parentId" column="parent_id" />
|
||
|
<result property="dictName" column="dict_name" />
|
||
|
<result property="name" column="name" />
|
||
|
<result property="value" column="value" />
|
||
|
<result property="isLinkage" column="is_linkage" />
|
||
|
<result property="createBy" column="create_by" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectHealthcareOsConventionalValueVo">
|
||
|
select id, parent_id, dict_name, name, value, is_linkage, create_by, create_time, update_by, update_time from healthcare_os_conventional_value
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectHealthcareOsConventionalValueList" parameterType="HealthcareOsConventionalValue" resultMap="HealthcareOsConventionalValueResult">
|
||
|
<include refid="selectHealthcareOsConventionalValueVo"/>
|
||
|
<where>
|
||
|
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||
|
<if test="dictName != null and dictName != ''"> and dict_name = #{dictName}</if>
|
||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||
|
<if test="value != null and value != ''"> and value = #{value}</if>
|
||
|
<if test="isLinkage != null and isLinkage != ''"> and is_linkage = #{isLinkage}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectHealthcareOsConventionalValueById" parameterType="Long" resultMap="HealthcareOsConventionalValueResult">
|
||
|
<include refid="selectHealthcareOsConventionalValueVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertHealthcareOsConventionalValue" parameterType="HealthcareOsConventionalValue" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into healthcare_os_conventional_value
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="parentId != null">parent_id,</if>
|
||
|
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||
|
<if test="name != null and name != ''">name,</if>
|
||
|
<if test="value != null and value != ''">value,</if>
|
||
|
<if test="isLinkage != null and isLinkage != ''">is_linkage,</if>
|
||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="updateBy != null">update_by,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="parentId != null">#{parentId},</if>
|
||
|
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||
|
<if test="name != null and name != ''">#{name},</if>
|
||
|
<if test="value != null and value != ''">#{value},</if>
|
||
|
<if test="isLinkage != null and isLinkage != ''">#{isLinkage},</if>
|
||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateHealthcareOsConventionalValue" parameterType="HealthcareOsConventionalValue">
|
||
|
update healthcare_os_conventional_value
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
||
|
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||
|
<if test="value != null and value != ''">value = #{value},</if>
|
||
|
<if test="isLinkage != null and isLinkage != ''">is_linkage = #{isLinkage},</if>
|
||
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteHealthcareOsConventionalValueById" parameterType="Long">
|
||
|
delete from healthcare_os_conventional_value where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteHealthcareOsConventionalValueByIds" parameterType="String">
|
||
|
delete from healthcare_os_conventional_value where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|