SysLoginLogServiceImpl.java
1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.zteits.sys.biz;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
import com.zteits.clouds.api.apibase.bean.BizResult;
import com.zteits.clouds.api.apibase.bean.PageBean;
import com.zteits.clouds.api.dto.sys.SysLoginLogDTO;
import com.zteits.clouds.api.dto.sys.param.SaveLoginLogRequest;
import com.zteits.clouds.api.dto.sys.param.SysLoginLogQueryRequest;
import com.zteits.clouds.api.service.sys.SysLoginLogService;
import com.zteits.sys.dao.SysLoginLogDao;
import com.zteits.sys.domain.SysLoginLog;
import com.zteits.sys.pagepaper.PageBeanUtil;
@Component("com.zteits.sys.biz.SysLoginLogServiceImpl")
public class SysLoginLogServiceImpl implements SysLoginLogService {
@Autowired
private SysLoginLogDao sysLoginLogDao;
@Override
public BizResult<Boolean> saveLoginLog(SaveLoginLogRequest request) {
SysLoginLog record = new SysLoginLog();
BeanUtils.copyProperties(request, record);
sysLoginLogDao.saveLoginLog(record );
return new BizResult<Boolean>(true);
}
@Override
public BizResult<PageBean<SysLoginLogDTO>> pageQuerySysLoginLog(SysLoginLogQueryRequest request) {
PageInfo<SysLoginLog> pageInfo = sysLoginLogDao.pageQuerySysLoginLog(request);
PageBean<SysLoginLogDTO> pageBean = new PageBean<>();
PageBeanUtil.copyProperties(pageInfo, pageBean, SysLoginLogDTO.class);
return new BizResult<PageBean<SysLoginLogDTO>>(pageBean);
}
}