|
|
@@ -213,6 +213,10 @@ type Useraccount struct {
|
|
|
Canrecommend int32 `json:"canrecommend" xorm:"CANRECOMMEND"` // 是否可推荐 - 0:不可 1;可
|
|
|
|
|
|
TodayRefercount int `json:"todayrefercount" xorm:"-"` // 今日推荐人数
|
|
|
+
|
|
|
+ CURSCORE int64 `json:"curscore" xorm:"-"` // 积分
|
|
|
+
|
|
|
+ IsSigned bool `json:"issigned" xorm:"-"` // 今日是否已签到
|
|
|
}
|
|
|
|
|
|
// TableName is USERACCOUNT
|
|
|
@@ -646,6 +650,21 @@ func GetUserAccount(userID int) (*Useraccount, error) {
|
|
|
}
|
|
|
userAccount.TodayRefercount = t.TodayRefercount
|
|
|
|
|
|
+ // 当前积分
|
|
|
+ type tmp1 struct {
|
|
|
+ CURSCORE int64 `json:"curscore" xorm:"CURSCORE"` // 期末积分
|
|
|
+ }
|
|
|
+ t1 := new(tmp1)
|
|
|
+ sql = fmt.Sprintf("select t.CURSCORE from THJ_USERSCORE t where t.USERID = %v", userAccount.Userid)
|
|
|
+ if _, err := engine.SQL(sql).Get(t); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ userAccount.CURSCORE = t1.CURSCORE
|
|
|
+
|
|
|
+ // 今日是否已签到
|
|
|
+ p := new(Thjsignin)
|
|
|
+ userAccount.IsSigned, _ = engine.Where("userid = ?", userAccount.Userid).And("tradedate = to_char(sysdate, 'yyyymmdd')").Get(&p)
|
|
|
+
|
|
|
return &userAccount, nil
|
|
|
}
|
|
|
|