| | |
| | | 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.UserCoupon; |
| | | import com.dsh.other.feignclient.model.SiteVo; |
| | | import com.dsh.other.model.*; |
| | | import com.dsh.other.service.ISiteBookingService; |
| | | import com.dsh.other.service.ISiteService; |
| | |
| | | } |
| | | |
| | | |
| | | @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; |
| | | |
| | | } |
| | | |
| | | } |