|
|
@@ -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; |
|
|
|
} |
|
|
|
|
|
|
|