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
6df481bf
Commit
6df481bf
authored
Sep 02, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
7136a547
42a3ec01
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
16 deletions
+58
-16
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+36
-11
RB_GuideCar_GuideRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_GuideRepository.cs
+1
-1
RB_GuideCar_SiteRegionRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
+2
-2
RB_GuideCar_SiteRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_SiteRepository.cs
+1
-1
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+18
-1
No files found.
Mall.Module.Product/GuideCarModule.cs
View file @
6df481bf
...
...
@@ -1109,7 +1109,7 @@ namespace Mall.Module.Product
/// <returns></returns>
public
RB_GuideCar_Site_Extend
GetGuideCarSiteModel
(
RB_GuideCar_Site_Extend
query
)
{
RB_GuideCar_Site_Extend
model
=
SiteRepository
.
Get
LogisticsRules
List
(
query
).
FirstOrDefault
();
RB_GuideCar_Site_Extend
model
=
SiteRepository
.
Get
GuideCarSite
List
(
query
).
FirstOrDefault
();
if
(
model
!=
null
)
{
List
<
RB_GuideCar_SiteRegion_Extend
>
listLogisticsRulesRegion
=
SiteRegionRepository
.
GetListRepository
(
new
RB_GuideCar_SiteRegion_Extend
{
TenantId
=
query
.
TenantId
,
SiteType
=
query
.
SiteType
,
MallBaseId
=
query
.
MallBaseId
,
SiteId
=
model
.
ID
});
...
...
@@ -1129,7 +1129,7 @@ namespace Mall.Module.Product
/// <returns></returns>
public
List
<
RB_GuideCar_Site_Extend
>
GetGuideCarSiteList
(
RB_GuideCar_Site_Extend
query
)
{
return
SiteRepository
.
Get
LogisticsRules
List
(
query
);
return
SiteRepository
.
Get
GuideCarSite
List
(
query
);
}
/// <summary>
...
...
@@ -1337,11 +1337,21 @@ namespace Mall.Module.Product
/// <returns></returns>
public
RB_GuideCar_Guide_Extend
GetGuideCarGuideModel
(
RB_GuideCar_Guide_Extend
query
)
{
RB_GuideCar_Guide_Extend
model
=
GuideRepository
.
Get
LogisticsRules
List
(
query
).
FirstOrDefault
();
RB_GuideCar_Guide_Extend
model
=
GuideRepository
.
Get
GuideCarGuide
List
(
query
).
FirstOrDefault
();
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>
...
...
@@ -1464,7 +1474,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
;
...
...
@@ -1501,7 +1511,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>
...
...
@@ -1553,19 +1578,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.Repository/GuideCar/RB_GuideCar_GuideRepository.cs
View file @
6df481bf
...
...
@@ -96,7 +96,7 @@ namespace Mall.Repository.GuideCar
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_Guide_Extend
>
Get
LogisticsRules
List
(
RB_GuideCar_Guide_Extend
query
)
public
List
<
RB_GuideCar_Guide_Extend
>
Get
GuideCarGuide
List
(
RB_GuideCar_Guide_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT a.*,b.SiteName FROM
{
TableName
}
as a LEFT JOIN
{
SiteTableName
}
as b on a.SiteId=b.ID WHERE a.
{
nameof
(
RB_GuideCar_Guide_Extend
.
Status
)}
=0"
);
...
...
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
View file @
6df481bf
...
...
@@ -58,11 +58,11 @@ LEFT JOIN {DestinationTableName} as c on b.ParentID = c.ID WHERE a.{nameof(RB_
/// <summary>
/// 获取
物流
地区列表
/// 获取
站点
地区列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_SiteRegion_Extend
>
GetList
ForSingle
(
RB_GuideCar_SiteRegion_Extend
query
)
public
List
<
RB_GuideCar_SiteRegion_Extend
>
GetList
SiteRegion
(
RB_GuideCar_SiteRegion_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@
$" SELECT a.* FROM
{
TableName
}
as a WHERE a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
Status
)}
=0"
);
...
...
Mall.Repository/GuideCar/RB_GuideCar_SiteRepository.cs
View file @
6df481bf
...
...
@@ -57,7 +57,7 @@ namespace Mall.Repository.GuideCar
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_Site_Extend
>
GetList
(
RB_GuideCar_Site_Extend
query
)
public
List
<
RB_GuideCar_Site_Extend
>
Get
GuideCarSite
List
(
RB_GuideCar_Site_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_GuideCar_Site_Extend
.
Status
)}
=0 "
);
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
6df481bf
...
...
@@ -933,6 +933,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>
...
...
@@ -1058,7 +1075,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