采购留言

main
cheney 11 months ago
parent 64ed03ae38
commit 3558067fd1
  1. 4
      nakadai/src/main/java/com/huoran/nakadai/controller/OrderController.java
  2. 8
      nakadai/src/main/java/com/huoran/nakadai/mapper/xml/OrderMapper.xml

@ -161,12 +161,14 @@ public class OrderController {
public ServerResponseEntity<OrderNumbersDto> 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());

@ -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

Loading…
Cancel
Save