| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.other.api.domain.TechnicianSubscribe; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 预约技师 |
| | | */ |
| | | @PostMapping("/subscribe") |
| | | @ApiOperation(value = "预约技师", notes = "预约技师", tags = {"小程序-个人中心-门店管理-预约列表-预约技师"}) |
| | | public R<Void> subscribe(@RequestBody TechnicianSubscribe technicianSubscribe){ |
| | | technicianSubscribeService.subscribe(technicianSubscribe); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 取消服务 |
| | | */ |
| | | @GetMapping("/cancel") |
| | | @ApiOperation(value = "取消服务", notes = "取消服务", tags = {"小程序-个人中心-门店管理-预约列表-取消服务","小程序-个人中心-我的预约"}) |
| | | public AjaxResult cancel(@ApiParam(value = "预约id") @RequestParam Long id){ |
| | | @ApiOperation(value = "取消服务", notes = "取消服务", tags = {"小程序-个人中心-门店管理-预约列表-取消服务"}) |
| | | public R<Void> cancel(@ApiParam(value = "预约id") @RequestParam Long id){ |
| | | |
| | | TechnicianSubscribe subscribe = technicianSubscribeService.getOne(new LambdaQueryWrapper<TechnicianSubscribe>() |
| | | .eq(TechnicianSubscribe::getId, id) |
| | | .eq(TechnicianSubscribe::getStatus, 0)); |
| | | if (null == subscribe){ |
| | | return error("不满足取消条件"); |
| | | return R.fail("不满足取消条件"); |
| | | } |
| | | subscribe.setStatus(2); |
| | | technicianSubscribeService.updateById(subscribe); |
| | | return success(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |