Răsfoiți Sursa

Merge branch 'cygx_13.9' of http://8.136.199.33:3000/hongze/hongze_clpt into debug

zhangchuanxing 1 zi în urmă
părinte
comite
35d31199a5
2 a modificat fișierele cu 14 adăugiri și 1 ștergeri
  1. 1 1
      controllers/gushou.go
  2. 13 0
      models/company.go

+ 1 - 1
controllers/gushou.go

@@ -121,7 +121,7 @@ func (this *MobileGushouController) History() {
 		return
 	}
 	var sellerName string
-	sellerName, err = models.GetCompanySellerName(user.CompanyId)
+	sellerName, err = models.GetCompanySellerNameRai(user.CompanyId)
 	if err != nil {
 		br.Msg = "记录失败!"
 		br.ErrMsg = "获取对应销售失败,Err:" + err.Error()

+ 13 - 0
models/company.go

@@ -176,6 +176,19 @@ func GetCompanySellerName(companyId int) (sellerName string, err error) {
 	return
 }
 
+// 获取权益销售
+func GetCompanySellerNameRai(companyId int) (sellerName string, err error) {
+	sql := ` SELECT
+			seller_name  AS sellerName 
+		FROM
+			company_product AS p
+		WHERE
+			p.company_id = ?  AND  product_id = 2 `
+	o := orm.NewOrmUsingDB("weekly_report")
+	err = o.Raw(sql, companyId).QueryRow(&sellerName)
+	return
+}
+
 type CompanyProductStatus struct {
 	IsSuspend int `description:"1:暂停,0:启用"`
 }