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
98ba09cc
Commit
98ba09cc
authored
Jul 26, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4f651e18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
1 deletion
+96
-1
AssessModule.cs
Mall.Module.Miai/AssessModule.cs
+81
-1
AppletAssessController.cs
Mall.WebApi/Controllers/Miai/AppletAssessController.cs
+15
-0
No files found.
Mall.Module.Miai/AssessModule.cs
View file @
98ba09cc
...
@@ -90,7 +90,7 @@ namespace Mall.Module.Miai
...
@@ -90,7 +90,7 @@ namespace Mall.Module.Miai
bool
flag
=
assess_CategoryRepository
.
Insert
(
demodel
)
>
0
;
bool
flag
=
assess_CategoryRepository
.
Insert
(
demodel
)
>
0
;
return
flag
?
""
:
"出错了,请联系管理员"
;
return
flag
?
""
:
"出错了,请联系管理员"
;
}
}
}
}
/// <summary>
/// <summary>
/// 删除分类
/// 删除分类
...
@@ -165,6 +165,86 @@ namespace Mall.Module.Miai
...
@@ -165,6 +165,86 @@ namespace Mall.Module.Miai
return
list
;
return
list
;
}
}
/// <summary>
/// 获取品牌分组列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
object
GetBrandGroupList
(
RB_Assess_Brand_Extend
demodel
)
{
List
<
object
>
RList
=
new
List
<
object
>();
var
list
=
assess_BrandRepository
.
GetList
(
demodel
);
if
(
list
.
Any
())
{
foreach
(
var
item
in
list
)
{
item
.
BrandImgList
=
new
List
<
AssessBrandImg
>();
if
(!
string
.
IsNullOrEmpty
(
item
.
BrandImg
))
{
item
.
BrandImgList
=
JsonHelper
.
DeserializeObject
<
List
<
AssessBrandImg
>>(
item
.
BrandImg
);
item
.
BrandImgList
=
item
.
BrandImgList
.
Where
(
x
=>
!
string
.
IsNullOrEmpty
(
x
.
Name
)).
ToList
();
}
}
RList
.
Add
(
new
{
letter
=
"*"
,
data
=
list
.
Where
(
x
=>
x
.
IsHot
==
1
).
Take
(
9
).
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
PinYin
,
x
.
Logo
,
x
.
IsHot
,
x
.
BrandImgList
,
x
.
MoreDesc
,
x
.
RemarkDesc
})
});
list
.
Where
(
x
=>
!
string
.
IsNullOrEmpty
(
x
.
PinYin
)).
GroupBy
(
x
=>
x
.
PinYin
).
OrderBy
(
x
=>
x
.
Key
).
ToList
().
ForEach
(
item
=>
{
RList
.
Add
(
new
{
letter
=
item
.
Key
,
data
=
item
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
PinYin
,
x
.
Logo
,
x
.
IsHot
,
x
.
BrandImgList
,
x
.
MoreDesc
,
x
.
RemarkDesc
})
});
});
if
(
list
.
Where
(
x
=>
string
.
IsNullOrEmpty
(
x
.
PinYin
)).
Any
())
{
RList
.
Add
(
new
{
letter
=
"#"
,
data
=
list
.
Where
(
x
=>
string
.
IsNullOrEmpty
(
x
.
PinYin
)).
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
PinYin
,
x
.
Logo
,
x
.
IsHot
,
x
.
BrandImgList
,
x
.
MoreDesc
,
x
.
RemarkDesc
})
});
}
}
return
RList
;
}
/// <summary>
/// <summary>
/// 获取详情
/// 获取详情
/// </summary>
/// </summary>
...
...
Mall.WebApi/Controllers/Miai/AppletAssessController.cs
View file @
98ba09cc
...
@@ -80,6 +80,21 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -80,6 +80,21 @@ namespace Mall.WebApi.Controllers.MallBase
}));
}));
}
}
/// <summary>
/// 获取品牌分组列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
30
,
Duration
=
60
)]
public
ApiResult
GetBrandGroupList
()
{
var
req
=
base
.
RequestParm
;
RB_Assess_Brand_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Assess_Brand_Extend
>(
req
.
msg
.
ToString
());
demodel
.
MallBaseId
=
req
.
MallBaseId
;
var
list
=
assessModule
.
GetBrandGroupList
(
demodel
);
return
ApiResult
.
Success
(
""
,
list
);
}
/// <summary>
/// <summary>
/// 获取品牌详情
/// 获取品牌详情
/// </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