瀏覽代碼

recharge update intro

abiao 4 年之前
父節點
當前提交
a7700b5d67

+ 9 - 2
go/gopath/src/fohow.com/apps/controllers/ad_controller/ad_controller.go

@@ -13,7 +13,7 @@ import (
 	"fohow.com/apps"
 	// "fohow.com/apps/models/activity_model"
 	"fohow.com/apps/models/ad_model"
-	// "fohow.com/apps/models/product_model"
+	"fohow.com/apps/models/user_model"
 	// "fohow.com/cache"
 )
 
@@ -41,8 +41,15 @@ func (self *AdController) GetItems() {
 	// if pCache == "false" {
 	// 	cache.Cache.Delete(k)
 	// }
-	ads := []*ad_model.AdItem{}
 
+	if adCode == "shop_apply" {
+		wxUId := self.GetCurrentWxUserId()
+		wxUser := user_model.GetWxUserById(wxUId, true)
+		if wxUser != nil && wxUser.Rank < 1 {
+			adCode = "user_apply_shop"
+		}
+	}
+	ads := []*ad_model.AdItem{}
 	_ads := ad_model.GetAdsByCode(adCode, cache)
 	if _ads != nil {
 		ads = _ads

+ 8 - 1
go/gopath/src/fohow.com/apps/helpers/recharge_helper.go

@@ -41,7 +41,14 @@ func PatchRechargeBalance(oId, totalFee int64, transactionId string) {
 	}
 	if totalFee >= base_config.GetBuyCash() && wxUser.ShowInviteMode != 1 {
 		//升级群主---0317手动升级群主
-		//UpdateIntroUser(wxUser)
+		specialDepart, err := beego.AppConfig.Int64("SpecialDepart")
+		if err != nil {
+			beego.BeeLogger.Error("%s", err)
+			return
+		}
+		if wxUser.Depart != specialDepart {
+			UpdateIntroUser(wxUser)
+		}
 	}
 
 	beego.BeeLogger.Warn("*******PatchRechargeBalance End oId:%d", oId)