wangshan 2 lat temu
rodzic
commit
8f1e1c69d6
1 zmienionych plików z 20 dodań i 17 usunięć
  1. 20 17
      jyBXBase/rpc/model/newestBidding.go

+ 20 - 17
jyBXBase/rpc/model/newestBidding.go

@@ -55,36 +55,39 @@ var mysqlTables = map[string]string{
 
 func GetRoleNewestInfoService(AppId, MgoUserId string, NewUserId, AccountId, EntId, EntUserId, PositionType, PositionId int64) (roleNewestInfo *NewestInfo, flag string) {
 	powerCheck := IC.Middleground.PowerCheckCenter.Check(AppId, MgoUserId, NewUserId, AccountId, EntId, PositionType, PositionId)
+	thisUserId := MC.If(PositionType == 1, MC.InterfaceToStr(EntUserId), MC.InterfaceToStr(NewUserId)).(string)
+	thisNewUserId := MC.If(PositionType == 1, EntUserId, NewUserId).(int64)
 	if powerCheck.Member.Status > 0 {
 		// 大会员
 		flag = "m"
-		if PositionType == int64(1) {
-			roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
-		} else {
-			roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(NewUserId), "m", NewUserId)
-		}
+		//if PositionType == int64(1) {
+		//	roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
+		//} else {
+		//	roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(NewUserId), "m", NewUserId)
+		//}
 	} else if powerCheck.Entniche.Status > 0 && powerCheck.Entniche.PowerSource != 1 && powerCheck.Entniche.IsEntPower == 1 {
 		// 商机管理
 		flag = "e"
-		roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
+		//roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
 	} else if powerCheck.Vip.Status > 0 {
 		// 超级订阅
 		flag = "v"
-		if PositionType == int64(1) {
-			roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
-		} else {
-			roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(NewUserId), "v", NewUserId)
-		}
+		//if PositionType == int64(1) {
+		//	roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
+		//} else {
+		//	roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(NewUserId), "v", NewUserId)
+		//}
 	} else {
 		// 普通用户
 		flag = "f"
-		if PositionType == int64(1) {
-			roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
-		} else {
-			roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(NewUserId), "f", NewUserId)
-		}
+		//if PositionType == int64(1) {
+		//	roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(EntUserId), "e", EntUserId)
+		//} else {
+		//	roleNewestInfo = GetNewestInfo(MC.InterfaceToStr(NewUserId), "f", NewUserId)
+		//}
 	}
-	return roleNewestInfo, flag
+	thisUserType := MC.If(PositionType == 1, "e", flag).(string)
+	return GetNewestInfo(thisUserId, thisUserType, thisNewUserId), flag
 }
 func GetNewestInfo(userId, userType string, newUserId int64) *NewestInfo {
 	nt := &NewestInfo{