소스 검색

no message

zhangchuanxing 3 달 전
부모
커밋
c5edbd2da8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      models/seal/seal.go

+ 1 - 1
models/seal/seal.go

@@ -66,7 +66,7 @@ func GetSealInfoByContractId(sealId int) (sealInfo *Seal, err error) {
 func GetSealInfoByDateAndCompanyId(startDate, endDate string, companyId int) (sealInfo *Seal, err error) {
 	o := orm.NewOrm()
 
-	sql := `select * from seal where start_date = ? and end_date = ? AND company_id =?  AND  product_id = 2  order by seal_id asc limit 1 `
+	sql := `select * from seal where start_date = ? and end_date = ? AND company_id =?  AND  product_id = 2   AND  company_contract_id  = 0  order by seal_id asc limit 1 `
 	err = o.Raw(sql, startDate, endDate, companyId).QueryRow(&sealInfo)
 	return
 }