修改部分 jsr305 注解的使用。

main
ZhouXY108 2023-04-16 00:08:04 +08:00
parent 19fc97362c
commit 8460b9da29
4 changed files with 3 additions and 5 deletions

View File

@ -24,12 +24,10 @@ public final class EntityStatus extends Enumeration<EntityStatus> {
private static final ValueSet<EntityStatus> VALUE_SET = new ValueSet<>( private static final ValueSet<EntityStatus> VALUE_SET = new ValueSet<>(
AVAILABLE, DISABLED); AVAILABLE, DISABLED);
@Nonnull
public static EntityStatus of(int id) { public static EntityStatus of(int id) {
return VALUE_SET.get(id); return VALUE_SET.get(id);
} }
@Nonnull
public static Collection<EntityStatus> constants() { public static Collection<EntityStatus> constants() {
return VALUE_SET.getValues(); return VALUE_SET.getValues();
} }

View File

@ -2,6 +2,8 @@ package xyz.zhouxy.plusone.system.application.query;
import java.util.List; import java.util.List;
import javax.annotation.Nonnull;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import xyz.zhouxy.plusone.commons.util.PageDTO; import xyz.zhouxy.plusone.commons.util.PageDTO;
@ -23,6 +25,7 @@ public interface AccountQueries {
return PageDTO.of(content, total); return PageDTO.of(content, total);
} }
@Nonnull
List<AccountOverview> queryAccountOverview(AccountQueryParams queryParams); List<AccountOverview> queryAccountOverview(AccountQueryParams queryParams);
long count(AccountQueryParams queryParams); long count(AccountQueryParams queryParams);

View File

@ -31,7 +31,6 @@ public final class AccountStatus extends Enumeration<AccountStatus> implements I
return VALUE_SET.get(id); return VALUE_SET.get(id);
} }
@Nonnull
public static Collection<AccountStatus> constants() { public static Collection<AccountStatus> constants() {
return VALUE_SET.getValues(); return VALUE_SET.getValues();
} }

View File

@ -26,12 +26,10 @@ public final class Sex extends Enumeration<Sex> implements IValueObject {
private static final ValueSet<Sex> VALUE_SET = new ValueSet<>(UNSET, MALE, FEMALE); private static final ValueSet<Sex> VALUE_SET = new ValueSet<>(UNSET, MALE, FEMALE);
@Nonnull
public static Sex of(int value) { public static Sex of(int value) {
return VALUE_SET.get(value); return VALUE_SET.get(value);
} }
@Nonnull
public static Collection<Sex> constants() { public static Collection<Sex> constants() {
return VALUE_SET.getValues(); return VALUE_SET.getValues();
} }