1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

Modifying search function bugs in work management

This commit is contained in:
ggb
2023-06-08 18:34:35 +08:00
parent 8b51888ad8
commit cfa67cf608
4 changed files with 23 additions and 13 deletions

View File

@@ -31,10 +31,13 @@ public class WorkController {
@GetMapping
@PreAuthorize("hasAuthority('work:manage:get')")
public ResponseResult<List<Work>> getAll(String content) {
if (content != null) {
System.out.println(content);
if (content != null && content.length() != 0) {
System.out.println("test1");
List<Work> workList = workService.getWorkByContent(content);
return ResponseResult.databaseSelectSuccess(workList);
} else {
System.out.println("test2");
return ResponseResult.databaseSelectSuccess(workService.getAll());
}
}

View File

@@ -18,7 +18,3 @@ mybatis-plus:
type-aliases-package: com.cfive.pinnacle.entity
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
logging:
level:
root: debug

View File

@@ -76,14 +76,18 @@
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.content like '%${content}%'
and w.deleted = 0
and w.old = 0;
and w.old = 0
order by w.id desc;
</select>
<select id="getTodo" parameterType="long" resultMap="workMap">
select w.id,