Ver Fonte

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

zhangchuanxing há 1 dia atrás
pai
commit
3688cef2ac
3 ficheiros alterados com 16 adições e 2 exclusões
  1. 1 1
      controllers/banner.go
  2. 1 1
      controllers/gushou.go
  3. 14 0
      models/company.go

+ 1 - 1
controllers/banner.go

@@ -122,7 +122,7 @@ func (this *BannerController) ListYx() {
 	if utils.RunMode == "release" {
 		listA = []*models.BannerUrlYxResp{
 			//&models.BannerUrlYxResp{IndexImg: "https://hzstatic.hzinsights.com/banner/yx/1.png", Path: "pages-purchaser/leaflet/leaflet?leafletImage=https%3A%2F%2Fhzstatic.hzinsights.com%2Fcygx%2Fconfig%2Fresearch_11_0.png"},
-			&models.BannerUrlYxResp{IndexImg: "https://hzstatic.hzinsights.com/banner/yx/1.png", Path: "pages-purchaser/leaflet/leaflet?leafletImage=https%3A%2F%2Fhzstatic.hzinsights.com%2Fcygx%2Fconfig%2Fresearch_11_1.png"},
+			//&models.BannerUrlYxResp{IndexImg: "https://hzstatic.hzinsights.com/banner/yx/1.png", Path: "pages-purchaser/leaflet/leaflet?leafletImage=https%3A%2F%2Fhzstatic.hzinsights.com%2Fcygx%2Fconfig%2Fresearch_11_1.png"},
 			&models.BannerUrlYxResp{IndexImg: "https://hzstatic.hzinsights.com/banner/yx/2.png", Path: "pages-purchaser/survey/surveySubmit"},
 			//&models.BannerUrlYxResp{IndexImg: "https://hzstatic.hzinsights.com/banner/yx/4.png", Path: "pages-purchaser/specialColumn/specialColumn"},
 			&models.BannerUrlYxResp{IndexImg: "https://hzstatic.hzinsights.com/banner/yx/3_long.png", Path: "pages-purchaser/researchList/researchList"},

+ 1 - 1
controllers/gushou.go

@@ -121,7 +121,7 @@ func (this *GushouController) 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()

+ 14 - 0
models/company.go

@@ -215,6 +215,7 @@ func GetSellerDetailAllByCompanyId(companyId int) (item *CompanyDetail, err erro
 	return
 }
 
+// 获取FICC与权益销售
 func GetCompanySellerName(companyId int) (sellerName string, err error) {
 	sql := ` SELECT
 			GROUP_CONCAT( DISTINCT p.seller_name SEPARATOR '/' ) AS sellerName 
@@ -227,6 +228,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:启用"`
 }