Browse Source

feat:列表排序

wangshan 2 năm trước cách đây
mục cha
commit
de0513fa95
1 tập tin đã thay đổi với 6 bổ sung5 xóa
  1. 6 5
      jyBXCore/rpc/model/mysql/participateBid.go

+ 6 - 5
jyBXCore/rpc/model/mysql/participateBid.go

@@ -601,13 +601,14 @@ func ParticipateListSql(in *bxcore.ParticipateListReq) string {
 		conditionSql += `)`
 	}
 	//默认按照投标截止日期正序排列、1:开标时间正序、2:更新状态时间倒序
+	//投标结束时间和开标时间 很多项目数据没有这两个字段值
 	switch in.OrderNum {
 	case 1:
-		conditionSql += ` ORDER BY pt.bid_open_time ASC`
+		conditionSql += ` ORDER BY pt.bid_open_time ASC,pt.bid_end_time ASC,pug.update_date DESC`
 	case 2:
 		conditionSql += ` ORDER BY pug.update_date DESC`
 	default:
-		conditionSql += ` ORDER BY pt.bid_end_time ASC`
+		conditionSql += ` ORDER BY pt.bid_end_time ASC,pt.bid_open_time ASC,pug.update_date DESC`
 	}
 	logx.Info(conditionSql)
 	return conditionSql
@@ -928,9 +929,9 @@ func GetPersonInfo(entId, entUserId int64, participateMap map[int64]bool) []*bxc
 		prevId int64 = 0
 	)
 	for _, v := range *r {
-		if entUserId == MC.Int64All(v["user_id"]) {
-			continue
-		}
+		//if entUserId == MC.Int64All(v["user_id"]) {
+		//	continue
+		//}
 		id := MC.Int64All(v["id"])
 		userId := strconv.FormatInt(MC.Int64All(v["user_id"]), 10)
 		user := &bxcore.ParticipatePerson{