| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.service.OrderService; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import model.Order; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @ApiImplicitParam(value = "分享id", name = "shareId", required = true, dataType = "int", paramType="query"), |
| | | }) |
| | | @GetMapping("/check/{orderNumber}/{shopId}") |
| | | public R<Boolean> check(@PathVariable("orderNumber") String orderNumber, @PathVariable("shopId") Long shopId){ |
| | | return R.ok(orderService.check(orderNumber, shopId)); |
| | | public R<Boolean> check(@PathVariable("orderNumber") String orderNumber, @PathVariable("shopId") Integer shopId){ |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | | Order order = orderService.getOne(new LambdaQueryWrapper<Order>() |
| | | .eq(Order::getOrderNumber, orderNumber)); |
| | | return R.ok(orderService.check(order, shopId, loginUserApplet.getUserid())); |
| | | } |
| | | |
| | | /** |