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
5b70c847
Commit
5b70c847
authored
Sep 09, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
dff7b061
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
15 deletions
+58
-15
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+19
-5
RB_GuideCar_SiteRegionRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
+1
-1
RB_Goods_CommentRepository.cs
Mall.Repository/Product/RB_Goods_CommentRepository.cs
+8
-7
AppletGuideCarController.cs
Mall.WebApi/Controllers/Product/AppletGuideCarController.cs
+30
-2
No files found.
Mall.Module.Product/GuideCarModule.cs
View file @
5b70c847
...
@@ -2894,6 +2894,17 @@ namespace Mall.Module.Product
...
@@ -2894,6 +2894,17 @@ namespace Mall.Module.Product
return
flag
;
return
flag
;
}
}
/// <summary>
/// 获取站点地区列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_SiteRegion_Extend
>
GetListRepository
(
RB_GuideCar_SiteRegion_Extend
query
)
{
return
SiteRegionRepository
.
GetListRepository
(
query
);
}
#
endregion
#
endregion
#
region
导游信息
#
region
导游信息
...
@@ -3482,7 +3493,8 @@ namespace Mall.Module.Product
...
@@ -3482,7 +3493,8 @@ namespace Mall.Module.Product
decimal
carScore
=
0
;
decimal
carScore
=
0
;
if
(
carScoreList
!=
null
&&
carScoreList
.
Any
())
if
(
carScoreList
!=
null
&&
carScoreList
.
Any
())
{
{
carScore
=
(
carScoreList
.
FirstOrDefault
().
TotalScore
+
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
CarId
==
dmodel
.
CarId
).
FirstOrDefault
().
CommentScore
??
0
)))
/
(
carScoreList
.
FirstOrDefault
().
CommentNum
+
1
);
carScore
=
carScoreList
.
FirstOrDefault
().
TotalScore
/
carScoreList
.
FirstOrDefault
().
CommentNum
;
//carScore = (carScoreList.FirstOrDefault().TotalScore + (Convert.ToDecimal(list.Where(x => x.CarId == dmodel.CarId).FirstOrDefault().CommentScore ?? 0))) / (carScoreList.FirstOrDefault().CommentNum + 1);
}
}
else
else
{
{
...
@@ -3510,7 +3522,8 @@ namespace Mall.Module.Product
...
@@ -3510,7 +3522,8 @@ namespace Mall.Module.Product
var
guideScoreList
=
goods_CommentRepository
.
GetAppletGoodsCommentscore
(
0
,
dmodel
.
GuideId
.
Value
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
var
guideScoreList
=
goods_CommentRepository
.
GetAppletGoodsCommentscore
(
0
,
dmodel
.
GuideId
.
Value
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
if
(
guideScoreList
!=
null
&&
guideScoreList
.
Any
())
if
(
guideScoreList
!=
null
&&
guideScoreList
.
Any
())
{
{
guidScore
=
(
guideScoreList
.
FirstOrDefault
().
TotalScore
+
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
GuideId
==
dmodel
.
GuideId
).
FirstOrDefault
().
CommentScore
??
0
)))
/
(
guideScoreList
.
FirstOrDefault
().
CommentNum
+
1
);
guidScore
=
guideScoreList
.
FirstOrDefault
().
TotalScore
/
guideScoreList
.
FirstOrDefault
().
CommentNum
;
//guidScore = (guideScoreList.FirstOrDefault().TotalScore + (Convert.ToDecimal(list.Where(x => x.GuideId == dmodel.GuideId).FirstOrDefault().CommentScore ?? 0))) / (guideScoreList.FirstOrDefault().CommentNum + 1);
}
}
else
else
{
{
...
@@ -3564,7 +3577,7 @@ namespace Mall.Module.Product
...
@@ -3564,7 +3577,7 @@ namespace Mall.Module.Product
decimal
carScore
=
0
;
decimal
carScore
=
0
;
if
(
carScoreList
!=
null
&&
carScoreList
.
Any
())
if
(
carScoreList
!=
null
&&
carScoreList
.
Any
())
{
{
carScore
=
(
carScoreList
.
FirstOrDefault
().
TotalScore
+
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
CarId
==
dmodel
.
CarId
).
FirstOrDefault
().
CommentScore
??
0
)))
/
(
carScoreList
.
FirstOrDefault
().
CommentNum
+
1
)
;
carScore
=
carScoreList
.
FirstOrDefault
().
TotalScore
/
carScoreList
.
FirstOrDefault
().
CommentNum
;
}
}
else
else
{
{
...
@@ -3592,7 +3605,7 @@ namespace Mall.Module.Product
...
@@ -3592,7 +3605,7 @@ namespace Mall.Module.Product
var
guideScoreList
=
goods_CommentRepository
.
GetAppletGoodsCommentscore
(
0
,
dmodel
.
GuideId
.
Value
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
var
guideScoreList
=
goods_CommentRepository
.
GetAppletGoodsCommentscore
(
0
,
dmodel
.
GuideId
.
Value
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
if
(
guideScoreList
!=
null
&&
guideScoreList
.
Any
())
if
(
guideScoreList
!=
null
&&
guideScoreList
.
Any
())
{
{
guidScore
=
(
guideScoreList
.
FirstOrDefault
().
TotalScore
+
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
GuideId
==
dmodel
.
GuideId
).
FirstOrDefault
().
CommentScore
??
0
)))
/
(
guideScoreList
.
FirstOrDefault
().
CommentNum
+
1
)
;
guidScore
=
guideScoreList
.
FirstOrDefault
().
TotalScore
/
guideScoreList
.
FirstOrDefault
().
CommentNum
;
}
}
else
else
{
{
...
@@ -3813,8 +3826,9 @@ namespace Mall.Module.Product
...
@@ -3813,8 +3826,9 @@ namespace Mall.Module.Product
var
list
=
goods_CommentRepository
.
GetGoodsDetailPageList
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
var
list
=
goods_CommentRepository
.
GetGoodsDetailPageList
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
{
{
string
goodsIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
GoodsId
));
string
orderDetailIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderDetailId
));
string
orderDetailIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderDetailId
));
var
carCommentList
=
goods_CommentRepository
.
GetCarCommentByOrderDetailId
(
orderDetailIds
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
var
carCommentList
=
goods_CommentRepository
.
GetCarCommentByOrderDetailId
(
orderDetailIds
,
goodsIds
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
var
guideCommentList
=
goods_CommentRepository
.
GetGuideCommentByOrderDetailId
(
orderDetailIds
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
var
guideCommentList
=
goods_CommentRepository
.
GetGuideCommentByOrderDetailId
(
orderDetailIds
,
dmodel
.
TenantId
,
dmodel
.
MallBaseId
);
List
<
RB_Member_User_Extend
>
userList
=
new
List
<
RB_Member_User_Extend
>();
List
<
RB_Member_User_Extend
>
userList
=
new
List
<
RB_Member_User_Extend
>();
...
...
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
View file @
5b70c847
...
@@ -20,7 +20,7 @@ namespace Mall.Repository.GuideCar
...
@@ -20,7 +20,7 @@ namespace Mall.Repository.GuideCar
public
string
DestinationTableName
{
get
{
return
nameof
(
RB_Destination
);
}
}
public
string
DestinationTableName
{
get
{
return
nameof
(
RB_Destination
);
}
}
/// <summary>
/// <summary>
/// 获取
物流
地区列表
/// 获取
站点
地区列表
/// </summary>
/// </summary>
/// <param name="query">查询条件</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
/// <returns></returns>
...
...
Mall.Repository/Product/RB_Goods_CommentRepository.cs
View file @
5b70c847
...
@@ -186,7 +186,7 @@ where {where} ";
...
@@ -186,7 +186,7 @@ where {where} ";
/// <param name="tenantId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Goods_Comment_Extend
>
GetCarCommentByOrderDetailId
(
string
orderDetailIds
,
int
tenantId
,
int
mallBaseId
)
public
List
<
RB_Goods_Comment_Extend
>
GetCarCommentByOrderDetailId
(
string
orderDetailIds
,
string
goodsIds
,
int
tenantId
,
int
mallBaseId
)
{
{
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Goods_Comment
.
Status
)}
=0 and c.
{
nameof
(
RB_Goods_Comment
.
Is_Show
)}
=1 and c.
{
nameof
(
RB_Goods_Comment
.
CarId
)}
>0 "
;
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Goods_Comment
.
Status
)}
=0 and c.
{
nameof
(
RB_Goods_Comment
.
Is_Show
)}
=1 and c.
{
nameof
(
RB_Goods_Comment
.
CarId
)}
>0 "
;
if
(
tenantId
>
0
)
if
(
tenantId
>
0
)
...
@@ -197,9 +197,9 @@ where {where} ";
...
@@ -197,9 +197,9 @@ where {where} ";
{
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
MallBaseId
)}
=
{
mallBaseId
}
"
;
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
MallBaseId
)}
=
{
mallBaseId
}
"
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
orderDetail
Ids
))
if
(!
string
.
IsNullOrWhiteSpace
(
goods
Ids
))
{
{
where
+=
$@" and
c.
{
nameof
(
RB_Goods_Comment
.
OrderDetailId
)}
in(
{
orderDetail
Ids
}
) "
;
where
+=
$@" and
b.ID in(
{
goods
Ids
}
) "
;
}
}
string
sql
=
$@"SELECT c.*,a.`Name` as CarName,d.ColorName as CarColorName,cb.`Name` as CarBrandName FROM RB_Goods_Comment c
string
sql
=
$@"SELECT c.*,a.`Name` as CarName,d.ColorName as CarColorName,cb.`Name` as CarBrandName FROM RB_Goods_Comment c
LEFT JOIN rb_guidecar_car as a on c.CarId=a.ID
LEFT JOIN rb_guidecar_car as a on c.CarId=a.ID
...
@@ -217,7 +217,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
...
@@ -217,7 +217,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
/// <param name="tenantId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Goods_Comment_Extend
>
GetGuideCommentByOrderDetailId
(
string
orderDetailIds
,
int
tenantId
,
int
mallBaseId
)
public
List
<
RB_Goods_Comment_Extend
>
GetGuideCommentByOrderDetailId
(
string
orderDetailIds
,
int
tenantId
,
int
mallBaseId
)
{
{
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Goods_Comment
.
Status
)}
=0 and c.
{
nameof
(
RB_Goods_Comment
.
Is_Show
)}
=1 and c.
{
nameof
(
RB_Goods_Comment
.
GuideId
)}
>0 "
;
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Goods_Comment
.
Status
)}
=0 and c.
{
nameof
(
RB_Goods_Comment
.
Is_Show
)}
=1 and c.
{
nameof
(
RB_Goods_Comment
.
GuideId
)}
>0 "
;
if
(
tenantId
>
0
)
if
(
tenantId
>
0
)
...
@@ -230,8 +230,9 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
...
@@ -230,8 +230,9 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
orderDetailIds
))
if
(!
string
.
IsNullOrWhiteSpace
(
orderDetailIds
))
{
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
OrderDetailId
)}
in
(
{
orderDetailIds
}
) "
;
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
OrderDetailId
)}
in
(
{
orderDetailIds
}
) "
;
}
}
string
sql
=
$@"SELECT c.*,a.`Name` as GuideName FROM RB_Goods_Comment c LEFT JOIN rb_guidecar_guide as a on c.GuideId=a.ID where
{
where
}
"
;
string
sql
=
$@"SELECT c.*,a.`Name` as GuideName FROM RB_Goods_Comment c LEFT JOIN rb_guidecar_guide as a on c.GuideId=a.ID where
{
where
}
"
;
return
Get
<
RB_Goods_Comment_Extend
>(
sql
).
ToList
();
return
Get
<
RB_Goods_Comment_Extend
>(
sql
).
ToList
();
}
}
...
@@ -291,7 +292,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
...
@@ -291,7 +292,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
{
{
whereGrade
+=
$@" and t.TotalScore>3 and t.TotalScore<=6"
;
whereGrade
+=
$@" and t.TotalScore>3 and t.TotalScore<=6"
;
}
}
else
else
if
(
dmodel
.
CommentGrade
.
Value
==
Common
.
Enum
.
Goods
.
GoodsCommentTypeEnum
.
Negative
)
{
{
whereGrade
+=
$@" and t.TotalScore>=1 and t.TotalScore<=3"
;
whereGrade
+=
$@" and t.TotalScore>=1 and t.TotalScore<=3"
;
}
}
...
@@ -303,7 +304,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
...
@@ -303,7 +304,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
when SUM(CommentScore)>6 then 1
when SUM(CommentScore)>6 then 1
ELSE 0
ELSE 0
end as CommentGrade
end as CommentGrade
from rb_goods_comment where
{
where
}
GROUP BY OrderDetailId order by CreateDate ) as t
{
whereGrade
}
"
;
from rb_goods_comment where
{
where
}
GROUP BY OrderDetailId order by CreateDate
desc
) as t
{
whereGrade
}
"
;
return
GetPage
<
GoodsComment_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
return
GetPage
<
GoodsComment_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
...
...
Mall.WebApi/Controllers/Product/AppletGuideCarController.cs
View file @
5b70c847
...
@@ -393,6 +393,32 @@ namespace Mall.WebApi.Controllers.Product
...
@@ -393,6 +393,32 @@ namespace Mall.WebApi.Controllers.Product
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
}
/// <summary>
/// 获取站点地区列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSiteRegionList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_GuideCar_SiteRegion_Extend
>(
parms
.
msg
.
ToString
());
query
.
TenantId
=
parms
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
SiteType
=
1
;
var
siteRegionList
=
guideCarModule
.
GetListRepository
(
query
);
if
(
siteRegionList
==
null
)
{
siteRegionList
=
new
List
<
RB_GuideCar_SiteRegion_Extend
>();
}
var
result
=
siteRegionList
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
SiteId
,
x
.
RegionId
,
x
.
RegionName
});
return
ApiResult
.
Success
(
""
,
result
);
}
/// <summary>
/// <summary>
...
@@ -452,7 +478,9 @@ namespace Mall.WebApi.Controllers.Product
...
@@ -452,7 +478,9 @@ namespace Mall.WebApi.Controllers.Product
y
.
CarBrandName
,
y
.
CarBrandName
,
y
.
CarColorName
,
y
.
CarColorName
,
y
.
CarName
,
y
.
CarName
,
CreateDate
=
y
.
CreateDate
.
HasValue
?
y
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
CreateDate
=
y
.
CreateDate
.
HasValue
?
y
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
y
.
CarId
,
y
.
GuideId
})
})
});
});
return
ApiResult
.
Success
(
""
,
pagelist
);
return
ApiResult
.
Success
(
""
,
pagelist
);
...
@@ -467,7 +495,7 @@ namespace Mall.WebApi.Controllers.Product
...
@@ -467,7 +495,7 @@ namespace Mall.WebApi.Controllers.Product
public
ApiResult
GetAppletGoodsCommentStatistics
(
object
requestMsg
)
public
ApiResult
GetAppletGoodsCommentStatistics
(
object
requestMsg
)
{
{
var
req
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
req
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
GoodsId
=
parms
.
GetInt
(
"GoodsId"
,
0
);
int
GoodsId
=
parms
.
GetInt
(
"GoodsId"
,
0
);
...
...
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