Browse Source

feat:参标列表排序

wangshan 2 years ago
parent
commit
d753f4a5b6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      jyBXCore/rpc/model/mysql/participateBid.go

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

@@ -618,11 +618,11 @@ func ParticipateListSql(in *bxcore.ParticipateListReq) string {
 	//投标结束时间和开标时间 很多项目数据没有这两个字段值
 	switch in.OrderNum {
 	case 1:
-		conditionSql += ` ORDER BY pt.bid_open_time ASC,pt.bid_end_time ASC,pbr.create_date DESC`
+		conditionSql += ` ORDER BY (pt.bid_open_time IS NULL),pt.bid_open_time ASC,(pt.bid_end_time IS NULL),pt.bid_end_time ASC,pbr.create_date DESC`
 	case 2:
 		conditionSql += ` ORDER BY pbr.create_date DESC`
 	default:
-		conditionSql += ` ORDER BY pt.bid_end_time ASC,pt.bid_open_time ASC,pbr.create_date DESC`
+		conditionSql += ` ORDER BY (pt.bid_end_time IS NULL),pt.bid_end_time ASC,(pt.bid_open_time IS NULL),pt.bid_open_time ASC,pbr.create_date DESC`
 	}
 	log.Println(conditionSql)
 	return conditionSql