99 lines
4.7 KiB
XML
99 lines
4.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.yanzhu.manage.mapper.BasSignetMapper">
|
||
|
|
|
||
|
|
<resultMap type="BasSignet" id="BasSignetResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="comId" column="com_id" />
|
||
|
|
<result property="projectId" column="project_id" />
|
||
|
|
<result property="userId" column="user_id" />
|
||
|
|
<result property="signetPath" column="signet_path" />
|
||
|
|
<result property="signetNumber" column="signet_number" />
|
||
|
|
<result property="isDel" column="is_del" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
<result property="remark" column="remark" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectBasSignetVo">
|
||
|
|
select id, com_id, project_id, user_id, signet_path, signet_number, is_del, create_by, create_time, update_by, update_time, remark from bas_signet
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectBasSignetList" parameterType="BasSignet" resultMap="BasSignetResult">
|
||
|
|
<include refid="selectBasSignetVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="comId != null "> and com_id = #{comId}</if>
|
||
|
|
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||
|
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectBasSignetById" parameterType="Long" resultMap="BasSignetResult">
|
||
|
|
<include refid="selectBasSignetVo"/>
|
||
|
|
where id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertBasSignet" parameterType="BasSignet" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into bas_signet
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="comId != null">com_id,</if>
|
||
|
|
<if test="projectId != null">project_id,</if>
|
||
|
|
<if test="userId != null">user_id,</if>
|
||
|
|
<if test="signetPath != null">signet_path,</if>
|
||
|
|
<if test="signetNumber != null">signet_number,</if>
|
||
|
|
<if test="isDel != null">is_del,</if>
|
||
|
|
<if test="createBy != null">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateBy != null">update_by,</if>
|
||
|
|
<if test="updateTime != null">update_time,</if>
|
||
|
|
<if test="remark != null">remark,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="comId != null">#{comId},</if>
|
||
|
|
<if test="projectId != null">#{projectId},</if>
|
||
|
|
<if test="userId != null">#{userId},</if>
|
||
|
|
<if test="signetPath != null">#{signetPath},</if>
|
||
|
|
<if test="signetNumber != null">#{signetNumber},</if>
|
||
|
|
<if test="isDel != null">#{isDel},</if>
|
||
|
|
<if test="createBy != null">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
<if test="remark != null">#{remark},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateBasSignet" parameterType="BasSignet">
|
||
|
|
update bas_signet
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="comId != null">com_id = #{comId},</if>
|
||
|
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||
|
|
<if test="userId != null">user_id = #{userId},</if>
|
||
|
|
<if test="signetPath != null">signet_path = #{signetPath},</if>
|
||
|
|
<if test="signetNumber != null">signet_number = #{signetNumber},</if>
|
||
|
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||
|
|
<if test="createBy != null">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>
|
||
|
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteBasSignetById" parameterType="Long">
|
||
|
|
delete from bas_signet where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteBasSignetByIds" parameterType="String">
|
||
|
|
delete from bas_signet where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|