退款接口

This commit is contained in:
2024-09-29 11:35:22 +08:00
parent c5d68ffffc
commit 655383fd02
2 changed files with 8 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ public class ReturnOrderDTO {
private String shopId;
@NotEmpty
private String note;
@NotEmpty
// @NotEmpty
private String pwd;
@Valid
private List<OrderDetail> orderDetails;

View File

@@ -230,8 +230,13 @@ public class TbShopTableServiceImpl implements TbShopTableService {
TbOrderInfo orderInfo = null;
if (StrUtil.isNotBlank(date.getQrcode())) {
ShopEatTypeInfoDTO shopEatTypeInfoDTO = checkEatModel(criteria.getShopId(), date.getQrcode());
orderInfo = getCurrentOrder(shopEatTypeInfoDTO);
try {
ShopEatTypeInfoDTO shopEatTypeInfoDTO = checkEatModel(criteria.getShopId(), date.getQrcode());
orderInfo = getCurrentOrder(shopEatTypeInfoDTO);
}catch (Exception e) {
log.info(e.getMessage());
}
}
itemMap.put("orderId", orderInfo == null ? null : orderInfo.getId());
@@ -2014,7 +2019,6 @@ public class TbShopTableServiceImpl implements TbShopTableService {
@Override
public Object returnOrder(ReturnOrderDTO returnOrderDTO) {
TbOrderInfo orderInfo = orderInfoMapper.selectOne(new LambdaQueryWrapper<TbOrderInfo>()
.eq(TbOrderInfo::getId, returnOrderDTO.getOrderId())
.eq(TbOrderInfo::getStatus, "closed"));