Эх сурвалжийг харах

Merge branch 'dev/4.9.24_fu' of qmx/jy into feature/v4.9.24

fuwencai 1 жил өмнө
parent
commit
dbc2edba67

+ 9 - 10
src/jfw/modules/bigmember/src/service/analysis/forecastproject.go

@@ -9,7 +9,6 @@ import (
 	"jy/src/jfw/modules/bigmember/src/util"
 	"log"
 	"sort"
-	"strconv"
 	"strings"
 	"time"
 
@@ -50,7 +49,7 @@ const (
 
 *
 */
-func getForecastProjectSql(scd *util.ViewCondition, startTime, endTime int, dataType string, minPrice int, maxPrice int) string {
+func getForecastProjectSql(scd *util.ViewCondition, startTime, endTime int, dataType string, minPrice, maxPrice float64) string {
 	musts := []string{}
 	bools := []string{}
 	entTimeStr := ``
@@ -122,13 +121,13 @@ func getForecastProjectSql(scd *util.ViewCondition, startTime, endTime int, data
 	if minPrice > 0 || maxPrice > 0 {
 		pricequery := `{"range":{"sortprice":{`
 		if minPrice > 0 {
-			pricequery += `"gte":` + strconv.Itoa(minPrice*10000)
+			pricequery += `"gte":` + fmt.Sprintf("%.0f", minPrice*10000)
 		}
 		if minPrice > 0 && maxPrice > 0 {
 			pricequery += `,`
 		}
 		if maxPrice > 0 {
-			pricequery += `"lt":` + strconv.Itoa(maxPrice*10000)
+			pricequery += `"lt":` + fmt.Sprintf("%.0f", maxPrice*10000)
 		}
 		pricequery += `}}}`
 		musts = append(musts, pricequery)
@@ -318,8 +317,8 @@ func (this *Analysis) ForDerive() {
 	endTime, _ := this.GetInteger("endTime")
 	dataType := this.GetString("dataType")
 	area := this.GetString("area")
-	minPrice, _ := this.GetInteger("minprice")
-	maxPrice, _ := this.GetInteger("maxprice")
+	minPrice, _ := this.GetFloat("minprice")
+	maxPrice, _ := this.GetFloat("maxprice")
 	if area == "{}" {
 		area = ""
 	}
@@ -432,8 +431,8 @@ func (this *Analysis) ForPList() {
 		dataType := this.GetString("dataType")
 		area := this.GetString("area")
 		total, _ := this.GetInteger("total")
-		minPrice, _ := this.GetInteger("minprice")
-		maxPrice, _ := this.GetInteger("maxprice")
+		minPrice, _ := this.GetFloat("minprice")
+		maxPrice, _ := this.GetFloat("maxprice")
 		if area == "{}" {
 			area = ""
 		}
@@ -566,7 +565,7 @@ func forecastMerge(r, f []map[string]interface{}) []*ForecastInfo {
 	return res
 }
 
-func getNewForecast(userId string, pageNum int, o_member_jy map[string]interface{}, pageSize int, startTime, endTime int, dataType, area string, minPrice, maxPrice int) (list []map[string]interface{}, count, distinctCount int64) {
+func getNewForecast(userId string, pageNum int, o_member_jy map[string]interface{}, pageSize int, startTime, endTime int, dataType, area string, minPrice, maxPrice float64) (list []map[string]interface{}, count, distinctCount int64) {
 	var d = &dfa.DFA{}
 	if userId == "" {
 		return
@@ -655,7 +654,7 @@ type DistinctInfoidCount struct {
 	Value int `json:"value"`
 }
 
-func getNewForecastDerive(userId string, o_member_jy map[string]interface{}, startTime, endTime, count int, dataType, area string, selectIds []string, minPrice, maxPrice int) (ids []string, sql *util.ViewCondition) {
+func getNewForecastDerive(userId string, o_member_jy map[string]interface{}, startTime, endTime, count int, dataType, area string, selectIds []string, minPrice, maxPrice float64) (ids []string, sql *util.ViewCondition) {
 	if userId == "" {
 		return
 	}