فهرست منبع

Merge branch 'master' of http://8.136.199.33:3000/hongze/hz_crm_api into crm/crm_15.9

xingzai 7 ماه پیش
والد
کامیت
9198f5f339
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      models/company/company_contract.go
  2. 1 1
      services/cygx/article.go

+ 1 - 1
models/company/company_contract.go

@@ -302,7 +302,7 @@ func UpdateCompanyContractPackageDifference(packageDifference string, companyCon
 // 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
 }

+ 1 - 1
services/cygx/article.go

@@ -89,7 +89,7 @@ func GetArticleSourcePlatform(SourcePlatform string) (sourcePlatformResp int) {
 	} else if SourcePlatform == "2" {
 		sourcePlatformResp = 2
 	} else {
-		sourcePlatformResp = 1
+		sourcePlatformResp, _ = strconv.Atoi(SourcePlatform)
 	}
 	return
 }