修改表名
This commit is contained in:
parent
4bb4be7204
commit
1ce5b473eb
@ -402,6 +402,8 @@ const (
|
|||||||
|
|
||||||
//推送礼包
|
//推送礼包
|
||||||
TablekTreasuremap = "treasuremap"
|
TablekTreasuremap = "treasuremap"
|
||||||
|
|
||||||
|
TableEntertainm = "entertainm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RPC服务接口定义处
|
// RPC服务接口定义处
|
||||||
|
@ -30,7 +30,13 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.EntertainRewardRe
|
|||||||
|
|
||||||
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
if user.Consumeexp == 0 { // 0 不让领
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_UserRepeadReward,
|
||||||
|
Title: pb.ErrorCode_UserRepeadReward.ToString(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if conf, err := this.module.configure.GetGameConsumeintegral(user.Consumeexp); err == nil {
|
if conf, err := this.module.configure.GetGameConsumeintegral(user.Consumeexp); err == nil {
|
||||||
if _, ok := list.Reward[conf.Key]; !ok {
|
if _, ok := list.Reward[conf.Key]; !ok {
|
||||||
if errdata, atno = this.module.DispenseAtno(session, conf.Rewards, true); errdata != nil {
|
if errdata, atno = this.module.DispenseAtno(session, conf.Rewards, true); errdata != nil {
|
||||||
@ -38,7 +44,7 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.EntertainRewardRe
|
|||||||
}
|
}
|
||||||
list.Reward[conf.Key] = 1
|
list.Reward[conf.Key] = 1
|
||||||
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{
|
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{
|
||||||
"reward": list.Reward[conf.Key],
|
"reward": list.Reward,
|
||||||
})
|
})
|
||||||
} else { // 重复领取
|
} else { // 重复领取
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
|
@ -18,7 +18,7 @@ type modelComp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
this.TableName = comm.TableDragon
|
this.TableName = comm.TableEntertainm
|
||||||
err = this.MCompModel.Init(service, module, comp, options)
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
this.module = module.(*Entertainment)
|
this.module = module.(*Entertainment)
|
||||||
// 通过uid创建索引
|
// 通过uid创建索引
|
||||||
|
Loading…
Reference in New Issue
Block a user