我的测评
This commit is contained in:
parent
ed50d0d3a2
commit
d58912b75e
|
@ -47,7 +47,7 @@ public class WxMyController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/evaluation/task/pageList")
|
@GetMapping("/evaluation/task/pageList")
|
||||||
public TableDataInfo<SysEvaluationRecordVo> taskList(PageQuery pageQuery) {
|
public TableDataInfo<SysEvaluationRecordVo> taskList(PageQuery pageQuery) {
|
||||||
return myService.queryPersonalEvaluationRecordPageList(pageQuery);
|
return myService.queryPersonalTaskPageList(pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,4 +73,12 @@ public class WxMyController extends BaseController {
|
||||||
public TableDataInfo<SysEvaluationRecordVo> publishList(PageQuery pageQuery) {
|
public TableDataInfo<SysEvaluationRecordVo> publishList(PageQuery pageQuery) {
|
||||||
return myService.queryPublishEvaluationRecordPageList(pageQuery);
|
return myService.queryPublishEvaluationRecordPageList(pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我的测评
|
||||||
|
*/
|
||||||
|
@GetMapping("/evaluation/Personal/pageList")
|
||||||
|
public TableDataInfo<SysEvaluationRecordVo> personalList(PageQuery pageQuery) {
|
||||||
|
return myService.queryPersonalEvaluationRecordPageList(pageQuery);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ public interface IMyService {
|
||||||
|
|
||||||
List<StatisticNumVo> getMyNum();
|
List<StatisticNumVo> getMyNum();
|
||||||
|
|
||||||
|
TableDataInfo<SysEvaluationRecordVo> queryPersonalTaskPageList(PageQuery pageQuery);
|
||||||
TableDataInfo<SysEvaluationRecordVo> queryPersonalEvaluationRecordPageList(PageQuery pageQuery);
|
TableDataInfo<SysEvaluationRecordVo> queryPersonalEvaluationRecordPageList(PageQuery pageQuery);
|
||||||
TableDataInfo<SysEvaluationRecordVo> queryPublishEvaluationRecordPageList(PageQuery pageQuery);
|
TableDataInfo<SysEvaluationRecordVo> queryPublishEvaluationRecordPageList(PageQuery pageQuery);
|
||||||
|
|
||||||
|
|
|
@ -69,16 +69,38 @@ public class MyServiceImpl implements IMyService {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<SysEvaluationRecordVo> queryPersonalTaskPageList(PageQuery pageQuery) {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
LambdaQueryWrapper<SysEvaluationRecord> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(SysEvaluationRecord::getUserId, userId);
|
||||||
|
//根据flag查询个人或发布
|
||||||
|
lqw.eq(SysEvaluationRecord::getPublishFlag, 0);
|
||||||
|
lqw.eq(SysEvaluationRecord::getStatus, 0);
|
||||||
|
lqw.orderByDesc(SysEvaluationRecord::getCreateTime);
|
||||||
|
return queryEvaluationRecordPageList(lqw, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<SysEvaluationRecordVo> queryPersonalEvaluationRecordPageList(PageQuery pageQuery) {
|
public TableDataInfo<SysEvaluationRecordVo> queryPersonalEvaluationRecordPageList(PageQuery pageQuery) {
|
||||||
Long userId = LoginHelper.getUserId();
|
Long userId = LoginHelper.getUserId();
|
||||||
return queryEvaluationRecordPageList(userId, 0, pageQuery);
|
LambdaQueryWrapper<SysEvaluationRecord> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(SysEvaluationRecord::getUserId, userId);
|
||||||
|
//根据flag查询个人或发布
|
||||||
|
lqw.eq(SysEvaluationRecord::getPublishFlag, 0);
|
||||||
|
lqw.orderByDesc(SysEvaluationRecord::getCreateTime);
|
||||||
|
return queryEvaluationRecordPageList(lqw, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<SysEvaluationRecordVo> queryPublishEvaluationRecordPageList(PageQuery pageQuery) {
|
public TableDataInfo<SysEvaluationRecordVo> queryPublishEvaluationRecordPageList(PageQuery pageQuery) {
|
||||||
Long userId = LoginHelper.getUserId();
|
Long userId = LoginHelper.getUserId();
|
||||||
return queryEvaluationRecordPageList(userId, 1, pageQuery);
|
LambdaQueryWrapper<SysEvaluationRecord> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(SysEvaluationRecord::getUserId, userId);
|
||||||
|
//根据flag查询个人或发布
|
||||||
|
lqw.eq(SysEvaluationRecord::getPublishFlag, 1);
|
||||||
|
lqw.orderByDesc(SysEvaluationRecord::getCreateTime);
|
||||||
|
return queryEvaluationRecordPageList(lqw, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -98,12 +120,7 @@ public class MyServiceImpl implements IMyService {
|
||||||
return TableDataInfo.build(page);
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TableDataInfo<SysEvaluationRecordVo> queryEvaluationRecordPageList(Long userId, int flag, PageQuery pageQuery) {
|
private TableDataInfo<SysEvaluationRecordVo> queryEvaluationRecordPageList(LambdaQueryWrapper<SysEvaluationRecord> lqw, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<SysEvaluationRecord> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.eq(SysEvaluationRecord::getUserId, userId);
|
|
||||||
//根据flag查询个人或发布
|
|
||||||
lqw.eq(SysEvaluationRecord::getPublishFlag, flag);
|
|
||||||
lqw.orderByDesc(SysEvaluationRecord::getCreateTime);
|
|
||||||
Page<SysEvaluationRecordVo> result = evaluationRecordMapper.selectRecordVoPage(pageQuery.build(), lqw);
|
Page<SysEvaluationRecordVo> result = evaluationRecordMapper.selectRecordVoPage(pageQuery.build(), lqw);
|
||||||
List<SysEvaluationRecordVo> records = result.getRecords();
|
List<SysEvaluationRecordVo> records = result.getRecords();
|
||||||
for (SysEvaluationRecordVo record : records) {
|
for (SysEvaluationRecordVo record : records) {
|
||||||
|
|
Loading…
Reference in New Issue