fuwencai 2 rokov pred
rodič
commit
a6f03726b7

+ 1 - 1
jyBXCore/rpc/internal/logic/participateinfologic.go

@@ -62,7 +62,7 @@ func (l *ParticipateInfoLogic) ParticipateInfo(in *bxcore.ParticipateInfoReq) (*
 	var isValid bool
 	var isValid bool
 	bidopentime := common.Int64All((*projectInfos)[0]["bidopentime"])
 	bidopentime := common.Int64All((*projectInfos)[0]["bidopentime"])
 	bidendtime := common.Int64All((*projectInfos)[0]["bidendtime"])
 	bidendtime := common.Int64All((*projectInfos)[0]["bidendtime"])
-	if time.Now().Unix() >= bidopentime || bidopentime == 0 {
+	if time.Now().Unix() < bidopentime || bidopentime == 0 {
 		isValid = true
 		isValid = true
 	}
 	}
 	//   获取项目id
 	//   获取项目id

+ 1 - 1
jyBXCore/rpc/internal/logic/updatebidstatuslogic.go

@@ -58,7 +58,7 @@ func (l *UpdateBidStatusLogic) UpdateBidStatus(in *bxcore.UpdateBidStatusReq) (*
 	var isValid bool
 	var isValid bool
 	bidopentime := common.Int64All((*projectInfos)[0]["bidopentime"])
 	bidopentime := common.Int64All((*projectInfos)[0]["bidopentime"])
 	projectId := common.ObjToString((*projectInfos)[0]["_id"])
 	projectId := common.ObjToString((*projectInfos)[0]["_id"])
-	if time.Now().Unix() >= bidopentime || bidopentime == 0 {
+	if time.Now().Unix() < bidopentime || bidopentime == 0 {
 		isValid = true
 		isValid = true
 	}
 	}
 	if !isValid {
 	if !isValid {

+ 16 - 2
jyBXCore/rpc/model/es/project.go

@@ -33,8 +33,22 @@ func GetValidProjectByInfoId(infoIds []string) *[]map[string]interface{} {
 	nowTime := time.Now().Unix()
 	nowTime := time.Now().Unix()
 	query := `{"_source":["_id","list.infoid"],"query": {"bool": {"must": [{"terms": {"list.infoid": ["` + strings.Join(infoIds, "\",\"") + `"]}},
 	query := `{"_source":["_id","list.infoid"],"query": {"bool": {"must": [{"terms": {"list.infoid": ["` + strings.Join(infoIds, "\",\"") + `"]}},
         {"bool": {"should": [{"range": {"bidopentime": {"gte": ` + fmt.Sprint(nowTime) + `}}},
         {"bool": {"should": [{"range": {"bidopentime": {"gte": ` + fmt.Sprint(nowTime) + `}}},
-        {"constant_score": {"filter": {"missing": {"field": "bidopentime"
-                    } } } }] }}]}}}`
+        {
+    "bool": {
+        "must_not": [
+            {
+                "constant_score": {
+                    "filter": {
+                        "exists": {
+                            "field": "bidopentime"
+                        }
+                    }
+                }
+            }
+        ]
+    }
+}
+] }}]}}}`
 
 
 	projectResult := elastic.Get(IndexProjectSet, TypeProjectSet, query)
 	projectResult := elastic.Get(IndexProjectSet, TypeProjectSet, query)
 	return projectResult
 	return projectResult

+ 1 - 1
jyBXCore/rpc/model/mysql/participateBid.go

@@ -828,7 +828,7 @@ func ParticipateProjectEnt(entId int64, projectId []string) *[]map[string]interf
 		value = append(value, projectId[i])
 		value = append(value, projectId[i])
 	}
 	}
 	argStr := strings.Join(arg, ",")
 	argStr := strings.Join(arg, ",")
-	query := "select GROUP_CONCAT(ent_user_id) as personIds ,project_id from " + EntnicheUserTable + " where ent_id=? and  project_id in (%s) and state=0  group by project_id "
+	query := "select GROUP_CONCAT(ent_user_id) as personIds ,project_id from " + ParticipateUserTable + " where ent_id=? and  project_id in (%s) and state=0  group by project_id "
 	rs := IC.BaseMysql.SelectBySql(fmt.Sprintf(query, argStr), value...)
 	rs := IC.BaseMysql.SelectBySql(fmt.Sprintf(query, argStr), value...)
 	return rs
 	return rs
 }
 }