Compare commits
No commits in common. "80da315d7bbeb291f8340fc295ed27c8034dc1b0" and "4195330c0c75f7b514e463cd2c91d646c0531efa" have entirely different histories.
80da315d7b
...
4195330c0c
@ -2,6 +2,7 @@ package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@ -9,7 +10,6 @@ import (
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/api/payment"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/config"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
@ -19,9 +19,6 @@ import (
|
||||
"math"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
@ -144,13 +141,7 @@ func CreateAntomPay(c *gin.Context) {
|
||||
|
||||
// 获取 用户信息
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
// 创建审批 防止重复提交
|
||||
lockKey := fmt.Sprintf("create_antom_pay_%v", userInfo.ID)
|
||||
reply := cache.RedisClient.SetNX(lockKey, 0, 5*time.Second)
|
||||
if !reply.Val() {
|
||||
service.Error(c, errors.New(common.CreateBundleFailed))
|
||||
return
|
||||
}
|
||||
|
||||
// outTradeNo就是orderNo,根据这个去查询子表的source,如果是2就时单独的子套餐,如果是1就是主套餐
|
||||
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
||||
OrderNo: req.OutTradeNo,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user