#
Junjie
11 小时以前 3778e2dd638f53db1ff2b61cbc2ce8a9f9a93f28
#
1个文件已修改
10 ■■■■■ 已修改文件
src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }
}