|
@@ -0,0 +1,50 @@
|
|
|
+<!DOCTYPE mapper
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+
|
|
|
+<mapper namespace="com.bosshand.virgo.api.operate.dao.ReviewerSetDao">
|
|
|
+
|
|
|
+ <resultMap type="com.bosshand.virgo.api.operate.model.ReviewerSet" id="reviewerSetResult">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="operateOrganizationId" property="operateOrganizationId"/>
|
|
|
+ <result column="projectId" property="projectId"/>
|
|
|
+ <result column="submiter" property="submiter"/>
|
|
|
+ <result column="checker" property="checker"/>
|
|
|
+ <result column="type" property="type"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="save" parameterType="com.bosshand.virgo.api.operate.model.ReviewerSet" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into operate_reviewer_set(operateOrganizationId, projectId, submiter, checker, type) VALUES (#{operateOrganizationId}, #{projectId}, #{submiter}, #{checker}, #{type})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="get" resultMap="reviewerSetResult">
|
|
|
+ SELECT * FROM operate_reviewer_set
|
|
|
+ <where>
|
|
|
+ <if test="id != 0">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="projectId != 0">
|
|
|
+ and projectId = #{projectId}
|
|
|
+ </if>
|
|
|
+ <if test="operateOrganizationId != 0">
|
|
|
+ and operateOrganizationId = #{operateOrganizationId}
|
|
|
+ </if>
|
|
|
+ <if test="type != 0">
|
|
|
+ and type = #{type}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.bosshand.virgo.api.operate.model.ReviewerSet">
|
|
|
+ update operate_reviewer_set
|
|
|
+ <trim prefix="set" suffixOverrides=",">
|
|
|
+ <if test="operateOrganizationId!=0">operateOrganizationId=#{operateOrganizationId},</if>
|
|
|
+ <if test="projectId!=0">projectId=#{projectId},</if>
|
|
|
+ <if test="submiter!=null">submiter=#{submiter},</if>
|
|
|
+ <if test="checker!=null">checker=#{checker},</if>
|
|
|
+ <if test="type!=0">type=#{type},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|