Эх сурвалжийг харах

Merge branch 'master' into feature/v4.8.96

lianbingjie 1 жил өмнө
parent
commit
45e8a793de

+ 40 - 2
src/jfw/front/front.go

@@ -87,7 +87,7 @@ type Front struct {
 	historypushPaging  xweb.Mapper `xweb:"/swordfish/historypush/paging"` //历时推送记录--分页
 	aboutus            xweb.Mapper `xweb:"/front/aboutus.html"`           //关于我们
 	busicooperation    xweb.Mapper `xweb:"/front/busicooperation.html"`   //商务合作
-
+	subscribeTransfer  xweb.Mapper `xweb:"/front/subscribeTransfer"`      //原文链接中转
 	/********************wxkeyset:v1.8**************************/
 	wxKeysetAjaxReq xweb.Mapper `xweb:"/wxkeyset/ajaxReq"`           //订阅词ajax请求
 	wxKeyset        xweb.Mapper `xweb:"/wxkeyset/keyset/(\\w+)"`     //订阅词设置
@@ -886,6 +886,7 @@ func (m *Front) Sess(ostr string) error {
 			ok = true
 		} else {
 			var identity *pb.Identity
+
 			if str[1] == "userId" || str[1] == "entUserId" || str[1] == "positionId" {
 				if str[1] == "userId" {
 					identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(userFlag))
@@ -905,7 +906,11 @@ func (m *Front) Sess(ostr string) error {
 					if m.GetSession("positionId") != nil {
 						hasIdentity = true
 					}
-					ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
+					if userFlag == "" && m.GetSession("positionId") != nil {
+						ok = true
+					} else if userFlag != "" {
+						ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
+					}
 				}
 				if !hasIdentity {
 					identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(m.GetSession("base_user_id")))
@@ -1212,6 +1217,39 @@ func isInTSguide(userid string) bool {
 func (f *Front) Transfer() error {
 	return f.Redirect(f.GetString("url"))
 }
+func (f *Front) SubscribeTransfer() error {
+	vt := f.GetString("t")
+	switch vt {
+	case "member":
+		vt = "m"
+	case "vip":
+		vt = "v"
+	case "free":
+		vt = "f"
+	case "entniche":
+		vt = "s"
+	}
+	if vt != "" {
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=%s", vt))
+	}
+	//查询用户状态
+	bigPower := jy.GetBigVipUserBaseMsg(f.Session(), *config.Middleground)
+	if bigPower.Status > 0 {
+		//大会员用户
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=m"))
+	}
+	IsEntPower := bigPower.Data.Entniche.IsEntPower
+	if bigPower.EntnicheStatus == 1 && IsEntPower > 0 {
+		//商机管理
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=s"))
+	}
+	if bigPower.VipStatus > 0 {
+		//超级订阅
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=v"))
+	}
+	//免费用户
+	return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=f"))
+}
 
 // 关于我们
 func (f *Front) Aboutus() error {

+ 4 - 1
src/jfw/modules/bigmember/src/entity/report.go

@@ -12,6 +12,7 @@ const (
 	TableMemberReportProject    = "member_report_project" // 大会员周报月报-项目明细表
 	From                        = "yyszsyy"
 	TableMemberReportProjectYys = "member_report_project_yys" // 大会员周报月报-项目明细表
+	BidStatus                   = `"中标","成交","合同","验收"`
 )
 
 type ReportProjectInfoParam struct {
@@ -44,7 +45,9 @@ func GetReportProjectInfo(param *ReportProjectInfoParam, positionId int64) (data
 		} // 关键词组
 		qstr = append(qstr, fmt.Sprintf("(%s)", strings.Join(tmpArr, " or ")))
 	}
-	// 省份
+	//信息类型
+	qstr = append(qstr, fmt.Sprintf("bidstatus in (%s)", BidStatus))
+	// 省份中标
 	if param.Area != nil && len(param.Area) > 0 {
 		area, city := []interface{}{}, []interface{}{} // 存值
 		areaS, cityS := []string{}, []string{}         // 存占位符