mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
Add employee name suffixes to work item information. Add password modification function.
This commit is contained in:
@@ -12,10 +12,15 @@
|
||||
<result property="status" column="status"/>
|
||||
<result property="completeTime" column="complete_time"/>
|
||||
</collection>
|
||||
<collection property="worker" ofType="user">
|
||||
<id property="id" column="worker_id"/>
|
||||
<result property="username" column="worker_name"/>
|
||||
</collection>
|
||||
<collection property="worker" resultMap="workerMap"/>
|
||||
</resultMap>
|
||||
<resultMap id="workerMap" type="user">
|
||||
<id property="id" column="worker_id"/>
|
||||
<result property="username" column="worker_name"/>
|
||||
<association property="staff" javaType="staff">
|
||||
<result property="firstName" column="first_name"/>
|
||||
<result property="lastName" column="last_name"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
<select id="getAll" resultMap="workMap">
|
||||
select w.id,
|
||||
@@ -27,12 +32,16 @@
|
||||
tuw.user_id worker_id,
|
||||
tu.username worker_name,
|
||||
tuw.status status,
|
||||
tuw.complete_time complete_time
|
||||
tuw.complete_time complete_time,
|
||||
first_name,
|
||||
last_name
|
||||
from t_work w
|
||||
left join (select * from t_user where deleted = 0) as u on w.publisher_id = u.id
|
||||
left join (select * from t_user_work where deleted = 0) as tuw on w.id = tuw.work_id
|
||||
left join (select * from t_user where deleted = 0) as tu on tuw.user_id = tu.id
|
||||
left join (select * from t_staff where deleted = 0) as ts on tuw.user_id = ts.user_id
|
||||
where w.deleted = 0
|
||||
and w.old = 0
|
||||
order by w.id desc;
|
||||
</select>
|
||||
<select id="getWork" parameterType="long" resultMap="workMap">
|
||||
@@ -45,13 +54,17 @@
|
||||
tuw.user_id worker_id,
|
||||
tu.username worker_name,
|
||||
tuw.status status,
|
||||
tuw.complete_time completeTime
|
||||
tuw.complete_time completeTime,
|
||||
first_name,
|
||||
last_name
|
||||
from t_work w
|
||||
left join (select * from t_user where deleted = 0) as u on w.publisher_id = u.id
|
||||
left join (select * from t_user_work where deleted = 0) as tuw on w.id = tuw.work_id
|
||||
left join (select * from t_user where deleted = 0) as tu on tuw.user_id = tu.id
|
||||
left join (select * from t_staff where deleted = 0) as ts on tuw.user_id = ts.user_id
|
||||
where w.id = #{id}
|
||||
and w.deleted = 0;
|
||||
and w.deleted = 0
|
||||
and w.old = 0;
|
||||
</select>
|
||||
<select id="getWorkByContent" parameterType="String" resultMap="workMap">
|
||||
select w.id,
|
||||
@@ -69,7 +82,8 @@
|
||||
left join (select * from t_user_work where deleted = 0) as tuw on w.id = tuw.work_id
|
||||
left join (select * from t_user where deleted = 0) as tu on tuw.user_id = tu.id
|
||||
where w.content like '%${content}%'
|
||||
and w.deleted = 0;
|
||||
and w.deleted = 0
|
||||
and w.old = 0;
|
||||
</select>
|
||||
<select id="getTodo" parameterType="long" resultMap="workMap">
|
||||
select w.id,
|
||||
@@ -89,6 +103,7 @@
|
||||
tuw.user_id = #{userId}
|
||||
and status = false
|
||||
and w.deleted = 0
|
||||
and w.old = 0
|
||||
order by w.deadline asc, w.id desc;
|
||||
</select>
|
||||
<select id="getCard" parameterType="long" resultMap="workMap">
|
||||
@@ -108,6 +123,7 @@
|
||||
where tuw.user_id = #{userId}
|
||||
and status = false
|
||||
and w.deleted = 0
|
||||
and w.old = 0
|
||||
order by w.deadline asc, w.id desc
|
||||
limit 5;
|
||||
|
||||
@@ -130,6 +146,7 @@
|
||||
where tuw.user_id = #{userId}
|
||||
and tuw.status = true
|
||||
and w.deleted = 0
|
||||
and w.old = 0
|
||||
order by w.id desc;
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user