| | |
| | | package com.ots.project.exam.service.impl; |
| | | |
| | | import com.ots.common.enums.OpertypeEnum; |
| | | import com.ots.common.utils.DateUtils; |
| | | import com.ots.common.utils.text.Convert; |
| | |
| | | import com.ots.project.exam.service.IEntOperLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 使用次数操作记录Service业务层处理 |
| | | * |
| | | * @author ots |
| | | * @date 2020-01-19 |
| | | */ |
| | | @Service |
| | | public class EntOperLogServiceImpl implements IEntOperLogService { |
| | | @Autowired |
| | | private EntOperLogMapper entOperLogMapper; |
| | | |
| | | |
| | | /** |
| | | * 查询使用次数操作记录 |
| | | * |
| | | * @param logId 使用次数操作记录ID |
| | | * @return 使用次数操作记录 |
| | | */ |
| | | @Override |
| | | public EntOperLog selectEntOperLogById(Long logId) { |
| | | return entOperLogMapper.selectEntOperLogById(logId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询使用次数操作记录列表 |
| | | * |
| | | * @param entOperLog 使用次数操作记录 |
| | | * @return 使用次数操作记录 |
| | | */ |
| | | @Override |
| | | public List<EntOperLog> selectEntOperLogList(EntOperLog entOperLog) { |
| | | return entOperLogMapper.selectEntOperLogList(entOperLog); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增使用次数操作记录 |
| | | * |
| | | * @param entOperLog 使用次数操作记录 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertEntOperLog(EntOperLog entOperLog) { |
| | | entOperLog.setCreateTime(DateUtils.getNowDate()); |
| | | return entOperLogMapper.insertEntOperLog(entOperLog); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改使用次数操作记录 |
| | | * |
| | | * @param entOperLog 使用次数操作记录 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateEntOperLog(EntOperLog entOperLog) { |
| | | entOperLog.setUpdateTime(DateUtils.getNowDate()); |
| | | return entOperLogMapper.updateEntOperLog(entOperLog); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除使用次数操作记录对象 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteEntOperLogByIds(String ids) { |
| | | return entOperLogMapper.deleteEntOperLogByIds(Convert.toStrArray(ids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除使用次数操作记录信息 |
| | | * |
| | | * @param logId 使用次数操作记录ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEntOperLogById(Long logId) { |
| | | return entOperLogMapper.deleteEntOperLogById(logId); |
| | | } |
| | | |
| | | @Override |
| | | public void saveLog(Long userId, String createUserId, OpertypeEnum opertypeEnum, Long addNum) { |
| | | EntOperLog entOperLog = new EntOperLog(); |