diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java index 7c521abb..3e1ec635 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java @@ -340,6 +340,13 @@ public class ShoppingController extends ControllerBase { QuotationShoppingCart cart = shoppingCartService.getById(id); VUtils.trueThrowBusinessError(Objects.isNull(cart)).throwMessage("未找到购物车信息"); ShoppingCartVO vo = Convert.convert(ShoppingCartVO.class, cart); + ProductModel model=productModelService.lambdaQuery() + .eq(ProductModel::getState, 1) + .eq(ProductModel::getBatchNumber, cart.getModelId()) + .one(); + if (Objects.nonNull(model)){ + vo.setModelKeyId(model.getId()); + } //获取部件配置 // Long categoryId = getCategoryId(); // List parts = modelConfigService.getEffectives(cart.getConfigId(), cart.getPriceId(), categoryId, MultilingualUtil.getLanguage()); @@ -429,7 +436,7 @@ public class ShoppingController extends ControllerBase { */ @Transactional @PostMapping("/quotation/generate") - public ApiResult generateQuotation(@RequestBody @NotEmpty List cartIds) { + public ApiResult generateQuotation(@RequestBody @NotEmpty List cartIds) { List carts = shoppingCartService.lambdaQuery() .eq(QuotationShoppingCart::getStatus, 0) .eq(QuotationShoppingCart::getCreateByType, AppUserUtil.isAgent() ? 1 : 0) @@ -484,7 +491,7 @@ public class ShoppingController extends ControllerBase { .eq(QuotationShoppingCart::getStatus, 0) .in(QuotationShoppingCart::getId, cartIds) .update(); - return ApiResult.success(); + return ApiResult.success(order.getId()); } /** diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java index d27edd91..9b68a5cd 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java @@ -25,6 +25,11 @@ public class ShoppingCartVO { */ private Long modelId; + /** + * 机型自增id + */ + private Integer modelKeyId; + /** * 价格id */