|
|
@@ -48,7 +48,7 @@ func AddPublicPlatoonRelateCommission(engine *xorm.Engine, AddPublicPlatoonRelat |
|
|
|
uniqueIdentifier := strings.Split(userPublicPlatoonRelation.UniqueIdentifier, "-") |
|
|
|
uniqueIdentifier[1] = param.Uid |
|
|
|
userPublicPlatoonRelation.UniqueIdentifier = strings.Join(uniqueIdentifier, "-") |
|
|
|
updateAffected, err := db.UserPublicPlatoonRelationUpdate(engine.NewSession(), userPublicPlatoonRelation.Id, userPublicPlatoonRelation) |
|
|
|
updateAffected, err := db.UserPublicPlatoonRelationUpdate(engine.NewSession(), userPublicPlatoonRelation.Id, userPublicPlatoonRelation, "uid", "unique_identifier") |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
@@ -247,7 +247,7 @@ func UpdateWaitForSettlementDate(engine *xorm.Engine, userIds []string) (err err |
|
|
|
settleDay = userPublicPlatoonSetting.SettleDay |
|
|
|
} |
|
|
|
//Todo:: 将 user_public_platoon_relation 中 wait_for_settlement_date 设置为 30天后 |
|
|
|
sql := "update user_public_platoon_amount set wait_for_settlement_date = ? where uid in (" + strings.Join(userIds, ",") + ")" |
|
|
|
sql := "update user_public_platoon_relation set wait_for_settlement_date = ? where uid in (" + strings.Join(userIds, ",") + ")" |
|
|
|
waitForSettlementDate := time.Now().AddDate(0, 0, settleDay).Format("2006-01-02") |
|
|
|
_, err = engine.Exec(sql, waitForSettlementDate) |
|
|
|
if err != nil { |
|
|
@@ -387,7 +387,7 @@ func DealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (err er |
|
|
|
_ = session.Rollback() |
|
|
|
} |
|
|
|
params.Uid = -1 |
|
|
|
updateAffected, err := db.UserPublicPlatoonRelationUpdate(session, params.Id, params) |
|
|
|
updateAffected, err := db.UserPublicPlatoonRelationUpdate(session, params.Id, params, "uid") |
|
|
|
if err != nil { |
|
|
|
_ = session.Rollback() |
|
|
|
return |
|
|
|