by Robin at 20231222; vas
This commit is contained in:
parent
1cbc732469
commit
5b9452aa91
|
@ -1,6 +1,7 @@
|
||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"service/api/base"
|
||||||
"service/api/consts"
|
"service/api/consts"
|
||||||
"service/api/errcode"
|
"service/api/errcode"
|
||||||
accountproto "service/api/proto/account/proto"
|
accountproto "service/api/proto/account/proto"
|
||||||
|
@ -14,6 +15,7 @@ import (
|
||||||
streamerlinkproto "service/api/proto/streamerlink/proto"
|
streamerlinkproto "service/api/proto/streamerlink/proto"
|
||||||
tokenproto "service/api/proto/token/proto"
|
tokenproto "service/api/proto/token/proto"
|
||||||
userwxaddcheckproto "service/api/proto/userwxaddcheck/proto"
|
userwxaddcheckproto "service/api/proto/userwxaddcheck/proto"
|
||||||
|
vasproto "service/api/proto/vas/proto"
|
||||||
vericodeproto "service/api/proto/vericode/proto"
|
vericodeproto "service/api/proto/vericode/proto"
|
||||||
"service/apollostruct"
|
"service/apollostruct"
|
||||||
businessvalidator "service/app/mix/service/business_validator"
|
businessvalidator "service/app/mix/service/business_validator"
|
||||||
|
@ -875,12 +877,40 @@ func (s *Service) ApiUpdateStreamer(ctx *gin.Context, req *streamerproto.ApiUpda
|
||||||
|
|
||||||
//执行更新
|
//执行更新
|
||||||
if err := _DefaultStreamer.OpUpdate(ctx, &streamerproto.OpUpdateReq{
|
if err := _DefaultStreamer.OpUpdate(ctx, &streamerproto.OpUpdateReq{
|
||||||
Streamer: req.Streamer,
|
Streamer: &dbstruct.Streamer{
|
||||||
|
Mid: req.Streamer.Mid,
|
||||||
|
Gender: req.Streamer.Gender,
|
||||||
|
Bio: req.Streamer.Bio,
|
||||||
|
Cover: req.Streamer.Cover,
|
||||||
|
Shorts: req.Streamer.Shorts,
|
||||||
|
Album: req.Streamer.Album,
|
||||||
|
Age: req.Streamer.Age,
|
||||||
|
Height: req.Streamer.Height,
|
||||||
|
Weight: req.Streamer.Weight,
|
||||||
|
Constellation: req.Streamer.Constellation,
|
||||||
|
City: req.Streamer.City,
|
||||||
|
Tag: req.Streamer.Tag,
|
||||||
|
Fans: req.Streamer.Fans,
|
||||||
|
AutoResponseMessage: req.Streamer.AutoResponseMessage,
|
||||||
|
},
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
logger.Error("OpUpdate fail, req: %v, err: %v", util.ToJson(req), err)
|
logger.Error("OpUpdate fail, req: %v, err: %v", util.ToJson(req), err)
|
||||||
ec = errcode.ErrCodeStreamerSrvFail
|
ec = errcode.ErrCodeStreamerSrvFail
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 更新user_vas
|
||||||
|
err = _DefaultVas.UpdateWechat(ctx, &vasproto.UpdateWechatReq{
|
||||||
|
BaseRequest: base.BaseRequest{
|
||||||
|
Mid: util.DerefInt64(req.Streamer.Mid),
|
||||||
|
},
|
||||||
|
WechatLockType: util.DerefInt32(req.Streamer.WechatLockType),
|
||||||
|
WechatContact: util.DerefString(req.Streamer.WechatContact),
|
||||||
|
WechatCoinPrice: util.DerefInt64(req.Streamer.WechatCoinPrice),
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("UpdateWechat fail, mid: %v, err: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 审核任务加入队列
|
// 审核任务加入队列
|
||||||
for i := range imageaudittasks {
|
for i := range imageaudittasks {
|
||||||
|
|
|
@ -1459,10 +1459,6 @@ func (s *Service) OpDeleteStreamer(ctx *gin.Context, id int64) (ec errcode.ErrCo
|
||||||
func (s *Service) OpGetStreamerList(ctx *gin.Context, req *streamerproto.OpListReq) (list []*dbstruct.Streamer, ec errcode.ErrCode) {
|
func (s *Service) OpGetStreamerList(ctx *gin.Context, req *streamerproto.OpListReq) (list []*dbstruct.Streamer, ec errcode.ErrCode) {
|
||||||
ec = errcode.ErrCodeStreamerSrvOk
|
ec = errcode.ErrCodeStreamerSrvOk
|
||||||
|
|
||||||
if ec = s.OpGetStreamerListBusinessValidate(ctx, req); ec != errcode.ErrCodeStreamerSrvOk {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
list, err := _DefaultStreamer.OpList(ctx, req)
|
list, err := _DefaultStreamer.OpList(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("OpList fail, req: %v, err: %v", util.ToJson(req), err)
|
logger.Error("OpList fail, req: %v, err: %v", util.ToJson(req), err)
|
||||||
|
@ -1707,10 +1703,6 @@ func (s *Service) OpGetStreamerRecommList(ctx *gin.Context, req *streamerproto.O
|
||||||
|
|
||||||
ec = errcode.ErrCodeStreamerSrvOk
|
ec = errcode.ErrCodeStreamerSrvOk
|
||||||
|
|
||||||
if ec = s.OpGetStreamerRecommListBusinessValidate(ctx, req); ec != errcode.ErrCodeStreamerSrvOk {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//1.从redis中获取数据
|
//1.从redis中获取数据
|
||||||
err := redis.GetRedisClient().GetObject(consts.RedisStreamerPrefix+"recomm_list", &recommlist)
|
err := redis.GetRedisClient().GetObject(consts.RedisStreamerPrefix+"recomm_list", &recommlist)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue