<?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.yssh.dao.YsshBjyjMapper">
|
<resultMap id="YsshBjyjResult" type="com.yssh.entity.YsshBjyj">
|
<id column="id" property="id" javaType="java.lang.Integer" />
|
<id column="jcyj" property="jcyj" javaType="java.lang.String" jdbcType="VARCHAR" />
|
<id column="jcbj" property="jcbj" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
<id column="pfyj" property="pfyj" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
<id column="pfbj" property="pfbj" javaType="java.lang.String" jdbcType="VARCHAR"/>
|
</resultMap>
|
<select id="query" resultType="com.yssh.entity.YsshBjyj">
|
select * from yssh_bjyj where 1=1
|
<if test="id != null and id != ''">
|
and id = #{id}
|
</if>
|
</select>
|
<select id="getAll" resultType="com.yssh.entity.YsshBjyj">
|
select * from yssh_bjyj where 1=1
|
</select>
|
<select id="getJcbj" resultType="java.lang.String">
|
select jcbj from yssh_bjyj where 1=1
|
</select>
|
|
<insert id="insert" parameterType="com.yssh.entity.YsshBjyj">
|
insert into yssh_bjyj (
|
jcyj, jcbj, pfyj, pfbj
|
)
|
values (
|
#{jcyj},#{jcbj},#{pfyj},#{pfbj}
|
)
|
</insert>
|
<delete id="delete">
|
delete from yssh_bjyj where id = #{id}
|
</delete>
|
<update id="update">
|
update yssh_bjyj
|
<set >
|
<if test="jcyj != null and jcyj != ''">
|
jcyj = #{jcyj},
|
</if>
|
<if test="jcbj != null and jcbj != ''">
|
jcbj = #{jcbj},
|
</if>
|
<if test="pfbj != null and pfbj != ''">
|
pfbj = #{pfbj},
|
</if>
|
<if test="pfyj != null and pfyj != ''">
|
pfyj = #{pfyj},
|
</if>
|
</set>
|
where id = #{id}
|
</update>
|
</mapper>
|