Ver Fonte

fix bug

Roc há 4 meses atrás
pai
commit
ec1cc06563
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      models/company_contract/company_contract.go

+ 1 - 1
models/company_contract/company_contract.go

@@ -91,7 +91,7 @@ func GetAfterCompanyContractListByCompanyIdListAndEndDate(endDate string, compan
 // GetLastContractListByEndDate 通过最近一份合同的日期获取早于该合同的最晚一份合同
 func GetLastContractListByEndDate(companyId, productId int, endDate string) (item *CompanyContract, err error) {
 	o := orm.NewOrm()
-	sql := "SELECT * FROM company_contract where company_id = ? AND product_id= ? end_date < ? AND status = 1 ORDER BY end_date desc"
+	sql := "SELECT * FROM company_contract where company_id = ? AND product_id= ? AND end_date < ? AND status = 1 ORDER BY end_date desc"
 	err = o.Raw(sql, companyId, productId, endDate).QueryRow(&item)
 
 	return