瀏覽代碼

Merge branch 'fix/bug' into debug

Roc 11 月之前
父節點
當前提交
d86a465735
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      models/company_contract/company_contract.go
  2. 1 1
      services/company_product.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

+ 1 - 1
services/company_product.go

@@ -153,7 +153,7 @@ func CompanyTryOut(cont context.Context) (err error) {
 		}
 
 		//正式转试用定时任务更新研选扣点
-		{
+		if v.ProductId == 2 {
 			cygx.YanXuanCompanyCompanyTryOut(v.CompanyId)
 		}