This commit is contained in:
duyu 2024-07-18 11:16:52 +08:00
parent 8425a19b39
commit 633231b997
1 changed files with 11 additions and 0 deletions

View File

@ -43,6 +43,17 @@ func CreateOrder(c *gin.Context) {
return return
} }
item, err := zhilianServ.GetByOutTradeNo(request.OutTradeNo, request.MerchantId)
if err != nil {
common.Error(c, 400, err.Error())
return
}
if item != nil {
common.Error(c, 400, "订单已存在")
return
}
orders := &orderMod.Orders{ orders := &orderMod.Orders{
OutTradeNo: request.OutTradeNo, OutTradeNo: request.OutTradeNo,
ProductId: request.ProductId, ProductId: request.ProductId,