| | |
| | | package com.ots.project.exam.service.impl; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ots.project.exam.domain.UserEventLog; |
| | |
| | | import com.ots.project.tool.exam.DateTimeUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class UserEventLogServiceImpl extends BaseServiceImpl<UserEventLog> implements UserEventLogService { |
| | | |
| | | @Autowired |
| | | private UserEventLogMapper userEventLogMapper; |
| | | |
| | | @Autowired |
| | | public UserEventLogServiceImpl(UserEventLogMapper userEventLogMapper) { |
| | | super(userEventLogMapper); |
| | | this.userEventLogMapper = userEventLogMapper; |
| | | } |
| | | |
| | | @Override |
| | | public List<UserEventLog> getUserEventLogByUserId(Integer id) { |
| | | return userEventLogMapper.getUserEventLogByUserId(id); |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<UserEventLog> page(UserEventPageRequestVM requestVM) { |
| | | return PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize(), "id desc").doSelectPageInfo(() -> |
| | | userEventLogMapper.page(requestVM) |
| | | ); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Integer> selectMothCount() { |
| | | Date startTime = DateTimeUtil.getMonthStartDay(); |
| | |
| | | return null == keyValue ? 0 : keyValue.getValue(); |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | |
| | | } |