Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
b9ad359f
Commit
b9ad359f
authored
Sep 03, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
739e89ed
71f15f2e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
388 additions
and
265 deletions
+388
-265
RB_Custom_Form_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
+5
-0
CustomFormModule.cs
Mall.Module.TradePavilion/CustomFormModule.cs
+11
-1
FirstShopListModule.cs
Mall.Module.TradePavilion/FirstShopListModule.cs
+135
-47
AppletMiaiController.cs
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
+135
-128
MiaiController.cs
Mall.WebApi/Controllers/Miai/MiaiController.cs
+75
-68
AppletGoodsController.cs
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
+2
-2
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+25
-4
Mall.WebApi.csproj.user
Mall.WebApi/Mall.WebApi.csproj.user
+0
-15
No files found.
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
View file @
b9ad359f
...
...
@@ -141,6 +141,11 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public
int
FileCount
{
get
;
set
;
}
/// <summary>
/// 上传文件类型
/// </summary>
public
string
FileType
{
get
;
set
;
}
/// <summary>
/// 上传文件大小M
/// </summary>
...
...
Mall.Module.TradePavilion/CustomFormModule.cs
View file @
b9ad359f
...
...
@@ -205,6 +205,15 @@ namespace Mall.Module.TradePavilion
}
dataItem
.
CompData
=
videoItem
;
break
;
//通用上传组件
case
"CommonUploadComp"
:
UploadItem
commonUpload
=
GetUploadItem
(
compData
);
if
(!
isGetAnswer
)
{
commonUpload
.
FileList
=
new
List
<
string
>();
}
dataItem
.
CompData
=
commonUpload
;
break
;
}
dataList
.
Add
(
dataItem
);
}
...
...
@@ -251,7 +260,7 @@ namespace Mall.Module.TradePavilion
};
if
(
selectItem
.
IsMultiple
)
{
List
<
string
>
valueList
=
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
dropdownObj
.
GetStringValue
(
"OptionValue"
));
List
<
int
>
valueList
=
Common
.
ConvertHelper
.
StringToList
(
dropdownObj
.
GetStringValue
(
"OptionValue"
).
Split
(
','
));
if
(
valueList
!=
null
&&
valueList
.
Count
>
0
)
{
selectItem
.
OptionValue
=
string
.
Join
(
","
,
valueList
);
...
...
@@ -290,6 +299,7 @@ namespace Mall.Module.TradePavilion
{
Name
=
uploadObj
.
GetStringValue
(
"Name"
),
FileCount
=
uploadObj
.
GetInt
(
"FileCount"
),
FileType
=
uploadObj
.
GetStringValue
(
"FileType"
),
FileSizeLimit
=
uploadObj
.
GetInt
(
"FileSizeLimit"
),
Remark
=
uploadObj
.
GetStringValue
(
"Remark"
),
FileList
=
new
List
<
string
>(),
...
...
Mall.Module.TradePavilion/FirstShopListModule.cs
View file @
b9ad359f
...
...
@@ -512,7 +512,8 @@ namespace Mall.Module.TradePavilion
List
<
ExcelDataSource
>
RList
=
new
List
<
ExcelDataSource
>();
var
enrollList
=
firstShop_ListEnrollRepository
.
GetList
(
new
RB_FirstShop_ListEnroll_Extend
()
{
MallBaseId
=
mallBaseId
,
ListId
=
listId
});
if
(
enrollList
.
Any
())
{
if
(
enrollList
.
Any
())
{
string
userIds
=
string
.
Join
(
","
,
enrollList
.
Select
(
x
=>
x
.
UserId
).
Distinct
());
var
clist
=
companyRepository
.
GetCompanyListRepository
(
new
RB_Company_Extend
()
{
MallBaseId
=
mallBaseId
,
UserIds
=
userIds
});
//查询 品牌/载体 名称 图片
...
...
@@ -574,7 +575,8 @@ namespace Mall.Module.TradePavilion
#
endregion
#
region
组装数据
foreach
(
var
item
in
enrollList
)
{
foreach
(
var
item
in
enrollList
)
{
var
cmodel
=
clist
.
Where
(
x
=>
x
.
CreateBy
==
item
.
UserId
).
FirstOrDefault
();
ExcelDataSource
row
=
new
ExcelDataSource
()
{
...
...
@@ -602,7 +604,7 @@ namespace Mall.Module.TradePavilion
var
olist
=
objv
.
OptionList
.
Where
(
x
=>
(
","
+
objv
.
OptionValue
+
","
).
Contains
(
","
+
x
.
Id
+
","
)).
ToList
();
value
=
string
.
Join
(
","
,
olist
.
Select
(
x
=>
x
.
Name
));
}
else
else
{
var
objv
=
JsonHelper
.
DeserializeObject
<
UploadItem
>(
qitem
.
CompData
.
ToString
());
value
=
string
.
Join
(
","
,
objv
.
FileList
);
...
...
@@ -654,7 +656,8 @@ namespace Mall.Module.TradePavilion
{
string
userIds
=
string
.
Join
(
","
,
enrollList
.
Select
(
x
=>
x
.
UserId
).
Distinct
());
var
clist
=
companyRepository
.
GetCompanyListRepository
(
new
RB_Company_Extend
()
{
MallBaseId
=
mallBaseId
,
UserIds
=
userIds
});
foreach
(
var
item
in
clist
)
{
foreach
(
var
item
in
clist
)
{
ExcelDataSource
rowData
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>(
30
)
{
...
...
@@ -1035,7 +1038,9 @@ namespace Mall.Module.TradePavilion
errorMsg
=
""
;
//存储的临时文件地址
string
rootBook
=
AppDomain
.
CurrentDomain
.
BaseDirectory
;
string
tempPath
=
rootBook
+
"/upfile/temporary/firstshopenrollzip/"
;
string
timeStr
=
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssffff"
);
string
endUrl
=
"upfile\\temporary\\firstshopenrollzip\\"
;
string
tempPath
=
Path
.
Combine
(
rootBook
+
endUrl
);
//获取榜单信息
var
listModel
=
firstShop_ListRepository
.
GetList
(
new
RB_FirstShop_List_Extend
{
MallBaseId
=
mallBaseId
,
QIds
=
listIds
});
...
...
@@ -1051,21 +1056,8 @@ namespace Mall.Module.TradePavilion
string
tempFoldr
=
""
;
#
region
解析表单内容
//foreach (var item in enrollList.Where(x => x.ListId == enrollModel.Id).GroupBy(x => x.UserId))//榜单下面的公司
//{
// var companyName = clist.Where(x => x.CreateBy == item.Key).FirstOrDefault()?.CompanyName ?? System.DateTime.Now.ToString("yyyyMMddHHmmssfff");
// var templistPath = rootBook + "/upfile/temporary/firstshopenrollzip/" + enrollModel.ListName + "/" + companyName;//路径
// if (!Directory.Exists(templistPath))
// {
// Directory.CreateDirectory(templistPath);
// }
//}
foreach
(
var
listItem
in
listModel
)
{
foreach
(
var
enrollModel
in
enrollList
.
Where
(
x
=>
x
.
ListId
==
listItem
.
Id
))
//榜单下面的公司
{
if
(
string
.
IsNullOrEmpty
(
enrollModel
.
Content
))
...
...
@@ -1078,7 +1070,7 @@ namespace Mall.Module.TradePavilion
if
(
elist
.
Any
())
{
var
companyName
=
clist
.
Where
(
x
=>
x
.
CreateBy
==
enrollModel
.
UserId
).
FirstOrDefault
()?.
CompanyName
??
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
var
templistPath
=
tempPath
+
"file/"
+
listItem
.
ListName
+
"/"
+
companyName
+
"/"
;
//路径
var
templistPath
=
Path
.
Combine
(
tempPath
+
"file\\"
+
timeStr
+
"\\"
+
listItem
.
ListName
+
"\\"
+
companyName
+
"\\"
)
;
//路径
if
(!
Directory
.
Exists
(
templistPath
))
{
Directory
.
CreateDirectory
(
templistPath
);
...
...
@@ -1099,12 +1091,12 @@ namespace Mall.Module.TradePavilion
{
Uri
uri
=
new
Uri
(
qitem
);
//imgPath :网络图片地址
WebRequest
webRequest
=
WebRequest
.
Create
(
uri
);
// byte[] bytes;
// byte[] bytes;
using
(
WebResponse
webResponse
=
webRequest
.
GetResponse
())
{
Bitmap
bitmap
=
new
Bitmap
(
webResponse
.
GetResponseStream
());
bitmap
.
Save
(
templistPath
+
Path
.
GetFileName
(
qitem
),
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
bitmap
.
Save
(
templistPath
+
Path
.
GetFileName
(
qitem
),
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
}
}
catch
(
Exception
ex
)
...
...
@@ -1116,41 +1108,137 @@ namespace Mall.Module.TradePavilion
else
if
(
itemFile
.
CompKey
==
"VideoUploadComp"
)
{
//视频处理
//foreach (var qitem in obj.FileList)
//{
// try
// {
// Uri uri = new Uri(qitem); //imgPath :网络图片地址
// WebRequest webRequest = WebRequest.Create(uri);
// // byte[] bytes;
// using (WebResponse webResponse = webRequest.GetResponse())
// {
// Bitmap bitmap = new Bitmap(webResponse.GetResponseStream());
// bitmap.Save(templistPath + Path.GetFileName(qitem), System.Drawing.Imaging.ImageFormat.Jpeg);
// }
// }
// catch (Exception ex)
// {
// }
//}
foreach
(
var
qitem
in
obj
.
FileList
)
{
try
{
HttpWebRequest
request
=
(
HttpWebRequest
)
WebRequest
.
Create
(
qitem
);
request
.
Method
=
"GET"
;
byte
[]
fileBytes
;
using
(
WebResponse
webRes
=
request
.
GetResponse
())
{
int
length
=
(
int
)
webRes
.
ContentLength
;
HttpWebResponse
response
=
webRes
as
HttpWebResponse
;
Stream
stream
=
response
.
GetResponseStream
();
var
contentdisposition
=
response
.
Headers
[
"Content-Disposition"
];
var
filename
=
Path
.
GetFileName
(
qitem
);
//读取到内存
MemoryStream
stmMemory
=
new
MemoryStream
();
byte
[]
buffer
=
new
byte
[
length
];
int
i
;
//将字节逐个放入到Byte中
while
((
i
=
stream
.
Read
(
buffer
,
0
,
buffer
.
Length
))
>
0
)
{
stmMemory
.
Write
(
buffer
,
0
,
i
);
}
fileBytes
=
stmMemory
.
ToArray
();
//文件流Byte
FileStream
fs
=
new
FileStream
(
templistPath
+
Path
.
GetFileName
(
qitem
),
FileMode
.
OpenOrCreate
);
stmMemory
.
WriteTo
(
fs
);
stmMemory
.
Close
();
fs
.
Close
();
}
}
catch
(
Exception
ex
)
{
}
}
}
}
}
}
}
var
templistZipPath
=
Path
.
Combine
(
tempPath
+
"zip\\"
+
timeStr
+
"\\"
);
//路径
if
(!
Directory
.
Exists
(
templistZipPath
))
{
Directory
.
CreateDirectory
(
templistZipPath
);
}
bool
result
=
Common
.
Plugin
.
ZipHelper
.
Zip
(
Path
.
Combine
(
tempPath
+
"file\\"
+
timeStr
),
Path
.
Combine
(
templistZipPath
,
"榜单导出文件夹.zip"
),
ref
tempFoldr
);
if
(
result
)
{
try
{
DirectoryInfo
dir
=
new
DirectoryInfo
(
Path
.
Combine
(
tempPath
+
"file\\"
));
DirectoryInfo
[]
dirArr
=
dir
.
GetDirectories
();
foreach
(
DirectoryInfo
item
in
dirArr
)
{
if
(
item
.
Name
==
timeStr
)
{
foreach
(
FileInfo
fi
in
item
.
GetFiles
())
{
fi
.
Delete
();
}
item
.
Delete
(
true
);
}
}
Common
.
Plugin
.
ZipHelper
.
Zip
(
tempPath
+
"file/"
,
tempPath
+
"/zip/ziliao.zip"
,
ref
tempFoldr
);
}
catch
{
LogHelper
.
Write
(
"清理临时文件失败"
);
}
return
Path
.
Combine
(
"/upfile/temporary/firstshopenrollzip/"
+
"zip/"
+
timeStr
+
"/榜单导出文件夹.zip"
);
}
else
{
return
""
;
}
#
endregion
}
/// <summary>
/// 删除生成的zip文件
/// </summary>
/// <param name="enrollId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
DelFirstShopEnrollZipExport
(
string
Url
)
{
//存储的临时文件地址
string
rootBook
=
AppDomain
.
CurrentDomain
.
BaseDirectory
;
string
tempPath
=
Path
.
Combine
(
rootBook
+
Url
.
TrimStart
(
'/'
));
#
region
解析表单内容
string
timeStr
=
Url
.
TrimStart
(
'/'
).
Split
(
"/"
)[
4
];
if
(!
File
.
Exists
(
tempPath
))
{
return
true
;
}
else
{
try
{
DirectoryInfo
dir
=
new
DirectoryInfo
(
Path
.
Combine
(
rootBook
+
"upfile\\temporary\\firstshopenrollzip\\"
+
"zip\\"
));
DirectoryInfo
[]
dirArr
=
dir
.
GetDirectories
();
foreach
(
DirectoryInfo
item
in
dirArr
)
{
if
(
item
.
Name
==
timeStr
)
{
foreach
(
FileInfo
fi
in
item
.
GetFiles
())
{
fi
.
Delete
();
}
item
.
Delete
(
true
);
}
}
return
true
;
}
catch
(
Exception
ex
)
{
return
false
;
}
}
// ZipFile.CreateFromDirectory(tempPath+ "file/", tempPath + "/zip/ziliao.zip");
// ZipHelper.ZipDirectory(tempPath, rootBook + "/upfile/temporary/firstshopenrollzip/榜单导出文件夹/ .zip","");
// ZipHelper.Zip(tempPath, "榜单导出文件夹",ref tempFoldr); //打包方法
#
endregion
return
""
;
}
}
}
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
View file @
b9ad359f
...
...
@@ -1291,153 +1291,160 @@ namespace Mall.WebApi.Controllers.MallBase
};
}
var
oldUserInfo
=
miaiModule
.
GetMemberUserInfo
(
userId
);
var
oldBaseInfo
=
miaiModule
.
GetBaseInfoModel
(
new
RB_MiAi_BaseInfo_Extend
{
UserId
=
userId
,
TenantId
=
RequestParm
.
TenantId
,
MallBaseId
=
RequestParm
.
MallBaseId
});
if
(
userInfo
!=
null
&&
userInfo
.
UserId
>
0
)
if
(
userId
>
0
)
{
var
old
List
=
miaiModule
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
{
Status
=
0
,
UserId
=
userId
,
CreateBy
=
userInfo
.
UserId
,
MallBaseId
=
userInfo
.
MallBaseId
,
TenantId
=
userInfo
.
TenantId
}
);
var
old
OtherList
=
miaiModule
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
{
Status
=
0
,
UserId
=
userInfo
.
UserId
,
CreateBy
=
userId
,
MallBaseId
=
userInfo
.
MallBaseId
,
TenantId
=
userInfo
.
Tenant
Id
});
var
old
UserInfo
=
miaiModule
.
GetMemberUserInfo
(
userId
);
var
old
BaseInfo
=
miaiModule
.
GetBaseInfoModel
(
new
RB_MiAi_BaseInfo_Extend
{
UserId
=
userId
,
TenantId
=
RequestParm
.
TenantId
,
MallBaseId
=
RequestParm
.
MallBase
Id
});
if
(
userI
d
!=
userInfo
.
UserId
)
if
(
userI
nfo
!=
null
&&
userInfo
.
UserId
>
0
)
{
if
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
{
oldBaseInfo
.
WechatNo
=
""
;
}
oldUserInfo
.
Moblie
=
""
;
if
(
oldList
!=
null
&&
oldList
.
Any
()
&&
oldOtherList
!=
null
&&
oldOtherList
.
Any
())
{
isFollow
=
3
;
MyFollowId
=
oldList
.
FirstOrDefault
()?.
ID
??
0
;
OtherFollowId
=
oldOtherList
.
FirstOrDefault
()?.
ID
??
0
;
}
else
if
(
oldList
!=
null
&&
oldList
.
Any
())
{
isFollow
=
1
;
MyFollowId
=
oldList
.
FirstOrDefault
()?.
ID
??
0
;
}
else
if
(
oldOtherList
!=
null
&&
oldOtherList
.
Any
())
{
isFollow
=
2
;
OtherFollowId
=
oldOtherList
.
FirstOrDefault
()?.
ID
??
0
;
}
else
{
isFollow
=
0
;
}
var
oldList
=
miaiModule
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
{
Status
=
0
,
UserId
=
userId
,
CreateBy
=
userInfo
.
UserId
,
MallBaseId
=
userInfo
.
MallBaseId
,
TenantId
=
userInfo
.
TenantId
});
var
oldOtherList
=
miaiModule
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
{
Status
=
0
,
UserId
=
userInfo
.
UserId
,
CreateBy
=
userId
,
MallBaseId
=
userInfo
.
MallBaseId
,
TenantId
=
userInfo
.
TenantId
});
//设置消息推送
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
if
(
userId
!=
userInfo
.
UserId
)
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
Look
,
UserId
=
userId
,
SourceId
=
userId
,
Content
=
"用户访问了您的自画像"
,
Status
=
0
,
TenantId
=
RequestParm
.
TenantId
,
MallBaseId
=
RequestParm
.
MallBaseId
,
CreateBy
=
userInfo
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
if
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
{
oldBaseInfo
.
WechatNo
=
""
;
}
oldUserInfo
.
Moblie
=
""
;
if
(
oldList
!=
null
&&
oldList
.
Any
()
&&
oldOtherList
!=
null
&&
oldOtherList
.
Any
())
{
isFollow
=
3
;
MyFollowId
=
oldList
.
FirstOrDefault
()?.
ID
??
0
;
OtherFollowId
=
oldOtherList
.
FirstOrDefault
()?.
ID
??
0
;
}
else
if
(
oldList
!=
null
&&
oldList
.
Any
())
{
isFollow
=
1
;
MyFollowId
=
oldList
.
FirstOrDefault
()?.
ID
??
0
;
}
else
if
(
oldOtherList
!=
null
&&
oldOtherList
.
Any
())
{
isFollow
=
2
;
OtherFollowId
=
oldOtherList
.
FirstOrDefault
()?.
ID
??
0
;
}
else
{
isFollow
=
0
;
}
//设置消息推送
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
Look
,
UserId
=
userId
,
SourceId
=
userId
,
Content
=
"用户访问了您的自画像"
,
Status
=
0
,
TenantId
=
RequestParm
.
TenantId
,
MallBaseId
=
RequestParm
.
MallBaseId
,
CreateBy
=
userInfo
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
}
}
}
if
(
oldUserInfo
!=
null
&&
oldUserInfo
.
Id
>
0
)
{
int
IsAttestation
=
0
;
if
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
if
(
oldUserInfo
!=
null
&&
oldUserInfo
.
Id
>
0
)
{
oldBaseInfo
.
AlbumList
=
new
List
<
string
>()
;
if
(
!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Album
)
)
int
IsAttestation
=
0
;
if
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
{
oldBaseInfo
.
AlbumList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldBaseInfo
.
Album
);
oldBaseInfo
.
AlbumList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Album
))
{
oldBaseInfo
.
AlbumList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldBaseInfo
.
Album
);
}
else
{
oldBaseInfo
.
AlbumList
=
new
List
<
string
>();
}
IsAttestation
=
2
;
//基础信息认证
if
(!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
IDCardNo
)
&&
!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
RealName
))
{
IsAttestation
=
1
;
//已认证
}
}
else
{
oldBaseInfo
.
AlbumList
=
new
List
<
string
>
();
oldBaseInfo
=
new
RB_MiAi_BaseInfo_Extend
();
}
IsAttestation
=
2
;
//基础信息认证
if
(!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
IDCardNo
)
&&
!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
RealName
))
var
result
=
new
{
IsAttestation
=
1
;
//已认证
}
MyFollowId
,
OtherFollowId
,
oldUserInfo
.
Id
,
oldUserInfo
.
Name
,
oldUserInfo
.
Photo
,
WechatNo
=
oldBaseInfo
.
WechatNo
??
""
,
Moblie
=
oldUserInfo
.
Moblie
??
""
,
IsAttestation
,
IsFaTie
=
oldBaseInfo
?.
IsFaTie
??
0
,
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
(),
Sex
=
oldBaseInfo
?.
Sex
??
0
,
oldBaseInfo
?.
Height
,
oldBaseInfo
?.
Weight
,
EducationType
=
oldBaseInfo
.
EducationType
??
0
,
EducationTypeStr
=
(
oldBaseInfo
.
EducationType
.
HasValue
&&
oldBaseInfo
.
EducationType
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
EducationType
)
:
""
,
SchoolInfo
=
oldBaseInfo
.
SchoolInfo
??
""
,
Age
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAge
(
oldBaseInfo
.
Birthday
),
//年纪
ShenXiao
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetShengXiao
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//生肖
ConoldBaseInfostellation
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAtomFromBirthday
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//星座
MarriageStr
=
(
oldBaseInfo
.
Marriage
.
HasValue
&&
oldBaseInfo
.
Marriage
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
Marriage
)
:
""
,
Marriage
=
oldBaseInfo
.
Marriage
??
0
,
Job
=
oldBaseInfo
.
Job
??
""
,
WorkUnit
=
oldBaseInfo
?.
WorkUnit
??
""
,
YearMoney
=
oldBaseInfo
?.
YearMoney
??
0
,
CName
=
oldBaseInfo
.
CName
??
""
,
DName
=
oldBaseInfo
.
DName
??
""
,
PName
=
oldBaseInfo
.
PName
??
""
,
Province
=
oldBaseInfo
.
Province
??
0
,
City
=
oldBaseInfo
.
City
??
0
,
District
=
oldBaseInfo
.
District
??
0
,
OtherInfo
=
oldBaseInfo
.
OtherInfo
??
""
,
HouseInfo
=
oldBaseInfo
.
HouseInfo
??
0
,
CarInfo
=
oldBaseInfo
.
CarInfo
??
0
,
CarInfoStr
=
(
oldBaseInfo
.
CarInfo
.
HasValue
&&
oldBaseInfo
.
CarInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
CarInfo
)
:
""
,
HouseInfoStr
=
(
oldBaseInfo
.
HouseInfo
.
HasValue
&&
oldBaseInfo
.
HouseInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
HouseInfo
)
:
""
,
FamilyInfo
=
oldBaseInfo
?.
FamilyInfo
??
""
,
Hobby
=
oldBaseInfo
?.
Hobby
??
""
,
LikeFood
=
oldBaseInfo
?.
LikeFood
??
""
,
LikeBook
=
oldBaseInfo
.
LikeBook
??
""
,
LikeTV
=
oldBaseInfo
.
LikeTV
??
""
,
LikeSong
=
oldBaseInfo
.
LikeSong
??
""
,
IdealLove
=
oldBaseInfo
.
IdealLove
??
""
,
LoveTalk
=
oldBaseInfo
.
LoveTalk
??
""
,
SingleReason
=
oldBaseInfo
.
SingleReason
??
""
,
HopeYou
=
oldBaseInfo
.
HopeYou
??
""
,
About
=
oldBaseInfo
.
About
??
""
,
Appointment
=
oldBaseInfo
.
Appointment
??
""
,
AppointmentAddress
=
oldBaseInfo
.
AppointmentAddress
??
""
,
oldBaseInfo
.
AlbumList
,
IDCardBack
=
oldBaseInfo
.
IDCardBack
??
""
,
IDCard
=
oldBaseInfo
.
IDCard
??
""
,
IDCardNo
=
oldBaseInfo
.
IDCardNo
??
""
,
RealName
=
oldBaseInfo
.
RealName
??
""
,
ActivityRegion
=
oldBaseInfo
.
ActivityRegion
??
""
,
DWCName
=
oldBaseInfo
.
DWCName
??
""
,
DWDName
=
oldBaseInfo
.
DWDName
??
""
,
DWPName
=
oldBaseInfo
.
DWPName
??
""
,
DWProvince
=
oldBaseInfo
.
DWProvince
??
0
,
DWCity
=
oldBaseInfo
.
DWCity
??
0
,
DWDistrict
=
oldBaseInfo
.
DWDistrict
??
0
,
};
return
ApiResult
.
Success
(
""
,
result
);
}
else
{
oldBaseInfo
=
new
RB_MiAi_BaseInfo_Extend
(
);
return
ApiResult
.
Failed
(
"用户信息不存在"
);
}
var
result
=
new
{
MyFollowId
,
OtherFollowId
,
oldUserInfo
.
Id
,
oldUserInfo
.
Name
,
oldUserInfo
.
Photo
,
WechatNo
=
oldBaseInfo
.
WechatNo
??
""
,
Moblie
=
oldUserInfo
.
Moblie
??
""
,
IsAttestation
,
IsFaTie
=
oldBaseInfo
?.
IsFaTie
??
0
,
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
(),
Sex
=
oldBaseInfo
?.
Sex
??
0
,
oldBaseInfo
?.
Height
,
oldBaseInfo
?.
Weight
,
EducationType
=
oldBaseInfo
.
EducationType
??
0
,
EducationTypeStr
=
(
oldBaseInfo
.
EducationType
.
HasValue
&&
oldBaseInfo
.
EducationType
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
EducationType
)
:
""
,
SchoolInfo
=
oldBaseInfo
.
SchoolInfo
??
""
,
Age
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAge
(
oldBaseInfo
.
Birthday
),
//年纪
ShenXiao
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetShengXiao
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//生肖
ConoldBaseInfostellation
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAtomFromBirthday
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//星座
MarriageStr
=
(
oldBaseInfo
.
Marriage
.
HasValue
&&
oldBaseInfo
.
Marriage
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
Marriage
)
:
""
,
Marriage
=
oldBaseInfo
.
Marriage
??
0
,
Job
=
oldBaseInfo
.
Job
??
""
,
WorkUnit
=
oldBaseInfo
?.
WorkUnit
??
""
,
YearMoney
=
oldBaseInfo
?.
YearMoney
??
0
,
CName
=
oldBaseInfo
.
CName
??
""
,
DName
=
oldBaseInfo
.
DName
??
""
,
PName
=
oldBaseInfo
.
PName
??
""
,
Province
=
oldBaseInfo
.
Province
??
0
,
City
=
oldBaseInfo
.
City
??
0
,
District
=
oldBaseInfo
.
District
??
0
,
OtherInfo
=
oldBaseInfo
.
OtherInfo
??
""
,
HouseInfo
=
oldBaseInfo
.
HouseInfo
??
0
,
CarInfo
=
oldBaseInfo
.
CarInfo
??
0
,
CarInfoStr
=
(
oldBaseInfo
.
CarInfo
.
HasValue
&&
oldBaseInfo
.
CarInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
CarInfo
)
:
""
,
HouseInfoStr
=
(
oldBaseInfo
.
HouseInfo
.
HasValue
&&
oldBaseInfo
.
HouseInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
HouseInfo
)
:
""
,
FamilyInfo
=
oldBaseInfo
?.
FamilyInfo
??
""
,
Hobby
=
oldBaseInfo
?.
Hobby
??
""
,
LikeFood
=
oldBaseInfo
?.
LikeFood
??
""
,
LikeBook
=
oldBaseInfo
.
LikeBook
??
""
,
LikeTV
=
oldBaseInfo
.
LikeTV
??
""
,
LikeSong
=
oldBaseInfo
.
LikeSong
??
""
,
IdealLove
=
oldBaseInfo
.
IdealLove
??
""
,
LoveTalk
=
oldBaseInfo
.
LoveTalk
??
""
,
SingleReason
=
oldBaseInfo
.
SingleReason
??
""
,
HopeYou
=
oldBaseInfo
.
HopeYou
??
""
,
About
=
oldBaseInfo
.
About
??
""
,
Appointment
=
oldBaseInfo
.
Appointment
??
""
,
AppointmentAddress
=
oldBaseInfo
.
AppointmentAddress
??
""
,
oldBaseInfo
.
AlbumList
,
IDCardBack
=
oldBaseInfo
.
IDCardBack
??
""
,
IDCard
=
oldBaseInfo
.
IDCard
??
""
,
IDCardNo
=
oldBaseInfo
.
IDCardNo
??
""
,
RealName
=
oldBaseInfo
.
RealName
??
""
,
ActivityRegion
=
oldBaseInfo
.
ActivityRegion
??
""
,
DWCName
=
oldBaseInfo
.
DWCName
??
""
,
DWDName
=
oldBaseInfo
.
DWDName
??
""
,
DWPName
=
oldBaseInfo
.
DWPName
??
""
,
DWProvince
=
oldBaseInfo
.
DWProvince
??
0
,
DWCity
=
oldBaseInfo
.
DWCity
??
0
,
DWDistrict
=
oldBaseInfo
.
DWDistrict
??
0
,
};
return
ApiResult
.
Success
(
""
,
result
);
}
else
{
...
...
Mall.WebApi/Controllers/Miai/MiaiController.cs
View file @
b9ad359f
...
...
@@ -657,81 +657,88 @@ namespace Mall.WebApi.Controllers.MallBase
JObject
parm
=
JObject
.
Parse
(
parms
.
msg
.
ToString
());
// var userInfo = AppletUserInfo;
int
userId
=
parm
.
GetInt
(
"UserId"
);
var
oldUserInfo
=
miaiModule
.
GetMemberUserInfo
(
userId
);
var
oldBaseInfo
=
miaiModule
.
GetBaseInfoModel
(
new
RB_MiAi_BaseInfo_Extend
{
UserId
=
userId
,
TenantId
=
UserInfo
.
TenantId
,
MallBaseId
=
UserInfo
.
MallBaseId
});
if
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
if
(
userId
>
0
)
{
oldBaseInfo
.
AlbumList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Album
))
var
oldUserInfo
=
miaiModule
.
GetMemberUserInfo
(
userId
);
var
oldBaseInfo
=
miaiModule
.
GetBaseInfoModel
(
new
RB_MiAi_BaseInfo_Extend
{
UserId
=
userId
,
TenantId
=
UserInfo
.
TenantId
,
MallBaseId
=
UserInfo
.
MallBaseId
});
if
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
{
oldBaseInfo
.
AlbumList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldBaseInfo
.
Album
);
}
oldBaseInfo
.
AlbumList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Album
))
{
oldBaseInfo
.
AlbumList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldBaseInfo
.
Album
);
}
var
result
=
new
var
result
=
new
{
oldUserInfo
.
Id
,
oldUserInfo
.
Name
,
oldUserInfo
.
Photo
,
WechatNo
=
oldBaseInfo
.
WechatNo
??
""
,
Moblie
=
oldUserInfo
.
Moblie
??
""
,
SexStr
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
?
(
oldBaseInfo
.
Sex
==
1
?
"男"
:
"女"
)
:
""
,
Birthday
=
oldBaseInfo
.
Birthday
??
""
,
Sex
=
oldBaseInfo
?.
Sex
??
0
,
oldBaseInfo
?.
Height
,
oldBaseInfo
?.
Weight
,
EducationType
=
oldBaseInfo
.
EducationType
??
0
,
EducationTypeStr
=
(
oldBaseInfo
.
EducationType
.
HasValue
&&
oldBaseInfo
.
EducationType
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
EducationType
)
:
""
,
SchoolInfo
=
oldBaseInfo
.
SchoolInfo
??
""
,
Age
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAge
(
oldBaseInfo
.
Birthday
),
//年纪
ShenXiao
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetShengXiao
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//生肖
ConoldBaseInfostellation
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAtomFromBirthday
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//星座
MarriageStr
=
(
oldBaseInfo
.
Marriage
.
HasValue
&&
oldBaseInfo
.
Marriage
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
Marriage
)
:
""
,
Marriage
=
oldBaseInfo
.
Marriage
??
0
,
Job
=
oldBaseInfo
.
Job
??
""
,
WorkUnit
=
oldBaseInfo
?.
WorkUnit
??
""
,
YearMoney
=
oldBaseInfo
?.
YearMoney
??
0
,
CName
=
oldBaseInfo
.
CName
??
""
,
DName
=
oldBaseInfo
.
DName
??
""
,
PName
=
oldBaseInfo
.
PName
??
""
,
Province
=
oldBaseInfo
.
Province
??
0
,
City
=
oldBaseInfo
.
City
??
0
,
District
=
oldBaseInfo
.
District
??
0
,
OtherInfo
=
oldBaseInfo
.
OtherInfo
??
""
,
HouseInfo
=
oldBaseInfo
.
HouseInfo
??
0
,
CarInfo
=
oldBaseInfo
.
CarInfo
??
0
,
CarInfoStr
=
(
oldBaseInfo
.
CarInfo
.
HasValue
&&
oldBaseInfo
.
CarInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
CarInfo
)
:
""
,
HouseInfoStr
=
(
oldBaseInfo
.
HouseInfo
.
HasValue
&&
oldBaseInfo
.
HouseInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
HouseInfo
)
:
""
,
FamilyInfo
=
oldBaseInfo
?.
FamilyInfo
??
""
,
Hobby
=
oldBaseInfo
?.
Hobby
??
""
,
LikeFood
=
oldBaseInfo
?.
LikeFood
??
""
,
LikeBook
=
oldBaseInfo
.
LikeBook
??
""
,
LikeTV
=
oldBaseInfo
.
LikeTV
??
""
,
LikeSong
=
oldBaseInfo
.
LikeSong
??
""
,
IdealLove
=
oldBaseInfo
.
IdealLove
??
""
,
LoveTalk
=
oldBaseInfo
.
LoveTalk
??
""
,
SingleReason
=
oldBaseInfo
.
SingleReason
??
""
,
HopeYou
=
oldBaseInfo
.
HopeYou
??
""
,
About
=
oldBaseInfo
.
About
??
""
,
Appointment
=
oldBaseInfo
.
Appointment
??
""
,
AppointmentAddress
=
oldBaseInfo
.
AppointmentAddress
??
""
,
oldBaseInfo
.
AlbumList
,
IDCardNo
=
oldBaseInfo
.
IDCardNo
??
""
,
RealName
=
oldBaseInfo
.
RealName
??
""
,
IDCard
=
oldBaseInfo
.
IDCard
??
""
,
IDCardBack
=
oldBaseInfo
.
IDCardBack
??
""
,
ActivityRegion
=
oldBaseInfo
.
ActivityRegion
??
""
,
DWCName
=
oldBaseInfo
.
DWCName
??
""
,
DWDName
=
oldBaseInfo
.
DWDName
??
""
,
DWPName
=
oldBaseInfo
.
DWPName
??
""
,
DWProvince
=
oldBaseInfo
.
DWProvince
??
0
,
DWCity
=
oldBaseInfo
.
DWCity
??
0
,
DWDistrict
=
oldBaseInfo
.
DWDistrict
??
0
,
};
return
ApiResult
.
Success
(
""
,
result
);
}
else
{
oldUserInfo
.
Id
,
oldUserInfo
.
Name
,
oldUserInfo
.
Photo
,
WechatNo
=
oldBaseInfo
.
WechatNo
??
""
,
Moblie
=
oldUserInfo
.
Moblie
??
""
,
SexStr
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
?
(
oldBaseInfo
.
Sex
==
1
?
"男"
:
"女"
)
:
""
,
Birthday
=
oldBaseInfo
.
Birthday
??
""
,
Sex
=
oldBaseInfo
?.
Sex
??
0
,
oldBaseInfo
?.
Height
,
oldBaseInfo
?.
Weight
,
EducationType
=
oldBaseInfo
.
EducationType
??
0
,
EducationTypeStr
=
(
oldBaseInfo
.
EducationType
.
HasValue
&&
oldBaseInfo
.
EducationType
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
EducationType
)
:
""
,
SchoolInfo
=
oldBaseInfo
.
SchoolInfo
??
""
,
Age
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAge
(
oldBaseInfo
.
Birthday
),
//年纪
ShenXiao
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetShengXiao
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//生肖
ConoldBaseInfostellation
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAtomFromBirthday
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//星座
MarriageStr
=
(
oldBaseInfo
.
Marriage
.
HasValue
&&
oldBaseInfo
.
Marriage
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
Marriage
)
:
""
,
Marriage
=
oldBaseInfo
.
Marriage
??
0
,
Job
=
oldBaseInfo
.
Job
??
""
,
WorkUnit
=
oldBaseInfo
?.
WorkUnit
??
""
,
YearMoney
=
oldBaseInfo
?.
YearMoney
??
0
,
CName
=
oldBaseInfo
.
CName
??
""
,
DName
=
oldBaseInfo
.
DName
??
""
,
PName
=
oldBaseInfo
.
PName
??
""
,
Province
=
oldBaseInfo
.
Province
??
0
,
City
=
oldBaseInfo
.
City
??
0
,
District
=
oldBaseInfo
.
District
??
0
,
OtherInfo
=
oldBaseInfo
.
OtherInfo
??
""
,
HouseInfo
=
oldBaseInfo
.
HouseInfo
??
0
,
CarInfo
=
oldBaseInfo
.
CarInfo
??
0
,
CarInfoStr
=
(
oldBaseInfo
.
CarInfo
.
HasValue
&&
oldBaseInfo
.
CarInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
CarInfo
)
:
""
,
HouseInfoStr
=
(
oldBaseInfo
.
HouseInfo
.
HasValue
&&
oldBaseInfo
.
HouseInfo
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
HouseInfo
)
:
""
,
FamilyInfo
=
oldBaseInfo
?.
FamilyInfo
??
""
,
Hobby
=
oldBaseInfo
?.
Hobby
??
""
,
LikeFood
=
oldBaseInfo
?.
LikeFood
??
""
,
LikeBook
=
oldBaseInfo
.
LikeBook
??
""
,
LikeTV
=
oldBaseInfo
.
LikeTV
??
""
,
LikeSong
=
oldBaseInfo
.
LikeSong
??
""
,
IdealLove
=
oldBaseInfo
.
IdealLove
??
""
,
LoveTalk
=
oldBaseInfo
.
LoveTalk
??
""
,
SingleReason
=
oldBaseInfo
.
SingleReason
??
""
,
HopeYou
=
oldBaseInfo
.
HopeYou
??
""
,
About
=
oldBaseInfo
.
About
??
""
,
Appointment
=
oldBaseInfo
.
Appointment
??
""
,
AppointmentAddress
=
oldBaseInfo
.
AppointmentAddress
??
""
,
oldBaseInfo
.
AlbumList
,
IDCardNo
=
oldBaseInfo
.
IDCardNo
??
""
,
RealName
=
oldBaseInfo
.
RealName
??
""
,
IDCard
=
oldBaseInfo
.
IDCard
??
""
,
IDCardBack
=
oldBaseInfo
.
IDCardBack
??
""
,
ActivityRegion
=
oldBaseInfo
.
ActivityRegion
??
""
,
DWCName
=
oldBaseInfo
.
DWCName
??
""
,
DWDName
=
oldBaseInfo
.
DWDName
??
""
,
DWPName
=
oldBaseInfo
.
DWPName
??
""
,
DWProvince
=
oldBaseInfo
.
DWProvince
??
0
,
DWCity
=
oldBaseInfo
.
DWCity
??
0
,
DWDistrict
=
oldBaseInfo
.
DWDistrict
??
0
,
};
return
ApiResult
.
Success
(
""
,
result
);
return
ApiResult
.
Failed
(
"用户暂未认证"
);
}
}
else
{
return
ApiResult
.
Failed
(
"用户
暂未认证
"
);
return
ApiResult
.
Failed
(
"用户
信息不存在!
"
);
}
}
...
...
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
View file @
b9ad359f
...
...
@@ -262,8 +262,8 @@ namespace Mall.WebApi.Controllers.MallBase
{
attr_group_name
=
smodel
.
Name
,
attr_group_id
=
smodel
.
Sort
,
attr_id
=
svmodel
.
Id
,
attr_name
=
svmodel
.
Name
attr_id
=
svmodel
?.
Id
??
0
,
attr_name
=
svmodel
?.
Name
??
""
});
}
decimal
price_member
=
item
.
SellingPrice
??
0
;
//未设会员价格的话 就为销售价格
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
b9ad359f
...
...
@@ -621,7 +621,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
var
query
=
new
RB_Commerce_Consult_Extend
()
{
LinkMan
=
parms
.
GetStringValue
(
"LinkMan"
),
ActivityId
=
parms
.
GetInt
(
"ActivityId"
)
ActivityId
=
parms
.
GetInt
(
"ActivityId"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
...
...
@@ -676,7 +676,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
foreach
(
var
sItem
in
item
.
SignUserList
)
{
var
excelColumns
=
new
List
<
ExcelColumn
>(
30
);
if
(
index
==
0
)
if
(
index
==
0
)
{
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
item
.
UserName
)
{
Rowspan
=
item
.
RowSpan
});
excelColumns
.
Add
(
new
ExcelColumn
(
value
:
item
.
CompanyStatusStr
)
{
Rowspan
=
item
.
RowSpan
});
...
...
@@ -2289,7 +2289,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
FileContentResult
GetFirstShopListEnrollToExcel
()
{
public
FileContentResult
GetFirstShopListEnrollToExcel
()
{
string
ExcelName
=
"榜单报名"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)
+
".xls"
;
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
...
...
@@ -2552,7 +2553,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <summary>
/// 报名列表
word
导出
/// 报名列表
批量
导出
/// </summary>
/// <returns></returns>
[
HttpPost
]
...
...
@@ -2578,6 +2579,26 @@ namespace Mall.WebApi.Controllers.TradePavilion
}
}
/// <summary>
/// 删除生成的zip文件
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
DelFirstShopEnrollZipExport
()
{
var
req
=
base
.
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
string
ListIds
=
parms
.
GetStringValue
(
"Url"
);
if
(
string
.
IsNullOrWhiteSpace
(
ListIds
))
{
return
ApiResult
.
ParamIsNull
(
"请传递文件路径"
);
}
bool
result
=
firstShopListModule
.
DelFirstShopEnrollZipExport
(
ListIds
);
return
ApiResult
.
Success
(
""
);
}
#
endregion
#
region
心愿单列表
...
...
Mall.WebApi/Mall.WebApi.csproj.user
deleted
100644 → 0
View file @
739e89ed
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<Controller_SelectedScaffolderID>
MvcControllerEmptyScaffolder
</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>
root/Common/MVC/Controller
</Controller_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ControllerDialogWidth>
600
</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsLayoutPageSelected>
True
</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>
False
</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>
True
</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile
/>
<WebStackScaffolding_IsAsyncSelected>
False
</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>
FolderProfile
</NameOfLastUsedPublishProfile>
<ShowAllFiles>
false
</ShowAllFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment