diff --git a/nakadai/src/main/java/com/huoran/nakadai/controller/OrderController.java b/nakadai/src/main/java/com/huoran/nakadai/controller/OrderController.java index 79deedf..7410ed5 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/controller/OrderController.java +++ b/nakadai/src/main/java/com/huoran/nakadai/controller/OrderController.java @@ -161,12 +161,14 @@ public class OrderController { public ServerResponseEntity submitOrders(@Valid @RequestBody SubmitOrderParam submitOrderParam) { String userId = SecurityUtils.getCurrentInfo().getAccountId(); if (submitOrderParam.isLeaveAMessage()){ + OrderShopParam orderShopParam = submitOrderParam.getOrderShopParam().get(0); Order order = new Order(); order.setUserId(userId); order.setTotal(0.0); order.setOrderType(submitOrderParam.getOrderType()); order.setProdName("采购留言"); - order.setShopId(SecurityUtils.getCurrentInfo().getShopId()); + order.setShopId(orderShopParam.getShopId()); + order.setRemarks(orderShopParam.getRemarks()); String orderNumbers = String.valueOf(snowflake.nextId()); order.setOrderNumber(orderNumbers); order.setCreateTime(new Date()); diff --git a/nakadai/src/main/java/com/huoran/nakadai/mapper/xml/OrderMapper.xml b/nakadai/src/main/java/com/huoran/nakadai/mapper/xml/OrderMapper.xml index b24ccb9..9c60576 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/mapper/xml/OrderMapper.xml +++ b/nakadai/src/main/java/com/huoran/nakadai/mapper/xml/OrderMapper.xml @@ -368,7 +368,7 @@ o.order_number, o.create_time, o.order_type, - GROUP_CONCAT( oi.prod_name SEPARATOR '、' ) AS content, + IFNULL(GROUP_CONCAT( oi.prod_name SEPARATOR '、'),o.prod_name) AS content, sum( oi.prod_count ) AS num, CASE WHEN o.order_type = 2 THEN @@ -381,7 +381,7 @@ kpt.logo_url WHEN o.order_type = 1 THEN avatars.user_avatars - END AS logo + END AS logo,o.remarks FROM tz_order o LEFT JOIN hr_user_account ua ON ua.id = o.user_id @@ -426,7 +426,7 @@ o.order_number, o.create_time, o.order_type, - GROUP_CONCAT( oi.prod_name SEPARATOR '、' ) AS content, + IFNULL(GROUP_CONCAT( oi.prod_name SEPARATOR '、'),o.prod_name) AS content, sum( oi.prod_count ) AS num, CASE WHEN o.order_type = 2 THEN @@ -439,7 +439,7 @@ kpt.logo_url WHEN o.order_type = 1 THEN avatars.user_avatars - END AS logo + END AS logo,o.remarks FROM tz_order o LEFT JOIN hr_user_account ua ON ua.id = o.user_id