nonesale post/detail-inside - Tạo/cập nhật bài viết (web-admin)

 



Tầng Puplic
Trang web , detail Post bài viết



http://saleplatform.fpt.net/web-admin/post/detail?PostId=23



Tầng Core
{{domain}}/utility/api/v1.0/post/update

{
  "Id"0,
  "Title""hoanvu tieu de",
  "Content""<p>hoanvu noi dung&nbsp;</p><p><img src=\"mobisalevn/stag/images/posts/08_11_2022_15_34_50_thumbnail_z3863150819158_f3690db5e00bfeb967293e25c48f6c9e.jpg\" width=\"100%\" style=\"width: 50%;\"><br></p>",
  "ShortDescription""hoanvu mo ta",
  "Image""mobisalevn/stag/images/posts/08_11_2022_15_34_00_thumbnail_image001_(8).png",
  "DateAvalible""2022-11-01",
  "ExpirationDate""2029-12-31",
  "SortOrder"1,
  "SaleTeamId"null,
  "Status"1,
  "CreatedBy""isc.vudh",
  "UpdatedBy""isc.vudh",
  "Type"2
}

{
    "Code"200,
    "Message": {
        "Message""Thành công.",
        "ExMessage"null
    },
    "Data": {}
}


Câu lệnh SQL trên C# của Utility

INSERT INTO SalePlatform.dbo.SPF_Post
   VALUES (@pTitle, @pContent, @pShortDescription, @pImage, @pDateAvalible, @pExpirationDate,pSortOrder,@pStatus,@pSaleTeamID,GETDATE(),@pCreatedBy,GETDATE(),@pUpdatedBy,@pType)





UPDATE SalePlatform.dbo.SPF_Post
    SET Title = @pTitle,
Content = @pContent,
ShortDescription = @pShortDescription,
Image = @pImage,
DateAvalible = @pDateAvalible,
ExpirationDate = @pExpirationDate,
SortOrder = @pSortOrder,
Status = @pStatus,
SaleTeamID = @pSaleTeamID,
UpdatedDate = GETDATE(),
                            Type = @pType,
UpdatedBy = @pUpdatedBy
WHERE ID = @pId















Nhận xét