Browse Source

提交

master
gwbvipvip 9 months ago
parent
commit
bade5ec563
5 changed files with 22 additions and 23 deletions
  1. +11
    -10
      BPA.KitChen.StoreManagement.Application/Service/Applet/AppletService.cs
  2. +1
    -0
      BPA.KitChen.StoreManagement.Application/Service/ShopManage/Printer/Dtos/PrinterOutDto.cs
  3. +3
    -1
      BPA.KitChen.StoreManagement.Application/Service/ShopManage/Printer/PrinterServices.cs
  4. +3
    -2
      BPA.KitChen.StoreManagement.Application/Service/ShopManage/StoreAdvertisement/Dtos/StoreAdvertisementEntityDto.cs
  5. +4
    -10
      BPA.KitChen.StoreManagement.Application/Service/ShopManage/StoreAdvertisement/StoreAdvertisementService.cs

+ 11
- 10
BPA.KitChen.StoreManagement.Application/Service/Applet/AppletService.cs View File

@@ -128,11 +128,11 @@ namespace BPA.KitChen.StoreManagement.Application.Service.Applet
[HttpPost("/api/AppletService/MaterialAdd")]
public async Task MaterialAdd(AddMiniStorePageMaterialInput input)
{
//var res = await db.Queryable<MiniStorePageConfig>().FirstAsync(x => x.MaterialCode == input.MaterialCode && x.PageId==input.PageId);
//if (res != null)
//{
// throw Oops.Bah("素材编码重复");
//}
var res = await db.Queryable<MiniStorePageConfig>().FirstAsync(x => x.MaterialCode == input.MaterialCode );
if (res != null)
{
throw Oops.Bah("素材编码重复");
}
MiniStorePageConfig data = input.Adapt<MiniStorePageConfig>();
await db.Insertable(data).ExecuteCommandAsync();
}
@@ -209,11 +209,11 @@ namespace BPA.KitChen.StoreManagement.Application.Service.Applet
throw Oops.Bah("没有找到数据");
}
//判断编码重复
//var data1 = await db.Queryable<MiniStorePageConfig>().FirstAsync(x => x.Id != input.Id && x.MaterialCode == input.MaterialCode&& x.PageId != input.PageId);
//if (data1!=null)
//{
// throw Oops.Bah("编码重复");
//}
var data1 = await db.Queryable<MiniStorePageConfig>().FirstAsync(x => x.Id != input.Id && x.MaterialCode == input.MaterialCode );
if (data1 != null)
{
throw Oops.Bah("编码重复");
}
data.MaterialName = input.MaterialName;
data.MaterialPath = input.MaterialPath;
data.PageId = input.PageId;
@@ -263,6 +263,7 @@ namespace BPA.KitChen.StoreManagement.Application.Service.Applet
try
{
db.Ado.BeginTran();

var payTemplate = await db.Insertable(new BPA_PayTemplate()
{
Name = inputDto.Name,


+ 1
- 0
BPA.KitChen.StoreManagement.Application/Service/ShopManage/Printer/Dtos/PrinterOutDto.cs View File

@@ -37,6 +37,7 @@ namespace BPA.KitChen.StoreManagement.Application.Service.ShopManage.Printer.Dto


public object IsHost { get; set; }
public DateTime? CreateAt { get; set; }

public List<string> goodsIdList { get; set; }



+ 3
- 1
BPA.KitChen.StoreManagement.Application/Service/ShopManage/Printer/PrinterServices.cs View File

@@ -177,7 +177,9 @@ namespace BPA.KitChen.StoreManagement.Application.Service.ShopManage.Printer
TemplaterId = d.Value,
TerminalId = a.TerminalId,
TerminalKey = a.TerminalKey,
StoreId=b.Value
StoreId=b.Value,
CreateAt = a.CreateAt,

}).ToList();

var goodsId = db.Queryable<BPA_PrinterConfigure>().Where(x =>


+ 3
- 2
BPA.KitChen.StoreManagement.Application/Service/ShopManage/StoreAdvertisement/Dtos/StoreAdvertisementEntityDto.cs View File

@@ -21,10 +21,11 @@ namespace BPA.KitChen.StoreManagement.Application.Service.ShopManage.StoreAdvert
/// 广告标题
/// </summary>
public string Title { get; set; }

/// <summary>
/// 广告内容
/// </summary>
public string Content { get; set; }
public string Content { get; set; } = "";
/// <summary>
/// 广告开始时间
/// </summary>
@@ -36,7 +37,7 @@ namespace BPA.KitChen.StoreManagement.Application.Service.ShopManage.StoreAdvert
/// <summary>
/// 状态 0启用 1停用
/// </summary>
public string Status { get; set; }
public int Status { get; set; }
/// <summary>
/// 图片存储路径
/// </summary>


+ 4
- 10
BPA.KitChen.StoreManagement.Application/Service/ShopManage/StoreAdvertisement/StoreAdvertisementService.cs View File

@@ -4,6 +4,7 @@ using BPA.KitChen.StoreManagement.Application.Service.ShopManage.StoreDesktopNum
using BPA.KitChen.StoreManagement.Core.Common;
using BPA.KitChen.StoreManagement.Core.Common.Const;
using BPA.KitChen.StoreManagement.Core.Entity;
using BPA.KitChen.StoreManagement.Core.Enum;
using BPA.KitChen.StoreManagement.SqlSugar;
using Furion;
using Furion.DependencyInjection;
@@ -163,7 +164,7 @@ namespace BPA.KitChen.StoreManagement.Application.Service.ShopManage.StoreAdvert
EndTime = item.EndTime,
VideoUrl = item.VideoUrl,
StoreId = item.StoreId,
Status = ((int)item.Status).ToString(),
Status = ((int)item.Status),
Step = item.Step,
CreateAt = item.CreateAt,
ImageUrl = imageUrls,
@@ -244,17 +245,10 @@ namespace BPA.KitChen.StoreManagement.Application.Service.ShopManage.StoreAdvert
public async Task<bool> UpdateStoreAdvertisementStatusAsync(StoreAdvertisementEntityDto inputDto)
{
var data = await db.Queryable<BPA_StoreAdvertisement>().Where(x => x.Id == inputDto.Id).FirstAsync();
data.Status=(CommonStatus)inputDto.Status;
if (data != null)
{
var res = await db.Updateable<BPA_StoreAdvertisement>(inputDto.Adapt<BPA_StoreAdvertisement>()).CallEntityMethod(i => i.Modify())
.UpdateColumns(x => new
{
x.Status,
x.UpdateAt,
x.UpdateBy
})
.Where(x => x.Id == inputDto.Id).ExecuteCommandAsync();
var res = await db.Updateable<BPA_StoreAdvertisement>(data).CallEntityMethod(i => i.Modify()).ExecuteCommandAsync();
return res > 0;
}



Loading…
Cancel
Save