|
@@ -56,7 +56,7 @@ func (r *BaseQuestion) ParseHistoryFsw() {
|
|
|
type questionFilter struct {
|
|
|
HasBuyer bool `json:"hasBuyer" dc:"有采购单位"`
|
|
|
HasWinner bool `json:"hasWinner" dc:"有中标单位"`
|
|
|
- InfoType InfoType `json:"infoType" dc:"信息类型"`
|
|
|
+ SubType InfoType `json:"subType" dc:"信息类型"`
|
|
|
}
|
|
|
type InfoType map[string]bool
|
|
|
|
|
@@ -88,7 +88,7 @@ func (q *cQuestion) GetUsuallyProblem(ctx context.Context, href string, limit in
|
|
|
}
|
|
|
if !((hasBuyer && tFilter.HasBuyer) ||
|
|
|
(hasWinner && tFilter.HasWinner) ||
|
|
|
- len(infoTypes) > 0 && tFilter.InfoType.Check(infoTypes)) {
|
|
|
+ len(infoTypes) > 0 && tFilter.SubType.Check(infoTypes)) {
|
|
|
continue
|
|
|
}
|
|
|
}
|
|
@@ -101,14 +101,14 @@ func getInfo(infoId string) (hasWinner, hasBuyer bool, infoTypes string) {
|
|
|
if infoId == "" {
|
|
|
return
|
|
|
}
|
|
|
- res, ok := utility.MgoBidding.FindById(utility.BiddingConf.Collection, infoId, `{"buyer":1,"winner":1,"toptype":1}`)
|
|
|
+ res, ok := utility.MgoBidding.FindById(utility.BiddingConf.Collection, infoId, `{"buyer":1,"winner":1,"subtype":1}`)
|
|
|
if ok && res == nil || len(*res) == 0 {
|
|
|
- res, _ = utility.MgoBidding.FindById(utility.BiddingConf.Collection, infoId, `{"buyer":1,"winner":1,"toptype":1}`)
|
|
|
+ res, _ = utility.MgoBidding.FindById(utility.BiddingConf.Collection, infoId, `{"buyer":1,"winner":1,"subtype":1}`)
|
|
|
}
|
|
|
if res != nil && len(*res) > 0 {
|
|
|
hasWinner = (*res)["winner"] != nil
|
|
|
hasBuyer = (*res)["buyer"] != nil
|
|
|
- infoTypes = gconv.String((*res)["toptype"])
|
|
|
+ infoTypes = gconv.String((*res)["subtype"])
|
|
|
}
|
|
|
return
|
|
|
}
|