Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
e9916d2df2
@ -225,7 +225,7 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
|
|||||||
// 校验随机事件是否超时
|
// 校验随机事件是否超时
|
||||||
func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCaravan) (bTimeOut bool) {
|
func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCaravan) (bTimeOut bool) {
|
||||||
|
|
||||||
if data.Eventid != 0 {
|
if data.Tasktime != 0 {
|
||||||
if list, err := this.configure.GetCaravanEventById(data.Eventid); err == nil {
|
if list, err := this.configure.GetCaravanEventById(data.Eventid); err == nil {
|
||||||
// 校验任务是否超时
|
// 校验任务是否超时
|
||||||
if configure.Now().Unix()-data.Tasktime > int64(list.Eventtime) { //TODO 任务超时 通知任务模块处理 并清理相关数据
|
if configure.Now().Unix()-data.Tasktime > int64(list.Eventtime) { //TODO 任务超时 通知任务模块处理 并清理相关数据
|
||||||
@ -238,6 +238,14 @@ func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCara
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.CleanCaravanTask(session.GetUserId(), data) //任务超时 清理任务数据
|
this.CleanCaravanTask(session.GetUserId(), data) //任务超时 清理任务数据
|
||||||
|
data.Eventid = 0
|
||||||
|
data.Tasktime = 0
|
||||||
|
data.Eventid = 0
|
||||||
|
update := make(map[string]interface{})
|
||||||
|
update["eventid"] = data.Eventid
|
||||||
|
update["tasktime"] = data.Tasktime
|
||||||
|
update["eventid"] = data.Eventid
|
||||||
|
this.modelCaravan.modifyCaravanDataByObjId(session.GetUserId(), update)
|
||||||
// 任务超时发送任务失败推送
|
// 任务超时发送任务失败推送
|
||||||
resp := &pb.CaravanTaskCompletePush{}
|
resp := &pb.CaravanTaskCompletePush{}
|
||||||
resp.Data = data
|
resp.Data = data
|
||||||
|
Loading…
Reference in New Issue
Block a user