|
@@ -128,7 +128,7 @@ func (l *SaveTSGuideLogic) SaveTSGuide(in *bxsubscribe.SaveTSGuideReq) (*bxsubsc
|
|
|
for i := 0; i < len(in.Keywords); i++ {
|
|
|
tmp := processKeyword(in.Keywords[i])
|
|
|
if len(tmp) > 0 {
|
|
|
- arryMap = append(arryMap, map[string]interface{}{"matchway": 1, "key": tmp[0], "notkey": nil, "updatetime": time.Now().Unix()})
|
|
|
+ arryMap = append(arryMap, map[string]interface{}{"matchway": 1, "key": tmp[0:1], "notkey": nil, "updatetime": time.Now().Unix()})
|
|
|
}
|
|
|
if len(key) >= countLimit {
|
|
|
break
|
|
@@ -154,9 +154,11 @@ func (l *SaveTSGuideLogic) SaveTSGuide(in *bxsubscribe.SaveTSGuideReq) (*bxsubsc
|
|
|
updateMap[fmt.Sprintf(field, "a_items")] = []map[string]interface{}{item}
|
|
|
}
|
|
|
|
|
|
- updateMap[fmt.Sprintf(field, "l_modifydate")] = date.NowFormat(date.Date_Full_Layout)
|
|
|
+ updateMap[fmt.Sprintf(field, "l_modifydate")] = time.Now()
|
|
|
updateMap["i_ts_guide"] = tsGuidefinished
|
|
|
- if !IC.Compatible.Update(in.UserId, updateMap) {
|
|
|
+ if !IC.Compatible.Update(in.UserId, map[string]interface{}{
|
|
|
+ "$set": updateMap,
|
|
|
+ }) {
|
|
|
logx.Error("设置订阅向导更新失败", in.UserId, updateMap)
|
|
|
return nil, errors.New("设置订阅向导更新失败")
|
|
|
}
|