Commit 8b4b6cf5 authored by 吴春's avatar 吴春

提交代码

parent b97da469
......@@ -1365,7 +1365,7 @@ namespace Mall.WebApi.Controllers
if (!string.IsNullOrWhiteSpace(tempGood.IDCardNo))
{
lastItem.Authentication = 1;
if (tempGood.IDCardNo.Length==18)
if (tempGood.IDCardNo.Length == 18)
{
lastItem.IDCardNo = tempGood.IDCardNo.Substring(8, 2);
}
......@@ -1374,12 +1374,16 @@ namespace Mall.WebApi.Controllers
lastItem.IDCardNo = tempGood.IDCardNo.Substring(6, 2);
}
}
else
{
lastItem.IDCardNo = !string.IsNullOrWhiteSpace(tempGood.Birthday) ? DateTime.Parse(tempGood.Birthday).Year.ToString().Substring(2, 2) : "";
}
lastItem.Album = tempGood.Album;
if (!string.IsNullOrWhiteSpace(lastItem.Album))
{
lastItem.AlbumList = JsonConvert.DeserializeObject<List<string>>(lastItem.Album);
}
newGoodsList.Add(lastItem);
......@@ -1456,6 +1460,10 @@ namespace Mall.WebApi.Controllers
lastItem.IDCardNo = tempGood.IDCardNo.Substring(6, 2);
}
}
else
{
lastItem.IDCardNo = !string.IsNullOrWhiteSpace(tempGood.Birthday) ? DateTime.Parse(tempGood.Birthday).Year.ToString().Substring(2, 2) : "";
}
lastItem.Album = tempGood.Album;
if (!string.IsNullOrWhiteSpace(lastItem.Album))
{
......@@ -1507,6 +1515,10 @@ namespace Mall.WebApi.Controllers
lastItem.IDCardNo = tempGood.IDCardNo.Substring(6, 2);
}
}
else
{
lastItem.IDCardNo = !string.IsNullOrWhiteSpace(tempGood.Birthday) ? DateTime.Parse(tempGood.Birthday).Year.ToString().Substring(2, 2) : "";
}
lastItem.Album = tempGood.Album;
if (!string.IsNullOrWhiteSpace(lastItem.Album))
{
......@@ -1556,6 +1568,10 @@ namespace Mall.WebApi.Controllers
lastItem.IDCardNo = tempGood.IDCardNo.Substring(6, 2);
}
}
else
{
lastItem.IDCardNo = !string.IsNullOrWhiteSpace(tempGood.Birthday) ? DateTime.Parse(tempGood.Birthday).Year.ToString().Substring(2, 2) : "";
}
lastItem.Album = tempGood.Album;
if (!string.IsNullOrWhiteSpace(lastItem.Album))
{
......
......@@ -1381,7 +1381,18 @@ namespace Mall.WebApi.Controllers.MallBase
{
oldBaseInfo = new RB_MiAi_BaseInfo_Extend();
}
string BirthdayYear = string.IsNullOrWhiteSpace(oldBaseInfo.Birthday) ? "" : Convert.ToDateTime(oldBaseInfo.Birthday).Year.ToString();
if (!string.IsNullOrWhiteSpace(oldBaseInfo.IDCardNo))
{
if (oldBaseInfo.IDCardNo.Length == 18)
{
BirthdayYear = oldBaseInfo.IDCardNo.Substring(6, 4);
}
else if (oldBaseInfo.IDCardNo.Length == 15)
{
BirthdayYear ="19"+ oldBaseInfo.IDCardNo.Substring(6, 2);
}
}
var result = new
{
MyFollowId,
......@@ -1396,7 +1407,7 @@ namespace Mall.WebApi.Controllers.MallBase
IsFollow = isFollow,
SexStr = (oldBaseInfo != null && oldBaseInfo.Id > 0) ? (oldBaseInfo.Sex == 1 ? "男" : "女") : "",
Birthday = oldBaseInfo.Birthday ?? "",
BirthdayYear = string.IsNullOrWhiteSpace(oldBaseInfo.Birthday) ? "" : Convert.ToDateTime(oldBaseInfo.Birthday).Year.ToString(),
BirthdayYear = BirthdayYear,
Sex = oldBaseInfo?.Sex ?? 0,
oldBaseInfo?.Height,
oldBaseInfo?.Weight,
......@@ -1768,6 +1779,10 @@ namespace Mall.WebApi.Controllers.MallBase
lastItem.IDCardNo = tempGood.IDCardNo.Substring(6, 2);
}
}
else
{
lastItem.IDCardNo = !string.IsNullOrWhiteSpace(tempGood.Birthday) ? DateTime.Parse(tempGood.Birthday).Year.ToString().Substring(2, 2) : "";
}
if (!string.IsNullOrWhiteSpace(lastItem.Album))
{
lastItem.AlbumList = JsonConvert.DeserializeObject<List<string>>(lastItem.Album);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment