mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 18:49:06 +08:00 
			
		
		
		
	Merge remote-tracking branch 'yudao/develop' into develop
This commit is contained in:
		| @ -290,7 +290,7 @@ public class CollectionUtils { | ||||
|         return valueFunc.apply(t); | ||||
|     } | ||||
|  | ||||
|     public static <T, V extends Comparable<? super V>> T getMinPropertyObj(List<T> from, Function<T, V> valueFunc) { | ||||
|     public static <T, V extends Comparable<? super V>> T getMinObject(List<T> from, Function<T, V> valueFunc) { | ||||
|         if (CollUtil.isEmpty(from)) { | ||||
|             return null; | ||||
|         } | ||||
| @ -298,7 +298,6 @@ public class CollectionUtils { | ||||
|         return from.stream().min(Comparator.comparing(valueFunc)).get(); | ||||
|     } | ||||
|  | ||||
|  | ||||
|     public static <T, V extends Comparable<? super V>> V getSumValue(Collection<T> from, Function<T, V> valueFunc, | ||||
|                                                                      BinaryOperator<V> accumulator) { | ||||
|         return getSumValue(from, valueFunc, accumulator, null); | ||||
|  | ||||
| @ -129,7 +129,7 @@ public class PointActivityController { | ||||
|         List<PointActivityRespVO> result = BeanUtils.toBean(activityList, PointActivityRespVO.class); | ||||
|         result.forEach(activity -> { | ||||
|             // 设置 product 信息 | ||||
|             PointProductDO minProduct = getMinPropertyObj(productsMap.get(activity.getId()), PointProductDO::getPoint); | ||||
|             PointProductDO minProduct = getMinObject(productsMap.get(activity.getId()), PointProductDO::getPoint); | ||||
|             assert minProduct != null; | ||||
|             activity.setPoint(minProduct.getPoint()).setPrice(minProduct.getPrice()); | ||||
|             findAndThen(spuMap, activity.getSpuId(), | ||||
|  | ||||
| @ -26,9 +26,9 @@ public class PointActivityRespVO { | ||||
|     @ExcelProperty("活动状态") | ||||
|     private Integer status; | ||||
|  | ||||
|     @Schema(description = "积分商城活动库存(剩余库存积分兑换时扣减)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||||
|     @ExcelProperty("积分商城活动库存(剩余库存积分兑换时扣减)") | ||||
|     private Integer stock; | ||||
|     @Schema(description = "积分商城活动库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||||
|     @ExcelProperty("积分商城活动库存") | ||||
|     private Integer stock; // 剩余库存积分兑换时扣减 | ||||
|  | ||||
|     @Schema(description = "积分商城活动总库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||||
|     @ExcelProperty("积分商城活动总库存") | ||||
|  | ||||
| @ -106,7 +106,7 @@ public class AppPointActivityController { | ||||
|         List<AppPointActivityRespVO> result = BeanUtils.toBean(activityList, AppPointActivityRespVO.class); | ||||
|         result.forEach(activity -> { | ||||
|             // 设置 product 信息 | ||||
|             PointProductDO minProduct = getMinPropertyObj(productsMap.get(activity.getId()), PointProductDO::getPoint); | ||||
|             PointProductDO minProduct = getMinObject(productsMap.get(activity.getId()), PointProductDO::getPoint); | ||||
|             assert minProduct != null; | ||||
|             activity.setPoint(minProduct.getPoint()).setPrice(minProduct.getPrice()); | ||||
|             findAndThen(spuMap, activity.getSpuId(), | ||||
|  | ||||
| @ -12,5 +12,4 @@ import lombok.ToString; | ||||
| @ToString(callSuper = true) | ||||
| public class AppPointActivityPageReqVO extends PageParam { | ||||
|  | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -22,14 +22,16 @@ public class AppPointActivityRespVO { | ||||
|     @ExcelProperty("活动状态") | ||||
|     private Integer status; | ||||
|  | ||||
|     @Schema(description = "积分商城活动库存(剩余库存积分兑换时扣减)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||||
|     @ExcelProperty("积分商城活动库存(剩余库存积分兑换时扣减)") | ||||
|     private Integer stock; | ||||
|     @Schema(description = "积分商城活动库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||||
|     @ExcelProperty("积分商城活动库存") | ||||
|     private Integer stock; // 剩余库存积分兑换时扣减 | ||||
|  | ||||
|     @Schema(description = "积分商城活动总库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||||
|     @ExcelProperty("积分商城活动总库存") | ||||
|     private Integer totalStock; | ||||
|  | ||||
|     // TODO @puhui999:只返回必要的字段,例如说 remark、sort、createTime 应该是不需要的呢。也可以看看别的也不需要哈。 | ||||
|  | ||||
|     @Schema(description = "备注", example = "你说的对") | ||||
|     @ExcelProperty("备注") | ||||
|     private String remark; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 puhui999
					puhui999