|
|
@@ -0,0 +1,181 @@
|
|
|
+<?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.TaskScoreMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.goafanti.common.model.TaskScore" id="TaskScoreMap">
|
|
|
+ <result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="tid" column="tid" jdbcType="INTEGER"/>
|
|
|
+ <result property="professionalism" column="professionalism" jdbcType="INTEGER"/>
|
|
|
+ <result property="communicationSkills" column="communication_skills" jdbcType="INTEGER"/>
|
|
|
+ <result property="responsiveness" column="responsiveness" jdbcType="INTEGER"/>
|
|
|
+ <result property="publicImage" column="public_image" jdbcType="INTEGER"/>
|
|
|
+ <result property="serviceAttitude" column="service_attitude" jdbcType="INTEGER"/>
|
|
|
+ <result property="monthlyReport" column="monthly_report" jdbcType="INTEGER"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="TaskScoreAllSql">
|
|
|
+ id, tid, professionalism, communication_skills, responsiveness, public_image, service_attitude, monthly_report, create_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!--查询单个-->
|
|
|
+ <select id="queryById" resultMap="TaskScoreMap">
|
|
|
+ select
|
|
|
+ <include refid="TaskScoreAllSql"/>
|
|
|
+ from task_score
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--查询指定行数据-->
|
|
|
+ <select id="findTaskScoreList" resultMap="TaskScoreMap">
|
|
|
+ select
|
|
|
+ <include refid="TaskScoreAllSql"/>
|
|
|
+
|
|
|
+ from task_score
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="tid != null">
|
|
|
+ and tid = #{tid}
|
|
|
+ </if>
|
|
|
+ <if test="professionalism != null">
|
|
|
+ and professionalism = #{professionalism}
|
|
|
+ </if>
|
|
|
+ <if test="communicationSkills != null">
|
|
|
+ and communication_skills = #{communicationSkills}
|
|
|
+ </if>
|
|
|
+ <if test="responsiveness != null">
|
|
|
+ and responsiveness = #{responsiveness}
|
|
|
+ </if>
|
|
|
+ <if test="publicImage != null">
|
|
|
+ and public_image = #{publicImage}
|
|
|
+ </if>
|
|
|
+ <if test="serviceAttitude != null">
|
|
|
+ and service_attitude = #{serviceAttitude}
|
|
|
+ </if>
|
|
|
+ <if test="monthlyReport != null">
|
|
|
+ and monthly_report = #{monthlyReport}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--统计总行数-->
|
|
|
+ <select id="findTaskScoreCount" resultType="java.lang.Integer">
|
|
|
+ select count(1)
|
|
|
+ from task_score
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="tid != null">
|
|
|
+ and tid = #{tid}
|
|
|
+ </if>
|
|
|
+ <if test="professionalism != null">
|
|
|
+ and professionalism = #{professionalism}
|
|
|
+ </if>
|
|
|
+ <if test="communicationSkills != null">
|
|
|
+ and communication_skills = #{communicationSkills}
|
|
|
+ </if>
|
|
|
+ <if test="responsiveness != null">
|
|
|
+ and responsiveness = #{responsiveness}
|
|
|
+ </if>
|
|
|
+ <if test="publicImage != null">
|
|
|
+ and public_image = #{publicImage}
|
|
|
+ </if>
|
|
|
+ <if test="serviceAttitude != null">
|
|
|
+ and service_attitude = #{serviceAttitude}
|
|
|
+ </if>
|
|
|
+ <if test="monthlyReport != null">
|
|
|
+ and monthly_report = #{monthlyReport}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--新增所有列-->
|
|
|
+ <insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into task_score(tid, professionalism, communication_skills, responsiveness, public_image,
|
|
|
+ service_attitude, monthly_report, create_time)
|
|
|
+ values (#{tid}, #{professionalism}, #{communicationSkills}, #{responsiveness}, #{publicImage},
|
|
|
+ #{serviceAttitude}, #{monthlyReport}, #{createTime})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertBatch">
|
|
|
+ insert into task_score(tid, professionalism, communication_skills, responsiveness, public_image,
|
|
|
+ service_attitude, monthly_report, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.tid}, #{entity.professionalism}, #{entity.communicationSkills}, #{entity.responsiveness},
|
|
|
+ #{entity.publicImage}, #{entity.serviceAttitude}, #{entity.monthlyReport}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into task_score(tid, professionalism, communication_skills, responsiveness, public_image,
|
|
|
+ service_attitude, monthly_report, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.tid}, #{entity.professionalism}, #{entity.communicationSkills}, #{entity.responsiveness},
|
|
|
+ #{entity.publicImage}, #{entity.serviceAttitude}, #{entity.monthlyReport}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ on duplicate key update
|
|
|
+ tid = values(tid),
|
|
|
+ professionalism = values(professionalism),
|
|
|
+ communication_skills = values(communication_skills),
|
|
|
+ responsiveness = values(responsiveness),
|
|
|
+ public_image = values(public_image),
|
|
|
+ service_attitude = values(service_attitude),
|
|
|
+ monthly_report = values(monthly_report),
|
|
|
+ create_time = values(create_time)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!--通过主键修改数据-->
|
|
|
+ <update id="update">
|
|
|
+ update task_score
|
|
|
+ <set>
|
|
|
+ <if test="tid != null">
|
|
|
+ tid = #{tid},
|
|
|
+ </if>
|
|
|
+ <if test="professionalism != null">
|
|
|
+ professionalism = #{professionalism},
|
|
|
+ </if>
|
|
|
+ <if test="communicationSkills != null">
|
|
|
+ communication_skills = #{communicationSkills},
|
|
|
+ </if>
|
|
|
+ <if test="responsiveness != null">
|
|
|
+ responsiveness = #{responsiveness},
|
|
|
+ </if>
|
|
|
+ <if test="publicImage != null">
|
|
|
+ public_image = #{publicImage},
|
|
|
+ </if>
|
|
|
+ <if test="serviceAttitude != null">
|
|
|
+ service_attitude = #{serviceAttitude},
|
|
|
+ </if>
|
|
|
+ <if test="monthlyReport != null">
|
|
|
+ monthly_report = #{monthlyReport},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--通过主键删除-->
|
|
|
+ <delete id="deleteById">
|
|
|
+ delete
|
|
|
+ from task_score
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|
|
|
+
|