|
@@ -1024,7 +1024,7 @@ func GetKeySet(t string, u *map[string]interface{}, data []string) (bool, []stri
|
|
|
const (
|
|
|
INDEX = "bidding"
|
|
|
TYPE = "bidding"
|
|
|
- bidField = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","filetext","spidercode","site","buyer","bidopentime","buyertel","buyerperson","agency","agencyperson","agencytel","s_winner",winnerperson","winnertel","signendtime","bidendtime","entidlist"`
|
|
|
+ bidField = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","filetext","spidercode","site","buyer","bidopentime","buyertel","buyerperson","agency","agencyperson","agencytel","s_winner","winnerperson","winnertel","signendtime","bidendtime","entidlist"`
|
|
|
bidTime = `{"range":{"publishtime":{"gt":%d}}}`
|
|
|
bidSort = `{"publishtime":"desc"}`
|
|
|
findfields = `"title"`
|
|
@@ -1067,11 +1067,11 @@ func (s *subscribePush) listManager(spqp *SubPushQueryParam, list []map[string]i
|
|
|
length := len(list)
|
|
|
resultList = make([]*bxsubscribe.SubscribeInfo, length)
|
|
|
pushInsert := []interface{}{}
|
|
|
- product := ""
|
|
|
+ var product interface{}
|
|
|
if spqp.UserType == SubVipFlag {
|
|
|
- product = "1"
|
|
|
+ product = 1
|
|
|
} else if spqp.UserType == MemberFlag {
|
|
|
- product = "2"
|
|
|
+ product = 2
|
|
|
}
|
|
|
for i := length - 1; i >= 0; i-- {
|
|
|
v := list[i]
|
|
@@ -1111,7 +1111,7 @@ func (s *subscribePush) listManager(spqp *SubPushQueryParam, list []map[string]i
|
|
|
pushInsert = append(pushInsert, common.InterfaceToStr(infoid), matchkey, now, area, city, buyerclass, toptype, subtype, subscopeclassStr, budget, bidamount, attachment_count)
|
|
|
switch s.ModuleFlag {
|
|
|
case EntnicheFlag:
|
|
|
- pushInsert = append(pushInsert, entid, deptid, entUserId, 1, product)
|
|
|
+ pushInsert = append(pushInsert, entUserId, entid, deptid, 1, product)
|
|
|
case MemberFlag:
|
|
|
pushInsert = append(pushInsert, common.InterfaceToStr(spqp.NewUserId))
|
|
|
case SubVipFlag:
|
|
@@ -1345,11 +1345,24 @@ func (s *subscribePush) getUserInfo(spqp *SubPushQueryParam) (vc *ViewCondition)
|
|
|
entInfo, deptId := (&ms.MatchJob{}).Start(entId, entUserId)
|
|
|
if entInfo != nil && len(entInfo) > 0 {
|
|
|
spqp.DeptId = strconv.Itoa(deptId)
|
|
|
- isPayBool = true
|
|
|
- tmpInfo.Items, _ = entInfo["a_items"].([]interface{})
|
|
|
- tmpInfo.BuyerClass, _ = entInfo["a_buyerclass"].([]interface{})
|
|
|
- tmpInfo.SubType, _ = entInfo["a_infotype"].([]interface{})
|
|
|
- tmpInfo.Area, _ = entInfo["o_area"].(map[string]interface{})
|
|
|
+ if common.IntAll(entInfo["i_type"]) == 2 {
|
|
|
+ if entInfo["a_key"] != nil {
|
|
|
+ tmpInfo.Items, _ = entInfo["a_key"].([]interface{})
|
|
|
+ //信息类型
|
|
|
+ tmpInfo.SubType, _ = entInfo["a_infotype"].([]interface{})
|
|
|
+ //省份
|
|
|
+ tmpInfo.Area, _ = entInfo["o_area"].(map[string]interface{})
|
|
|
+ if common.IntAllDef(entInfo["i_ppstatus"], 0) == 1 && entInfo["o_area_p"] != nil {
|
|
|
+ tmpInfo.Area, _ = entInfo["o_area_p"].(map[string]interface{})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isPayBool = true
|
|
|
+ tmpInfo.Items, _ = entInfo["a_items"].([]interface{})
|
|
|
+ tmpInfo.BuyerClass, _ = entInfo["a_buyerclass"].([]interface{})
|
|
|
+ tmpInfo.SubType, _ = entInfo["a_infotype"].([]interface{})
|
|
|
+ tmpInfo.Area, _ = entInfo["o_area"].(map[string]interface{})
|
|
|
+ }
|
|
|
}
|
|
|
default:
|
|
|
userMap, ok := IC.Mgo.FindById("user", spqp.UserId, `{"o_jy":1}`)
|