预约页面修改
This commit is contained in:
parent
6a97f727f4
commit
6780f859cb
|
|
@ -8,6 +8,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -88,6 +89,10 @@ namespace CoreCms.Net.Model.ViewModels.SQ
|
||||||
public class SQReservationsAddDto : SQReservations
|
public class SQReservationsAddDto : SQReservations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最晚到店时间
|
||||||
|
/// </summary>
|
||||||
|
public long? LatestDateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开始时间
|
/// 开始时间
|
||||||
|
|
@ -422,8 +427,8 @@ namespace CoreCms.Net.Model.ViewModels.SQ
|
||||||
public string game_type { get; set; }
|
public string game_type { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可选日期信息DTO
|
/// 可选日期信息DTO
|
||||||
|
|
|
||||||
|
|
@ -516,6 +516,11 @@ public class SQController : ControllerBase
|
||||||
var userId = _user.ID;
|
var userId = _user.ID;
|
||||||
var start_time = DateTimeOffset.FromUnixTimeSeconds(dto.start_time).AddHours(8).DateTime;
|
var start_time = DateTimeOffset.FromUnixTimeSeconds(dto.start_time).AddHours(8).DateTime;
|
||||||
var end_time = DateTimeOffset.FromUnixTimeSeconds(dto.end_time).AddHours(8).DateTime;
|
var end_time = DateTimeOffset.FromUnixTimeSeconds(dto.end_time).AddHours(8).DateTime;
|
||||||
|
if (dto?.LatestDateTime > 0)
|
||||||
|
{
|
||||||
|
dto.latest_arrival_time = DateTimeOffset.FromUnixTimeSeconds(dto.LatestDateTime ?? 0).AddHours(8).DateTime;
|
||||||
|
}
|
||||||
|
|
||||||
// 1. 参数校验
|
// 1. 参数校验
|
||||||
if (dto == null || dto.room_id <= 0 || start_time >= end_time)
|
if (dto == null || dto.room_id <= 0 || start_time >= end_time)
|
||||||
{
|
{
|
||||||
|
|
@ -631,6 +636,7 @@ public class SQController : ControllerBase
|
||||||
updated_at = DateTime.Now,
|
updated_at = DateTime.Now,
|
||||||
credit_limit = dto.credit_limit,
|
credit_limit = dto.credit_limit,
|
||||||
player_count = dto.player_count,
|
player_count = dto.player_count,
|
||||||
|
latest_arrival_time = dto.latest_arrival_time,
|
||||||
deposit_fee = dto.deposit_fee,
|
deposit_fee = dto.deposit_fee,
|
||||||
duration_minutes = (int)(end_time - start_time).TotalMinutes,
|
duration_minutes = (int)(end_time - start_time).TotalMinutes,
|
||||||
extra_info = dto.extra_info,
|
extra_info = dto.extra_info,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user