From 633231b9976ddda4730c912231a30d3c4f9ce171 Mon Sep 17 00:00:00 2001 From: duyu Date: Thu, 18 Jul 2024 11:16:52 +0800 Subject: [PATCH] fix --- app/http/controllers/zhiliansys/zhiliansys.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/http/controllers/zhiliansys/zhiliansys.go b/app/http/controllers/zhiliansys/zhiliansys.go index beeac1a..b89818a 100644 --- a/app/http/controllers/zhiliansys/zhiliansys.go +++ b/app/http/controllers/zhiliansys/zhiliansys.go @@ -43,6 +43,17 @@ func CreateOrder(c *gin.Context) { 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{ OutTradeNo: request.OutTradeNo, ProductId: request.ProductId,