| | |
| | | ; |
| | | } |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | if (tStudents.size() > 0) { |
| | | TStudent tStudent = tStudents.get(0); |
| | | classInfoVo.setStuId(tStudent.getId()); |
| | |
| | | course.setTotalNums(ToolUtil.isEmpty(tCoursePackagePayment.getTotalCourseNums()) ? 0 : tCoursePackagePayment.getTotalCourseNums()); |
| | | course.setDeductedNums(ToolUtil.isEmpty(tCoursePackagePayment.getDeductionNums()) ? 0 : tCoursePackagePayment.getDeductionNums()); |
| | | course.setRemainingNums(ToolUtil.isEmpty(tCoursePackagePayment.getResidueNums()) ? 0 : tCoursePackagePayment.getResidueNums()); |
| | | course.setPeriodOfValidity(tCoursePackagePayment.getPeriodOfValidity()); |
| | | course.setPeriodOfValidity(sdf.format(tStudent.getValidity())); |
| | | course.setIsAble(tCoursePackagePayment.getIsAble()); |
| | | course.setCourseType(tCoursePackagePayment.getCourseType()); |
| | | courseList.add(course); |
| | |
| | | goods.add(commodity); |
| | | } |
| | | } |
| | | |
| | | List<Coupon> allCoupons = ucponClient.getAllCoupons(commodityRequest); |
| | | if (allCoupons.size() > 0) { |
| | | for (Coupon allCoupon : allCoupons) { |
| | |
| | | userCouponPayment.setCode(code); |
| | | userCouponPayment.setPayType(coupon.getRedemptionMethod()); |
| | | userCouponPayment.setIntegral(coupon.getIntegral().intValue()); |
| | | userCouponPayment.setCash(coupon.getCash().doubleValue()); |
| | | userCouponPayment.setCash(null == coupon.getCash() ? 0D : coupon.getCash().doubleValue()); |
| | | userCouponPayment.setCashPayType(exchangeType.getPayType()); |
| | | userCouponPayment.setInsertTime(new Date()); |
| | | |
| | |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String code = sdf.format(new Date()) + UUIDUtil.getNumberRandom(5); |
| | | PointsMerchandise merchandise = mcClient.selectPointsMerchandiseById(exchangeType.getGoodId()); |
| | | PointsMerchandise merchandise = new PointsMerchandise(); |
| | | if(exchangeType.getGoodsType() != 4){ |
| | | merchandise = mcClient.selectPointsMerchandiseById(exchangeType.getGoodId()); |
| | | }else{ |
| | | Coupon coupon = ucponClient.queryCouponById(exchangeType.getGoodId()); |
| | | merchandise.setId(coupon.getId()); |
| | | merchandise.setUserPopulation(coupon.getUserPopulation()); |
| | | merchandise.setIntegral(coupon.getIntegral().intValue()); |
| | | merchandise.setQuantityIssued(coupon.getQuantityIssued()); |
| | | merchandise.setPickUpQuantity(coupon.getPickUpQuantity()); |
| | | merchandise.setUseScope(coupon.getUseScope()); |
| | | merchandise.setCash(coupon.getCash()); |
| | | merchandise.setType(4); |
| | | } |
| | | |
| | | |
| | | if (ToolUtil.isEmpty(merchandise)) { |