| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.other.entity.Site; |
| | | import com.dsh.other.entity.SiteBooking; |
| | | import com.dsh.other.entity.SiteType; |
| | | import com.dsh.other.feignclient.activity.UserCouponClient; |
| | | import com.dsh.other.feignclient.activity.model.QueryUserCouponByIdAndUserId; |
| | | import com.dsh.other.feignclient.activity.model.UserCoupon; |
| | | import com.dsh.other.feignclient.model.BillingDataRequestVo; |
| | | import com.dsh.other.feignclient.model.SiteVo; |
| | | import com.dsh.other.model.*; |
| | | import com.dsh.other.service.ISiteBookingService; |
| | | import com.dsh.other.service.ISiteService; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | siteBooking.setRefundOrderNo(refund_id); |
| | | siteBookingService.updateById(siteBooking); |
| | | if(null != siteBooking.getUserCouponId()){ |
| | | UserCoupon userCoupon = userCouponClient.queryUserCouponById(siteBooking.getUserCouponId()); |
| | | UserCoupon userCoupon = userCouponClient.queryUserCouponById(new QueryUserCouponByIdAndUserId(siteBooking.getUserCouponId(),siteBooking.getAppUserId())); |
| | | userCoupon.setStatus(1); |
| | | userCouponClient.updateUserCoupon(userCoupon); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询所有现金支付的预约记录 |
| | | * @param requestVo |
| | | * @return |
| | | */ |
| | | @PostMapping("/base/site/queryPaymentSiteDetail") |
| | | public List<SiteBooking> getAllSiteBookingList(@RequestBody BillingDataRequestVo requestVo){ |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | integers.add(1); |
| | | integers.add(2); |
| | | integers.add(3); |
| | | integers.add(4); |
| | | integers.add(5); |
| | | return siteBookingService.list(new QueryWrapper<SiteBooking>() |
| | | .in("status",integers) |
| | | .ne("payType",3) |
| | | .eq("appUserId",requestVo.getAppUserId()) |
| | | .between("payTime",requestVo.getMonthStart(),requestVo.getMonthEnd())); |
| | | } |
| | | |
| | | /** |
| | | * 查询所有玩湃币支付的预约记录 |
| | | * @param appUserId |
| | | * @return |
| | | */ |
| | | @PostMapping("/base/site/queryPlaypaiGoldSiteDetail") |
| | | public List<SiteBooking> wanpaiGoldSiteBookingList(@RequestBody Integer appUserId){ |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | integers.add(1); |
| | | integers.add(2); |
| | | integers.add(3); |
| | | integers.add(4); |
| | | integers.add(5); |
| | | return siteBookingService.list(new QueryWrapper<SiteBooking>() |
| | | .in("status",integers) |
| | | .eq("payType",3) |
| | | .eq("appUserId",appUserId)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/site/getNewAddSiteList") |
| | | public List<SiteVo> getAppUserSiteList(){ |
| | | List<SiteVo> siteVos = new ArrayList<>(); |
| | | |
| | | List<Site> list = siteService.list(new QueryWrapper<Site>() |
| | | .orderByDesc("insertTime")); |
| | | if (list.size() > 0 ){ |
| | | for (Site site : list) { |
| | | SiteVo vo = new SiteVo(); |
| | | vo.setSiteId(site.getId()); |
| | | vo.setSiteName(site.getName()); |
| | | vo.setSiteTime(site.getAppointmentStartTime() + "-" + site.getAppointmentEndTime()); |
| | | SiteType byId = siteTypeService.getById(site.getSiteTypeId()); |
| | | vo.setSiteType(byId.getName()); |
| | | vo.setPrice(site.getCashPrice()); |
| | | siteVos.add(vo); |
| | | } |
| | | } |
| | | return siteVos; |
| | | |
| | | } |
| | | |
| | | } |