Ver código fonte

更新

guide_order
huangjiajun 1 semana atrás
pai
commit
c625b80d8d
5 arquivos alterados com 18 adições e 4 exclusões
  1. +1
    -0
      app/db/model/ord_list.go
  2. +1
    -0
      app/md/order.go
  3. +1
    -1
      app/svc/svc_order_track_save_create.go
  4. +12
    -0
      app/svc/svc_order_track_save_create_update_zero.go
  5. +3
    -3
      go.mod

+ 1
- 0
app/db/model/ord_list.go Ver arquivo

@@ -13,6 +13,7 @@ type OrdList struct {
ItemCommissionRate float64 `xorm:"not null default 0.00 DOUBLE(6,4)" json:"item_commission_rate"`
PaidPrice float64 `xorm:"not null default 0.00 DOUBLE(10,2)" json:"paid_price"`
OrderType int `xorm:"not null default 0 TINYINT(1)" json:"order_type"`
ShareUid int `xorm:"not null default 0 TINYINT(1)" json:"share_uid"`
PriceType int `xorm:"not null default 0 INT(1)" json:"price_type"`
SecondPriceType int `xorm:"not null default 0 INT(1)" json:"second_price_type"`
FourPriceType int `xorm:"not null default 0 INT(1)" json:"four_price_type"`


+ 1
- 0
app/md/order.go Ver arquivo

@@ -175,6 +175,7 @@ type OrderInfo struct {
TikTokTeamCommission string
TikTokTeamRealCommission string
OptPvd string
ShareUid string
}

type OrderFindRequest struct {


+ 1
- 1
app/svc/svc_order_track_save_create.go Ver arquivo

@@ -912,7 +912,7 @@ func orderFourFreeCheck(eg *xorm.Engine, v *md.OrderInfo, oid int64, uid int, is
eg.Where("id=?", tmp.Id).Cols("is_buy").Update(&tmp)
m.Sale++
eg.Where("id=?", m.Id).Cols("sale").Update(m)
StationDeduct(utils.Int64ToStr(oid), v.PvdOid, dbName)
//StationDeduct(utils.Int64ToStr(oid), v.PvdOid, dbName)
}
return m
}


+ 12
- 0
app/svc/svc_order_track_save_create_update_zero.go Ver arquivo

@@ -484,6 +484,13 @@ func OrderSaveCreateUpdateZero(eg *xorm.Engine, pvd string, ordData *[]md.OrderI
if user != nil {
user.OwnbuyReturnType = ownbuyReturnType //是否有自购奖励
uid = user.Uid
if utils.StrToInt(v.ShareUid) > 0 {
uid = utils.StrToInt(v.ShareUid)
}
profile, _ := db.UserProfileFindByID(eg, uid)
if profile != nil && profile.ParentUid == utils.StrToInt(v.ShareUid) && utils.StrToInt(v.ShareUid) > 0 {
uid = user.Uid
}
isShare := 0
if v.OrderType == md.OrderTypeShare || v.OrderType == md.OrderTypeWechatActShare {
isShare = 1
@@ -774,6 +781,7 @@ func OrderSaveCreateUpdateZero(eg *xorm.Engine, pvd string, ordData *[]md.OrderI
ItemPrice: v.ItemPrice,
PaidPrice: v.PaidPrice,
OrderType: v.OrderType,
ShareUid: utils.StrToInt(v.ShareUid),
PriceType: priceType,
SecondPriceType: secondPriceType,
FourPriceType: fourPriceType,
@@ -843,6 +851,10 @@ func OrderSaveCreateUpdateZero(eg *xorm.Engine, pvd string, ordData *[]md.OrderI
// lvUser.AdditionalSubsidy = v.Commission
//}
OrderRelateInsert(eg, oid, newPvd, newOrd.CreateAt, lvUser, newOrd, dbName, false, mode, "1")
if lvUser.Uid != user.Uid {
data := model.OrdListRelate{Oid: oid, Uid: user.Uid, Amount: 0, AdditionalSubsidy: "0", Pvd: pvd, CreateAt: newOrd.CreateAt, Level: 0, Mode: mode, ExtendType: 6}
eg.InsertOne(&data)
}
} else if returnMoneyOne != nil && returnMoneyType == "1" {
OrderReturnMoneyRelateInsert(eg, oid, newPvd, newOrd.CreateAt, returnMoneyOne, newOrd, dbName, false)
}


+ 3
- 3
go.mod Ver arquivo

@@ -5,7 +5,7 @@ go 1.18
require (
code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git v1.1.2
code.fnuoos.com/go_rely_warehouse/zyos_go_day_luck_draw.git v1.2.1
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.0
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_jg_push.git v1.0.5
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
code.fnuoos.com/go_rely_warehouse/zyos_go_o2o_business.git v1.0.9
@@ -18,7 +18,7 @@ require (
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/forgoer/openssl v1.2.1
github.com/gin-contrib/sessions v1.0.0
github.com/gin-contrib/sessions v1.0.1
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
@@ -108,5 +108,5 @@ require (
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 // indirect
xorm.io/builder v0.3.13 // indirect
)

Carregando…
Cancelar
Salvar