Roc hai 7 meses
pai
achega
b9f8615089
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      models/company/company_contract.go

+ 1 - 1
models/company/company_contract.go

@@ -302,7 +302,7 @@ func UpdateCompanyContractPackageDifference(packageDifference string, companyCon
 // GetLastContractListByEndDate 通过最近一份合同的日期获取早于该合同的最晚一份合同
 // GetLastContractListByEndDate 通过最近一份合同的日期获取早于该合同的最晚一份合同
 func GetLastContractListByEndDate(companyId, productId int, endDate string) (item *CompanyContract, err error) {
 func GetLastContractListByEndDate(companyId, productId int, endDate string) (item *CompanyContract, err error) {
 	o := orm.NewOrm()
 	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)
 	err = o.Raw(sql, companyId, productId, endDate).QueryRow(&item)
 	return
 	return
 }
 }