package com.zy.system.service.impl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.zy.system.entity.UserLogin;
|
import com.zy.system.mapper.UserLoginMapper;
|
import com.zy.system.service.UserLoginService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.Date;
|
|
@Service("userLoginService")
|
public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin> implements UserLoginService {
|
|
@Autowired
|
private UserLoginMapper userLoginMapper;
|
|
@Override
|
public int selectCountByCurrentWeek() {
|
return userLoginMapper.selectCountByCurrentWeek();
|
}
|
|
@Override
|
public boolean save(UserLogin entity) {
|
if (entity != null && entity.getId() == null && entity.getCreateTime() == null) {
|
entity.setCreateTime(new Date());
|
}
|
return super.save(entity);
|
}
|
}
|