1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 23:11:24 +08:00

temp 2023/5/5

This commit is contained in:
GGB
2023-05-05 18:25:33 +08:00
parent 41b6c77509
commit 24318d36b7
13 changed files with 199 additions and 84 deletions

View File

@@ -18,7 +18,7 @@ public interface IWorkService extends IService<Work> {
List<Work> getAll();
List<Work> getTodo(Long userId);
List<Work> getComplete(Long userId);
Work getOne(Long workId);
double getProgress(Long workId);
String getUserName(Long userId);

View File

@@ -62,6 +62,14 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, Work> implements IW
return workList;
}
@Override
public Work getOne(Long workId) {
Work work = workMapper.getWork(workId);
work.setProgress(getProgress(workId));
work.setPublisherName(getUserName(work.getPublisherId()));
return work;
}
@Override
public double getProgress(Long workId) {
double workNum = userWorkMapper.selectCount(new QueryWrapper<UserWork>().eq("work_id",workId));