|
@@ -12,6 +12,7 @@ import (
|
|
"fmt"
|
|
"fmt"
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/os/gctx"
|
|
"github.com/gogf/gf/v2/os/gctx"
|
|
|
|
+ "go.mongodb.org/mongo-driver/bson"
|
|
"sort"
|
|
"sort"
|
|
"strings"
|
|
"strings"
|
|
"sync"
|
|
"sync"
|
|
@@ -1244,8 +1245,12 @@ func (ut *UserTask) ResultSave() {
|
|
if !ut.IsFalse {
|
|
if !ut.IsFalse {
|
|
//未取消
|
|
//未取消
|
|
if ut.IsCancel = utility.IsAnalyzeCancel(ut.RId); !ut.IsCancel {
|
|
if ut.IsCancel = utility.IsAnalyzeCancel(ut.RId); !ut.IsCancel {
|
|
- if ok := do.Mgo.UpdateById(consts.MarketAnalysisReport, ut.RId, map[string]interface{}{
|
|
|
|
- "i_state": 1,
|
|
|
|
|
|
+ if ok := do.Mgo.UpdateById(consts.MarketAnalysisReport, ut.RId, bson.M{
|
|
|
|
+ "$set": bson.M{
|
|
|
|
+ "i_state": 1,
|
|
|
|
+ "l_updateTime": time.Now().Unix(),
|
|
|
|
+ "l_finishTime": time.Now().Unix(),
|
|
|
|
+ },
|
|
}); !ok {
|
|
}); !ok {
|
|
ut.IsFalse = true
|
|
ut.IsFalse = true
|
|
g.Log().Info(model.Ctx, fmt.Sprintf("marketanalysisreport -- 保存失败-:%s , %s", consts.MarketAnalysisReport, ut.RId))
|
|
g.Log().Info(model.Ctx, fmt.Sprintf("marketanalysisreport -- 保存失败-:%s , %s", consts.MarketAnalysisReport, ut.RId))
|