陈少旭 пре 1 месец
родитељ
комит
f029d7af8e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      service/export_data_service.go

+ 1 - 1
service/export_data_service.go Прегледај датотеку

@@ -126,7 +126,7 @@ func GetHisOrderDetailFor390(start_time string, end_time string, org_id int64) (
126 126
 	return
127 127
 }
128 128
 func GetHisOrderByTime(patient_id int64, start_time string, end_time string) (order []models.HisOrder, err error) {
129
-	err = readDb.Model(&models.HisOrder{}).Where("patient_id = ? AND status = 1 and order_status = 2 and setl_time >= ? and setl_time <= ?", patient_id, start_time+" 00:00:00", end_time+" 23:59:00").Find(&order).Error
129
+	err = readDb.Model(&models.HisOrder{}).Where("patient_id = ? AND status = 1 and order_status = 2 and  FROM_UNIXTIME(settle_accounts_date)  >= ? and FROM_UNIXTIME(settle_accounts_date) <= ?", patient_id, start_time+" 00:00:00", end_time+" 23:59:00").Find(&order).Error
130 130
 	return
131 131
 }
132 132