采购留言

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) { 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());

@ -368,7 +368,7 @@
o.order_number, o.order_number,
o.create_time, o.create_time,
o.order_type, 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, sum( oi.prod_count ) AS num,
CASE CASE
WHEN o.order_type = 2 THEN WHEN o.order_type = 2 THEN
@ -381,7 +381,7 @@
kpt.logo_url kpt.logo_url
WHEN o.order_type = 1 THEN WHEN o.order_type = 1 THEN
avatars.user_avatars avatars.user_avatars
END AS logo END AS logo,o.remarks
FROM FROM
tz_order o tz_order o
LEFT JOIN hr_user_account ua ON ua.id = o.user_id LEFT JOIN hr_user_account ua ON ua.id = o.user_id
@ -426,7 +426,7 @@
o.order_number, o.order_number,
o.create_time, o.create_time,
o.order_type, 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, sum( oi.prod_count ) AS num,
CASE CASE
WHEN o.order_type = 2 THEN WHEN o.order_type = 2 THEN
@ -439,7 +439,7 @@
kpt.logo_url kpt.logo_url
WHEN o.order_type = 1 THEN WHEN o.order_type = 1 THEN
avatars.user_avatars avatars.user_avatars
END AS logo END AS logo,o.remarks
FROM FROM
tz_order o tz_order o
LEFT JOIN hr_user_account ua ON ua.id = o.user_id LEFT JOIN hr_user_account ua ON ua.id = o.user_id

Loading…
Cancel
Save