|
|
@@ -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) |
|
|
|
} |
|
|
|