Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
|
||||
"server/api/store/v1"
|
||||
"server/internal/service"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetStoreInfoByNetbar(ctx context.Context, req *v1.GetStoreInfoByNetbarReq) (res *v1.GetStoreInfoByNetbarRes, err error) {
|
||||
|
||||
out, err := service.Store().GetStoreInfoByNetbarAccount(ctx, &model.StoreByNetbarAccountIn{NetbarAccount: req.NetbarAccount})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.GetStoreInfoByNetbarRes{
|
||||
Store: out.Store,
|
||||
}, nil
|
||||
}
|
||||
@ -374,3 +374,15 @@ func (s *sStore) SaveNetfeeSetting(ctx context.Context, in *model.SaveNetfeeSett
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// GetStoreInfoByNetbarAccount 根据网关账号获取门店信息
|
||||
func (s *sStore) GetStoreInfoByNetbarAccount(ctx context.Context, in *model.StoreByNetbarAccountIn) (out *model.StoreByNetbarAccountOut, err error) {
|
||||
|
||||
var data model.Store
|
||||
if err = dao.Stores.Ctx(ctx).Where(do.Stores{NetbarAccount: in.NetbarAccount}).Fields(dao.Stores.Columns().Id, dao.Stores.Columns().Name).Scan(&data); err != nil {
|
||||
return nil, ecode.Fail.Sub("查询门店信息失败")
|
||||
}
|
||||
return &model.StoreByNetbarAccountOut{
|
||||
Store: data,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -116,3 +116,11 @@ type StoreDetailIn struct {
|
||||
type StoreDetailOut struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
|
||||
type StoreByNetbarAccountIn struct {
|
||||
NetbarAccount string `json:"netbarAccount"`
|
||||
}
|
||||
|
||||
type StoreByNetbarAccountOut struct {
|
||||
Store interface{} `json:"store"`
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ type UserTask struct {
|
||||
User User `json:"user,omitempty" orm:"with:id=user_id"`
|
||||
Game Game `json:"game,omitempty" orm:"with:game_id=game_id"`
|
||||
// Store Store `json:"store" orm:"with:id=store_id"`
|
||||
UserTimes int64 `json:"userTimes" orm:"user_times" description:"用户完成次数"` // 用户完成次数
|
||||
}
|
||||
|
||||
type TaskReward struct {
|
||||
|
||||
@ -27,6 +27,8 @@ type (
|
||||
GetStoreAreaList(ctx context.Context, in *model.StoreAreaListIn) (out *model.StoreAreaListOut, err error)
|
||||
GetNetfeeSetting(ctx context.Context, in *model.GetNetfeeSettingIn) (out *model.StoreNetfeeAreaLevel, err error)
|
||||
SaveNetfeeSetting(ctx context.Context, in *model.SaveNetfeeSettingIn) (out *model.SaveNetfeeSettingOut, err error)
|
||||
// GetStoreInfoByNetbarAccount 根据网关账号获取门店信息
|
||||
GetStoreInfoByNetbarAccount(ctx context.Context, in *model.StoreByNetbarAccountIn) (out *model.StoreByNetbarAccountOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ type (
|
||||
// GetTaskCompletedList 获取用户任务完成列表
|
||||
GetTaskCompletedList(ctx context.Context, in *model.TaskListIn) (out *model.TaskListOut, err error)
|
||||
GetSelectorList(ctx context.Context, in *model.SelectorIn) (out *[]model.SelectorOut, err error)
|
||||
// GetTask 完成任务
|
||||
// GetTask 领取任务
|
||||
GetTask(ctx context.Context, in *model.GetTaskIn) (out *model.GetTaskOut, err error)
|
||||
GetUserTaskRecordsList(ctx context.Context, in *model.UserTaskRecordsListIn) (out *model.UserTaskRecordsListOut, err error)
|
||||
GetTaskList(ctx context.Context, in *model.GetTaskListV2In) (out *model.GetTaskListV2Out, err error)
|
||||
|
||||
Reference in New Issue
Block a user