| | |
| | | pmdsService.changeState(dto); |
| | | } |
| | | /** |
| | | * 门票核销 |
| | | * 根据id查询 |
| | | */ |
| | | |
| | | @RequestMapping("/base/pointMerchars/getById") |
| | | @ResponseBody |
| | | public PointsMerchandise getById(@RequestBody Integer id){ |
| | | return pmdsService.getById(id); |
| | | } |
| | | /** |
| | | * 门票核销 |
| | | */ |
| | | @RequestMapping("/base/course/changeState") |
| | | @ResponseBody |
| | | public Object changeState(@RequestBody CourseChangeStateDTO dto){ |
| | |
| | | cIds.add(pointsMerchandiseCity.getPointsMerchandiseId()); |
| | | } |
| | | |
| | | if (cIds.size()>0) { |
| | | |
| | | List<PointsMerchandise> merchandises = pmdsService.list(new QueryWrapper<PointsMerchandise>() |
| | | .eq("state",1) |
| | | .eq("shelves",1).in("id",cIds) |
| | | .gt("endTime",new Date())); |
| | | if (merchandises.size() > 0){ |
| | | for (PointsMerchandise merchandise : merchandises) { |
| | | IntegralCommodity integralCommodity = new IntegralCommodity(); |
| | | integralCommodity.setCommodityId(merchandise.getId()); |
| | | integralCommodity.setCommodityImg(merchandise.getCover()); |
| | | integralCommodity.setCommodityName(merchandise.getName()); |
| | | integralCommodity.setCommodityPrice(merchandise.getPrice()); |
| | | integralCommodity.setGoodsType(merchandise.getType()); |
| | | commodity.add(integralCommodity); |
| | | List<PointsMerchandise> merchandises = pmdsService.list(new QueryWrapper<PointsMerchandise>() |
| | | .eq("state", 1) |
| | | .eq("shelves", 1).in("id", cIds) |
| | | .gt("endTime", new Date())); |
| | | if (merchandises.size() > 0){ |
| | | for (PointsMerchandise merchandise : merchandises) { |
| | | IntegralCommodity integralCommodity = new IntegralCommodity(); |
| | | integralCommodity.setCommodityId(merchandise.getId()); |
| | | integralCommodity.setCommodityImg(merchandise.getCover()); |
| | | integralCommodity.setCommodityName(merchandise.getName()); |
| | | integralCommodity.setCommodityPrice(merchandise.getPrice()); |
| | | integralCommodity.setGoodsType(merchandise.getType()); |
| | | commodity.add(integralCommodity); |
| | | } |
| | | } |
| | | } |
| | | |
| | | System.out.println(commodity); |
| | | return commodity; |
| | | } |
| | |
| | | ids.add(coupon.getId()); |
| | | } |
| | | } |
| | | List<UserCoupon> userCoupons = userCouponService.list(new QueryWrapper<UserCoupon>().eq("userId", appUserId).in("couponId",ids)); |
| | | List<UserCoupon> userCoupons = new ArrayList<>(); |
| | | if (ids.size()>0) { |
| | | userCoupons = userCouponService.list(new QueryWrapper<UserCoupon>().eq("userId", appUserId).in("couponId", ids)); |
| | | } |
| | | if (pointsMerchandises.size() > 0 ){ |
| | | for (UserPointsMerchandise pointsMerchandise : pointsMerchandises) { |
| | | PointsMerchandise merchandise = pmdsService.getById(pointsMerchandise.getPointsMerchandiseId()); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getSpecificsOfGoods") |
| | | public PointDetailsVo getSpecificsOfGoods(@RequestBody Long speMercharsId){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | PointDetailsVo detailsVo = new PointDetailsVo(); |
| | | UserPointsMerchandise byId = upmseService.getById(speMercharsId); |
| | | |
| | |
| | | PointsMerchandise pmdsServiceById = pmdsService.getById(byId.getPointsMerchandiseId()); |
| | | // 2.0 |
| | | detailsVo.setCardType(pmdsServiceById.getCardType()); |
| | | detailsVo.setExchangeAddrType(pmdsServiceById.getUseScope()); |
| | | detailsVo.setExchangeType(pmdsServiceById.getRedemptionMethod()); |
| | | detailsVo.setGoodType(pmdsServiceById.getType()); |
| | | if (pmdsServiceById.getRedemptionMethod() == 1){ |
| | |
| | | detailsVo.setBelongs(pmdsServiceById.getProvince()+pmdsServiceById.getCity()); |
| | | break; |
| | | case 3: |
| | | StoreDetailOfCourse courseOfStore = stoClient.getCourseOfStore(byId.getStoreId()); |
| | | detailsVo.setBelongs(courseOfStore.getStoreName()+" "+courseOfStore.getStoreAddr()); |
| | | // StoreDetailOfCourse courseOfStore = stoClient.getCourseOfStore(byId.getStoreId()); |
| | | // detailsVo.setBelongs(courseOfStore.getStoreName()+" "+courseOfStore.getStoreAddr()); |
| | | // detailsVo.setBelongs("---------------"); |
| | | break; |
| | | default: |
| | | break; |