|
@@ -373,27 +373,27 @@ func GetAttachmentCountById(mgo *MongodbSim, dbName, coll, _id string) int {
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-func NewBiddingInfo(info *map[string]interface{}, keys []string) *BiddingInfo {
|
|
|
+func NewBiddingInfo(info map[string]interface{}, keys []string) *BiddingInfo {
|
|
|
bi := &BiddingInfo{}
|
|
|
- bi.Title, _ = (*info)["title"].(string)
|
|
|
+ bi.Title, _ = info["title"].(string)
|
|
|
bi.ClearTitle = TitleClearRe.ReplaceAllString(strings.Replace(bi.Title, "\n", "", -1), "$1")
|
|
|
- bi.Area, _ = (*info)["area"].(string)
|
|
|
+ bi.Area, _ = info["area"].(string)
|
|
|
bi.AreaTitle = fmt.Sprintf("[%s]%s", bi.Area, bi.ClearTitle)
|
|
|
- bi.Publishtime = util.Int64All((*info)["publishtime"])
|
|
|
+ bi.Publishtime = util.Int64All(info["publishtime"])
|
|
|
bi.PublishtimeYMD = FormatDateByInt64(&bi.Publishtime, Date_Short_Layout)
|
|
|
bi.PublishtimeDiff = util.TimeDiff(time.Unix(bi.Publishtime, 0))
|
|
|
- bi.Buyerclass, _ = (*info)["buyerclass"].(string)
|
|
|
- bi.Subscopeclass = GetSubScopeClass((*info)["s_subscopeclass"])
|
|
|
- bi.Bidamount = (*info)["bidamount"]
|
|
|
- bi.Budget = (*info)["budget"]
|
|
|
+ bi.Buyerclass, _ = info["buyerclass"].(string)
|
|
|
+ bi.Subscopeclass = GetSubScopeClass(info["s_subscopeclass"])
|
|
|
+ bi.Bidamount = info["bidamount"]
|
|
|
+ bi.Budget = info["budget"]
|
|
|
if bi.Bidamount != nil {
|
|
|
bi.Acount = ConversionMoney(bi.Bidamount)
|
|
|
} else if bi.Budget != nil {
|
|
|
bi.Acount = ConversionMoney(bi.Budget)
|
|
|
}
|
|
|
- bi.Id, _ = (*info)["_id"].(string)
|
|
|
- bi.Subtype, _ = (*info)["subtype"].(string)
|
|
|
- bi.Toptype, _ = (*info)["toptype"].(string)
|
|
|
+ bi.Id, _ = info["_id"].(string)
|
|
|
+ bi.Subtype, _ = info["subtype"].(string)
|
|
|
+ bi.Toptype, _ = info["toptype"].(string)
|
|
|
bi.Infotype = bi.Subtype
|
|
|
if bi.Infotype == "" {
|
|
|
bi.Infotype = bi.Toptype
|