47 lines
1.5 KiB
XML
Raw Normal View History

2025-06-24 18:01:25 +08:00
<?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.interfaceCommon.mapper.ComOptMapper">
<select id="getComOptOne">
select * from com_opt where yq = #{yq} and xxdh = #{xxdh}
</select>
<select id="getComOptValue">
select xxqz from com_opt where yq = #{yq} and xxdh = #{xxdh}
</select>
<select id="query">
select * from com_opt
<where>
<if test="yq != null and yq != ''"> and yq = #{yq}</if>
<if test="xxdh != null and xxdh != ''"> and xxdh = #{xxdh}</if>
<if test="xxlb != null and xxlb != ''"> and xxlb = #{xxlb}</if>
<if test="xxqz != null and xxqz != ''"> and xxqz = #{xxqz}</if>
</where>
</select>
<insert id="add">
insert into com_opt(
<if test="bz != null and bz !=''">bz,</if>
yq,xxdh,xxlb,xxqz
)values(
<if test="bz != null and bz !=''">#{bz},</if>
#{yq},#{xxdh},#{xxlb},#{xxqz}
)
</insert>
<update id="update">
update com_opt set
<if test="xxlb != null and xxlb !=''">xxlb = #{xxlb},</if>
<if test="bz != null and bz !=''">bz = #{bz},</if>
xxqz = #{xxqz}
where yq = #{yq} and xxdh = #{xxdh}
</update>
2025-06-24 18:01:25 +08:00
<delete id="delete">
delete from com_opt where yq = #{yq} and xxdh = #{xxdh}
</delete>
2025-06-24 18:01:25 +08:00
</mapper>