Forráskód Böngészése

大会员 项目进度监控

wangshan 3 éve
szülő
commit
b5dfb54772

+ 3 - 1
src/jfw/front/frontRouter.go

@@ -4,6 +4,7 @@ import (
 	"fmt"
 	"jfw/config"
 	"jfw/public"
+	"log"
 	"qfw/util/jy"
 	"regexp"
 	"strings"
@@ -156,7 +157,7 @@ func (this *CommonRouter) BigpcPage(htmlPage string) error {
 	return this.doPcBigPage(htmlPage)
 }
 
-var bigVipFreePageReg = regexp.MustCompile(`set_.*|free|unit_portrayal|analysis_(search|result)`)
+var bigVipFreePageReg = regexp.MustCompile(`set_.*|free|unit_portrayal|analysis_(search|result)|pro_follow_detail`)
 
 func (this *CommonRouter) doPcBigPage(pageSign string) error {
 	userid, _ := this.GetSession("userId").(string)
@@ -169,6 +170,7 @@ func (this *CommonRouter) doPcBigPage(pageSign string) error {
 		if array := strings.Split(pageSign, "/"); len(array) > 0 {
 			pageSign = array[0]
 		}
+		log.Println(bigVipFreePageReg.MatchString(pageSign), pageSign)
 		if !bigVipFreePageReg.MatchString(pageSign) {
 			bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 			if bigBaseMsg.Status <= 0 && bigBaseMsg.Vip_BuySet.Upgrade != 1 {

+ 4 - 3
src/jfw/modules/bigmember/src/entity/followProject.go

@@ -30,7 +30,6 @@ func CreateProjectFollowManager(userid string, mustBuy ...bool) (*ProjectFollow,
 	if len(mustBuy) > 0 && !isBuy {
 		return nil, errors.New("非法请求")
 	}
-
 	if isBuy { //收费版
 		uid := qutil.If(bigMsg.Pid == "", userid, bigMsg.Pid).(string) //若为子账号则存储为主账号userid
 		return &ProjectFollow{true, uid, bigMsg.ProNum, "follow_project_bigvip"}, nil
@@ -219,7 +218,7 @@ func (this *ProjectFollow) GetDetailByFid(fid string) (returnData map[string]int
 //大会员查询项目信息
 func (this *ProjectFollow) GetProjectDetailBySid(sid string) (res map[string]interface{}, err error) {
 	redisKey := fmt.Sprintf("project_%s", sid)
-	log.Println("redisKey:", redisKey)
+	// log.Println("redisKey:", redisKey)
 	if reidsCatche, redisErr := redis.GetBytes("other", redisKey); redisErr == nil && reidsCatche != nil {
 		err = json.Unmarshal(*reidsCatche, &res)
 		if err == nil {
@@ -294,6 +293,8 @@ func (this *ProjectFollow) GetFollowList(pNum, pSize int) (followData []map[stri
 		sid := qutil.ObjToString(followOne["s_id"])
 		if followOne["l_lastpushtime"] != nil && followOne["l_lastpushtime"] != "" {
 			followOne["l_createtime"] = followOne["l_lastpushtime"]
+		} else if followOne["l_lastpushtime"] == nil {
+			followOne["l_lastpushtime"] = followOne["l_createtime"]
 		}
 		sidArr = append(sidArr, sid)
 		followSetting[sid] = followOne
@@ -384,7 +385,7 @@ func (this *ProjectFollow) CancelFollow(sid, fid string) error {
 	if fid != "" {
 		query["_id"] = StringTOBsonId(fid)
 	}
-	log.Println(query)
+	// log.Println(query)
 	data, _ := db.Mgo.FindOne(this.SaveTable, query)
 	if data == nil || len(*data) == 0 {
 		return errors.New("未找到相应数据")

+ 2 - 1
src/jfw/modules/bigmember/src/service/follow/project.go

@@ -137,7 +137,7 @@ func (this *FollowProject) FollowList() {
 func (this *FollowProject) FollowDetail() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, true)
+		projectManager, err := entity.CreateProjectFollowManager(userId)
 		if err != nil {
 			return nil, err
 		}
@@ -151,6 +151,7 @@ func (this *FollowProject) FollowDetail() {
 			fid, _, _ = projectManager.FollowedCheck(sid)
 		}
 		var followData, projectInfo map[string]interface{}
+		log.Println("fid:", fid, "---", sid)
 		if fid != "" { //已关注 查询详情
 			followData, projectInfo, err = projectManager.GetDetailByFid(fid)
 			sid = qutil.ObjToString(followData["sid"])

+ 2 - 1
src/jfw/modules/bigmember/src/service/use/use.go

@@ -488,7 +488,7 @@ func (u *Use) Equity() {
 			if s_phone != "" && len(s_phone) == 11 {
 				s_phone = s_phone[:3] + "****" + s_phone[7:]
 			}
-			name := qu.If((*person)["s_nickname"] == nil, s_phone, (*person)["s_nickname"])
+			name := (*person)["s_nickname"] //qu.If((*person)["s_nickname"] == nil, s_phone, (*person)["s_nickname"])
 			i_member_status := qu.IntAllDef((*person)["i_member_status"], 0)
 			i_member_endtime := qu.IntAllDef((*person)["i_member_endtime"], 0)
 			companyname, industry := "", map[string]interface{}{}
@@ -520,6 +520,7 @@ func (u *Use) Equity() {
 			return Result{Data: M{
 				"headimage":      headimage,
 				"name":           name,
+				"phone":          s_phone,
 				"member_status":  i_member_status,
 				"member_endtime": i_member_endtime,
 				"entname":        companyname,

+ 1 - 0
src/jfw/modules/publicapply/src/customer/entity/entiy.go

@@ -62,6 +62,7 @@ func (this *CustomerOperation) Exclude() (B bool) {
 	}
 	B = db.Mgo.Update(ec, map[string]interface{}{
 		"userId": this.UserId,
+		"name":   this.Name,
 	}, updateMap, true, false)
 	if B {
 		redis.Del(redisName, fmt.Sprintf(redisCRIndex, this.UserId))

+ 1 - 1
src/jfw/modules/publicapply/src/customer/service/service.go

@@ -44,7 +44,7 @@ func (this *ServiceStruct) Exclude() {
 		cotion := entity.NewCustomerOperation()
 		//接收参数
 		json.Unmarshal(this.Body(), &cotion)
-		if !cotion.B && cotion.Name == "" {
+		if cotion.Name == "" {
 			return Result{Data: nil, Error_msg: Error_msg_1003}
 		}
 		cotion.UserId = userId