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
42a3ec01
Commit
42a3ec01
authored
Sep 02, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导游下拉
parent
ebf8d841
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
10 deletions
+37
-10
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+19
-9
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+18
-1
No files found.
Mall.Module.Product/GuideCarModule.cs
View file @
42a3ec01
...
...
@@ -1281,6 +1281,16 @@ namespace Mall.Module.Product
return
model
;
}
/// <summary>
/// 导游配置
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_GuideCar_Guide_Extend
>
GetGuideCarGuideList
(
RB_GuideCar_Guide_Extend
query
)
{
return
GuideRepository
.
GetGuideCarGuideList
(
query
);
}
/// <summary>
/// 新增/修改导游配置
/// </summary>
...
...
@@ -1403,7 +1413,7 @@ namespace Mall.Module.Product
{
item
.
ColorList
=
new
List
<
RB_GuideCar_CarColor_Extend
>();
item
.
ColorList
=
listCarColor
.
Where
(
x
=>
x
.
CarId
==
item
.
ID
).
ToList
();
}
}
return
list
;
...
...
@@ -1440,8 +1450,8 @@ namespace Mall.Module.Product
/// <returns></returns>
public
List
<
RB_GuideCar_Car_Extend
>
GetGuideCarList
(
RB_GuideCar_Car_Extend
query
)
{
var
list
=
GuideCarRepository
.
GetGuideCarCarList
(
query
);
if
(
list
!=
null
&&
list
.
Any
())
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
())
...
...
@@ -1507,19 +1517,19 @@ namespace Mall.Module.Product
//}
//else
//{ //全部删除
foreach
(
var
itemRegion
in
listLogisticsRulesRegion
.
Where
(
x
=>
x
.
CarId
==
model
.
ID
))
{
IDictionary
<
string
,
object
>
filedsRegion
=
new
Dictionary
<
string
,
object
>()
//删除价格下面对应的地区
foreach
(
var
itemRegion
in
listLogisticsRulesRegion
.
Where
(
x
=>
x
.
CarId
==
model
.
ID
))
{
IDictionary
<
string
,
object
>
filedsRegion
=
new
Dictionary
<
string
,
object
>()
//删除价格下面对应的地区
{
{
nameof
(
RB_GuideCar_CarColor_Extend
.
Status
),
1
},
{
nameof
(
RB_GuideCar_CarColor_Extend
.
UpdateDate
),
System
.
DateTime
.
Now
},
};
IList
<
WhereHelper
>
whereHelpersRegion
=
new
List
<
WhereHelper
>()
IList
<
WhereHelper
>
whereHelpersRegion
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_GuideCar_CarColor_Extend
.
ID
),
FiledValue
=
itemRegion
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
CarColorRepository
.
Update
(
filedsRegion
,
whereHelpersRegion
,
trans
);
}
CarColorRepository
.
Update
(
filedsRegion
,
whereHelpersRegion
,
trans
);
}
//}
}
if
(
model
.
ColorList
!=
null
&&
model
.
ColorList
.
Any
())
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
42a3ec01
...
...
@@ -1017,6 +1017,23 @@ namespace Mall.WebApi.Controllers.MallBase
}
/// <summary>
/// 获取全部导游
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGuideCarGuideList
()
{
var
parms
=
RequestParm
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_GuideCar_Guide_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
guideCarModule
.
GetGuideCarGuideList
(
query
);
var
result
=
list
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
Name
,
x
.
WorkYears
,
x
.
Score
});
return
ApiResult
.
Success
(
""
,
result
);
}
/// <summary>
/// 保存司导导游信息
/// </summary>
...
...
@@ -1142,7 +1159,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
,
ColorList
=
x
.
ColorList
.
Select
(
y
=>
new
{
y
.
ColorName
,
y
.
PicList
}),
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