File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
java/io/github/talelin/latticy Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 3
3
import lombok .Data ;
4
4
5
5
import javax .validation .constraints .Min ;
6
+ import javax .validation .constraints .NotEmpty ;
6
7
import java .util .List ;
7
8
8
9
/**
12
13
@ Data
13
14
public class UpdateUserInfoDTO {
14
15
16
+ @ NotEmpty (message = "{group.ids.not-empty}" )
15
17
private List <@ Min (1 ) Integer > groupIds ;
18
+
16
19
}
Original file line number Diff line number Diff line change @@ -93,9 +93,6 @@ public boolean deleteUser(Integer id) {
93
93
@ Override
94
94
public boolean updateUserInfo (Integer id , UpdateUserInfoDTO validator ) {
95
95
List <Integer > newGroupIds = validator .getGroupIds ();
96
- if (newGroupIds == null || newGroupIds .isEmpty ()) {
97
- return false ;
98
- }
99
96
Integer rootGroupId = groupService .getParticularGroupIdByLevel (GroupLevelEnum .ROOT );
100
97
boolean anyMatch = newGroupIds .stream ().anyMatch (it -> it .equals (rootGroupId ));
101
98
if (anyMatch ) {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ page.number.min=\u5206\u9875\u9875\u7801\u5FC5\u987B\u4E3A\u6B63\u6574\u6570
7
7
group.id.positive =\u5206\u7EC4 id\u5FC5\u987B\u4E3A\u6B63\u6574\u6570
8
8
group.id.not-null =\u5206\u7EC4 id\u4E0D\u53EF\u4E3A\u7A7A
9
9
group.ids.long-list =\u5206\u7EC4 id\u6BCF\u4E00\u9879\u5FC5\u987B\u4E3A\u6B63\u6574\u6570
10
+ group.ids.not-empty =\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5206\u7EC4
10
11
group.name.not-blank =\u8BF7\u8F93\u5165\u5206\u7EC4\u540D\u79F0
11
12
group.name.length =\u5206\u7EC4\u540D\u79F0\u4E0D\u53EF\u8D85\u8FC7 60\u5B57\u7B26
12
13
group.info.length =\u5206\u7EC4\u63CF\u8FF0\u4E0D\u53EF\u8D85\u8FC7 255\u5B57\u7B26
You can’t perform that action at this time.
0 commit comments