#
Junjie
1 天以前 c61293fa498f17973a3bd72b58b8c2992863144c
src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java
@@ -7,6 +7,8 @@
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 {
@@ -17,4 +19,12 @@
    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);
    }
}