| | |
| | | detailsVo.setPerLimit(merchandise.getPickUpQuantity()); |
| | | if (merchandise.getRedemptionMethod() == 1){ |
| | | detailsVo.setExchangeType(1); |
| | | detailsVo.setRequiredType(merchandise.getIntegral() + "积分"); |
| | | detailsVo.setIntegral(merchandise.getIntegral()); |
| | | }else { |
| | | detailsVo.setExchangeType(2); |
| | | detailsVo.setRequiredType(merchandise.getIntegral() + "积分+¥"+merchandise.getCash()); |
| | | detailsVo.setIntegral(merchandise.getIntegral()); |
| | | detailsVo.setCash(merchandise.getCash()); |
| | | } |
| | | detailsVo.setCost(merchandise.getPrice()); |
| | | if (merchandise.getUseScope() == 1){ |
| | |
| | | detailsVo.setBelongs(courseOfStore.getStoreName()+"可用"); |
| | | } |
| | | List<CoursePackagePaymentConfig> courseConfigList = cpcfigClient.getCourseConfigList(coursePackage.getId()); |
| | | int redul = 0; |
| | | |
| | | for (CoursePackagePaymentConfig coursePackagePaymentConfig : courseConfigList) { |
| | | redul = redul + coursePackagePaymentConfig.getClassHours(); |
| | | if (Objects.equals(coursePackagePaymentConfig.getId(), merchandise.getCoursePackageConfigId())){ |
| | | detailsVo.setCourseHours(coursePackagePaymentConfig.getClassHours()); |
| | | break; |
| | | } |
| | | } |
| | | detailsVo.setCourseHours(redul); |
| | | detailsVo.setStartTime(format.format(merchandise.getStartTime())); |
| | | detailsVo.setEndTime(format.format(merchandise.getEndTime())); |
| | | |
| | |
| | | detailsVo.setResidueNum(merchandise.getQuantityIssued()-count); |
| | | detailsVo.setPerLimit(merchandise.getPickUpQuantity()); |
| | | if (merchandise.getRedemptionMethod() == 1){ |
| | | detailsVo.setRequiredType(merchandise.getIntegral() + "积分"); |
| | | detailsVo.setIntegral(merchandise.getIntegral()); |
| | | }else { |
| | | detailsVo.setRequiredType(merchandise.getIntegral() + "积分+¥"+merchandise.getCash()); |
| | | detailsVo.setIntegral(merchandise.getIntegral()); |
| | | detailsVo.setCash(merchandise.getCash()); |
| | | } |
| | | detailsVo.setCost(merchandise.getPrice()); |
| | | if (merchandise.getUseScope() == 1){ |
| | |
| | | detailsVo.setResidueNum(coupon.getQuantityIssued()-couponNums); |
| | | detailsVo.setPerLimit(coupon.getPickUpQuantity()); |
| | | if (merchandise.getRedemptionMethod() == 1){ |
| | | detailsVo.setRequiredType(merchandise.getIntegral() + "积分"); |
| | | detailsVo.setIntegral(merchandise.getIntegral()); |
| | | }else { |
| | | detailsVo.setRequiredType(merchandise.getIntegral() + "积分+¥"+merchandise.getCash()); |
| | | detailsVo.setIntegral(merchandise.getIntegral()); |
| | | detailsVo.setCash(merchandise.getCash()); |
| | | } |
| | | if (coupon.getUseScope() == 1){ |
| | | detailsVo.setBelongs("全国通用"); |
| | |
| | | detailsResponse.setDetailsId(pointsMerchandise.getId()); |
| | | detailsResponse.setGoodName(merchandise.getName()); |
| | | if (merchandise.getRedemptionMethod() == 1){ |
| | | detailsResponse.setRequiredType(merchandise.getIntegral()+"积分"); |
| | | detailsResponse.setExchangeType(1); |
| | | detailsResponse.setIntegral(merchandise.getIntegral()); |
| | | }else { |
| | | detailsResponse.setRequiredType(merchandise.getIntegral()+"积分 ¥"+merchandise.getCash()); |
| | | detailsResponse.setExchangeType(2); |
| | | detailsResponse.setIntegral(merchandise.getIntegral()); |
| | | detailsResponse.setCash(merchandise.getCash()); |
| | | } |
| | | detailsResponse.setStartTime(simpleDateFormat.format(merchandise.getStartTime())); |
| | | detailsResponse.setEndTime(simpleDateFormat.format(merchandise.getEndTime())); |
| | |
| | | UserPointsMerchandise byId = upmseService.getById(speMercharsId); |
| | | if (ToolUtil.isNotEmpty(byId)){ |
| | | PointsMerchandise pmdsServiceById = pmdsService.getById(byId.getPointsMerchandiseId()); |
| | | detailsVo.setExchangeType(pmdsServiceById.getRedemptionMethod()); |
| | | detailsVo.setGoodType(pmdsServiceById.getType()); |
| | | if (pmdsServiceById.getRedemptionMethod() == 1){ |
| | | detailsVo.setIntegral(pmdsServiceById.getIntegral()); |
| | | }else { |
| | | detailsVo.setCash(pmdsServiceById.getCash()); |
| | | detailsVo.setIntegral(pmdsServiceById.getIntegral()); |
| | | } |
| | | detailsVo.setDetailsId(byId.getId()); |
| | | switch (pmdsServiceById.getType()){ |
| | | case 1: |
| | |
| | | List<String> list1 = Arrays.asList(StrUtils.splitStr2StrArr(coursePackage.getDetailDrawing(), ",")); |
| | | list1.add(coursePackage.getCoverDrawing()); |
| | | detailsVo.setPics(list1); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig = cpClient.queryConfigCoursePackData(pmdsServiceById.getCoursePackageConfigId()); |
| | | detailsVo.setClassHours(coursePackagePaymentConfig.getClassHours()); |
| | | Collections.sort(detailsVo.getPics(), (s1, s2) -> { |
| | | if (s1.equals(coursePackage.getCoverDrawing())) { |
| | | return -1; // s1排在前面 |