ProjectBindMapper.xml 952 B

1234567891011121314151617181920212223242526
  1. <!DOCTYPE mapper
  2. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <mapper namespace="com.bosshand.virgo.api.dao.ProjectBindDao">
  5. <resultMap type="com.bosshand.virgo.api.model.ProjectBind" id="ProjectBindResult" >
  6. <id column="id" property="id"/>
  7. <result column="organizationId" property="organizationId"/>
  8. <result column="projectId" property="projectId"/>
  9. <result column="userId" property="userId"/>
  10. </resultMap>
  11. <select id="get" resultMap="ProjectBindResult">
  12. select * from project_bind where organizationId = #{organizationId} and userId = #{userId}
  13. </select>
  14. <insert id="insert">
  15. insert into project_bind (organizationId, projectId, userId) value (#{organizationId}, #{projectId}, #{userId})
  16. </insert>
  17. <delete id="delete">
  18. delete from project_bind where projectId = #{projectId}
  19. </delete>
  20. </mapper>