Merge branch 'driver' of http://122.51.230.86:3000/dianliang/lanan-system into driver
This commit is contained in:
commit
c11c140c5e
@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
@ -48,9 +49,33 @@ public class ExamBatchServiceImpl extends ServiceImpl<ExamBatchMapper, ExamBatch
|
|||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public IPage<ExamBatchVO> queryListPage(ExamBatchVO pageReqVO, Page<ExamBatchVO> page) {
|
public IPage<ExamBatchVO> queryListPage(ExamBatchVO pageReqVO, Page<ExamBatchVO> page) {
|
||||||
//教练ID
|
if(StringUtils.isEmpty(pageReqVO.getTimeType())){
|
||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
//不是首页过来的,那么代表是教练自己查自己的所有考试记录
|
||||||
pageReqVO.setCoachId(userId);
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
|
pageReqVO.setCoachId(userId);
|
||||||
|
}else {
|
||||||
|
//首页过来的,默认查全部的数据
|
||||||
|
String startTimeStr = "";
|
||||||
|
String endTimeStr = "";
|
||||||
|
if("more".equals(pageReqVO.getTimeType())){
|
||||||
|
if(StringUtils.isNotEmpty(pageReqVO.getStartTimeSearch())){
|
||||||
|
startTimeStr = pageReqVO.getStartTimeSearch()+" 00:00:01";
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(pageReqVO.getEndTimeSearch())) {
|
||||||
|
endTimeStr = pageReqVO.getEndTimeSearch() + " 23:59:59";
|
||||||
|
}
|
||||||
|
}else if("month".equals(pageReqVO.getTimeType())){
|
||||||
|
//当月
|
||||||
|
startTimeStr = DateUtil.format(DateUtil.beginOfMonth(DateUtil.date()),"yyyy-MM-dd")+" 00:00:01";
|
||||||
|
endTimeStr = DateUtil.format(DateUtil.endOfMonth(DateUtil.date()),"yyyy-MM-dd")+" 23:59:59";
|
||||||
|
}else if("day".equals(pageReqVO.getTimeType())){
|
||||||
|
//当天
|
||||||
|
startTimeStr = DateUtil.formatDate(DateUtil.date())+" 00:00:01";
|
||||||
|
endTimeStr = DateUtil.formatDate(DateUtil.date())+" 23:59:59";
|
||||||
|
}
|
||||||
|
pageReqVO.setStartTimeSearch(startTimeStr);
|
||||||
|
pageReqVO.setEndTimeSearch(endTimeStr);
|
||||||
|
}
|
||||||
IPage<ExamBatchVO> rtnList = examBatchMapper.queryListPage(pageReqVO, page);
|
IPage<ExamBatchVO> rtnList = examBatchMapper.queryListPage(pageReqVO, page);
|
||||||
return rtnList;
|
return rtnList;
|
||||||
}
|
}
|
||||||
|
@ -15,4 +15,17 @@ public class ExamBatchVO extends ExamBatch {
|
|||||||
* 学员姓名
|
* 学员姓名
|
||||||
*/
|
*/
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间查询类型(all-全部|day-当日|month-当月|more-自定义)
|
||||||
|
*/
|
||||||
|
private String timeType;
|
||||||
|
/**
|
||||||
|
* 查询时间区间-开始
|
||||||
|
*/
|
||||||
|
private String startTimeSearch;
|
||||||
|
/**
|
||||||
|
* 查询时间区间-结束
|
||||||
|
*/
|
||||||
|
private String endTimeSearch;
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
<if test="entity.subject != null and entity.subject != ''">
|
<if test="entity.subject != null and entity.subject != ''">
|
||||||
and dseb.subject =#{entity.subject}
|
and dseb.subject =#{entity.subject}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="entity.startTimeSearch!=null and entity.startTimeSearch!=''">
|
||||||
|
AND dseb.start_time >= #{entity.startTimeSearch}
|
||||||
|
</if>
|
||||||
|
<if test="entity.endTimeSearch!=null and entity.endTimeSearch!=''">
|
||||||
|
AND dseb.start_time <= #{entity.endTimeSearch}
|
||||||
|
</if>
|
||||||
ORDER BY dseb.create_time DESC
|
ORDER BY dseb.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user