对比新文件 |
| | |
| | | package com.flow.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.flow.mapper.DuanxinlogMapper; |
| | | import com.flow.mapper.OperationLogMapper; |
| | | import com.flow.pojo.Duanxinlog; |
| | | import com.flow.pojo.OperationLog; |
| | | import com.flow.service.DuanxinlogService; |
| | | import com.flow.service.OperationLogService; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, OperationLog> implements OperationLogService { |
| | | |
| | | @Autowired |
| | | OperationLogMapper operationLogMapper; |
| | | @Override |
| | | public PageInfo<OperationLog> FindOperationLog(Integer page, Integer limit) { |
| | | PageHelper.startPage(page, limit); |
| | | List<OperationLog> cardList = this.operationLogMapper.FindOperationLog(); |
| | | PageInfo<OperationLog> info = new PageInfo(cardList); |
| | | return info; |
| | | } |
| | | |
| | | public int addOperationLog(OperationLog operationLog) { |
| | | Date date = new Date(); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | operationLog.setCaozuodate(formatter.format(date)); |
| | | return ((OperationLogMapper)this.baseMapper).insert(operationLog); |
| | | } |
| | | |
| | | } |