|
@@ -245,26 +245,26 @@ public class MemberApiController {
|
|
|
String newHobbyId = "";
|
|
|
if(memberInfo != null && memberInfo.getHobby() != null){
|
|
|
newHobbyId = memberInfo.getHobby();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- List<String> oldList = Arrays.asList(oldHobbyId.split(","));
|
|
|
- List<String> newList= Arrays.asList(newHobbyId.split(","));
|
|
|
|
|
|
- //数量相同,判断内容是否相同
|
|
|
- if(oldList.size() == newList.size()) {
|
|
|
- List<String> aList = newList.stream()
|
|
|
- .filter(newId -> oldList.stream().map(all -> all).collect(Collectors.toList()).contains(newId))
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (aList.size() == newList.size()) {
|
|
|
- //相同则表示未修改
|
|
|
- changeHobby = false;
|
|
|
- } else {
|
|
|
+ List<String> oldList = Arrays.asList(oldHobbyId.split(","));
|
|
|
+ List<String> newList= Arrays.asList(newHobbyId.split(","));
|
|
|
+
|
|
|
+ //数量相同,判断内容是否相同
|
|
|
+ if(oldList.size() == newList.size()) {
|
|
|
+ List<String> aList = newList.stream()
|
|
|
+ .filter(newId -> oldList.stream().map(all -> all).collect(Collectors.toList()).contains(newId))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ if (aList.size() == newList.size()) {
|
|
|
+ //相同则表示未修改
|
|
|
+ changeHobby = false;
|
|
|
+ } else {
|
|
|
+ changeHobby = true;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //数量不同 确定为修改
|
|
|
changeHobby = true;
|
|
|
}
|
|
|
- }else{
|
|
|
- //数量不同 确定为修改
|
|
|
- changeHobby = true;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
List<String> updateList = getListData(oldMember,memberInfo);
|