Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
ca76e91ce9
@ -297,10 +297,12 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul
|
||||
)
|
||||
curTime := configure.Now().Unix()
|
||||
|
||||
if activity, err = this.GetHdInfoByItype(pb.HdType_HdCelebration); err == nil {
|
||||
if activity.Stime > curTime || curTime > activity.Etime { // 不在活动范围内数据不给活动记录数据
|
||||
return
|
||||
}
|
||||
if activity, err = this.GetHdInfoByItype(pb.HdType_HdCelebration); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
if activity.Stime > curTime || curTime > activity.Etime { // 不在活动范围内数据不给活动记录数据
|
||||
return
|
||||
}
|
||||
id := activity.Id
|
||||
list, _ = this.modelhdData.getHddataByOid(session.GetUserId(), id)
|
||||
|
@ -34,7 +34,7 @@ func (this *modelGlobal) GetGlobalData(key string, v interface{}) (err error) {
|
||||
// 更新全局配置
|
||||
func (this *modelGlobal) UpdateGlobalData(key string, v interface{}) (err error) {
|
||||
if _, err = this.DBModel.DB.UpdateOne(core.SqlTable(this.TableName), bson.M{"_id": key}, bson.M{"$set": v}, options.Update().SetUpsert(true)); err != nil {
|
||||
this.module.Error("GetGlobalData err", log.Field{Key: "key", Value: key}, log.Field{Key: "err", Value: err.Error()})
|
||||
//this.module.Error("GetGlobalData err", log.Field{Key: "key", Value: key}, log.Field{Key: "err", Value: err.Error()})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user