Browse Source

Merge remote-tracking branch 'origin/dev_personal_center' into dev_temp

dev_shibei_match
zxc 5 years ago
parent
commit
045bd0c88f
  1. 3
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgeListResultDTO.java
  2. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
  3. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml

3
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgeListResultDTO.java

@ -43,12 +43,13 @@ public class UserBadgeListResultDTO implements Serializable {
@JsonIgnore @JsonIgnore
private Integer sort; private Integer sort;
@JsonIgnore @JsonIgnore
private Date updatedTime; private Long updatedTime;
public UserBadgeListResultDTO() { public UserBadgeListResultDTO() {
this.badgeId = ""; this.badgeId = "";
this.badgeIcon = ""; this.badgeIcon = "";
this.isOpened = "0"; this.isOpened = "0";
this.status = false; this.status = false;
this.updatedTime = 0L;
} }
} }

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

@ -99,7 +99,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
} }
}); });
if (!CollectionUtils.isEmpty(noOpenBadge)){ if (!CollectionUtils.isEmpty(noOpenBadge)){
userBadgeListResultDTOS.addAll(noOpenBadge.stream().sorted(Comparator.comparing(UserBadgeListResultDTO::getSort)).collect(Collectors.toList())); userBadgeListResultDTOS.addAll(noOpenBadge);
} }
return userBadgeListResultDTOS.stream().sorted(Comparator.comparing(UserBadgeListResultDTO::getIsOpened).reversed().thenComparing(UserBadgeListResultDTO::getUpdatedTime).reversed().thenComparing(UserBadgeListResultDTO::getSort)).collect(Collectors.toList()); return userBadgeListResultDTOS.stream().sorted(Comparator.comparing(UserBadgeListResultDTO::getIsOpened).reversed().thenComparing(UserBadgeListResultDTO::getUpdatedTime).reversed().thenComparing(UserBadgeListResultDTO::getSort)).collect(Collectors.toList());
} }

2
epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml

@ -29,7 +29,7 @@
ub.IS_OPENED, ub.IS_OPENED,
b.FIXATION_BADGE_TYPE as badgeType, b.FIXATION_BADGE_TYPE as badgeType,
b.sort, b.sort,
ub.UPDATED_TIME UNIX_TIMESTAMP(ub.updated_time) AS updatedTime
FROM resi_user_badge ub FROM resi_user_badge ub
LEFT JOIN badge b ON b.ID = ub.BADGE_ID LEFT JOIN badge b ON b.ID = ub.BADGE_ID
WHERE ub.DEL_FLAG = '0' WHERE ub.DEL_FLAG = '0'

Loading…
Cancel
Save