|
@@ -9,10 +9,12 @@ import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.dromara.common.core.domain.R;
|
|
import org.dromara.common.core.domain.R;
|
|
|
import org.dromara.common.core.enums.OrderSourceEnum;
|
|
import org.dromara.common.core.enums.OrderSourceEnum;
|
|
|
import org.dromara.common.core.enums.OrderStatus;
|
|
import org.dromara.common.core.enums.OrderStatus;
|
|
|
|
|
+import org.dromara.common.core.exception.ServiceException;
|
|
|
import org.dromara.common.log.annotation.Log;
|
|
import org.dromara.common.log.annotation.Log;
|
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
+import org.dromara.common.redis.utils.SequenceUtils;
|
|
|
import org.dromara.common.satoken.utils.LoginHelper;
|
|
import org.dromara.common.satoken.utils.LoginHelper;
|
|
|
import org.dromara.common.web.core.BaseController;
|
|
import org.dromara.common.web.core.BaseController;
|
|
|
import org.dromara.customer.api.RemoteCustomerService;
|
|
import org.dromara.customer.api.RemoteCustomerService;
|
|
@@ -35,10 +37,12 @@ import org.dromara.product.api.RemoteProductService;
|
|
|
import org.dromara.product.api.RemoteProductShoppingCartService;
|
|
import org.dromara.product.api.RemoteProductShoppingCartService;
|
|
|
import org.dromara.product.api.domain.ProductVo;
|
|
import org.dromara.product.api.domain.ProductVo;
|
|
|
import org.dromara.product.api.domain.RemoteProductShoppingCartVo;
|
|
import org.dromara.product.api.domain.RemoteProductShoppingCartVo;
|
|
|
|
|
+import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
+import java.time.Duration;
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
|
import java.time.ZoneOffset;
|
|
import java.time.ZoneOffset;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
@@ -385,8 +389,14 @@ public class PcOrderController extends BaseController {
|
|
|
orderProductBo.setProductName(productVo.getItemName());
|
|
orderProductBo.setProductName(productVo.getItemName());
|
|
|
orderProductBo.setProductUnitId(Long.valueOf(productVo.getUnitId()));
|
|
orderProductBo.setProductUnitId(Long.valueOf(productVo.getUnitId()));
|
|
|
orderProductBo.setProductUnit(productVo.getUnitName());
|
|
orderProductBo.setProductUnit(productVo.getUnitName());
|
|
|
- orderProductBo.setProductImage(productVo.getProductImageUrl());
|
|
|
|
|
|
|
+ orderProductBo.setProductImage(productVo.getProductImage());
|
|
|
orderProductBo.setOrderPrice(productVo.getMemberPrice());
|
|
orderProductBo.setOrderPrice(productVo.getMemberPrice());
|
|
|
|
|
+ orderProductBo.setMarketPrice(productVo.getMarketPrice());
|
|
|
|
|
+ orderProductBo.setTaxRate(productVo.getTaxRate());
|
|
|
|
|
+ orderProductBo.setCategoryName(productVo.getCategoryName());
|
|
|
|
|
+ orderProductBo.setPurchasingPrice(productVo.getPurchasingPrice());
|
|
|
|
|
+ orderProductBo.setMinOrderQuantity(productVo.getMinOrderQuantity());
|
|
|
|
|
+ orderProductBo.setMinSellingPrice(productVo.getMinSellingPrice());
|
|
|
orderProductBo.setOrderQuantity(quantity);
|
|
orderProductBo.setOrderQuantity(quantity);
|
|
|
orderProductBo.setSubtotal(productVo.getMemberPrice().multiply(BigDecimal.valueOf(quantity)));
|
|
orderProductBo.setSubtotal(productVo.getMemberPrice().multiply(BigDecimal.valueOf(quantity)));
|
|
|
return orderProductBo;
|
|
return orderProductBo;
|