29 lines
863 B
C#
29 lines
863 B
C#
namespace MoviconWebApi.API.ClearStaticApi
|
|
{
|
|
/// <summary>
|
|
/// 清洗统计数据映射工具类
|
|
/// </summary>
|
|
public static class Mapper
|
|
{
|
|
/// <summary>
|
|
/// 格式化小数为两位小数的字符串
|
|
/// </summary>
|
|
/// <param name="value">原始值</param>
|
|
/// <returns>格式化后的字符串</returns>
|
|
public static string FormatDecimal(decimal value)
|
|
{
|
|
return value.ToString("0.00");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 格式化日期时间为yyyy-MM-dd HH:mm:ss格式
|
|
/// </summary>
|
|
/// <param name="dateTime">日期时间</param>
|
|
/// <returns>格式化后的字符串</returns>
|
|
public static string FormatDateTime(DateTime dateTime)
|
|
{
|
|
return dateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
}
|
|
}
|
|
}
|