|
|
@@ -23,7 +23,6 @@ import com.uas.sso.support.SyncFail;
|
|
|
import com.uas.sso.util.AccountTypeUtils;
|
|
|
import com.uas.sso.util.CountUtils;
|
|
|
import com.uas.sso.util.PasswordLevelUtils;
|
|
|
-import net.sf.ehcache.search.aggregator.Count;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
@@ -35,7 +34,6 @@ import org.springframework.util.Assert;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
-import javax.persistence.Version;
|
|
|
import javax.persistence.criteria.*;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.sql.Timestamp;
|
|
|
@@ -670,6 +668,21 @@ public class UserServiceImpl implements UserService {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Long getMaxUUInLastWeek() {
|
|
|
+ Calendar start = Calendar.getInstance();
|
|
|
+ start.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
+ start.set(Calendar.MINUTE, 0);
|
|
|
+ start.set(Calendar.SECOND, 0);
|
|
|
+ start.set(Calendar.MILLISECOND, 0);
|
|
|
+ int dayofweek = start.get(Calendar.DAY_OF_WEEK);
|
|
|
+ if (dayofweek == 1) {
|
|
|
+ dayofweek += 7;
|
|
|
+ }
|
|
|
+ start.add(Calendar.DATE, 2 - dayofweek);
|
|
|
+ return userDao.findMaxUUBefore(start.getTime());
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public long countByRegisterDate(final Calendar start, final Calendar end) {
|
|
|
return userDao.count(new Specification<User>() {
|