Kaynağa Gözat

feat:商机管理权限直接查库判断、不走缓存

zhangxinlei1996 3 yıl önce
ebeveyn
işleme
a3e3908b92
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      core/proxy/rpc/checkPower.go

+ 4 - 4
core/proxy/rpc/checkPower.go

@@ -38,12 +38,12 @@ func CheckUserPower(userid, phone string, power_type int) error {
 			userPower.Status = gconv.Int((*data)["i_member_status"])
 			userPower.VipStatus = gconv.Int((*data)["i_vip_status"])
 		}
-		userPower.EntnicheStatus = 0
-		if count := db.JyMysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i
+	}
+	userPower.EntnicheStatus = 0
+	if count := db.JyMysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i
 								ON u.ent_id=i.id
 								WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
-			userPower.EntnicheStatus = 1
-		}
+		userPower.EntnicheStatus = 1
 	}
 	/*
 		权益判断方式、0走资源中台