|
@@ -250,7 +250,7 @@ func GetRemindCompany(sellerId int, endDate string) (items []*CompanyProduct, er
|
|
|
company a
|
|
|
INNER JOIN company_product AS b ON a.company_id = b.company_id
|
|
|
WHERE
|
|
|
- (b.seller_id = ? OR a.share_seller_id =?)
|
|
|
+ (b.seller_id = ? OR b.share_seller_id =?)
|
|
|
AND (
|
|
|
( b.contract_end_date = ? AND b.status = "正式" ) OR (b.end_date = ? AND b.status = "试用")
|
|
|
) ORDER BY b.status DESC `
|
|
@@ -335,7 +335,7 @@ func GetCompanyProductItemListByCompanyIdList(companyIdList []int, productId int
|
|
|
return
|
|
|
}
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT a.*,b.is_share,b.share_seller,b.share_seller_id FROM company_product as a
|
|
|
+ sql := `SELECT a.* FROM company_product as a
|
|
|
JOIN company b on a.company_id=b.company_id
|
|
|
WHERE a.company_id in (` + utils.GetOrmInReplace(num) + `) AND a.product_id = ? `
|
|
|
_, err = o.Raw(sql, companyIdList, productId).QueryRows(&items)
|
|
@@ -353,7 +353,7 @@ func GetCompanyProductItemListByCompanyIdList(companyIdList []int, productId int
|
|
|
// @return err error
|
|
|
func GetCompanyProductItemByCompanyId(companyId int, productId int) (items *CompanyProductItem, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT a.*,b.is_share,b.share_seller,b.share_seller_id FROM company_product as a
|
|
|
+ sql := `SELECT a.* FROM company_product as a
|
|
|
JOIN company b on a.company_id=b.company_id
|
|
|
WHERE a.company_id = ? AND a.product_id = ? `
|
|
|
_, err = o.Raw(sql, companyId, productId).QueryRows(&items)
|