|
@@ -3,6 +3,7 @@ package service
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
+ "log"
|
|
|
"math/rand"
|
|
|
"strconv"
|
|
|
"strings"
|
|
@@ -204,11 +205,15 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
|
"$gt": time.Now().Unix(),
|
|
|
},
|
|
|
})
|
|
|
+ log.Println("~~~~~~~~~~~", edata)
|
|
|
eudata, _ := this.Conn.MgoJy.FindOne("ent_user", map[string]interface{}{
|
|
|
"i_entid": entId,
|
|
|
"i_userid": entnicheUserId,
|
|
|
})
|
|
|
+ log.Println("~~~~~~~~~~~", eudata)
|
|
|
if eudata != nil && len(*eudata) > 0 {
|
|
|
+ i_ts_guide := common.Int64All((*eudata)["i_ts_guide"])
|
|
|
+ free.TsGuide = i_ts_guide
|
|
|
haskey := false
|
|
|
o_entniche := &map[string]interface{}{}
|
|
|
if edata != nil && len(*edata) > 0 {
|
|
@@ -243,11 +248,12 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
|
NewCitys: newcitysArr,
|
|
|
}
|
|
|
}
|
|
|
+ fmt.Println("@@@@@@@@@@@@@@@@", common.Int64All((*eudata)["i_member_status"]))
|
|
|
if common.Int64All((*eudata)["i_member_status"]) > 0 {
|
|
|
member.PowerType = 2
|
|
|
status := common.Int64All((*eudata)["i_member_status"])
|
|
|
- starttime := common.Int64All((*eudata)["l_member_starttime"])
|
|
|
- endtime := common.Int64All((*eudata)["l_member_endtime"])
|
|
|
+ starttime := common.Int64All((*eudata)["i_member_starttime"])
|
|
|
+ endtime := common.Int64All((*eudata)["i_member_endtime"])
|
|
|
member = &entity.Member{
|
|
|
Status: status,
|
|
|
StartTime: starttime,
|
|
@@ -256,8 +262,9 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
|
|
|
PowerType: 2,
|
|
|
HasKey: haskey,
|
|
|
}
|
|
|
- //是否试用
|
|
|
- if this.Conn.MgoJy.Count("member", map[string]interface{}{"userid": positionId}) > 0 {
|
|
|
+ //是否使用
|
|
|
+ s_positionId := strconv.Itoa(int(positionId))
|
|
|
+ if this.Conn.MgoJy.Count("member", map[string]interface{}{"userid": s_positionId}) > 0 {
|
|
|
member.Used = true
|
|
|
}
|
|
|
}
|