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
d1b322a4
Commit
d1b322a4
authored
Sep 02, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
675b3c19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
133 additions
and
9 deletions
+133
-9
RB_FirstShop_ListEnroll_Extend.cs
...el/Extend/TradePavilion/RB_FirstShop_ListEnroll_Extend.cs
+5
-0
RB_FirstShop_List_Extend.cs
Mall.Model/Extend/TradePavilion/RB_FirstShop_List_Extend.cs
+6
-0
FirstShopListModule.cs
Mall.Module.TradePavilion/FirstShopListModule.cs
+83
-9
RB_FirstShop_ListEnrollRepository.cs
...sitory/TradePavilion/RB_FirstShop_ListEnrollRepository.cs
+4
-0
RB_FirstShop_ListRepository.cs
Mall.Repository/TradePavilion/RB_FirstShop_ListRepository.cs
+4
-0
ExportController.cs
Mall.WebApi/Controllers/Export/ExportController.cs
+1
-0
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+30
-0
No files found.
Mall.Model/Extend/TradePavilion/RB_FirstShop_ListEnroll_Extend.cs
View file @
d1b322a4
...
...
@@ -62,5 +62,10 @@ namespace Mall.Model.Extend.TradePavilion
/// 对象ids
/// </summary>
public
string
ObjectIds
{
get
;
set
;
}
/// <summary>
/// 绑定ids
/// </summary>
public
string
ListIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_FirstShop_List_Extend.cs
View file @
d1b322a4
...
...
@@ -70,5 +70,11 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public
int
RankListState
{
get
;
set
;
}
#
endregion
/// <summary>
/// 查询多个榜单
/// </summary>
public
string
QIds
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/FirstShopListModule.cs
View file @
d1b322a4
...
...
@@ -452,17 +452,19 @@ namespace Mall.Module.TradePavilion
public
List
<
RB_FirstShop_ListEnroll_Extend
>
GetFirstShopEnrollPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_FirstShop_ListEnroll_Extend
demodel
)
{
var
list
=
firstShop_ListEnrollRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
{
if
(
list
.
Any
())
{
string
userIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
UserId
).
Distinct
());
//企业名称
var
companylist
=
companyRepository
.
GetCompanyListRepository
(
new
RB_Company_Extend
()
{
MallBaseId
=
demodel
.
MallBaseId
,
UserIds
=
userIds
});
foreach
(
var
item
in
list
)
{
foreach
(
var
item
in
list
)
{
var
companyModel
=
companylist
.
Where
(
x
=>
x
.
CreateBy
==
item
.
UserId
).
FirstOrDefault
();
item
.
CompanyName
=
companyModel
.
CompanyName
;
item
.
Principal
=
companyModel
.
Principal
;
item
.
Mobile
=
companyModel
.
Mobile
;
}
//查询 品牌/载体 名称 图片
var
e1list
=
list
.
Where
(
x
=>
x
.
ObjectType
==
Common
.
Enum
.
TradePavilion
.
ListObjectTypeEnum
.
Brand
).
ToList
();
var
e2list
=
list
.
Where
(
x
=>
x
.
ObjectType
==
Common
.
Enum
.
TradePavilion
.
ListObjectTypeEnum
.
Carrier
).
ToList
();
...
...
@@ -523,7 +525,8 @@ namespace Mall.Module.TradePavilion
//重置
keyValues
.
Add
(
nameof
(
RB_FirstShop_ListEnroll_Extend
.
CandidateState
),
1
);
}
else
{
else
{
return
"状态有误,请核实后再试"
;
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
...
...
@@ -612,7 +615,8 @@ namespace Mall.Module.TradePavilion
//首先清除历史评比
firstShop_ListEnrollRepository
.
ClearHostoryAppraisal
(
listId
,
mallBaseId
);
int
RankListState
=
type
==
1
?
3
:
2
;
if
(
type
==
1
)
{
if
(
type
==
1
)
{
//设置榜单为已放榜
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_FirstShop_List_Extend
.
ListState
),
Common
.
Enum
.
TradePavilion
.
ListStateEnum
.
Confirmed
},
...
...
@@ -628,7 +632,8 @@ namespace Mall.Module.TradePavilion
};
firstShop_ListRepository
.
Update
(
keyValues
,
wheres
);
}
foreach
(
var
item
in
deList
)
{
foreach
(
var
item
in
deList
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_FirstShop_ListEnroll_Extend
.
Reviews
),
item
.
Reviews
},
{
nameof
(
RB_FirstShop_ListEnroll_Extend
.
Rank
),
item
.
Rank
},
...
...
@@ -784,7 +789,7 @@ namespace Mall.Module.TradePavilion
if
(
enrollModel
==
null
)
{
errorMsg
=
"报名信息不存在"
;
return
""
;
}
//获取榜单信息
var
listModel
=
firstShop_ListRepository
.
GetEntity
(
enrollModel
.
ListId
);
if
(
listModel
==
null
)
{
errorMsg
=
"榜单不存在"
;
return
""
;
}
if
(
listModel
==
null
)
{
errorMsg
=
"榜单不存在"
;
return
""
;
}
//创建一个临时文件夹
string
tempFoldr
=
""
;
...
...
@@ -801,13 +806,15 @@ namespace Mall.Module.TradePavilion
if
(
elist
.
Any
())
{
//开始下载图片视频至临时文件
foreach
(
var
item
in
elist
)
{
foreach
(
var
item
in
elist
)
{
var
obj
=
JsonHelper
.
DeserializeObject
<
UploadItem
>(
item
.
CompData
.
ToString
());
if
(
item
.
CompKey
==
"ImageUploadComp"
)
{
//图片处理
string
Name
=
obj
.
Name
;
foreach
(
var
qitem
in
obj
.
FileList
)
{
foreach
(
var
qitem
in
obj
.
FileList
)
{
//FileHelper.CreateImage(); 下载腾讯云至本地
}
}
...
...
@@ -835,5 +842,72 @@ namespace Mall.Module.TradePavilion
{
return
""
;
}
/// <summary>
/// 榜单报名下载word 单次
/// </summary>
/// <param name="enrollId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
string
GetFirstShopEnrollZipExport
(
string
listIds
,
int
mallBaseId
,
out
string
errorMsg
)
{
errorMsg
=
""
;
//存储的临时文件地址
string
rootBook
=
AppDomain
.
CurrentDomain
.
BaseDirectory
;
string
tempPath
=
rootBook
+
"/upfile/temporary/firstshopenrollzip"
;
//获取榜单信息
var
listModel
=
firstShop_ListRepository
.
GetList
(
new
RB_FirstShop_List_Extend
{
MallBaseId
=
mallBaseId
,
QIds
=
listIds
});
if
(
listModel
==
null
||
!
listModel
.
Any
())
{
errorMsg
=
"榜单不存在"
;
return
""
;
}
var
enrollList
=
firstShop_ListEnrollRepository
.
GetList
(
new
RB_FirstShop_ListEnroll_Extend
{
MallBaseId
=
mallBaseId
,
ListIds
=
listIds
});
if
(
enrollList
==
null
||
!
enrollList
.
Any
())
{
errorMsg
=
"报名信息不存在"
;
return
""
;
}
//创建一个临时文件夹
string
tempFoldr
=
""
;
#
region
解析表单内容
foreach
(
var
enrollModel
in
listModel
)
{
if
(
string
.
IsNullOrEmpty
(
enrollModel
.
Content
))
{
errorMsg
=
"报名内容不存在,请核实后再试"
;
return
""
;
}
List
<
FormDataItem
>
elist
=
JsonHelper
.
DeserializeObject
<
List
<
FormDataItem
>>(
enrollModel
.
Content
);
elist
=
elist
.
Where
(
x
=>
x
.
CompKey
==
"ImageUploadComp"
||
x
.
CompKey
==
"VideoUploadComp"
).
ToList
();
if
(
elist
.
Any
())
{
//开始下载图片视频至临时文件
foreach
(
var
item
in
elist
)
{
var
obj
=
JsonHelper
.
DeserializeObject
<
UploadItem
>(
item
.
CompData
.
ToString
());
if
(
item
.
CompKey
==
"ImageUploadComp"
)
{
//图片处理
string
Name
=
obj
.
Name
;
foreach
(
var
qitem
in
obj
.
FileList
)
{
//FileHelper.CreateImage(); 下载腾讯云至本地
}
}
else
if
(
item
.
CompKey
==
"VideoUploadComp"
)
{
//视频处理
}
}
}
}
//ZipHelper.Zip(); 打包方法
#
endregion
return
""
;
}
}
}
Mall.Repository/TradePavilion/RB_FirstShop_ListEnrollRepository.cs
View file @
d1b322a4
...
...
@@ -83,6 +83,10 @@ where {where} order by w.Id desc
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_ListEnroll_Extend
.
ListId
)}
=
{
dmodel
.
ListId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ListIds
))
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_ListEnroll_Extend
.
ListId
)}
in (
{
dmodel
.
ListIds
}
)"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_ListEnroll_Extend
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
...
...
Mall.Repository/TradePavilion/RB_FirstShop_ListRepository.cs
View file @
d1b322a4
...
...
@@ -119,6 +119,10 @@ where {where} {orderBy}
{
where
+=
$@" and find_in_set('
{
dmodel
.
ObjectTypeId
}
',w.
{
nameof
(
RB_FirstShop_List_Extend
.
ListType
)}
)"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
QIds
))
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_List_Extend
.
Id
)}
in (
{
dmodel
.
QIds
}
)"
;
}
if
(
dmodel
.
ListState
>
0
)
{
if
(
dmodel
.
ListState
==
Common
.
Enum
.
TradePavilion
.
ListStateEnum
.
Enroll
)
...
...
Mall.WebApi/Controllers/Export/ExportController.cs
View file @
d1b322a4
...
...
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using
Mall.Common.API
;
using
Mall.WebApi.Controllers.User
;
using
Microsoft.AspNetCore.Mvc
;
using
NPOI.XWPF.UserModel
;
namespace
Mall.WebApi.Controllers.Export
{
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
d1b322a4
...
...
@@ -2389,6 +2389,36 @@ namespace Mall.WebApi.Controllers.TradePavilion
x
.
ObjectIcon
,
}));
}
/// <summary>
/// 报名列表word导出
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetFirstShopEnrollZipExport
()
{
var
req
=
base
.
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
string
ListIds
=
parms
.
GetStringValue
(
"ListIds"
);
if
(!
string
.
IsNullOrWhiteSpace
(
ListIds
))
{
return
ApiResult
.
ParamIsNull
(
"请传递绑定ids"
);
}
string
path
=
firstShopListModule
.
GetFirstShopEnrollZipExport
(
ListIds
,
req
.
MallBaseId
,
out
string
errmsg
);
if
(
errmsg
==
""
)
{
return
ApiResult
.
Success
(
""
,
path
);
}
else
{
return
ApiResult
.
Failed
(
errmsg
);
}
}
#
endregion
#
region
心愿单列表
...
...
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