瀏覽代碼

消费

Lishi
xxe 2 年之前
父節點
當前提交
d2e3bb9b2b
共有 3 個檔案被更改,包括 4 行新增9 行删除
  1. +0
    -5
      HKCardOUT/Logic/Model/SaleLog.cs
  2. +2
    -2
      HKCardOUT/Logic/RemoteService.cs
  3. +2
    -2
      HKCardOUT/Logic/Service/HKCore.cs

+ 0
- 5
HKCardOUT/Logic/Model/SaleLog.cs 查看文件

@@ -16,11 +16,6 @@ namespace HKCardOUT.Logic.Model
[SugarColumn(IsNullable = false)]
public string CardNo { get; set; }
/// <summary>
/// 消费金额
/// </summary>
[SugarColumn(IsNullable = false, ColumnDataType = "decimal(10,2)")]
public decimal Money { get; set; }
/// <summary>
/// 消费位置
/// </summary>
[SugarColumn(IsNullable = false)]


+ 2
- 2
HKCardOUT/Logic/RemoteService.cs 查看文件

@@ -31,12 +31,12 @@ namespace HKCardOUT.Logic
/// </summary>
/// <param name="CardNo"></param>
/// <param name="Money"></param>
public static bool SyncSaleLog(string CardNo, decimal Money)
public static bool SyncSaleLog(string CardNo, string StallId)
{
var data = IHttpMultiClient.HttpMulti.AddNode(t =>
{
t.ReqType = MultiType.POST;
t.JsonParam = (new { Money, Type = -1, CardNum = CardNo }).ToJson();
t.JsonParam = (new { GateId=StallId, Type = -1, CardNum = CardNo }).ToJson();
t.NodePath = ApiRoute.SyncSaleLog;
}).Build().RunStringFirst();
return bool.Parse(data.ToModel<JObject>()["data"].ToString());


+ 2
- 2
HKCardOUT/Logic/Service/HKCore.cs 查看文件

@@ -31,7 +31,7 @@ namespace HKCardOUT.Logic.Service
var entity = DbContext.Context.Insertable(input).CallEntityMethod(t => t.Create()).ExecuteReturnEntity();
if (entity.Id!=Guid.Empty)
{
var res = RemoteService.SyncSaleLog(input.CardNo, input.Money);
var res = RemoteService.SyncSaleLog(input.CardNo, input.Location);
Main.GetInstance.Start(input.Location.AsInt());
DbContext.Context.Updateable<SaleLog>().SetColumns(t => t.IsSync == true).Where(t => t.Id == entity.Id).ExecuteCommand();
return res;
@@ -44,7 +44,7 @@ namespace HKCardOUT.Logic.Service
var entity = DbContext.Context.Insertable(input).CallEntityMethod(t => t.Create()).ExecuteReturnEntity();
if (entity.Id!=Guid.Empty)
{
var res = RemoteService.SyncSaleLog(input.CardNo, input.Money);
var res = RemoteService.SyncSaleLog(input.CardNo, input.Location);
Main.GetInstance.Start(input.Location.AsInt());
DbContext.Context.Updateable<SaleLog>().SetColumns(t => t.IsSync == true).Where(t => t.Id == entity.Id).ExecuteCommand();
return res;


Loading…
取消
儲存