Преглед на файлове

feat:参标列表排序

wangshan преди 2 години
родител
ревизия
d753f4a5b6
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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