hsun преди 2 години
родител
ревизия
2ae1e0226f
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      controller/contract/register.go

+ 3 - 1
controller/contract/register.go

@@ -53,8 +53,10 @@ func (rg *RegisterController) List(c *gin.Context) {
 		pars = append(pars, kw, kw, kw)
 	}
 	if req.StartDate != "" && req.EndDate != "" {
+		st := fmt.Sprint(req.StartDate, " 00:00:00")
+		ed := fmt.Sprint(req.EndDate, " 23:59:59")
 		cond += ` AND (create_time BETWEEN ? AND ?)`
-		pars = append(pars, req.StartDate, req.EndDate)
+		pars = append(pars, st, ed)
 	}
 	if req.ContractType != 0 {
 		cond += ` AND contract_type = ?`