|
|
@@ -1,87 +0,0 @@
|
|
|
-<?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="seecoder.devcloud.web.dao.ProjectDao">
|
|
|
- <resultMap id="BaseResultMap" type="generator.Project">
|
|
|
- <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
- <result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
- <result column="description" jdbcType="VARCHAR" property="description" />
|
|
|
- <result column="git_remote_url" jdbcType="VARCHAR" property="gitRemoteUrl" />
|
|
|
- <result column="group_id" jdbcType="INTEGER" property="groupId" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Base_Column_List">
|
|
|
- id, `name`, description, git_remote_url, group_id
|
|
|
- </sql>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from project
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
- delete from project
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </delete>
|
|
|
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="generator.Project" useGeneratedKeys="true">
|
|
|
- insert into project (`name`, description, git_remote_url,
|
|
|
- group_id)
|
|
|
- values (#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gitRemoteUrl,jdbcType=VARCHAR},
|
|
|
- #{groupId,jdbcType=INTEGER})
|
|
|
- </insert>
|
|
|
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="generator.Project" useGeneratedKeys="true">
|
|
|
- insert into project
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="name != null">
|
|
|
- `name`,
|
|
|
- </if>
|
|
|
- <if test="description != null">
|
|
|
- description,
|
|
|
- </if>
|
|
|
- <if test="gitRemoteUrl != null">
|
|
|
- git_remote_url,
|
|
|
- </if>
|
|
|
- <if test="groupId != null">
|
|
|
- group_id,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="name != null">
|
|
|
- #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="description != null">
|
|
|
- #{description,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="gitRemoteUrl != null">
|
|
|
- #{gitRemoteUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="groupId != null">
|
|
|
- #{groupId,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="generator.Project">
|
|
|
- update project
|
|
|
- <set>
|
|
|
- <if test="name != null">
|
|
|
- `name` = #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="description != null">
|
|
|
- description = #{description,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="gitRemoteUrl != null">
|
|
|
- git_remote_url = #{gitRemoteUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="groupId != null">
|
|
|
- group_id = #{groupId,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="generator.Project">
|
|
|
- update project
|
|
|
- set `name` = #{name,jdbcType=VARCHAR},
|
|
|
- description = #{description,jdbcType=VARCHAR},
|
|
|
- git_remote_url = #{gitRemoteUrl,jdbcType=VARCHAR},
|
|
|
- group_id = #{groupId,jdbcType=INTEGER}
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
-</mapper>
|