炉子升级后提升炉温上限时需要开启自动恢复

This commit is contained in:
meixiongfeng 2023-04-12 11:44:32 +08:00
parent 0d37725262
commit 92b7b5747d

View File

@ -3,6 +3,7 @@ package smithy
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"google.golang.org/protobuf/proto"
)
@ -39,6 +40,11 @@ func (this *apiComp) StoveUp(session comm.IUserSession, req *pb.SmithyStoveUpReq
}
stove.Lv += 1
update := make(map[string]interface{})
if stove.RecoveTime == 0 {
stove.RecoveTime = configure.Now().Unix()
update["recoveTime"] = stove.RecoveTime
}
//update["temperature"] = stove.Temperature
update["lv"] = stove.Lv
this.module.modelStove.updateSmithyStove(session.GetUserId(), update)