zoujiajian 3 жил өмнө
parent
commit
2db7f0c067

+ 2 - 0
netflix-dao/src/main/java/com/cyksj/model/views/UserRecommendGoodsFrontView.java

@@ -27,6 +27,8 @@ public class UserRecommendGoodsFrontView {
 
 	private String tags;
 
+	private Integer type;
+
 	private Integer months;
 
 	private Integer days;

+ 1 - 0
netflix-dao/src/main/resources/mapper/GroupRelationMapper.xml

@@ -177,6 +177,7 @@
         img,
         tags,
         sort_by,
+        `type`,
         min_months as months,
         min_days as days,
         min_price as price,

+ 4 - 0
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -84,10 +84,14 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 			}
 			if (ticket.getExpiryTime() != null && ticket.getGoodsType() == 1 && ticket.getSecondType() == 2) {
 				String remainDays = DateUtil.formatBetween(now, ticket.getExpiryTime(), BetweenFormater.Level.DAY);
+				if ("0天".equals(remainDays)) {
+					remainDays = "小于1天";
+				}
 				ticket.setRemainDays(remainDays);
 			}
 			List<GroupsRelationUserView> relationUserViews = groupsRelationMapper.getUserRelationUserViews(ticket.getGroupId(), ticket.getRelationId(), ticket.getUserId(), List.of(GroupsRelation.Status.validity, GroupsRelation.Status.outside));
 			ticket.setRelationViews(relationUserViews);
+			ticket.setExpiryTime(DateUtil.parse(ticket.getExpiryTime().toString(), "yyyy-MM-dd"));
 			return true;
 		}).collect(Collectors.toList());
 		return collect;