完成管理端订单所有功能
This commit is contained in:
parent
2ed7d003b2
commit
0acf4a8cb0
@ -0,0 +1,131 @@
|
|||||||
|
package com.sky.controller.admin;
|
||||||
|
|
||||||
|
import com.sky.dto.OrdersCancelDTO;
|
||||||
|
import com.sky.dto.OrdersConfirmDTO;
|
||||||
|
import com.sky.dto.OrdersPageQueryDTO;
|
||||||
|
import com.sky.dto.OrdersRejectionDTO;
|
||||||
|
import com.sky.result.PageResult;
|
||||||
|
import com.sky.result.Result;
|
||||||
|
import com.sky.service.OrderService;
|
||||||
|
import com.sky.vo.OrderStatisticsVO;
|
||||||
|
import com.sky.vo.OrderVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单管理
|
||||||
|
*/
|
||||||
|
@RestController("adminOrderController")
|
||||||
|
@RequestMapping("/admin/order")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "订单管理接口")
|
||||||
|
public class OrderController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrderService orderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询订单
|
||||||
|
* @param ordersPageQueryDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/conditionSearch")
|
||||||
|
@ApiOperation("条件查询订单")
|
||||||
|
public Result<PageResult> conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO) {
|
||||||
|
PageResult pageResult = orderService.conditionSearch(ordersPageQueryDTO);
|
||||||
|
return Result.success(pageResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各状态订单数量统计
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/statistics")
|
||||||
|
@ApiOperation("各状态订单数量统计")
|
||||||
|
public Result<OrderStatisticsVO> statistics() {
|
||||||
|
log.info("各状态订单数量统计");
|
||||||
|
OrderStatisticsVO orderStatisticsVO = orderService.statistics();
|
||||||
|
return Result.success(orderStatisticsVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单详情查询
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/details/{id}")
|
||||||
|
@ApiOperation("订单详情查询")
|
||||||
|
public Result<OrderVO> details(@PathVariable Long id) {
|
||||||
|
log.info("订单详情查询, id={}", id);
|
||||||
|
OrderVO orderVO = orderService.details(id);
|
||||||
|
return Result.success(orderVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单
|
||||||
|
* @param ordersConfirmDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/confirm")
|
||||||
|
@ApiOperation("接单")
|
||||||
|
public Result confirm(@RequestBody OrdersConfirmDTO ordersConfirmDTO) {
|
||||||
|
log.info("接单, ordersConfirmDTO={}", ordersConfirmDTO);
|
||||||
|
orderService.confirm(ordersConfirmDTO);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拒单
|
||||||
|
* @param ordersRejectionDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/rejection")
|
||||||
|
@ApiOperation("拒单")
|
||||||
|
public Result rejection(@RequestBody OrdersRejectionDTO ordersRejectionDTO) throws Exception {
|
||||||
|
log.info("拒单, ordersRejectionDTO={}", ordersRejectionDTO);
|
||||||
|
orderService.rejection(ordersRejectionDTO);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消订单
|
||||||
|
* @param ordersCancelDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/cancel")
|
||||||
|
@ApiOperation("取消订单")
|
||||||
|
public Result cancel(@RequestBody OrdersCancelDTO ordersCancelDTO) throws Exception {
|
||||||
|
log.info("取消订单, ordersConfirmDTO={}", ordersCancelDTO);
|
||||||
|
orderService.cancel(ordersCancelDTO);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单派送
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/delivery/{id}")
|
||||||
|
@ApiOperation("订单派送")
|
||||||
|
public Result delivery(@PathVariable Long id) {
|
||||||
|
log.info("订单派送, id={}", id);
|
||||||
|
orderService.delivery(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单完成
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/complete/{id}")
|
||||||
|
@ApiOperation("订单完成")
|
||||||
|
public Result complete(@PathVariable Long id) {
|
||||||
|
log.info("订单完成, id={}", id);
|
||||||
|
orderService.complete(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
}
|
@ -41,4 +41,12 @@ public interface OrderMapper {
|
|||||||
*/
|
*/
|
||||||
@Select("select * from orders where id = #{id}")
|
@Select("select * from orders where id = #{id}")
|
||||||
Orders getById(Long id);
|
Orders getById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据状态查询订单数量
|
||||||
|
* @param status
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Select("select count(*) from orders where status = #{status}")
|
||||||
|
Integer countStatus(Integer status);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package com.sky.service;
|
package com.sky.service;
|
||||||
|
|
||||||
import com.sky.dto.OrdersPageQueryDTO;
|
import com.sky.dto.*;
|
||||||
import com.sky.dto.OrdersPaymentDTO;
|
|
||||||
import com.sky.dto.OrdersSubmitDTO;
|
|
||||||
import com.sky.result.PageResult;
|
import com.sky.result.PageResult;
|
||||||
import com.sky.vo.OrderPaymentVO;
|
import com.sky.vo.OrderPaymentVO;
|
||||||
|
import com.sky.vo.OrderStatisticsVO;
|
||||||
import com.sky.vo.OrderSubmitVO;
|
import com.sky.vo.OrderSubmitVO;
|
||||||
import com.sky.vo.OrderVO;
|
import com.sky.vo.OrderVO;
|
||||||
|
|
||||||
@ -57,4 +56,47 @@ public interface OrderService {
|
|||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
void repetition(Long id);
|
void repetition(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询订单
|
||||||
|
* @param ordersPageQueryDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各状态订单数量统计
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
OrderStatisticsVO statistics();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单
|
||||||
|
* @param ordersConfirmDTO
|
||||||
|
*/
|
||||||
|
void confirm(OrdersConfirmDTO ordersConfirmDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拒单
|
||||||
|
* @param ordersRejectionDTO
|
||||||
|
*/
|
||||||
|
void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单取消
|
||||||
|
* @param ordersCancelDTO
|
||||||
|
*/
|
||||||
|
void cancel(OrdersCancelDTO ordersCancelDTO) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单派送
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
void delivery(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单完成
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
void complete(Long id);
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,7 @@ import com.github.pagehelper.Page;
|
|||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.sky.constant.MessageConstant;
|
import com.sky.constant.MessageConstant;
|
||||||
import com.sky.context.BaseContext;
|
import com.sky.context.BaseContext;
|
||||||
import com.sky.dto.OrdersPageQueryDTO;
|
import com.sky.dto.*;
|
||||||
import com.sky.dto.OrdersPaymentDTO;
|
|
||||||
import com.sky.dto.OrdersSubmitDTO;
|
|
||||||
import com.sky.entity.*;
|
import com.sky.entity.*;
|
||||||
import com.sky.exception.AddressBookBusinessException;
|
import com.sky.exception.AddressBookBusinessException;
|
||||||
import com.sky.exception.OrderBusinessException;
|
import com.sky.exception.OrderBusinessException;
|
||||||
@ -17,12 +15,15 @@ import com.sky.result.PageResult;
|
|||||||
import com.sky.service.OrderService;
|
import com.sky.service.OrderService;
|
||||||
import com.sky.utils.WeChatPayUtil;
|
import com.sky.utils.WeChatPayUtil;
|
||||||
import com.sky.vo.OrderPaymentVO;
|
import com.sky.vo.OrderPaymentVO;
|
||||||
|
import com.sky.vo.OrderStatisticsVO;
|
||||||
import com.sky.vo.OrderSubmitVO;
|
import com.sky.vo.OrderSubmitVO;
|
||||||
import com.sky.vo.OrderVO;
|
import com.sky.vo.OrderVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -31,6 +32,7 @@ import java.util.List;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class OrderServiceImpl implements OrderService {
|
public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -215,7 +217,7 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消订单
|
* 用户取消订单
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
public void userCancelById(Long id) throws Exception {
|
public void userCancelById(Long id) throws Exception {
|
||||||
@ -256,7 +258,7 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
orderMapper.update(orders);
|
orderMapper.update(orders);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**】
|
/**
|
||||||
* 再来一单
|
* 再来一单
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
@ -283,4 +285,222 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
//将购物车对象的菜品套餐批量插入到数据库
|
//将购物车对象的菜品套餐批量插入到数据库
|
||||||
shoppingCartMapper.insertBatch(shoppingCartList);
|
shoppingCartMapper.insertBatch(shoppingCartList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询订单列表
|
||||||
|
* @param ordersPageQueryDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO) {
|
||||||
|
//开始分页
|
||||||
|
PageHelper.startPage(ordersPageQueryDTO.getPage(), ordersPageQueryDTO.getPageSize());
|
||||||
|
Page<Orders> page = orderMapper.pageQuery(ordersPageQueryDTO);
|
||||||
|
|
||||||
|
//分订单状态,需要额外返回订单菜品信息,将Orders转化为OrderVO
|
||||||
|
List<OrderVO> orderVOList = getOrderVOList(page);
|
||||||
|
|
||||||
|
return new PageResult(page.getTotal(), orderVOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各状态订单统计
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public OrderStatisticsVO statistics() {
|
||||||
|
//根据状态,分别查询待接单、待派送、派送中订单数量
|
||||||
|
Integer toBeConfirmed = orderMapper.countStatus(Orders.TO_BE_CONFIRMED);
|
||||||
|
Integer confirmed = orderMapper.countStatus(Orders.CONFIRMED);
|
||||||
|
Integer deliveryInProgress = orderMapper.countStatus(Orders.DELIVERY_IN_PROGRESS);
|
||||||
|
|
||||||
|
//封装vo对象并返回
|
||||||
|
OrderStatisticsVO orderStatisticsVO = new OrderStatisticsVO();
|
||||||
|
orderStatisticsVO.setToBeConfirmed(toBeConfirmed);
|
||||||
|
orderStatisticsVO.setConfirmed(confirmed);
|
||||||
|
orderStatisticsVO.setDeliveryInProgress(deliveryInProgress);
|
||||||
|
return orderStatisticsVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单
|
||||||
|
* @param ordersConfirmDTO
|
||||||
|
*/
|
||||||
|
public void confirm(OrdersConfirmDTO ordersConfirmDTO) {
|
||||||
|
Orders orders = Orders.builder()
|
||||||
|
.id(ordersConfirmDTO.getId())
|
||||||
|
.status(Orders.CONFIRMED)
|
||||||
|
.build();
|
||||||
|
orderMapper.update(orders);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拒单
|
||||||
|
* @param ordersRejectionDTO
|
||||||
|
*/
|
||||||
|
public void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception {
|
||||||
|
//根据id查询订单
|
||||||
|
Orders ordersDB = orderMapper.getById(ordersRejectionDTO.getId());
|
||||||
|
|
||||||
|
//校验订单是否存在
|
||||||
|
if (ordersDB == null) {
|
||||||
|
throw new OrderBusinessException(MessageConstant.ORDER_NOT_FOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
//订单状态 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消
|
||||||
|
//订单处于待接单状态,才可以拒单
|
||||||
|
Integer status = ordersDB.getStatus();
|
||||||
|
if (status != Orders.TO_BE_CONFIRMED) {
|
||||||
|
throw new OrderBusinessException(MessageConstant.ORDER_STATUS_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
//支付状态
|
||||||
|
Integer payStatus = ordersDB.getPayStatus();
|
||||||
|
//订单已支付,需要退款
|
||||||
|
// if (payStatus == Orders.PAID) {
|
||||||
|
// //用户已支付,需要退款,调用微信支付退款接口
|
||||||
|
// String refund = weChatPayUtil.refund(
|
||||||
|
// ordersDB.getNumber(),
|
||||||
|
// ordersDB.getNumber(),
|
||||||
|
// new BigDecimal(0.01),
|
||||||
|
// new BigDecimal(0.01));
|
||||||
|
// log.info("申请退款:{}", refund);
|
||||||
|
// }
|
||||||
|
|
||||||
|
//更新订单状态、拒单原因、拒单时间
|
||||||
|
Orders orders = new Orders();
|
||||||
|
orders.setId(ordersRejectionDTO.getId());
|
||||||
|
orders.setStatus(Orders.CANCELLED);
|
||||||
|
orders.setRejectionReason(ordersRejectionDTO.getRejectionReason());
|
||||||
|
orders.setCancelTime(LocalDateTime.now());
|
||||||
|
|
||||||
|
orderMapper.update(orders);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理端取消订单
|
||||||
|
* @param ordersCancelDTO
|
||||||
|
*/
|
||||||
|
public void cancel(OrdersCancelDTO ordersCancelDTO) throws Exception {
|
||||||
|
//根据id查询订单
|
||||||
|
Orders ordersDB = orderMapper.getById(ordersCancelDTO.getId());
|
||||||
|
|
||||||
|
//校验订单是否存在
|
||||||
|
if (ordersDB == null) {
|
||||||
|
throw new OrderBusinessException(MessageConstant.ORDER_NOT_FOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
//订单状态 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消
|
||||||
|
Integer payStatus = ordersDB.getPayStatus();
|
||||||
|
//订单处于待接单状态,说明已支付,需要退款
|
||||||
|
// if (payStatus == Orders.PAID) {
|
||||||
|
// //用户已支付,需要退款,调用微信支付退款接口
|
||||||
|
// String refund = weChatPayUtil.refund(
|
||||||
|
// ordersDB.getNumber(),
|
||||||
|
// ordersDB.getNumber(),
|
||||||
|
// new BigDecimal(0.01),
|
||||||
|
// new BigDecimal(0.01));
|
||||||
|
// log.info("申请退款:{}", refund);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
//更新订单状态、取消原因、取消时间
|
||||||
|
Orders orders = new Orders();
|
||||||
|
orders.setId(ordersCancelDTO.getId());
|
||||||
|
orders.setStatus(Orders.CANCELLED);
|
||||||
|
orders.setRejectionReason(ordersCancelDTO.getCancelReason());
|
||||||
|
orders.setCancelTime(LocalDateTime.now());
|
||||||
|
|
||||||
|
orderMapper.update(orders);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单派送
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void delivery(Long id) {
|
||||||
|
//根据id查询订单
|
||||||
|
Orders ordersDB = orderMapper.getById(id);
|
||||||
|
|
||||||
|
//校验订单是否存在
|
||||||
|
if (ordersDB == null) {
|
||||||
|
throw new OrderBusinessException(MessageConstant.ORDER_NOT_FOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
//订单状态为已接单时,才可以派送, 否则抛出异常
|
||||||
|
if (ordersDB.getStatus() != Orders.CONFIRMED) {
|
||||||
|
throw new OrderBusinessException(MessageConstant.ORDER_STATUS_ERROR);
|
||||||
|
}
|
||||||
|
Orders orders = new Orders();
|
||||||
|
orders.setId(ordersDB.getId());
|
||||||
|
//订单状态修改为 已派送
|
||||||
|
orders.setStatus(Orders.DELIVERY_IN_PROGRESS);
|
||||||
|
orderMapper.update(orders);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单完成
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void complete(Long id) {
|
||||||
|
//根据id查询订单
|
||||||
|
Orders ordersDB = orderMapper.getById(id);
|
||||||
|
|
||||||
|
//校验订单是否存在
|
||||||
|
if (ordersDB == null) {
|
||||||
|
throw new OrderBusinessException(MessageConstant.ORDER_NOT_FOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
//订单状态为派送中时,才可以完成, 否则抛出异常
|
||||||
|
if (ordersDB.getStatus() != Orders.DELIVERY_IN_PROGRESS) {
|
||||||
|
throw new OrderBusinessException(MessageConstant.ORDER_STATUS_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
Orders orders = new Orders();
|
||||||
|
orders.setId(ordersDB.getId());
|
||||||
|
//订单状态修改为 已完成
|
||||||
|
orders.setStatus(Orders.COMPLETED);
|
||||||
|
orders.setDeliveryTime(LocalDateTime.now());
|
||||||
|
|
||||||
|
orderMapper.update(orders);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<OrderVO> getOrderVOList(Page<Orders> page) {
|
||||||
|
//需要返回订单菜品信息,自定义OrderVO响应结果
|
||||||
|
List<OrderVO> orderVOList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<Orders> ordersList = page.getResult();
|
||||||
|
if (!CollectionUtils.isEmpty(ordersList)) {
|
||||||
|
ordersList.forEach(orders -> {
|
||||||
|
// 将共同字段复制到vo
|
||||||
|
OrderVO orderVO = new OrderVO();
|
||||||
|
BeanUtils.copyProperties(orders, orderVO);
|
||||||
|
//将菜品对象转为字符串方便前端展示
|
||||||
|
String orderDishes = getOrderDishesStr(orders);
|
||||||
|
|
||||||
|
//封装vo对象
|
||||||
|
orderVO.setOrderDishes(orderDishes);
|
||||||
|
orderVOList.add(orderVO);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return orderVOList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单id获取菜品信息字符串
|
||||||
|
* @param orders
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getOrderDishesStr(Orders orders) {
|
||||||
|
// 查询订单菜品详细信息(订单终端菜品和数量)
|
||||||
|
List<OrderDetail> orderDetailList = orderDetailMapper.getByOrderId(orders.getId());
|
||||||
|
|
||||||
|
// 将每一条订单菜品信息转换为字符串(格式:菜品名称*数量)
|
||||||
|
List<String> orderDishesList = orderDetailList.stream().map(orderDetail -> {
|
||||||
|
String orderDish = orderDetail.getName() + "*" + orderDetail.getNumber() + ";";
|
||||||
|
return orderDish;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 将列表转换为字符串
|
||||||
|
return String.join("", orderDishesList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user