|
|
@@ -0,0 +1,82 @@
|
|
|
+<?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.goafanti.common.dao.AchievementDemandMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.AchievementDemand" >
|
|
|
+ <id column="id" property="id" jdbcType="VARCHAR" />
|
|
|
+ <result column="achievement_id" property="achievementId" jdbcType="VARCHAR" />
|
|
|
+ <result column="demand_id" property="demandId" jdbcType="VARCHAR" />
|
|
|
+ <result column="keyword" property="keyword" jdbcType="VARCHAR" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ id, achievement_id, demand_id, keyword
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from achievement_demand
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
+ delete from achievement_demand
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.AchievementDemand" >
|
|
|
+ insert into achievement_demand (id, achievement_id, demand_id,
|
|
|
+ keyword)
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{achievementId,jdbcType=VARCHAR}, #{demandId,jdbcType=VARCHAR},
|
|
|
+ #{keyword,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.AchievementDemand" >
|
|
|
+ insert into achievement_demand
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="achievementId != null" >
|
|
|
+ achievement_id,
|
|
|
+ </if>
|
|
|
+ <if test="demandId != null" >
|
|
|
+ demand_id,
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null" >
|
|
|
+ keyword,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="achievementId != null" >
|
|
|
+ #{achievementId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="demandId != null" >
|
|
|
+ #{demandId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null" >
|
|
|
+ #{keyword,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AchievementDemand" >
|
|
|
+ update achievement_demand
|
|
|
+ <set >
|
|
|
+ <if test="achievementId != null" >
|
|
|
+ achievement_id = #{achievementId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="demandId != null" >
|
|
|
+ demand_id = #{demandId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null" >
|
|
|
+ keyword = #{keyword,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AchievementDemand" >
|
|
|
+ update achievement_demand
|
|
|
+ set achievement_id = #{achievementId,jdbcType=VARCHAR},
|
|
|
+ demand_id = #{demandId,jdbcType=VARCHAR},
|
|
|
+ keyword = #{keyword,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+</mapper>
|