WH01243 2 년 전
부모
커밋
e07db5cbbb
6개의 변경된 파일160개의 추가작업 그리고 89개의 파일을 삭제
  1. 0 7
      src/order/orderManageController.go
  2. 41 28
      src/order/orderManageService.go
  3. 0 3
      src/order/otherOrderController.go
  4. 118 39
      src/order/otherOrderService.go
  5. 0 4
      src/order/suppleSalePerson.go
  6. 1 8
      src/task/vipTask.go

+ 0 - 7
src/order/orderManageController.go

@@ -1396,7 +1396,6 @@ func UpdateBigOrder(context *admin.Context) (interface{}, error) {
 				util.MQFW.UpdateById("user", res["user_id"], set)
 				sql := "update bigmember_service_user set i_status = -1 where  s_userid = ?"
 				util.JysqlDB.UpdateOrDeleteBySql(sql, res["user_id"])
-				RedisDel(qutil.ObjToString(res["user_id"]))
 				ClearBigVipUserPower(qutil.ObjToString(res["user_id"]))
 			}
 			util.JysqlDB.Update("dataexport_order", map[string]interface{}{"user_phone": qutil.ObjToString(res["user_phone"])}, map[string]interface{}{"user_phone": param.Phone, "user_id": userId})
@@ -1672,7 +1671,6 @@ func MyUpdateBigOrder(context *admin.Context) (interface{}, error) {
 					util.MQFW.UpdateById("user", res["user_id"], set)
 					sql := "update bigmember_service_user set i_status = -1 where  s_userid = ?"
 					util.JysqlDB.UpdateOrDeleteBySql(sql, res["user_id"])
-					RedisDel(qutil.ObjToString(res["user_id"]))
 					ClearBigVipUserPower(userId)
 				}
 			}
@@ -2063,7 +2061,6 @@ func CreateSubOrder(context *admin.Context) (interface{}, error) {
 		} else {
 			return nil, errors.New("创建子账号订单失败")
 		}
-		RedisDel(userId)
 		ClearBigVipUserPower(userId)
 	}
 
@@ -2259,7 +2256,6 @@ func UpdateSubOrder(context *admin.Context) (interface{}, error) {
 		} else {
 			return nil, errors.New("修改子账号订单失败")
 		}
-		RedisDel(userId)
 		ClearBigVipUserPower(userId)
 		saveData := map[string]interface{}{
 			"operator":      context.User.Username,
@@ -2574,7 +2570,6 @@ func CreateSupplyOrder(context *admin.Context) (interface{}, error) {
 				}
 			}
 		}
-		RedisDel(userId)
 		ClearBigVipUserPower(userId)
 	}
 	return nil, nil
@@ -2766,7 +2761,6 @@ func UpdateSupplyOrder(context *admin.Context) (interface{}, error) {
 				"contract_archive_num":    param.ContractArchiveNum,
 			})
 		}
-		RedisDel(userId)
 		ClearBigVipUserPower(userId)
 		saveData := map[string]interface{}{
 			"operator":      context.User.Username,
@@ -3014,7 +3008,6 @@ func MyUpdateSupplySubOrder(context *admin.Context) (interface{}, error) {
 				"contract_archive_num":    param.ContractArchiveNum,
 			})
 		}
-		RedisDel(userId)
 		ClearBigVipUserPower(userId)
 		// 增加审核轨迹
 		saveData := map[string]interface{}{

+ 41 - 28
src/order/orderManageService.go

@@ -1,6 +1,7 @@
 package order
 
 import (
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"bytes"
 	. "config"
 	"regexp"
@@ -3809,23 +3810,23 @@ func NewBigOrder(subStatus, dateType int, startdate, enddate time.Time, userId,
 			}
 		}
 		ok := false
+		sets := map[string]interface{}{
+			"i_member_status":      qutil.If(dateType == 1, param.Level, -param.Level),
+			"i_member_starttime":   startdate.Unix(),
+			"i_member_endtime":     enddate.Unix(),
+			"i_mainaccount":        1,
+			"o_member_jy.i_wxpush": 1,
+		}
+		if subStatus == 1 {
+			sets["i_member_sub_status"] = 0
+		}
+		set := map[string]interface{}{
+			"$set": sets,
+		}
 		if param.BuySubject != "2" {
-			sets := map[string]interface{}{
-				"i_member_status":      qutil.If(dateType == 1, param.Level, -param.Level),
-				"i_member_starttime":   startdate.Unix(),
-				"i_member_endtime":     enddate.Unix(),
-				"i_mainaccount":        1,
-				"o_member_jy.i_wxpush": 1,
-			}
-			if subStatus == 1 {
-				sets["i_member_sub_status"] = 0
-			}
-			set := map[string]interface{}{
-				"$set": sets,
-			}
 			ok = util.MQFW.UpdateById("user", userId, set)
 		} else {
-			ok = UpdateRule(qutil.IntAll(paramOrder["entId"]), startdate, enddate, qutil.If(dateType == 1, param.Level, -param.Level), 2)
+			ok = UpdateRule(qutil.IntAll(paramOrder["entId"]), set)
 		}
 		if !ok {
 			log.Println("大会员创建订单user表大会员状态更新失败")
@@ -3948,8 +3949,7 @@ func NewBigOrder(subStatus, dateType int, startdate, enddate time.Time, userId,
 				}
 			}
 		}
-		RedisDel(qutil.InterfaceToStr(paramOrder["user_id"]))
-		//ClearBigVipUserPower(userId)
+		ClearBigVipUserPower(qutil.InterfaceToStr(paramOrder["user_id"]))
 	}
 	if param.PaySub > 0 || param.FreeSub > 0 {
 		sets := map[string]interface{}{
@@ -4102,7 +4102,7 @@ func EntServiceOpen(entId int, subject string, st int64) (bool, int) {
 		},
 		"i_entid": entId,
 	})
-	if qutil.Int64All((*data)["l_endtime"]) < time.Now().Local().Unix() {
+	if qutil.IntAll((*data)["i_vip_status"]) > 0 || qutil.IntAll((*data)["i_member_status"]) > 0 {
 		return false, 0
 	}
 	return true, 1
@@ -4209,13 +4209,12 @@ func UpdateNewBigOrder(subStatus, dateType int, now, startdate, enddate time.Tim
 			"$set": sets,
 		}
 		if param.BuySubject == "2" {
-			UpdateRule(qutil.IntAll(paramOrder["entId"]), time.Now(), time.Now(), qutil.If(dateType == 1, param.Level, -param.Level), 2)
+			UpdateRule(qutil.IntAll(paramOrder["entId"]), set)
 		} else {
 			util.MQFW.UpdateById("user", userId, set)
 		}
 		sql := "update bigmember_service_user set i_status = -1 where  s_userid = ?"
 		util.JysqlDB.UpdateOrDeleteBySql(sql, qutil.InterfaceToStr(paramOrder["user_id"]))
-		RedisDel(qutil.InterfaceToStr(paramOrder["user_id"]))
 		ClearBigVipUserPower(qutil.InterfaceToStr(paramOrder["user_id"]))
 		return nil
 	}
@@ -4282,7 +4281,7 @@ func UpdateNewBigOrder(subStatus, dateType int, now, startdate, enddate time.Tim
 			}
 			ok := false
 			if param.BuySubject == "2" {
-				ok = UpdateRule(qutil.IntAll(paramOrder["entId"]), time.Now(), time.Now(), qutil.If(dateType == 1, param.Level, -param.Level), 2)
+				ok = UpdateRule(qutil.IntAll(paramOrder["entId"]), set)
 			} else {
 				ok = util.MQFW.UpdateById("user", userId, set)
 			}
@@ -4409,7 +4408,6 @@ func UpdateNewBigOrder(subStatus, dateType int, now, startdate, enddate time.Tim
 					}
 				}
 				log.Println("大会员更新订单 清空大会员权益缓存++++++++++++", qutil.InterfaceToStr(paramOrder["user_id"]))
-				RedisDel(qutil.InterfaceToStr(paramOrder["user_id"]))
 				ClearBigVipUserPower(qutil.InterfaceToStr(paramOrder["user_id"]))
 			}
 		}
@@ -4720,7 +4718,6 @@ func SupplyBigOrder(subStatus, pay_sub_num, free_sub_num, dateType int, now, sta
 					}
 				}
 			}
-			RedisDel(userId)
 			ClearBigVipUserPower(userId)
 		}
 	}
@@ -5260,12 +5257,28 @@ func GetDATE1(m int, endtime int64) (_endtime time.Time) {
 }
 
 func RedisDel(userId string) {
-	redis.Del("newother", SysConfigs.BigmemberKey+userId)
-	userData, ok := util.MQFW.Find("user", map[string]interface{}{"s_member_mainid": userId, "i_member_sub_status": 1}, nil, nil, false, -1, -1)
-	if ok && userData != nil && len(*userData) > 0 {
-		for _, v := range *userData {
-			user_id := m.BsonIdToSId(v["_id"])
-			redis.Del("newother", SysConfigs.BigmemberKey+user_id)
+	if mongodb.IsObjectIdHex(userId) {
+		//通过mongo查找职位标识
+		userData, ok := util.MQFW.FindById("user", userId, `"base_user_id":1`)
+		if userData != nil && len(*userData) > 0 && ok {
+			baseUserId := qutil.Int64All((*userData)["base_user_id"])
+			positionData := util.BaseDB.FindOne(util.BasePosition, map[string]interface{}{
+				"type":    0,
+				"ent_id":  0,
+				"user_id": baseUserId,
+			}, "id", "")
+			if positionData != nil && len(*positionData) > 0 {
+				userId = qutil.InterfaceToStr((*positionData)["id"])
+			}
+		}
+	} else {
+		redis.Del("newother", SysConfigs.BigmemberKey+userId)
+		userData, ok := util.MQFW.Find("user", map[string]interface{}{"s_member_mainid": userId, "i_member_sub_status": 1}, nil, nil, false, -1, -1)
+		if ok && userData != nil && len(*userData) > 0 {
+			for _, v := range *userData {
+				user_id := m.BsonIdToSId(v["_id"])
+				redis.Del("newother", SysConfigs.BigmemberKey+user_id)
+			}
 		}
 	}
 }

+ 0 - 3
src/order/otherOrderController.go

@@ -1132,7 +1132,6 @@ func UpdateSalesperson(context *admin.Context) (interface{}, error) {
 		} else {
 			log.Println("订单表修改用户手机号失败", param.OrderCode, param.Phone)
 		}
-		RedisDel(userId)
 		ClearBigVipUserPower(userId)
 		return map[string]interface{}{"status": ok}, nil
 	}
@@ -1217,9 +1216,7 @@ func UpdateSalesperson(context *admin.Context) (interface{}, error) {
 			log.Println("未找到与之关联的订单", param.OrderCode, param.UserPhone, qutil.FormatDateByInt64(&createMin, qutil.Date_Full_Layout), qutil.FormatDateByInt64(&createMax, qutil.Date_Short_Layout))
 
 		}
-
 		util.MQFW.UpdateById("user", param.UserId, set)
-		RedisDel(param.UserId)
 		ClearBigVipUserPower(param.UserId)
 	}
 

+ 118 - 39
src/order/otherOrderService.go

@@ -5,9 +5,11 @@ import (
 	"database/sql"
 	"encoding/json"
 	"fmt"
+	"go.mongodb.org/mongo-driver/bson"
 	"log"
 	"math"
 	"mongodb"
+	m "mongodb"
 	"net/http"
 	qutil "qfw/util"
 	"qfw/util/redis"
@@ -16,8 +18,6 @@ import (
 	"strings"
 	"time"
 	"util"
-
-	"go.mongodb.org/mongo-driver/bson"
 )
 
 const (
@@ -935,10 +935,23 @@ func createVipOrder(param *CreateOtherOrderParams, code string) (bool, string) {
 			}
 			//log.Println(areaCount)
 			isOk := false
+			set := map[string]interface{}{
+				"o_vipjy.i_trial":      -1,                       //已激活试用
+				"o_vipjy.o_area":       buyArea,                  //设置地区
+				"o_vipjy.o_buyset":     newBuySet,                //购买内容 城市、省份、行业数量
+				"l_vip_starttime":      vipStartTime.Unix(),      //开始时间
+				"l_vip_endtime":        endTime.Unix(),           //结束时间
+				"i_vip_status":         qutil.If(isTrial, -2, 2), //1试用 2正式 -2 试用到期
+				"i_vip_expire_tip":     0,                        //消息提示初始化
+				"o_vipjy.a_buyerclass": []interface{}{},          //设置行业
+			}
 			if param.BuySubject == "1" {
-				isOk = StartSubVip(param.Phone, buyArea, newBuySet, vipStartTime, endTime, isTrial, userId)
+				isOk = StartSubVip(set, userId)
 			} else {
-				isOk = UpdateRule(entId, vipStartTime, endTime, qutil.If(isTrial, -2, 2), 1)
+
+				isOk = UpdateRule(entId, map[string]interface{}{
+					"$set": set,
+				})
 			}
 			return isOk, qutil.FormatDate(&endTime, qutil.Date_Full_Layout)
 		}
@@ -1137,6 +1150,7 @@ func updateVipOrder(param *CreateOtherOrderParams, code string, returnStatus int
 			log.Printf("AutomaticallyCreatingEnt 自动创建企业信息失败:code:%s,err:%s", code, err.Error())
 			return false, "自动创建企业信息失败"
 		}
+		userId = userPositionId
 	}
 
 	b := util.JysqlDB.ExecTx("修改订单信息和合同信息", func(tx *sql.Tx) bool {
@@ -1263,7 +1277,6 @@ func updateVipOrder(param *CreateOtherOrderParams, code string, returnStatus int
 				ClearBigVipUserPower(userId)
 				return true, ""
 			}
-
 		}
 		//0 购买  1 续费  2 升级
 		if param.VipType == 0 {
@@ -1282,12 +1295,13 @@ func updateVipOrder(param *CreateOtherOrderParams, code string, returnStatus int
 					util.MQFW.UpdateById("user", userId, bson.M{
 						"$set": set,
 					})
-					jyRedis := config.SysConfigs.JyRedis
-					redis.Del("newother", jyRedis+userId)
-					redis.Del("newother", "pl_indexMessage_"+userId)
+					ClearBigVipUserPower(userId)
 					return true, ""
 				} else {
-					UpdateRule(entId, time.Now(), time.Now(), 0, 1)
+					UpdateRule(entId, map[string]interface{}{
+						"$set": set,
+					})
+					ClearBigVipUserPower(userId)
 					return true, ""
 				}
 			}
@@ -1298,9 +1312,23 @@ func updateVipOrder(param *CreateOtherOrderParams, code string, returnStatus int
 				isTrial = true
 			}
 			if param.UpdateType == 0 {
+				set := map[string]interface{}{
+					"o_vipjy.i_trial":      -1,                       //已激活试用
+					"o_vipjy.o_area":       buyArea,                  //设置地区
+					"o_vipjy.o_buyset":     newBuySet,                //购买内容 城市、省份、行业数量
+					"l_vip_starttime":      vipStartTime.Unix(),      //开始时间
+					"l_vip_endtime":        endTime.Unix(),           //结束时间
+					"i_vip_status":         qutil.If(isTrial, -2, 2), //1试用 2正式 -2 试用到期
+					"i_vip_expire_tip":     0,                        //消息提示初始化
+					"o_vipjy.a_buyerclass": []interface{}{},          //设置行业
+				}
 				isOk := false
 				if param.BuySubject == "1" {
-					isOk = StartSubVip(param.Phone, buyArea, newBuySet, vipStartTime, endTime, isTrial, userId)
+					isOk = StartSubVip(set, userId)
+				} else {
+					isOk = UpdateRule(entId, map[string]interface{}{
+						"$set": set,
+					})
 				}
 				return isOk, qutil.FormatDate(&endTime, qutil.Date_Full_Layout)
 			} else {
@@ -1322,6 +1350,27 @@ func ClearBigVipUserPower(userId string) bool {
 // 当大会员状态改变时清除此状态
 func ClearBigVipUserPower(userId string) {
 	if mongodb.IsObjectIdHex(userId) {
+		user_id := userId
+		userDatas, ok := util.MQFW.Find("user", map[string]interface{}{"s_member_mainid": user_id, "i_member_sub_status": 1}, nil, nil, false, -1, -1)
+		if ok && userDatas != nil && len(*userDatas) > 0 {
+			for _, v := range *userDatas {
+				user_id := m.BsonIdToSId(v["_id"])
+				userData, ok := util.MQFW.FindById("user", user_id, `"base_user_id":1`)
+				if userData != nil && len(*userData) > 0 && ok {
+					baseUserId := qutil.Int64All((*userData)["base_user_id"])
+					positionData := util.BaseDB.FindOne(util.BasePosition, map[string]interface{}{
+						"type":    0,
+						"ent_id":  0,
+						"user_id": baseUserId,
+					}, "id", "")
+					if positionData != nil && len(*positionData) > 0 {
+						user_id = qutil.InterfaceToStr((*positionData)["id"])
+						redis.Del("newother", config.SysConfigs.BigmemberKey+user_id)
+					}
+				}
+
+			}
+		}
 		//通过mongo查找职位标识
 		userData, ok := util.MQFW.FindById("user", userId, `"base_user_id":1`)
 		if userData != nil && len(*userData) > 0 && ok {
@@ -1343,32 +1392,24 @@ func ClearBigVipUserPower(userId string) {
 	redisMenuKeyAPP := fmt.Sprintf(RedisMenuKeyAPP, userId)
 	userPowerRedisKey := fmt.Sprintf(UserPowerRedisKey, time.Now().Day(), userId)
 	redis.Del(NewOther, cacheKey)
+	redis.Del("newother", config.SysConfigs.BigmemberKey+userId)
+	redis.Del(NewOther, fmt.Sprintf("user_power_info_%s", userId))
 	redis.Del(NewOther, baseInfoCacheKey)
 	redis.Del(NewOther, redisMenuKeyPC)
 	redis.Del(NewOther, redisMenuKeyWX)
 	redis.Del(NewOther, redisMenuKeyAPP)
 	redis.Del(NewOther, userPowerRedisKey)
+	redis.Del(NewOther, "pl_indexMessage_"+userId)
 }
 
 // 开始使用超级订阅
-func StartSubVip(phone string, area map[string]interface{}, newBuyset SubvipBuySet, startTime, endTime time.Time, isTrial bool, userId string) bool {
-	set := map[string]interface{}{
-		"o_vipjy.i_trial":      -1,                       //已激活试用
-		"o_vipjy.o_area":       area,                     //设置地区
-		"o_vipjy.o_buyset":     newBuyset,                //购买内容 城市、省份、行业数量
-		"l_vip_starttime":      startTime.Unix(),         //开始时间
-		"l_vip_endtime":        endTime.Unix(),           //结束时间
-		"i_vip_status":         qutil.If(isTrial, -2, 2), //1试用 2正式 -2 试用到期
-		"i_vip_expire_tip":     0,                        //消息提示初始化
-		"o_vipjy.a_buyerclass": []interface{}{},          //设置行业
-	}
+func StartSubVip(set map[string]interface{}, userId string) bool {
 	isOk := util.MQFW.UpdateById("user", userId, bson.M{
 		"$set": set,
 	})
 	go func() {
 		MergeKws(userId)
 	}()
-	redis.Del(NewOther, "pl_indexMessage_"+userId)
 	ClearBigVipUserPower(userId)
 	if isOk {
 		return true
@@ -1841,28 +1882,66 @@ func GetNameList(name string) (rs *[]map[string]interface{}) {
 }
 
 // 企业订阅时间修改
-func UpdateRule(entId int, startTime, endTime time.Time, status interface{}, types int) bool {
+func UpdateRule(entId int, update map[string]interface{}) bool {
 	ok := false
 	if entId > 0 {
-		set := map[string]interface{}{
-			"$set": map[string]interface{}{},
-		}
-		if types == 1 {
-			set["$set"] = map[string]interface{}{
-				"l_vip_starttime": startTime.Unix(),
-				"l_vip_endtime":   endTime.Unix(),
-				"i_vip_status":    qutil.Int64All(status),
+		up1, up2 := map[string]interface{}{}, map[string]interface{}{}
+		var tp int
+		for k, v := range update {
+			vm, ok := v.(map[string]interface{})
+			if !ok {
+				return false
 			}
-		} else {
-			set["$set"] = map[string]interface{}{
-				"l_member_starttime": startTime.Unix(),
-				"l_member_endtime":   endTime.Unix(),
-				"i_member_status":    qutil.Int64All(status),
+			up11, up22 := map[string]interface{}{}, map[string]interface{}{}
+			key := ""
+			for kk, vv := range vm {
+				if (key == "" || key == "o_jy") && (kk == "o_jy" || strings.HasPrefix(kk, "o_jy.")) {
+					key = "o_jy"
+					up22[strings.ReplaceAll(kk, key, "o_entniche")] = vv
+					tp = 2
+				} else if (key == "" || key == "o_vipjy") && (kk == "o_vipjy" || strings.HasPrefix(kk, "o_vipjy.")) {
+					key = "o_vipjy"
+					up22[strings.ReplaceAll(kk, key, "o_entniche")] = vv
+					tp = 1
+				} else if (key == "" || key == "o_member_jy") && (kk == "o_member_jy" || strings.HasPrefix(kk, "o_member_jy.")) {
+					key = "o_member_jy"
+					up22[strings.ReplaceAll(kk, key, "o_entniche")] = vv
+					tp = 1
+				} else if (key == "" || key == "o_entniche") && (kk == "o_entniche" || strings.HasPrefix(kk, "o_entniche.")) {
+					key = "o_entniche"
+					up22[strings.ReplaceAll(kk, key, "o_entniche")] = vv
+					tp = 0
+				} else {
+					up11[kk] = vv
+				}
+			}
+			if len(up11) > 0 {
+				up1[k] = up11
+			}
+			if len(up22) > 0 {
+				up2[k] = up22
 			}
 		}
-		ok = util.MQFW.Update("ent_user", map[string]interface{}{
-			"i_entid": entId,
-		}, set, false, true)
+		ok1, ok2 := false, false
+		log.Println(up1)
+		if len(up1) > 0 {
+			ok1 = util.MQFW.Update("ent_user", map[string]interface{}{
+				"i_entid": entId,
+				"i_userid": map[string]interface{}{
+					"$exists": false,
+				},
+			}, up1, true, false)
+		}
+		if len(up2) > 0 {
+			ok2 = util.MQFW.Update("entniche_rule", map[string]interface{}{
+				"i_entid": entId,
+				"i_userid": map[string]interface{}{
+					"$exists": false,
+				},
+				"i_type": tp,
+			}, up2, true, false)
+		}
+		return ok1 || ok2
 	}
 	return ok
 }

+ 0 - 4
src/order/suppleSalePerson.go

@@ -388,7 +388,6 @@ func OrdersExamine(context *admin.Context) (interface{}, error) {
 		}
 		if newState == 3 { //审核通过,开通权益
 			productType = cm.ObjToString((*order)["product_type"])
-
 			if productType == "VIP订阅" {
 				vipType := cm.IntAll((*order)["vip_type"])
 				if vipType != 0 {
@@ -691,7 +690,6 @@ func BigMemberSupple(freeSubNum, paySubNum int, startTime, endTime time.Time, us
 			}
 		}
 	}
-	RedisDel(userId)
 	ClearBigVipUserPower(userId)
 	//子账号
 	if newPaySubNum > 0 || newFreeSubNum > 0 {
@@ -1010,7 +1008,6 @@ func SupplePackage(userId string, serverArr []map[string]interface{}) (bool, err
 			return false, errors.New("更新补充包数量失败")
 		}
 	}
-	RedisDel(userId)
 	ClearBigVipUserPower(userId)
 	return true, nil
 }
@@ -1049,7 +1046,6 @@ func SubAccount(userId string, filterMap map[string]interface{}, paySubNum, free
 			}
 		}
 	}
-	RedisDel(userId)
 	ClearBigVipUserPower(userId)
 	return true, nil
 }

+ 1 - 8
src/task/vipTask.go

@@ -1,14 +1,11 @@
 package task
 
 import (
-	"config"
-	"fmt"
 	"go.mongodb.org/mongo-driver/bson"
 	"log"
 	"mongodb"
 	"order"
 	cm "qfw/util"
-	"qfw/util/redis"
 	"time"
 	"util"
 )
@@ -52,11 +49,7 @@ func VipStateTask() {
 			if isOk {
 				go func() {
 					order.MergeKws(_id)
-					jyRedis := config.SysConfigs.JyRedis
-					redis.Del(order.NewOther, jyRedis+_id)
-					redis.Del(order.NewOther, "pl_indexMessage_"+_id)
-					baseInfoCacheKey := fmt.Sprintf(order.IsGetUserBaseInfoRedisKey, _id)
-					redis.Del(order.NewOther, baseInfoCacheKey)
+					order.ClearBigVipUserPower(_id)
 				}()
 			}
 		}