|
|
@ -161,12 +161,14 @@ public class OrderController { |
|
|
|
public ServerResponseEntity<OrderNumbersDto> submitOrders(@Valid @RequestBody SubmitOrderParam submitOrderParam) { |
|
|
|
public ServerResponseEntity<OrderNumbersDto> submitOrders(@Valid @RequestBody SubmitOrderParam submitOrderParam) { |
|
|
|
String userId = SecurityUtils.getCurrentInfo().getAccountId(); |
|
|
|
String userId = SecurityUtils.getCurrentInfo().getAccountId(); |
|
|
|
if (submitOrderParam.isLeaveAMessage()){ |
|
|
|
if (submitOrderParam.isLeaveAMessage()){ |
|
|
|
|
|
|
|
OrderShopParam orderShopParam = submitOrderParam.getOrderShopParam().get(0); |
|
|
|
Order order = new Order(); |
|
|
|
Order order = new Order(); |
|
|
|
order.setUserId(userId); |
|
|
|
order.setUserId(userId); |
|
|
|
order.setTotal(0.0); |
|
|
|
order.setTotal(0.0); |
|
|
|
order.setOrderType(submitOrderParam.getOrderType()); |
|
|
|
order.setOrderType(submitOrderParam.getOrderType()); |
|
|
|
order.setProdName("采购留言"); |
|
|
|
order.setProdName("采购留言"); |
|
|
|
order.setShopId(SecurityUtils.getCurrentInfo().getShopId()); |
|
|
|
order.setShopId(orderShopParam.getShopId()); |
|
|
|
|
|
|
|
order.setRemarks(orderShopParam.getRemarks()); |
|
|
|
String orderNumbers = String.valueOf(snowflake.nextId()); |
|
|
|
String orderNumbers = String.valueOf(snowflake.nextId()); |
|
|
|
order.setOrderNumber(orderNumbers); |
|
|
|
order.setOrderNumber(orderNumbers); |
|
|
|
order.setCreateTime(new Date()); |
|
|
|
order.setCreateTime(new Date()); |
|
|
|