|
@@ -29,8 +29,10 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 优惠券信息
|
|
@@ -63,11 +65,14 @@ public class CouponInfoController extends BaseController {
|
|
|
request.setUserId(user.getId());
|
|
|
request.setClientType(ClientEnum.TEACHER.getCode());
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// 用户端的券类型 都包含全品类券
|
|
|
if (request.getCouponCategory() != null) {
|
|
|
List<CouponCategoryEnum> couponCategoryList = new ArrayList<>();
|
|
|
+ List<CouponCategoryEnum> collect = Arrays.stream(request.getCouponCategory().split(",")).map(CouponCategoryEnum::valueOf).collect(Collectors.toList());
|
|
|
couponCategoryList.add(CouponCategoryEnum.UNIVERSAL);
|
|
|
- couponCategoryList.add(request.getCouponCategory());
|
|
|
+ couponCategoryList.addAll(collect);
|
|
|
request.setCouponCategory(null);
|
|
|
request.setCouponCategoryList(couponCategoryList);
|
|
|
}
|