lis8.0/liswork/src/main/resources/mapper/XmBaseMapper.xml
2025-09-24 12:18:31 +08:00

68 lines
2.7 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.dict.XmBaseMapper">
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmBase">
select * from xm_base
<where>
<if test="xmdh != null and xmdh != ''"> and xmdh = #{xmdh}</if>
</where>
</select>
<insert id="add">
insert into xm_base(
<if test="xmmc != null and xmmc != ''">xmmc,</if>
<if test="xmlb != null and xmlb != ''">xmlb,</if>
<if test="xmz != null and xmz != ''">xmz,</if>
<if test="dw != null and dw != ''">dw,</if>
<if test="cksx != null">cksx,</if>
<if test="ckxx != null">ckxx,</if>
<if test="dyckz != null and dyckz != ''">dyckz,</if>
<if test="dyxh != null">dyxh,</if>
<if test="jsgs != null and jsgs != ''">jsgs,</if>
<if test="lcyy != null and lcyy != ''">lcyy,</if>
<if test="bz != null and bz != ''">bz,</if>
xmdh
)values (
<if test="xmmc != null and xmmc != ''">#{xmmc},</if>
<if test="xmlb != null and xmlb != ''">#{xmlb},</if>
<if test="xmz != null and xmz != ''">#{xmz},</if>
<if test="dw != null and dw != ''">#{dw},</if>
<if test="cksx != null">#{cksx},</if>
<if test="ckxx != null">#{ckxx},</if>
<if test="dyckz != null and dyckz != ''">#{dyckz},</if>
<if test="dyxh != null">#{dyxh},</if>
<if test="jsgs != null and jsgs != ''">#{jsgs},</if>
<if test="lcyy != null and lcyy != ''">#{lcyy},</if>
<if test="bz != null and bz != ''">#{bz},</if>
#{xmdh}
)
</insert>
<delete id="delete">
delete from xm_base where xmdh = #{xmdh}
</delete>
<update id="update">
update xm_base
<set>
<if test="xmmc != null and xmmc != ''">xmmc = #{xmmc},</if>
<if test="xmlb != null and xmlb != ''">xmlb = #{xmlb},</if>
<if test="xmz != null and xmz != ''">xmz = #{xmz},</if>
<if test="dw != null and dw != ''">dw = #{dw},</if>
<if test="cksx != null">cksx = #{cksx},</if>
<if test="ckxx != null">ckxx = #{ckxx},</if>
<if test="dyckz != null and dyckz != ''">dyckz = #{dyckz},</if>
<if test="dyxh != null">dyxh = #{dyxh},</if>
<if test="jsgs != null and jsgs != ''">jsgs = #{jsgs},</if>
<if test="lcyy != null and lcyy != ''">lcyy = #{lcyy},</if>
<if test="bz != null and bz != ''">bz = #{bz},</if>
</set>
where xmdh = #{xmdh}
</update>
</mapper>