lis8.0/liswork/src/main/resources/mapper/XmMedgroupMapper.xml
2025-10-13 17:44:53 +08:00

43 lines
1.5 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.czlis.liswork.mapper.xtwh.XmMedgroupMapper">
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmMedgroup">
select * from xm_medgroup
<where>
<if test="ywzmc != null and ywzmc != ''"> and ywzmc = #{ywzmc}</if>
<if test="xh != null and xh != ''"> and xh = #{xh}</if>
</where>
</select>
<insert id="add">
insert into xm_medgroup(
<if test="ywdh != null and ywdh != ''">ywdh,</if>
<if test="bz != null and bz != ''">bz,</if>
<if test="nymic != null ">nymic,</if>
<if test="zjmic != null ">zjmic,</if>
ywzmc, xh
)values(
<if test="ywdh != null and ywdh != ''">#{ywdh},</if>
<if test="bz != null and bz != ''">#{bz},</if>
<if test="nymic != null ">#{nymic},</if>
<if test="zjmic != null ">#{zjmic},</if>
#{ywzmc}, #{xh}
)
</insert>
<update id="update">
update xm_medgroup set
<if test="ywdh != null and ywdh != ''"> ywdh = #{ywdh},</if>
<if test="bz != null and bz != ''"> bz = #{bz},</if>
<if test="nymic != null"> nymic = #{nymic},</if>
ywzmc = #{ywzmc}
where ywzmc = #{ywzmc} and xh = #{xh}
</update>
<delete id="delete">
delete from xm_medgroup where ywzmc = #{ywzmc} and xh = #{xh}
</delete>
</mapper>