Commit d963afaf authored by hujiebin's avatar hujiebin

Merge branch 'feature/cp-new' into feature/3.9.0

parents 055b6560 b86a5d09
......@@ -51,6 +51,9 @@ func CpSpace(c *gin.Context) (*mycontext.MyContext, error) {
cpRelation, exists := cp_m.GetCpRelation(model, targetUserInfo.ID)
if exists {
level := cp_m.GetCpLevel(model, cpRelation.ID)
if level.ExpireAt.Before(time.Now()) {
level.ExpireAt = time.Now().AddDate(0, 1, 0)
}
cpLevel, curPoints = level.Level, level.Points
expireAtUnix, settlementDate = level.ExpireAt.Unix(), level.ExpireAt.Format("2006-01-02")
cpDays = int(time.Now().Sub(cpRelation.CreatedTime).Hours()/24) + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment