| | |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.poji.shop.ShopAppointableTime; |
| | | import com.ruoyi.system.api.domain.poji.shop.ShopNonAppointableTime; |
| | | import com.ruoyi.system.api.domain.poji.shop.TShopAppointableTime; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerStaffInfoVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo; |
| | |
| | | @RequestMapping(value = "/confirmReservation/{id}", method = RequestMethod.POST) |
| | | @ApiOperation(value = "商户确认预约【2.0】") |
| | | public R confirmReservation(@PathVariable("id") String id) { |
| | | ShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(id); |
| | | TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(id); |
| | | if (null == shopAppointableTime) { |
| | | return R.fail("预约不存在"); |
| | | } |
| | |
| | | @RequestMapping(value = "/cancelReservation", method = RequestMethod.POST) |
| | | @ApiOperation(value = "商户取消预约【2.0】") |
| | | public R cancelReservation(@RequestBody CancelReservationDto dto) { |
| | | ShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getId()); |
| | | TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getId()); |
| | | if (null == shopAppointableTime) { |
| | | return R.fail("预约不存在"); |
| | | } |
| | |
| | | shopAppointableTimeService.updateById(shopAppointableTime); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getMyShopList", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取当前账户可切换的门店列表【2.0】") |
| | | public R<List<Shop>> getMyShopList() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | List<ShopRelUser> shopRelUser = shopRelUserService.getByUserId(userId); |
| | | List<Shop> collect = shopRelUser.stream().map(e -> { |
| | | Shop shop = shopService.getById(e.getShopId()); |
| | | return shop; |
| | | }).collect(Collectors.toList()); |
| | | return R.ok(collect); |
| | | } |
| | | |
| | | |
| | | } |