Commit 0468fd2c authored by zhengyi's avatar zhengyi

检查提单状态是否已制作提单

parent d67164f7
......@@ -81,6 +81,7 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.UNAUTHORIZED;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
......@@ -105,7 +106,6 @@ public class OrderController {
private RoleApi roleApi;
@Autowired
private OrderItemService orderItemService;
@Autowired
private ProductService productService;
@Autowired
......
......@@ -32,6 +32,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -44,6 +45,7 @@ import java.text.MessageFormat;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
......@@ -135,6 +137,18 @@ public class MakeBillOfLadingController {
return success(true);
}
@PostMapping("/check/billOfLading/{orderId}")
@ApiOperation("检查提单状态是否已制作提单")
@ApiImplicitParam(name = "orderId", value = "该值为orderId", required = true, example = "1024", dataType = "Long")
public CommonResult<Boolean> checkBillOfLadingStatus(@PathVariable Long orderId) {
MakeBillOfLadingDO billOfLadingDO = makeBillOfLadingService.getOne(new LambdaQueryWrapperX<MakeBillOfLadingDO>()
.eq(MakeBillOfLadingDO::getOrderId, orderId)
.orderByDesc(MakeBillOfLadingDO::getId)
.last("limit 1"));
return success(Objects.nonNull(billOfLadingDO) && StringUtils.isNotBlank(billOfLadingDO.getImgUrl()));
}
@GetMapping("/get")
@ApiOperation("获得制作提货单")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment