|
|
@@ -0,0 +1,205 @@
|
|
|
+<?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.UserArchivesInterviewMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.goafanti.common.model.UserArchivesInterview" id="UserArchivesInterviewMap">
|
|
|
+ <result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="uid" column="uid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="counts" column="counts" jdbcType="INTEGER"/>
|
|
|
+ <result property="earlyCommunication" column="early_communication" jdbcType="VARCHAR"/>
|
|
|
+ <result property="customerDemand" column="customer_demand" jdbcType="VARCHAR"/>
|
|
|
+ <result property="interviewIdeas" column="interview_ideas" jdbcType="VARCHAR"/>
|
|
|
+ <result property="interviewPurpose" column="interview_purpose" jdbcType="VARCHAR"/>
|
|
|
+ <result property="interviewRecommend" column="interview_recommend" jdbcType="VARCHAR"/>
|
|
|
+ <result property="interviewFeedback" column="interview_feedback" jdbcType="VARCHAR"/>
|
|
|
+ <result property="followUpPlan" column="follow_up_plan" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="UserArchivesInterviewAllSql">
|
|
|
+ id, uid, aid, counts, early_communication, customer_demand, interview_ideas, interview_purpose, interview_recommend, interview_feedback, follow_up_plan
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!--查询单个-->
|
|
|
+ <select id="selectById" resultMap="UserArchivesInterviewMap">
|
|
|
+ select
|
|
|
+ <include refid="UserArchivesInterviewAllSql"/>
|
|
|
+ from user_archives_interview
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--新增所有列-->
|
|
|
+ <insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into user_archives_interview(uid, aid, counts, early_communication, customer_demand, interview_ideas,
|
|
|
+ interview_purpose, interview_recommend, interview_feedback, follow_up_plan)
|
|
|
+ values (#{uid}, #{aid}, #{counts}, #{earlyCommunication}, #{customerDemand}, #{interviewIdeas},
|
|
|
+ #{interviewPurpose}, #{interviewRecommend}, #{interviewFeedback}, #{followUpPlan})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertBatch">
|
|
|
+ insert into user_archives_interview(uid, aid, counts, early_communication, customer_demand, interview_ideas,
|
|
|
+ interview_purpose, interview_recommend, interview_feedback, follow_up_plan)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.uid}, #{entity.aid}, #{entity.counts}, #{entity.earlyCommunication}, #{entity.customerDemand},
|
|
|
+ #{entity.interviewIdeas}, #{entity.interviewPurpose}, #{entity.interviewRecommend},
|
|
|
+ #{entity.interviewFeedback}, #{entity.followUpPlan})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into user_archives_interview(uid, aid, counts, early_communication, customer_demand, interview_ideas,
|
|
|
+ interview_purpose, interview_recommend, interview_feedback, follow_up_plan)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.uid}, #{entity.aid}, #{entity.counts}, #{entity.earlyCommunication}, #{entity.customerDemand},
|
|
|
+ #{entity.interviewIdeas}, #{entity.interviewPurpose}, #{entity.interviewRecommend},
|
|
|
+ #{entity.interviewFeedback}, #{entity.followUpPlan})
|
|
|
+ </foreach>
|
|
|
+ on duplicate key update
|
|
|
+ uid = values(uid),
|
|
|
+ aid = values(aid),
|
|
|
+ counts = values(counts),
|
|
|
+ early_communication = values(early_communication),
|
|
|
+ customer_demand = values(customer_demand),
|
|
|
+ interview_ideas = values(interview_ideas),
|
|
|
+ interview_purpose = values(interview_purpose),
|
|
|
+ interview_recommend = values(interview_recommend),
|
|
|
+ interview_feedback = values(interview_feedback),
|
|
|
+ follow_up_plan = values(follow_up_plan)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!--通过主键修改数据-->
|
|
|
+ <update id="update">
|
|
|
+ update user_archives_interview
|
|
|
+ <set>
|
|
|
+ <if test="uid != null and uid != ''">
|
|
|
+ uid = #{uid},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null and aid != ''">
|
|
|
+ aid = #{aid},
|
|
|
+ </if>
|
|
|
+ <if test="counts != null">
|
|
|
+ counts = #{counts},
|
|
|
+ </if>
|
|
|
+ <if test="earlyCommunication != null and earlyCommunication != ''">
|
|
|
+ early_communication = #{earlyCommunication},
|
|
|
+ </if>
|
|
|
+ <if test="customerDemand != null and customerDemand != ''">
|
|
|
+ customer_demand = #{customerDemand},
|
|
|
+ </if>
|
|
|
+ <if test="interviewIdeas != null and interviewIdeas != ''">
|
|
|
+ interview_ideas = #{interviewIdeas},
|
|
|
+ </if>
|
|
|
+ <if test="interviewPurpose != null and interviewPurpose != ''">
|
|
|
+ interview_purpose = #{interviewPurpose},
|
|
|
+ </if>
|
|
|
+ <if test="interviewRecommend != null and interviewRecommend != ''">
|
|
|
+ interview_recommend = #{interviewRecommend},
|
|
|
+ </if>
|
|
|
+ <if test="interviewFeedback != null and interviewFeedback != ''">
|
|
|
+ interview_feedback = #{interviewFeedback},
|
|
|
+ </if>
|
|
|
+ <if test="followUpPlan != null and followUpPlan != ''">
|
|
|
+ follow_up_plan = #{followUpPlan},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--查询指定行数据-->
|
|
|
+ <select id="findUserArchivesInterviewList" resultMap="UserArchivesInterviewMap">
|
|
|
+ select
|
|
|
+ <include refid="UserArchivesInterviewAllSql"/>
|
|
|
+
|
|
|
+ from user_archives_interview
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="uid != null and uid != ''">
|
|
|
+ and uid = #{uid}
|
|
|
+ </if>
|
|
|
+ <if test="aid != null and aid != ''">
|
|
|
+ and aid = #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="counts != null">
|
|
|
+ and counts = #{counts}
|
|
|
+ </if>
|
|
|
+ <if test="earlyCommunication != null and earlyCommunication != ''">
|
|
|
+ and early_communication = #{earlyCommunication}
|
|
|
+ </if>
|
|
|
+ <if test="customerDemand != null and customerDemand != ''">
|
|
|
+ and customer_demand = #{customerDemand}
|
|
|
+ </if>
|
|
|
+ <if test="interviewIdeas != null and interviewIdeas != ''">
|
|
|
+ and interview_ideas = #{interviewIdeas}
|
|
|
+ </if>
|
|
|
+ <if test="interviewPurpose != null and interviewPurpose != ''">
|
|
|
+ and interview_purpose = #{interviewPurpose}
|
|
|
+ </if>
|
|
|
+ <if test="interviewRecommend != null and interviewRecommend != ''">
|
|
|
+ and interview_recommend = #{interviewRecommend}
|
|
|
+ </if>
|
|
|
+ <if test="interviewFeedback != null and interviewFeedback != ''">
|
|
|
+ and interview_feedback = #{interviewFeedback}
|
|
|
+ </if>
|
|
|
+ <if test="followUpPlan != null and followUpPlan != ''">
|
|
|
+ and follow_up_plan = #{followUpPlan}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--统计总行数-->
|
|
|
+ <select id="findUserArchivesInterviewCount" resultType="java.lang.Integer">
|
|
|
+ select count(1)
|
|
|
+ from user_archives_interview
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="uid != null and uid != ''">
|
|
|
+ and uid = #{uid}
|
|
|
+ </if>
|
|
|
+ <if test="aid != null and aid != ''">
|
|
|
+ and aid = #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="counts != null">
|
|
|
+ and counts = #{counts}
|
|
|
+ </if>
|
|
|
+ <if test="earlyCommunication != null and earlyCommunication != ''">
|
|
|
+ and early_communication = #{earlyCommunication}
|
|
|
+ </if>
|
|
|
+ <if test="customerDemand != null and customerDemand != ''">
|
|
|
+ and customer_demand = #{customerDemand}
|
|
|
+ </if>
|
|
|
+ <if test="interviewIdeas != null and interviewIdeas != ''">
|
|
|
+ and interview_ideas = #{interviewIdeas}
|
|
|
+ </if>
|
|
|
+ <if test="interviewPurpose != null and interviewPurpose != ''">
|
|
|
+ and interview_purpose = #{interviewPurpose}
|
|
|
+ </if>
|
|
|
+ <if test="interviewRecommend != null and interviewRecommend != ''">
|
|
|
+ and interview_recommend = #{interviewRecommend}
|
|
|
+ </if>
|
|
|
+ <if test="interviewFeedback != null and interviewFeedback != ''">
|
|
|
+ and interview_feedback = #{interviewFeedback}
|
|
|
+ </if>
|
|
|
+ <if test="followUpPlan != null and followUpPlan != ''">
|
|
|
+ and follow_up_plan = #{followUpPlan}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--通过主键删除-->
|
|
|
+ <delete id="deleteById">
|
|
|
+ delete
|
|
|
+ from user_archives_interview
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|
|
|
+
|