This commit is contained in:
2025-10-09 18:31:51 +08:00
parent fc429f5b48
commit dc5a7c311c
4 changed files with 331 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"hm-server/app/main/api/internal/svc"
"hm-server/app/main/api/internal/types"
"hm-server/app/main/model"
"hm-server/common/ctxdata"
"hm-server/common/xerr"
@@ -59,6 +60,13 @@ func (l *QueryListLogic) QueryList(req *types.QueryListReq) (resp *types.QueryLi
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告列表查询, 获取商品信息失败, %+v", err)
}
query.ProductName = product.ProductName
// 检查订单状态,如果订单已退款,则设置查询状态为已退款
order, findOrderErr := l.svcCtx.OrderModel.FindOne(l.ctx, queryModel.OrderId)
if findOrderErr == nil && order.Status == model.OrderStatusRefunded {
query.QueryState = model.QueryStateRefunded
}
list = append(list, query)
}
}