mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-06 07:21:24 +08:00
Add fuzzy query function in work items
This commit is contained in:
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -71,6 +72,17 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, Work> implements IW
|
||||
return work;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Work> getWorkByContent(String content) {
|
||||
List<Work> workList = workMapper.getWorkByContent(content);
|
||||
for (Work work:
|
||||
workList) {
|
||||
work.setProgress(getProgress(work.getId()));
|
||||
work.setPublisherName(getUserName(work.getPublisherId()));
|
||||
}
|
||||
return workList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getProgress(Long workId) {
|
||||
double workNum = userWorkMapper.selectCount(new QueryWrapper<UserWork>().eq("work_id",workId));
|
||||
|
||||
Reference in New Issue
Block a user