实现网费奖励下发和回调接口
This commit is contained in:
@ -189,11 +189,16 @@ func saveOrUpdateClientSession(ctx context.Context, storeId int, session ClientS
|
||||
}
|
||||
clientId := client["id"].Int64()
|
||||
areaId := client["area_id"].Int64()
|
||||
|
||||
value, err := dao.Users.Ctx(ctx).Where(do.Users{XyUserId: session.XyUserId}).Fields("id").Value()
|
||||
if err != nil || value.IsEmpty() {
|
||||
glog.Errorf(ctx, "未找到用户信息:xy_user_id=%s", session.XyUserId)
|
||||
return
|
||||
}
|
||||
// 上机逻辑(没有 end_time)
|
||||
if session.EndTime == "" {
|
||||
// 插入上机记录
|
||||
_, err := dao.StoreClientSessions.Ctx(ctx).Data(do.StoreClientSessions{
|
||||
UserId: value.Int64(),
|
||||
StoreId: int64(storeId),
|
||||
ClientId: clientId,
|
||||
AreaId: areaId,
|
||||
|
||||
Reference in New Issue
Block a user