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:
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user