This commit is contained in:
eson
2023-08-28 14:21:06 +08:00
parent 2830ea8724
commit bde9e98f62
26 changed files with 43 additions and 35 deletions

View File

@@ -9,11 +9,12 @@ import (
"fusenapi/utils/format"
"fusenapi/utils/id_generator"
"fusenapi/utils/step_price"
"gorm.io/gorm"
"math"
"strings"
"time"
"gorm.io/gorm"
"context"
"fusenapi/server/inventory/internal/svc"
@@ -106,7 +107,7 @@ func (l *SupplementLogic) Supplement(req *types.SupplementReq, userinfo *auth.Us
amount := step_price.GetCentStepPrice(int(minByNum), stepNum, stepPrice) + optionalPrice
totalAmount := amount * req.Num
newOrderSn := id_generator.GenSnNum()
now := time.Now().Unix()
now := time.Now().UTC().Unix()
deliveryMethod := int64(constants.DELIVERY_METHOD_CLOUD)
isSup := int64(1)
//生成雪花id

View File

@@ -11,10 +11,12 @@ import (
"fusenapi/utils/auth"
"fusenapi/utils/basic"
"fusenapi/utils/id_generator"
"gorm.io/gorm"
"time"
"gorm.io/gorm"
"fusenapi/server/inventory/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
@@ -60,7 +62,7 @@ func (l *TakeLogic) Take(req *types.TakeReq, userinfo *auth.UserInfo) (resp *bas
addressInfoJson := string(addressInfoBytes)
trackNum := id_generator.GenSnNum()
status := int64(constants.STATUS_ORDERD)
now := time.Now().Unix()
now := time.Now().UTC().Unix()
pickUpData := gmodel.FsCloudPickUp{
UserId: &userinfo.UserId,
TrackNum: &trackNum,