From 3558067fd1f34cc84e24a8517949f2b68bdc619d Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Thu, 11 Jan 2024 15:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=95=99=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/huoran/nakadai/controller/OrderController.java | 4 +++- .../java/com/huoran/nakadai/mapper/xml/OrderMapper.xml | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) 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