|
@@ -554,11 +554,10 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
|
|
|
}
|
|
|
//换手率
|
|
|
if so.Changehand != 0 && isLogin {
|
|
|
- /*musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.changehand", `"`+gconv.String(so.Changehand)+`"`))
|
|
|
- if so.Changehand > 0 {
|
|
|
- //存在
|
|
|
- musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.isfile", `"63"`))
|
|
|
- } */
|
|
|
+ if so.Changehand > 0 {
|
|
|
+ //存在
|
|
|
+ musts = append(musts, `{"range":{"tag_set.wuye.changehand":{"gte":0}}}`)
|
|
|
+ }
|
|
|
}
|
|
|
if so.Isfile != 0 && isLogin {
|
|
|
if so.Isfile > 0 {
|
|
@@ -738,26 +737,26 @@ func (so *SearchOptimize) GetBidSearchQuery() string {
|
|
|
}
|
|
|
startTime, endTime := "", ""
|
|
|
now := time.Now()
|
|
|
- if publishTime == "1" { //本月到期
|
|
|
+ if so.ExpireTime == "1" { //本月到期
|
|
|
startTime = fmt.Sprint(now.Unix())
|
|
|
first := time.Date(now.Year(), now.Month()+1, 1, 0, 0, 0, 0, time.Local)
|
|
|
- endTime = fmt.Sprint(first.AddDate(0, 0, -1).Unix())
|
|
|
+ endTime = fmt.Sprint(first.AddDate(0, 0, 0).Unix())
|
|
|
/* endTime = fmt.Sprint(time.Date(now.Year(), now.Month()+1, 1, 0, 0, 0, 0, time.Local).Unix())*/
|
|
|
- } else if publishTime == "1-3" { //1-3个月到期
|
|
|
+ } else if so.ExpireTime == "1-3" { //1-3个月到期
|
|
|
startTime = fmt.Sprint(time.Date(now.Year(), now.Month()+1, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
+ endTime = fmt.Sprint(time.Date(now.Year(), now.Month()+3, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
+ } else if so.ExpireTime == "3-6" { //3-6个月到期
|
|
|
startTime = fmt.Sprint(time.Date(now.Year(), now.Month()+3, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
- } else if publishTime == "3-6" { //3-6个月到期
|
|
|
- startTime = fmt.Sprint(time.Date(now.Year(), now.Month()+3, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
- startTime = fmt.Sprint(time.Date(now.Year(), now.Month()+6, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
- } else if publishTime == "6-12" { //6-12个月到期
|
|
|
+ endTime = fmt.Sprint(time.Date(now.Year(), now.Month()+6, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
+ } else if so.ExpireTime == "6-12" { //6-12个月到期
|
|
|
startTime = fmt.Sprint(time.Date(now.Year(), now.Month()+6, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
- startTime = fmt.Sprint(time.Date(now.Year(), now.Month()+12, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
- } else if publishTime == "12" { //12个月以后
|
|
|
+ endTime = fmt.Sprint(time.Date(now.Year(), now.Month()+12, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
+ } else if so.ExpireTime == "12" { //12个月以后
|
|
|
startTime = fmt.Sprint(now.Unix())
|
|
|
- startTime = fmt.Sprint(time.Date(now.Year(), now.Month()+12, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
- } else if len(strings.Split(publishTime, "_")) > 1 {
|
|
|
- startTime = strings.Split(publishTime, "_")[0]
|
|
|
- endTime = strings.Split(publishTime, "_")[1]
|
|
|
+ endTime = fmt.Sprint(time.Date(now.Year(), now.Month()+12, now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
+ } else if len(strings.Split(so.ExpireTime, "_")) > 1 {
|
|
|
+ startTime = strings.Split(so.ExpireTime, "_")[0]
|
|
|
+ endTime = strings.Split(so.ExpireTime, "_")[1]
|
|
|
etTime := time.Now()
|
|
|
if endTime != "" {
|
|
|
et, _ := strconv.ParseInt(endTime, 0, 64)
|