|
@@ -9,12 +9,13 @@
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
<result column="admin_name" jdbcType="VARCHAR" property="adminName" />
|
|
<result column="admin_name" jdbcType="VARCHAR" property="adminName" />
|
|
|
|
|
+ <result column="staff_name" jdbcType="VARCHAR" property="staffName" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
|
- id, aid, `name`, project_status, create_time, remark, admin_name
|
|
|
|
|
|
|
+ id, aid, `name`, project_status, create_time, remark, admin_name, staff_name
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
|
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
<include refid="Base_Column_List" />
|
|
|
from project_task
|
|
from project_task
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
@@ -24,12 +25,12 @@
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</delete>
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectTask" useGeneratedKeys="true">
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectTask" useGeneratedKeys="true">
|
|
|
- insert into project_task (aid, `name`, project_status,
|
|
|
|
|
- create_time, remark, admin_name
|
|
|
|
|
- )
|
|
|
|
|
- values (#{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
|
|
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{adminName,jdbcType=VARCHAR}
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ insert into project_task (aid, `name`, project_status,
|
|
|
|
|
+ create_time, remark, admin_name,
|
|
|
|
|
+ staff_name)
|
|
|
|
|
+ values (#{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{adminName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{staffName,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectTask" useGeneratedKeys="true">
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectTask" useGeneratedKeys="true">
|
|
|
insert into project_task
|
|
insert into project_task
|
|
@@ -52,6 +53,9 @@
|
|
|
<if test="adminName != null">
|
|
<if test="adminName != null">
|
|
|
admin_name,
|
|
admin_name,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="staffName != null">
|
|
|
|
|
+ staff_name,
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="aid != null">
|
|
<if test="aid != null">
|
|
@@ -72,6 +76,9 @@
|
|
|
<if test="adminName != null">
|
|
<if test="adminName != null">
|
|
|
#{adminName,jdbcType=VARCHAR},
|
|
#{adminName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="staffName != null">
|
|
|
|
|
+ #{staffName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectTask">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectTask">
|
|
@@ -95,6 +102,9 @@
|
|
|
<if test="adminName != null">
|
|
<if test="adminName != null">
|
|
|
admin_name = #{adminName,jdbcType=VARCHAR},
|
|
admin_name = #{adminName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="staffName != null">
|
|
|
|
|
+ staff_name = #{staffName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
</update>
|
|
@@ -105,7 +115,13 @@
|
|
|
project_status = #{projectStatus,jdbcType=INTEGER},
|
|
project_status = #{projectStatus,jdbcType=INTEGER},
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
- admin_name = #{adminName,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ admin_name = #{adminName,jdbcType=VARCHAR},
|
|
|
|
|
+ staff_name = #{staffName,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
</update>
|
|
|
-</mapper>
|
|
|
|
|
|
|
+ <update id="updateStaffName">
|
|
|
|
|
+ update project_task a left join (select pid ,group_concat(name)name from project_staff
|
|
|
|
|
+ where pid = #{pid} group by pid) b on a.id=b.pid set a.staff_name =b.name
|
|
|
|
|
+ where a.id = #{pid}
|
|
|
|
|
+ </update>
|
|
|
|
|
+</mapper>
|