|
@@ -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
|