nonesale post/detail - Chi tiết bài viết (App)

 



Tầng puplic
{{domain}}/d2d-nonsale/{{instance}}/api/post/detail
{

    "PostId":136
}

{
    "Code"200,
    "Message": {
        "Title""Thông báo",
        "Message""Thành công.",
        "ExMessage"null,
        "Popup"0
    },
    "Data": {
        "Result": {
            "Content""<p><img src=\"https://hi-static.fpt.vn/sys/mobisalevn/stag/images/posts/18_10_2022_15_42_35_icon_techcombank.png\" width=\"100%\"><br></p>",
            "CreatedDate""14:43 10/11/2022",
            "Id"136,
            "Title""aaaaaaaaaaaaaaa1",
            "DateAvalible""18/10/2022",
            "ExpirationDate""16/11/2030",
            "Image""https://hi-static.fpt.vn/sys/mobisalevn/stag/images/posts/18_10_2022_15_42_29_2048-x-635-1536x476.png",
            "SortOrder"1,
            "Type"1
        },
        "Pagination"null
    }
}

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

{"PostId":136,"SaleTeamId":0}

{
    "Code"200,
    "Message": {
        "Message""Thành công.",
        "ExMessage"null
    },
    "Data": {
        "Content""<p><img src=\"https://hi-static.fpt.vn/sys/mobisalevn/stag/images/posts/18_10_2022_15_42_35_icon_techcombank.png\" width=\"100%\"><br></p>",
        "CreatedDate""14:43 10/11/2022",
        "Id"136,
        "Title""aaaaaaaaaaaaaaa1",
        "Image""https://hi-static.fpt.vn/sys/mobisalevn/stag/images/posts/18_10_2022_15_42_29_2048-x-635-1536x476.png",
        "DateAvalible""18/10/2022",
        "ExpirationDate""16/11/2030",
        "SortOrder"1,
        "Type"1
    }
}


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

  SELECT p.ID,
            p.Title,
            p.Content,
            p.ShortDescription,
            p.Image,
            p.DateAvalible,
            p.ExpirationDate,
            p.SortOrder,
            p.Status,
            p.SaleTeamID,
            p.CreatedBy,
            p.CreatedDate,
            p.UpdatedBy,
            p.UpdatedDate,
            p.Type
            FROM SalePlatform..SPF_Post(nolock) p 
            WHERE p.ID = @pPostId 
            AND (
            ((',' + RTRIM(p.SaleTeamID) + ',')  LIKE '%,'+CAST(@pSaleTeamId as varchar(5))+',%' )
            OR p.SaleTeamID = ''            
            )
































Nhận xét