huangjiajun há 2 anos
ascendente
cometimento
3324bb3787
3 ficheiros alterados com 6 adições e 2 eliminações
  1. +1
    -0
      db/model/user_public_platoon_settlement_records.go
  2. +1
    -0
      db/model/user_public_platoon_system_punish_records.go
  3. +4
    -2
      rule/small_public_platoon_relate_commission.go

+ 1
- 0
db/model/user_public_platoon_settlement_records.go Ver ficheiro

@@ -12,6 +12,7 @@ type UserPublicPlatoonSettlementRecords struct {
Title string `json:"title" xorm:"comment('标题') VARCHAR(255)"`
Date string `json:"date" xorm:"not null default '' comment('结算日期(0000-00)') VARCHAR(50)"`
Kind int `json:"kind" xorm:"not null default 1 comment('结算种类(1:转入用户余额 2:清零)') TINYINT(1)"`
Type int `json:"type" xorm:"not null default 1 comment('类型(1:大公排 2:小公排)') TINYINT(1)"`
CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 1
- 0
db/model/user_public_platoon_system_punish_records.go Ver ficheiro

@@ -12,6 +12,7 @@ type UserPublicPlatoonSystemPunishRecords struct {
Date string `json:"date" xorm:"not null default '' comment('日期(0000-00)') VARCHAR(50)"`
Title string `json:"title" xorm:"not null default '' comment('标题') VARCHAR(100)"`
Reason string `json:"reason" xorm:"not null default '' comment('原因') VARCHAR(255)"`
Type int `json:"type" xorm:"not null default 1 comment('类型(1:大公排 2:小公排)') TINYINT(1)"`
CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 4
- 2
rule/small_public_platoon_relate_commission.go Ver ficheiro

@@ -478,6 +478,7 @@ func SmallDealCommonWealthReward(engine *xorm.Engine, uid int, isCompleteReward
Amount: param.Amount,
Title: "结算共富奖励",
Date: now.AddDate(0, 0, 30).Format("2006-01-02"),
Type: 2,
CreateAt: now,
UpdateAt: now,
}
@@ -563,7 +564,7 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e
}

//2、查询出 `user_public_platoon_relation` 中相关记录 && 将该记录的uid置为 -1
params, err := db.UserPublicPlatoonRelationGetOneByParams(engine, map[string]interface{}{
params, err := db.UserSmallPublicPlatoonRelationGetOneByParams(engine, map[string]interface{}{
"key": "uid",
"value": uid,
})
@@ -582,7 +583,7 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e
params.Uid = -2
}

updateAffected, err := db.UserPublicPlatoonRelationUpdate(session, params.Id, params)
updateAffected, err := db.UserSmallPublicPlatoonRelationUpdate(session, params.Id, params)
if err != nil {
_ = session.Rollback()
return
@@ -609,6 +610,7 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e
Date: now.AddDate(0, 0, 30).Format("2006-01-02"),
Title: "共富收益-系统处罚记录",
Reason: reason,
Type: 2,
CreateAt: now,
UpdateAt: now,
})


Carregando…
Cancelar
Guardar