@@ -5,16 +5,14 @@ import ( | |||||
) | ) | ||||
type UserPublicPlatoonSettlementRecords struct { | type UserPublicPlatoonSettlementRecords struct { | ||||
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` | |||||
Uid int `json:"uid" xorm:"not null comment('用户id') index INT(11)"` | |||||
CoinId int `json:"coin_id" xorm:"not null default 0 comment('虚拟币id(0为金额)') INT(11)"` | |||||
Amount string `json:"amount" xorm:"not null default '' comment('结算金额') VARCHAR(50)"` | |||||
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)"` | |||||
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"` | |||||
Oid string `json:"oid" xorm:"comment('订单号') VARCHAR(100)"` | |||||
Type int `json:"type" xorm:"not null default 0 comment('0收入 1支出') INT(11)"` | |||||
BeforeAmount string `json:"before_amount" xorm:"comment('变更前金额') VARCHAR(100)"` | |||||
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` | |||||
Uid int `json:"uid" xorm:"not null comment('用户id') index INT(11)"` | |||||
CoinId int `json:"coin_id" xorm:"not null default 0 comment('虚拟币id(0为金额)') INT(11)"` | |||||
Amount string `json:"amount" xorm:"not null default '' comment('结算金额') VARCHAR(50)"` | |||||
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"` | |||||
} | } |
@@ -12,6 +12,7 @@ type UserPublicPlatoonSystemPunishRecords struct { | |||||
Date string `json:"date" xorm:"not null default '' comment('日期(0000-00)') VARCHAR(50)"` | Date string `json:"date" xorm:"not null default '' comment('日期(0000-00)') VARCHAR(50)"` | ||||
Title string `json:"title" xorm:"not null default '' comment('标题') VARCHAR(100)"` | Title string `json:"title" xorm:"not null default '' comment('标题') VARCHAR(100)"` | ||||
Reason string `json:"reason" xorm:"not null default '' comment('原因') VARCHAR(255)"` | 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"` | 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"` | UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` | ||||
} | } |
@@ -476,6 +476,7 @@ func SmallDealCommonWealthReward(engine *xorm.Engine, uid int, isCompleteReward | |||||
Amount: param.Amount, | Amount: param.Amount, | ||||
Title: "结算共富奖励", | Title: "结算共富奖励", | ||||
Date: now.AddDate(0, 0, 30).Format("2006-01-02"), | Date: now.AddDate(0, 0, 30).Format("2006-01-02"), | ||||
Type: 2, | |||||
CreateAt: now, | CreateAt: now, | ||||
UpdateAt: now, | UpdateAt: now, | ||||
} | } | ||||
@@ -561,7 +562,7 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e | |||||
} | } | ||||
//2、查询出 `user_public_platoon_relation` 中相关记录 && 将该记录的uid置为 -1 | //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", | "key": "uid", | ||||
"value": uid, | "value": uid, | ||||
}) | }) | ||||
@@ -580,7 +581,7 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e | |||||
params.Uid = -2 | params.Uid = -2 | ||||
} | } | ||||
updateAffected, err := db.UserPublicPlatoonRelationUpdate(session, params.Id, params) | |||||
updateAffected, err := db.UserSmallPublicPlatoonRelationUpdate(session, params.Id, params) | |||||
if err != nil { | if err != nil { | ||||
_ = session.Rollback() | _ = session.Rollback() | ||||
return | return | ||||
@@ -607,6 +608,7 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e | |||||
Date: now.AddDate(0, 0, 30).Format("2006-01-02"), | Date: now.AddDate(0, 0, 30).Format("2006-01-02"), | ||||
Title: "共富收益-系统处罚记录", | Title: "共富收益-系统处罚记录", | ||||
Reason: reason, | Reason: reason, | ||||
Type: 2, | |||||
CreateAt: now, | CreateAt: now, | ||||
UpdateAt: now, | UpdateAt: now, | ||||
}) | }) | ||||