实现网费奖励下发和回调接口

This commit is contained in:
2025-07-05 14:45:02 +08:00
parent 357ada8455
commit 3933d98c4d
17 changed files with 271 additions and 17 deletions

View File

@ -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,