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
897a57a0
Commit
897a57a0
authored
Feb 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
ae437b7b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+31
-0
RB_Commerce_NewsRepository.cs
Mall.Repository/TradePavilion/RB_Commerce_NewsRepository.cs
+1
-1
AppletGoodsController.cs
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
+22
-0
No files found.
Mall.Module.Product/ProductModule.cs
View file @
897a57a0
...
...
@@ -5383,6 +5383,37 @@ namespace Mall.Module.Product
return
treeList
;
}
/// <summary>
/// 获取树形结构列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Product_Category_Extend
>
GetProductCategoryAllList
(
RB_Product_Category_Extend
demodel
)
{
var
list
=
product_CategoryRepository
.
GetList
(
demodel
);
if
(
list
.
Any
())
{
List
<
int
>
ImgIds
=
new
List
<
int
>();
ImgIds
.
AddRange
(
list
.
Select
(
x
=>
x
.
Icon
??
0
).
Distinct
());
ImgIds
.
AddRange
(
list
.
Select
(
x
=>
x
.
BigIcon
??
0
).
Distinct
());
ImgIds
.
AddRange
(
list
.
Select
(
x
=>
x
.
AdvertisingImage
??
0
).
Distinct
());
List
<
RB_Material_Info_Extend
>
mlist
=
new
List
<
RB_Material_Info_Extend
>();
if
(
ImgIds
.
Any
())
{
mlist
=
material_InfoRepository
.
GetList
(
new
RB_Material_Info_Extend
()
{
MaterialIds
=
string
.
Join
(
","
,
ImgIds
),
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
}
foreach
(
var
item
in
list
)
{
item
.
IconPath
=
mlist
.
Where
(
x
=>
x
.
Id
==
item
.
Icon
).
FirstOrDefault
()?.
Path
??
""
;
item
.
BigIconPath
=
mlist
.
Where
(
x
=>
x
.
Id
==
item
.
BigIcon
).
FirstOrDefault
()?.
Path
??
""
;
item
.
AdvertisingImagePath
=
mlist
.
Where
(
x
=>
x
.
Id
==
item
.
AdvertisingImage
).
FirstOrDefault
()?.
Path
??
""
;
item
.
CategoryPageTypeStr
=
item
.
CategoryPageType
.
GetEnumName
();
}
list
=
list
.
OrderBy
(
x
=>
x
.
Sort
).
ThenBy
(
x
=>
x
.
Id
).
ToList
();
}
return
list
;
}
/// <summary>
/// 获取子集列表
/// </summary>
...
...
Mall.Repository/TradePavilion/RB_Commerce_NewsRepository.cs
View file @
897a57a0
...
...
@@ -53,7 +53,7 @@ WHERE 1=1
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Title
.
Trim
()
+
"%"
);
}
}
return
GetPage
<
RB_Commerce_
Activity
_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Commerce_
News
_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
View file @
897a57a0
...
...
@@ -94,6 +94,28 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
Success
(
""
,
list
);
}
/// <summary>
/// 获取分类树形结构
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetProductCategoryAllList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
parms
.
MallBaseId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
RB_Product_Category_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Product_Category_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
demodel
.
Enabled
=
1
;
demodel
.
IsShow
=
1
;
var
list
=
productModule
.
GetProductCategoryAllList
(
demodel
);
return
ApiResult
.
Success
(
""
,
list
);
}
/// <summary>
/// 获取分类样式
/// </summary>
...
...
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