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
3f062ec7
Commit
3f062ec7
authored
Sep 02, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
64c1bf01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+16
-1
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+1
-1
No files found.
Mall.Module.Product/GuideCarModule.cs
View file @
3f062ec7
...
...
@@ -1440,7 +1440,22 @@ namespace Mall.Module.Product
/// <returns></returns>
public
List
<
RB_GuideCar_Car_Extend
>
GetGuideCarList
(
RB_GuideCar_Car_Extend
query
)
{
return
GuideCarRepository
.
GetGuideCarCarList
(
query
);
var
list
=
GuideCarRepository
.
GetGuideCarCarList
(
query
);
if
(
list
!=
null
&&
list
.
Any
())
{
List
<
RB_GuideCar_CarColor_Extend
>
listCarColor
=
CarColorRepository
.
GetCarColorList
(
new
RB_GuideCar_CarColor_Extend
{
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
,
CardIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
ID
))
});
if
(
listCarColor
!=
null
&&
listCarColor
.
Any
())
{
listCarColor
.
Where
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
CarPic
)).
ToList
().
ForEach
(
x
=>
x
.
PicList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
x
.
CarPic
));
}
foreach
(
var
item
in
list
)
{
item
.
ColorList
=
new
List
<
RB_GuideCar_CarColor_Extend
>();
item
.
ColorList
=
listCarColor
.
Where
(
x
=>
x
.
CarId
==
item
.
ID
).
ToList
();
}
}
return
list
;
}
/// <summary>
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
3f062ec7
...
...
@@ -922,7 +922,7 @@ namespace Mall.WebApi.Controllers.MallBase
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
guideCarModule
.
GetGuideCarList
(
query
);
var
result
=
list
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
Name
,
x
.
CarBrand
,
x
.
CarClass
,
x
.
CarLogo
,
x
.
ColorList
,
x
.
CarType
});
var
result
=
list
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
Name
,
x
.
CarBrand
,
x
.
CarClass
,
x
.
CarLogo
,
ColorList
=
x
.
ColorList
.
Select
(
y
=>
new
{
y
.
ColorName
,
y
.
PicList
})
,
x
.
CarType
});
return
ApiResult
.
Success
(
""
,
result
);
}
...
...
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