You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
31 lines
1.0 KiB
using SqlSugar; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Text; |
|
|
|
namespace ReZero.SuperAPI |
|
{ |
|
internal class ResultColumnService |
|
{ |
|
internal object GetValue(object propertyValue, ResultColumnModel? resultColumnModel) |
|
{ |
|
switch (resultColumnModel!.ResultColumnType) |
|
{ |
|
case ResultColumnType.ConvertDefault: |
|
propertyValue= UtilMethods.ChangeType2(propertyValue, resultColumnModel.ConvertType); |
|
break; |
|
case ResultColumnType.ConvertDefaultTimeString: |
|
if (propertyValue is DateTime) |
|
{ |
|
propertyValue = Convert.ToDateTime(propertyValue).ToString("yyyy-MM-dd HH:mm:ss"); |
|
} |
|
break; |
|
} |
|
if (resultColumnModel.ConvertType2 != null) |
|
{ |
|
propertyValue=UtilMethods.ChangeType2(propertyValue, resultColumnModel.ConvertType2); |
|
} |
|
return propertyValue; |
|
} |
|
} |
|
}
|
|
|