|
|
@@ -14,26 +14,27 @@
|
|
|
<result column="duration" jdbcType="DOUBLE" property="duration" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, pid, aid, `name`, project_status, content, annex_url, create_time, process_status,
|
|
|
+ id, pid, aid, `name`, project_status, content, annex_url, create_time, process_status,
|
|
|
duration
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from project_staff_record
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
+
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
delete from project_staff_record
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
|
|
|
- insert into project_staff_record (pid, aid, `name`,
|
|
|
- project_status, content, annex_url,
|
|
|
+ insert into project_staff_record (pid, aid, `name`,
|
|
|
+ project_status, content, annex_url,
|
|
|
create_time, process_status, duration
|
|
|
)
|
|
|
- values (#{pid,jdbcType=BIGINT}, #{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
|
|
- #{projectStatus,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
|
|
|
+ values (#{pid,jdbcType=BIGINT}, #{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
|
|
+ #{projectStatus,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{processStatus,jdbcType=INTEGER}, #{duration,jdbcType=DOUBLE}
|
|
|
)
|
|
|
</insert>
|
|
|
@@ -144,4 +145,17 @@
|
|
|
duration = #{duration,jdbcType=DOUBLE}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
-</mapper>
|
|
|
+ <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">
|
|
|
+ select a.id,a.pid ,a.aid ,a.name ,a.project_status projectStatus,a.content ,
|
|
|
+ a.annex_url annexUrl,a.create_time createTime,a.process_status processStatus ,
|
|
|
+ a.duration
|
|
|
+ from project_staff_record a left join project_task b on a.pid=b.id
|
|
|
+ where 1=1
|
|
|
+ <if test="roleId==2">
|
|
|
+ and a.aid =#{aid}
|
|
|
+ </if>
|
|
|
+ <if test="roleId==3">
|
|
|
+ and b.aid =#{aid}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|