Browse Source

fix:bug

token_replace
黄梓健 5 years ago
parent
commit
ab87e1afb6
  1. 23
      controllers/author.go
  2. 2
      controllers/client/activity.go
  3. 6
      controllers/client/auction.go
  4. 4
      controllers/client/barrage.go
  5. 7
      controllers/client/bully_screen.go
  6. 2
      controllers/client/calorie.go
  7. 4
      controllers/client/good.go
  8. 4
      controllers/client/invite_envelope.go
  9. 4
      controllers/client/live.go
  10. 6
      controllers/client/login.go
  11. 6
      controllers/client/lottery.go
  12. 25
      controllers/client/order_entry.go
  13. 4
      controllers/client/reward.go
  14. 6
      controllers/client/shake_red_envelope.go
  15. 14
      controllers/client/sign.go
  16. 6
      controllers/client/tug_war.go
  17. 4
      controllers/client/upper_wall.go
  18. 4
      controllers/client/vote.go
  19. 2
      controllers/pc/activity.go
  20. 2
      controllers/pc/auction.go
  21. 2
      controllers/pc/bully_screen.go
  22. 2
      controllers/pc/calorie.go
  23. 4
      controllers/pc/login.go
  24. 6
      controllers/pc/lottery_draw.go
  25. 4
      controllers/pc/order_draw.go
  26. 2
      controllers/pc/reward.go
  27. 8
      controllers/pc/shake_red_envelope.go
  28. 2
      controllers/pc/sign.go
  29. 2
      controllers/pc/tug_war.go
  30. 4
      controllers/pc/upper_wall.go
  31. 2
      controllers/pc/vote.go
  32. 2
      controllers/pc/ws.go

23
controllers/author.go

@ -52,27 +52,10 @@ func (t *AuthorCtl) Prepare() {
}
}
func (t *AuthorCtl) MustGetUID() int64 {
func (t *AuthorCtl) GetAccountId() int64 {
return t.claims.AccountId
}
func (t *AuthorCtl) MustGetCustomerId() int64 {
if t.claims.CustomerId == 0 {
return t.MustGetInt64("customer_id")
}
return t.claims.CustomerId
}
func (t *AuthorCtl) MustGetAreaId() int64 {
areaId, exist := t.GetInt64("area_id")
if !exist {
areaId = t.claims.AreaId
}
if areaId == 0 {
t.ERROR("area_id 不能为空", code.MSG_ERR_Param)
}
return areaId
func (t *AuthorCtl) GetAccountType() string {
return t.claims.AccountType
}
// 对各种角色进行不同的接口权限限定
// role: main sub entry user : 主账号 子账号 录入人员 用户

2
controllers/client/activity.go

@ -32,7 +32,7 @@ func (t *ActivityCtl) ModuleStatus() {
func (t *ActivityCtl) ModuleCurrent() {
activityId := t.MustGetInt64("activity_id")
moduleName := t.MustGet("module_name")
uid := t.MustGetUID()
uid := t.GetAccountId()
activity := new(models.Activity)
exist, err := models.Get(activity, activityId)

6
controllers/client/auction.go

@ -20,7 +20,7 @@ type AuctionCtl struct {
func (t *AuctionCtl) Auction() {
auctionId := t.MustGetInt64("auction_activity_id")
totalMoney := t.MustGetDouble("total_money")
uid := t.MustGetUID()
uid := t.GetAccountId()
areaId := t.MustGetInt64("area_id")
if totalMoney < 0 {
@ -149,7 +149,7 @@ func (t *AuctionCtl) Auction() {
func (t *AuctionCtl) ExistRecord() {
auctionId := t.MustGetInt64("auction_activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
auction := new(models.NewAuctionActivity)
exist, err := models.Get(auction, auctionId)
@ -171,7 +171,7 @@ func (t *AuctionCtl) ExistRecord() {
// 已经竞拍到了
func (t *AuctionCtl) UserAuctions() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
activity := new(models.Activity)

4
controllers/client/barrage.go

@ -18,8 +18,8 @@ type BarrageCtl struct {
//发送弹幕
func (t *BarrageCtl) Send() {
uid := t.MustGetUID()
customerId := t.MustGetCustomerId()
uid := t.GetAccountId()
customerId := t.MustGetInt64("customer_id")
activityId := t.MustGetInt64("activity_id")
content := t.MustGet("content")

7
controllers/client/bully_screen.go

@ -18,10 +18,11 @@ type BullyScreenCtl struct {
//用户霸屏
func (t *BullyScreenCtl) PaScreen() {
activityId := t.MustGetInt64("activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
content := t.MustGet("content")
second := t.MustGetDouble("second")
style := t.MustGetInt("style")
customerId := t.MustGetInt64("customer_id")
activity := new(models.Activity)
exist, err := models.Get(activity, activityId)
@ -62,7 +63,7 @@ func (t *BullyScreenCtl) PaScreen() {
ActivityId: activityId,
UserId: user.Id,
Nickname: user.Nickname,
CustomerId: t.MustGetCustomerId(),
CustomerId: customerId,
RehearsalId: activity.RehearsalId,
Second: int(second),
Amount: amount,
@ -81,7 +82,7 @@ func (t *BullyScreenCtl) PaScreen() {
// 审核列表 [未审核,未通过,已通过]
func (t *BullyScreenCtl) List() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
bss := new(models.BullyScreenServer)

2
controllers/client/calorie.go

@ -15,7 +15,7 @@ type CalorieCtl struct {
func (t *CalorieCtl) Shake() {
calorieId := t.MustGetInt64("calorie_id")
score := t.DefaultInt("score", 0)
uid := t.MustGetUID()
uid := t.GetAccountId()
calorie := new(models.Calorie)
exist, err := models.Get(calorie, calorieId)

4
controllers/client/good.go

@ -68,7 +68,7 @@ func (t *GoodCtl) ListOrder() {
activityId := t.MustGetInt64("activity_id")
status := t.MustGet("status")
areaId := t.MustGetInt64("area_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
statusList := strings.Split(status, ",")
@ -117,7 +117,7 @@ type OrderParam struct {
// 下订单
func (t *GoodCtl) Order() {
userId := t.MustGetUID() //
userId := t.GetAccountId() //
param := OrderParam{}
if t.Request.OriginRequest.Method == "POST" {
t.CheckErr(t.Bind(&param))

4
controllers/client/invite_envelope.go

@ -12,7 +12,7 @@ type InvitationLetterCtl struct {
}
func (t *InvitationLetterCtl) Invite() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
invitationId := t.MustGetInt64("invitation_id")
answer := t.MustGet("answer")
@ -43,7 +43,7 @@ func (t *InvitationLetterCtl) Invite() {
func (t *InvitationLetterCtl) Setting() {
activityId := t.MustGetInt64("activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
activity := new(models.Activity)
exist, err := models.Get(activity, activityId)

4
controllers/client/live.go

@ -153,7 +153,7 @@ func (t *LiveCtl) LoopQuery() {
// 下单发送红包
// 维护一个队列进行循环, 遍历是否付款成功
func (t *LiveCtl) SendLiveRedPack() {
userId := t.MustGetUID() // 用户 uid
userId := t.GetAccountId() // 用户 uid
activityId := t.MustGetInt64("activity_id") // activity_id
num := t.MustGetInt("num") // 红包数量
prompt := t.MustGet("prompt") // 提示
@ -219,7 +219,7 @@ func (t *LiveCtl) SendLiveRedPack() {
// 领取红包
func (t *LiveCtl) GetLiveRedPack() {
ruleId := t.MustGetInt64("live_red_envelope_rule_id")
userId := t.MustGetUID()
userId := t.GetAccountId()
rule := new(models.LiveRedEnvelopeRule)
exist, err := models.Get(rule, ruleId)

6
controllers/client/login.go

@ -47,7 +47,7 @@ func (t *UserCtl) EntryLogin() {
t.Assert(exist, code.MSG_CUSTOMER_NOT_EXIST, "客户不存在")
// 怎讲activity
token, err := jwt.GenJwtToken("entry", entryPeople.Id, customer.Id, customer.Pid, entryPeople.AreaId, entryPeople.ActivityId)
token, err := jwt.GenJwtToken(define.TYPE_ENTRYPEOPLE, entryPeople.Id, customer.Id, customer.Pid, entryPeople.AreaId, entryPeople.ActivityId)
t.CheckErr(err)
t.SetSession(define.TOKEN, token)
entryPeople.Token = token
@ -214,7 +214,7 @@ func (t *UserCtl) DebugLogin() {
t.CheckErr(err)
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "地区不存在")
jwtToken, err := jwt.GenJwtToken("user", user.Id, customer.Id, customer.Pid, area.Id, activityId)
jwtToken, err := jwt.GenJwtToken(define.TYPE_H5USER, user.Id, customer.Id, customer.Pid, area.Id, activityId)
t.CheckErr(err)
t.SetSession(define.TOKEN, jwtToken)
t.JSON(map[string]interface{}{
@ -228,7 +228,7 @@ type UserAuthCtl struct {
}
func (t *UserAuthCtl) SaveUserInfo() {
uid := t.MustGetUID()
uid := t.GetAccountId()
info := mpoauth2.SessionInfo{}
t.RequestToStruct(&info)

6
controllers/client/lottery.go

@ -14,7 +14,7 @@ type LotteryCtl struct {
}
func (t *LotteryCtl) UserLotteries() {
userId := t.MustGetUID()
userId := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
activity := new(models.Activity)
@ -32,7 +32,7 @@ func (t *LotteryCtl) UserLotteries() {
}
func (t *LotteryCtl) CashLottery() {
uid := t.MustGetUID()
uid := t.GetAccountId()
prizeId := t.MustGetInt64("prize_id")
name := t.MustGet("name")
phone := t.MustGet("phone")
@ -60,7 +60,7 @@ func (t *LotteryCtl) CashLottery() {
}
func (t *LotteryCtl) CheckLottery() {
uid := t.MustGetUID()
uid := t.GetAccountId()
ladderId := t.MustGetInt64("lottery_draw_ladder_id")
ladder := &models.LotteryDrawRuleLadder{}

25
controllers/client/order_entry.go

@ -17,18 +17,21 @@ type OrderEntryCtl struct {
// 用户查看所有商品
func (t *OrderEntryCtl) List() {
uid := t.MustGetUID()
_type := t.GetAccountType()
activityId := t.MustGetInt64("activity_id")
areaId := t.MustGetInt64("area_id")
goods, err := models.GetGoodsByActivityId(activityId, areaId)
t.CheckErr(err)
for index := range goods {
url := fmt.Sprintf("%s/PcClient/Client/OrderEntryCtl/order?"+
"user_id=%d&activity_id=%d&good_id=%d", define.HOST, uid, activityId, goods[index].Id)
qrcode, err := utils.Qrcode2Base64(url)
t.CheckErr(err)
goods[index].Qrcode = qrcode
if _type == define.TYPE_H5USER {
uid := t.GetAccountId()
for index := range goods {
url := fmt.Sprintf("%s/PcClient/Client/OrderEntryCtl/order?"+
"user_id=%d&activity_id=%d&good_id=%d", define.HOST, uid, activityId, goods[index].Id)
qrcode, err := utils.Qrcode2Base64(url)
t.CheckErr(err)
goods[index].Qrcode = qrcode
}
}
t.JSON(map[string]interface{}{
@ -41,7 +44,7 @@ func (t *OrderEntryCtl) List() {
func (t *OrderEntryCtl) Order() {
userId := t.MustGetInt64("user_id")
goodId := t.MustGetInt64("good_id")
entryId := t.MustGetUID()
entryId := t.GetAccountId()
entryPerson := models.OrderEntryPerson{}
exist, err := models.Get(&entryPerson, entryId)
@ -196,7 +199,7 @@ type ManualOrderParam struct {
// 手动下单
func (t *OrderEntryCtl) ManualOrder() {
entryId := t.MustGetUID() // 录入人员id
entryId := t.GetAccountId() // 录入人员id
param := &ManualOrderParam{}
err := t.Bind(param)
t.CheckErr(err)
@ -407,7 +410,7 @@ type OrderListResult struct {
}
func (t *OrderEntryCtl) EntryOrders() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
entry := new(models.OrderEntryPerson)
@ -456,7 +459,7 @@ type UserOrdersResult struct {
// 用户查看订单列表
func (t *OrderEntryCtl) UserOrders() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
activity := new(models.Activity)

4
controllers/client/reward.go

@ -20,7 +20,7 @@ func (t *RewardCtl) Reward() {
activityId := t.MustGetInt64("activity_id")
content := t.MustGet("content")
amount := t.MustGetDouble("amount")
uid := t.MustGetUID()
uid := t.GetAccountId()
_type := t.DefaultInt("type", 0)
if amount <= 0 {
@ -90,7 +90,7 @@ func (t *RewardCtl) Reward() {
}
func (t *RewardCtl) List() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
activity := new(models.Activity)

6
controllers/client/shake_red_envelope.go

@ -30,8 +30,8 @@ func (t *ShakeRedEnvelopeCtl) Status() {
func (t *ShakeRedEnvelopeCtl) Shake() {
ruleId := t.MustGetInt64("shake_red_envelope_rule_id")
userId := t.MustGetUID()
areaId := t.MustGetAreaId()
userId := t.GetAccountId()
areaId := t.MustGetInt64("area_id")
// 查询摇红包规则
rule := new(models.ShakeRedEnvelopeRule)
@ -143,7 +143,7 @@ func (t *ShakeRedEnvelopeCtl) Shake() {
// 用户红包
func (t *ShakeRedEnvelopeCtl) UserRedEnvelopes() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
activity := new(models.Activity)

14
controllers/client/sign.go

@ -18,7 +18,7 @@ type SignCtl struct {
func (t *SignCtl) CheckSign() {
activityId := t.MustGetInt64("activity_id")
areaId := t.MustGetInt64("area_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
_type := t.MustGetInt("type")
activity := &models.Activity{}
@ -114,10 +114,10 @@ func (t *SignCtl) Setting() {
//签到动作
func (t *SignCtl) Sign() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
_type := t.DefaultInt("type", 0) // 默认 0
areaId := t.MustGetAreaId()
areaId := t.MustGetInt64("area_id")
//根据activity_id查找主活动的信息
activity := new(models.Activity)
@ -200,7 +200,7 @@ func (t *SignCtl) Sign() {
// 实名签到
func (t *SignCtl) RealSign() {
activityId := t.MustGetInt64("activity_id")
userId := t.MustGetUID()
userId := t.GetAccountId()
areaId := t.MustGetInt64("area_id")
user := new(models.User)
@ -292,8 +292,8 @@ func (t *SignCtl) RealSign() {
}
func (t *SignCtl) ApplySign() {
userId := t.MustGetUID()
areaId := t.MustGetAreaId()
userId := t.GetAccountId()
areaId := t.MustGetInt64("area_id")
activityId := t.MustGetInt64("activity_id")
activity := new(models.Activity)
@ -317,7 +317,7 @@ func (t *SignCtl) ApplySign() {
}
func (t *SignCtl) CheckRealSign() {
userId := t.MustGetUID()
userId := t.GetAccountId()
areaId := t.MustGetInt64("area_id")
activityId := t.MustGetInt64("activity_id")

6
controllers/client/tug_war.go

@ -16,7 +16,7 @@ type TugOfWarCtl struct {
func (t *TugOfWarCtl) Status() {
// 获取此次活动的状态
baheId := t.MustGetInt64("bahe_activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
// 找到活动
bahe := new(models.TugOfWar)
exist, err := models.Get(bahe, baheId)
@ -62,7 +62,7 @@ func (t *TugOfWarCtl) Status() {
}
func (t *TugOfWarCtl) Shake() {
uid := t.MustGetUID()
uid := t.GetAccountId()
baheId := t.MustGetInt64("bahe_activity_id")
score := t.MustGetInt64("score") // 增加的分数
@ -109,7 +109,7 @@ func (t *TugOfWarCtl) Shake() {
func (t *TugOfWarCtl) JoinTeam() {
teamId := t.MustGetInt64("bahe_team_id")
baheActivityId := t.MustGetInt64("bahe_activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
bahe := new(models.TugOfWar)
exist, err := models.Get(bahe, baheActivityId)

4
controllers/client/upper_wall.go

@ -15,7 +15,7 @@ type UpperWallCtl struct {
//发送上墙消息
func (t *UpperWallCtl) Send() {
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
category := t.MustGetInt("category")
content, _ := t.Get("content")
@ -59,7 +59,7 @@ func (t *UpperWallCtl) Send() {
func (t *UpperWallCtl) List() {
activityId := t.MustGetInt64("activity_id")
userId := t.MustGetUID()
userId := t.GetAccountId()
activity := new(models.Activity)
exist, err := models.Get(activity, activityId)

4
controllers/client/vote.go

@ -14,7 +14,7 @@ type VoteCtl struct {
//投票
func (t *VoteCtl) Vote() {
uid := t.MustGetUID()
uid := t.GetAccountId()
ladderId := t.MustGetInt64("vote_activity_ladder_id")
//检查是否可以投票
@ -88,7 +88,7 @@ func (t *VoteCtl) List() {
func (t *VoteCtl) Detail() {
voteActivityId := t.MustGetInt64("vote_activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
activity := new(models.Activity)

2
controllers/pc/activity.go

@ -18,7 +18,7 @@ type ActivityCtl struct {
func (t *ActivityCtl) StartActivity() {
activityId := t.MustGetInt64("activity_id")
mode := t.MustGetInt("mode") // 标识彩排 mode=0正式 mode=1彩排
uid := t.MustGetUID()
uid := t.GetAccountId()
limit := t.DefaultInt64("limit", 10)
activity := new(models.Activity)

2
controllers/pc/auction.go

@ -247,7 +247,7 @@ func (t *AuctionCtl) Records() {
//获取二维码
func (t *AuctionCtl) Qrcode() {
//将服务器得地址和activity_id,动态生成二维码
uid := t.MustGetUID()
uid := t.GetAccountId()
activityId := t.MustGetInt64("activity_id")
auctionId := t.MustGetInt64("auction_activity_id")

2
controllers/pc/bully_screen.go

@ -43,7 +43,7 @@ func (t *BullyScreenCtl) WaitReview() {
//审核操作
func (t *BullyScreenCtl) Review() {
customerId := t.MustGetUID()
customerId := t.GetAccountId()
status := t.MustGetBool("status")
ids := strings.Split(t.MustGet("ids"), "|")
activityId := t.MustGetInt64("activity_id")

2
controllers/pc/calorie.go

@ -98,7 +98,7 @@ func (t *CalorieCtl) List() {
// 二维码
func (t *CalorieCtl) Qrcode() {
activityId := t.MustGetInt64("activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
calorieId := t.MustGetInt64("calorie_id")
area := new(models.AreaStore)

4
controllers/pc/login.go

@ -38,7 +38,7 @@ func (t *UserCtl) Login() {
t.CheckErr(err)
// 主账号无法确定
token, err := jwt.GenJwtToken("customer", customer.Id, customer.Id, customer.Pid, customer.AreaId, customer.ActivityId)
token, err := jwt.GenJwtToken(define.TYPE_CUSTOMER, customer.Id, customer.Id, customer.Pid, customer.AreaId, customer.ActivityId)
t.CheckErr(err)
t.SetSession(define.TOKEN, token)
customer.Token = token
@ -68,7 +68,7 @@ func (t *UserCtl) DebugLogin() {
t.CheckErr(err)
t.Assert(exist, code.MSG_CUSTOMER_NOT_EXIST, "客户不存在")
token, err := jwt.GenJwtToken("customer", customer.Id, customer.Id, customer.Pid, customer.AreaId, customer.ActivityId)
token, err := jwt.GenJwtToken(define.TYPE_CUSTOMER, customer.Id, customer.Id, customer.Pid, customer.AreaId, customer.ActivityId)
t.CheckErr(err)
t.SetSession(define.TOKEN, token)
t.JSON(map[string]interface{}{

6
controllers/pc/lottery_draw.go

@ -178,7 +178,7 @@ func (t *LotteryDrawCtl) Stop() {
//获取所有抽奖活动列表
func (t *LotteryDrawCtl) List() {
activityId := t.MustGetInt64("activity_id")
customerId := t.MustGetUID()
customerId := t.GetAccountId()
customer := new(models.Customer)
exist, err := models.Get(customer, customerId)
@ -218,7 +218,7 @@ func (t *LotteryDrawCtl) Prize() {
func (t *LotteryDrawCtl) Users() {
activityId := t.MustGetInt64("activity_id")
ruleId := t.MustGetInt64("lottery_draw_rule_id")
customerId := t.MustGetUID()
customerId := t.GetAccountId()
//customer := new(models.Customer)
//exist, err := models.Get(customer, customerId)
@ -259,7 +259,7 @@ func (t *LotteryDrawCtl) Lottery() {
ruleId := t.MustGetInt64("lottery_draw_rule_id")
ladderId := t.MustGetInt64("lottery_draw_ladder_id")
number := t.MustGetInt("number") // 奖品数量
customerId := t.MustGetUID()
customerId := t.GetAccountId()
customer := new(models.Customer)
exist, err := models.Get(customer, customerId)

4
controllers/pc/order_draw.go

@ -110,7 +110,7 @@ type OrderLadderResult struct {
//获取所有订单奖品
func (t *OrderDrawCtl) List() {
activityId := t.MustGetInt64("activity_id")
customerId := t.MustGetUID()
customerId := t.GetAccountId()
//
area := &models.AreaStore{}
exist, err := area.GetByCustomerId(customerId, activityId)
@ -249,7 +249,7 @@ func (t *OrderDrawCtl) Draw() {
ruleId := t.MustGetInt64("order_draw_rule_id")
ladderId := t.MustGetInt64("order_draw_rule_ladder_id")
number := t.MustGetInt("number")
customerId := t.MustGetUID()
customerId := t.GetAccountId()
customer := new(models.Customer)
exist, err := models.Get(customer, customerId)

2
controllers/pc/reward.go

@ -82,7 +82,7 @@ func (t *RewardCtl) WaitReview() {
func (t *RewardCtl) Review() {
status := t.MustGetBool("status")
ids := strings.Split(t.MustGet("ids"), "|")
uid := t.MustGetUID()
uid := t.GetAccountId()
result, err := models.GetRewardHistoryByIds(ids)
t.CheckErr(err)

8
controllers/pc/shake_red_envelope.go

@ -54,7 +54,7 @@ func (t *ShakeRedEnvelopeCtl) Ready() {
//开始摇红包
func (t *ShakeRedEnvelopeCtl) Start() {
ruleId := t.MustGetInt64("shake_red_envelope_rule_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
//根据摇红包规则id查找该条记录并且更给状态
rule := new(models.ShakeRedEnvelopeRule)
@ -105,7 +105,7 @@ func (t *ShakeRedEnvelopeCtl) Start() {
//停止摇红包
func (t *ShakeRedEnvelopeCtl) Stop() {
ruleId := t.MustGetInt64("shake_red_envelope_rule_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
rule := new(models.ShakeRedEnvelopeRule)
exist, err := models.Get(rule, ruleId)
@ -146,7 +146,7 @@ func (t *ShakeRedEnvelopeCtl) Stop() {
func (t *ShakeRedEnvelopeCtl) List() {
activityId := t.MustGetInt64("activity_id")
customerId := t.MustGetUID()
customerId := t.GetAccountId()
area := new(models.AreaStore)
exist, err := area.GetByCustomerId(customerId, activityId)
@ -205,7 +205,7 @@ func (t *ShakeRedEnvelopeCtl) List() {
//二维码
func (t *ShakeRedEnvelopeCtl) Qrcode() {
activityId := t.MustGetInt64("activity_id")
customerId := t.MustGetUID()
customerId := t.GetAccountId()
rehearsalId := t.MustGetInt64("rehearsal_id")
ruleId := t.MustGetInt64("shake_red_envelope_rule_id")

2
controllers/pc/sign.go

@ -19,7 +19,7 @@ type SignCtl struct {
//获取二维码
func (t *SignCtl) Qrcode() {
activityId := t.MustGetInt64("activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
signUpId := t.MustGetInt64("sign_rule_id")
area := new(models.AreaStore)

2
controllers/pc/tug_war.go

@ -102,7 +102,7 @@ func (t *TugOfWarCtl) Stop() {
func (t *TugOfWarCtl) Team() {
baheId := t.MustGetInt64("bahe_activity_id")
customerId := t.MustGetUID()
customerId := t.GetAccountId()
customer := new(models.Customer)
exist, err := models.Get(customer, customerId)

4
controllers/pc/upper_wall.go

@ -73,7 +73,7 @@ func (t *UpperWallCtl) WaitReview() {
func (t *UpperWallCtl) Review() {
idList := t.MustGet("ids")
status := t.MustGetBool("status")
uid := t.MustGetUID()
uid := t.GetAccountId()
ids := strings.Split(idList, "|")
customer := new(models.Customer)
@ -168,7 +168,7 @@ func (t *UpperWallCtl) Total() {
// 跳到主页
func (t *UpperWallCtl) Qrcode() {
activityId := t.MustGetInt64("activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
activity := new(models.Activity)
exist, err := models.Get(activity, activityId)

2
controllers/pc/vote.go

@ -20,7 +20,7 @@ type VoteCtl struct {
func (t *VoteCtl) Qrcode() {
activityId := t.MustGetInt64("activity_id")
voteActivityId := t.MustGetInt64("vote_activity_id")
uid := t.MustGetUID()
uid := t.GetAccountId()
area := new(models.AreaStore)
exist, err := area.GetByCustomerId(uid, activityId)

2
controllers/pc/ws.go

@ -15,7 +15,7 @@ type WsCtl struct {
// ws doc
func (t *WsCtl) Ops() {
customerId := t.MustGetUID()
customerId := t.GetAccountId()
activityId, _ := t.GetInt64("activity_id")
customer := new(models.Customer)
exist, err := models.Get(customer, customerId)

Loading…
Cancel
Save