Refine live schedule data
- Add special_live_rotation_m data to main.db for rotated special live scheduling - Split normal and special live queries to avoid selecting special-only columns from normal_live_m - Build live schedule/status around rotated special lives and derived training lives - Reuse user training energy values in login top info and live party list responses - Set training energy and max training energy defaults to 999 Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
func partyList(ctx *gin.Context) {
|
||||
ss := session.Get(ctx)
|
||||
defer ss.Finalize()
|
||||
userInfo := ss.GetUserInfo()
|
||||
|
||||
pref := usermodel.UserPref{}
|
||||
_, err := ss.UserEng.Table("user_pref").Where("user_id = ?", ss.UserID).Get(&pref)
|
||||
@@ -37,7 +38,7 @@ func partyList(ctx *gin.Context) {
|
||||
|
||||
if len(partyList) == 0 {
|
||||
selfParty := liveschema.PartyList{
|
||||
UserInfo: ss.GetUserInfo(),
|
||||
UserInfo: userInfo,
|
||||
SettingAwardID: pref.AwardID,
|
||||
FriendStatus: usermodel.ClientFriendStatusNone,
|
||||
}
|
||||
@@ -52,8 +53,8 @@ func partyList(ctx *gin.Context) {
|
||||
ss.Respond(liveschema.PartyListResp{
|
||||
ResponseData: liveschema.PartyListData{
|
||||
PartyList: partyList,
|
||||
TrainingEnergy: 10,
|
||||
TrainingEnergyMax: 10,
|
||||
TrainingEnergy: userInfo.TrainingEnergy,
|
||||
TrainingEnergyMax: userInfo.TrainingEnergyMax,
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
|
||||
Reference in New Issue
Block a user