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
69f66bab
Commit
69f66bab
authored
Oct 30, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
b9b4e2d5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
588 additions
and
34 deletions
+588
-34
OrderStatusesRerveEnum.cs
Mall.Common/Enum/Goods/OrderStatusesRerveEnum.cs
+47
-0
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+5
-0
RB_Reserve_MemberCoupon_Extend.cs
Mall.Model/Extend/Reserve/RB_Reserve_MemberCoupon_Extend.cs
+5
-0
OfflineGoodsModule.cs
Mall.Module.Reserve/OfflineGoodsModule.cs
+210
-1
ReserveModule.cs
Mall.Module.Reserve/ReserveModule.cs
+8
-5
RB_Goods_CommentRepository.cs
Mall.Repository/Product/RB_Goods_CommentRepository.cs
+108
-7
RB_Reserve_CouponRepository.cs
Mall.Repository/Reserve/RB_Reserve_CouponRepository.cs
+1
-1
AppletStoresController.cs
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
+204
-20
No files found.
Mall.Common/Enum/Goods/OrderStatusesRerveEnum.cs
0 → 100644
View file @
69f66bab
using
Mall.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Mall.Common.Enum.Goods
{
/// <summary>
/// 订单状态枚举
/// </summary>
public
enum
OrderStatusesRerveEnum
{
/// <summary>
/// 未付款
/// </summary>
[
EnumField
(
"未付款"
)]
NonPayment
=
1
,
/// <summary>
/// 待使用
/// </summary>
[
EnumField
(
"待使用"
)]
WaitReceiving
=
3
,
/// <summary>
/// 已使用
/// </summary>
[
EnumField
(
"已使用"
)]
Received
=
4
,
/// <summary>
/// 已完成
/// </summary>
[
EnumField
(
"已完成"
)]
Completed
=
5
,
/// <summary>
/// 待处理
/// </summary>
[
EnumField
(
"待处理"
)]
WaitDeal
=
6
,
/// <summary>
/// 已取消
/// </summary>
[
EnumField
(
"已取消"
)]
Cancel
=
7
}
}
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
69f66bab
...
...
@@ -349,5 +349,10 @@ namespace Mall.Model.Entity.Product
/// 使用课程卡id
/// </summary>
public
int
?
EducationCouponId
{
get
;
set
;
}
/// <summary>
/// 服务人员的id
/// </summary>
public
int
?
ServicepersonalId
{
get
;
set
;
}
}
}
Mall.Model/Extend/Reserve/RB_Reserve_MemberCoupon_Extend.cs
View file @
69f66bab
...
...
@@ -49,5 +49,10 @@ namespace Mall.Model.Extend.Reserve
/// 用户优惠券id
/// </summary>
public
string
Ids
{
get
;
set
;
}
/// <summary>
/// 线下服务门店id
/// </summary>
public
int
StoreId
{
get
;
set
;
}
}
}
Mall.Module.Reserve/OfflineGoodsModule.cs
View file @
69f66bab
This diff is collapsed.
Click to expand it.
Mall.Module.Reserve/ReserveModule.cs
View file @
69f66bab
...
...
@@ -129,7 +129,7 @@ namespace Mall.Module.Reserve
}
if
(
model
.
OrderStateJson
==
null
||
model
.
OrderStateJson
==
""
||
model
.
OrderStateJson
==
"[]"
)
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
Goods
.
OrderStatusEnum
));
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
Goods
.
OrderStatus
esRerve
Enum
));
model
.
OrderStateList
=
list
.
OrderBy
(
x
=>
Convert
.
ToInt32
(
x
.
Value
)).
Select
(
x
=>
new
ReserveStateModel
{
Name
=
x
.
Key
,
...
...
@@ -506,11 +506,14 @@ namespace Mall.Module.Reserve
{
string
Ids
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
x
.
UseType
==
Common
.
Enum
.
MarketingCenter
.
UseTypeEnum
.
Category
||
x
.
UseType
==
Common
.
Enum
.
MarketingCenter
.
UseTypeEnum
.
Product
).
Select
(
x
=>
x
.
ID
));
var
listProduct
=
productRepository
.
GetListByDiscountCouponIds
(
query
,
Ids
);
foreach
(
var
item
in
list
)
if
(!
string
.
IsNullOrWhiteSpace
(
Ids
))
{
item
.
ProductList
=
new
List
<
RB_Reserve_CouponProduct_Extend
>();
item
.
ProductList
=
listProduct
.
Where
(
x
=>
x
.
CouponId
==
item
.
ID
).
ToList
();
var
listProduct
=
productRepository
.
GetListByDiscountCouponIds
(
query
,
Ids
);
foreach
(
var
item
in
list
)
{
item
.
ProductList
=
new
List
<
RB_Reserve_CouponProduct_Extend
>();
item
.
ProductList
=
listProduct
.
Where
(
x
=>
x
.
CouponId
==
item
.
ID
).
ToList
();
}
}
}
return
list
;
...
...
Mall.Repository/Product/RB_Goods_CommentRepository.cs
View file @
69f66bab
...
...
@@ -87,14 +87,11 @@ where {where} order by c.Id desc";
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
CommentGrade
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
CommentGrade
)}
=
{(
int
)
dmodel
.
CommentGrade
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
...
...
@@ -179,6 +176,7 @@ where {where} ";
return
Get
<
RB_Goods_Comment_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取车辆评分信息
/// </summary>
...
...
@@ -217,7 +215,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <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 "
;
if
(
tenantId
>
0
)
...
...
@@ -232,7 +230,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
{
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
}
"
;
return
Get
<
RB_Goods_Comment_Extend
>(
sql
).
ToList
();
}
...
...
@@ -347,11 +345,114 @@ from rb_goods_comment as c where {where} GROUP BY OrderDetailId) as t GROUP BY t
/// </summary>
/// <param name="goodsId"></param>
/// <returns></returns>
public
RB_Goods_Comment_Extend
GetGoodsCommentScore
(
int
goodsId
)
{
public
RB_Goods_Comment_Extend
GetGoodsCommentScore
(
int
goodsId
)
{
string
sql
=
$@"SELECT SUM(CommentScore) AS CommentScore, COUNT(0) AS CommentNum FROM rb_goods_comment WHERE Status =0 and GoodsId =
{
goodsId
}
"
;
return
Get
<
RB_Goods_Comment_Extend
>(
sql
).
FirstOrDefault
();
}
#
region
线下服务
/// <summary>
/// 获取商品和服务人员评分信息
/// </summary>
/// <param name="goodsId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
List
<
RB_Goods_Comment_Extend
>
GetAppletReserveGoodsCommentscore
(
int
servicepersonalId
,
int
goodsId
,
int
tenantId
,
int
mallBaseId
)
{
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Goods_Comment
.
Status
)}
=0 "
;
if
(
tenantId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
TenantId
)}
=
{
tenantId
}
"
;
}
if
(
mallBaseId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
MallBaseId
)}
=
{
mallBaseId
}
"
;
}
if
(
servicepersonalId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
ServicePersonalId
)}
=
{
servicepersonalId
}
"
;
}
if
(
goodsId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
GoodsId
)}
=
{
goodsId
}
"
;
}
string
sql
=
$@"SELECT COUNT(0) as CommentNum,SUM(c.CommentScore) as TotalScore FROM RB_Goods_Comment c
where
{
where
}
"
;
return
Get
<
RB_Goods_Comment_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Comment_Extend
>
GetAppletReservePageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Comment_Extend
dmodel
)
{
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Goods_Comment
.
Status
)}
=0 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
CommentGrade
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
CommentGrade
)}
=
{(
int
)
dmodel
.
CommentGrade
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
&&
dmodel
.
ServicePersonalId
>
0
)
{
where
+=
$@" and (c.
{
nameof
(
RB_Goods_Comment
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
or c.
{
nameof
(
RB_Goods_Comment
.
ServicePersonalId
)}
=
{
dmodel
.
ServicePersonalId
}
)"
;
}
else
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
else
if
(
dmodel
.
ServicePersonalId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
ServicePersonalId
)}
=
{
dmodel
.
ServicePersonalId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
PlatformSource
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
PlatformSource
)}
=
{(
int
)
dmodel
.
PlatformSource
}
"
;
}
if
(
dmodel
.
Is_Show
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Is_Show
)}
=
{
dmodel
.
Is_Show
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
UserName
)}
like '%
{
dmodel
.
UserName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Content
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Content
)}
like '%
{
dmodel
.
Content
}
%'"
;
}
string
sql
=
$@"SELECT c.* FROM RB_Goods_Comment c where
{
where
}
order by c.Is_Top asc,c.Id desc"
;
return
GetPage
<
RB_Goods_Comment_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
#
endregion
}
}
Mall.Repository/Reserve/RB_Reserve_CouponRepository.cs
View file @
69f66bab
...
...
@@ -234,7 +234,7 @@ SELECT a.ID as MemberCouponId,a.UserId,a.HeXiao,a.UseHeXiao,b.`Name`,b.UseType,b
}
if
(
query
.
StoreId
>
0
)
{
where
+=
$" AND ( a.
{
nameof
(
RB_Reserve_Coupon_Extend
.
StoreId
)}
=
{
query
.
StoreId
}
or a.
{
nameof
(
RB_Reserve_Coupon_Extend
.
StoreId
)}
=0 )
)
"
;
where
+=
$" AND ( a.
{
nameof
(
RB_Reserve_Coupon_Extend
.
StoreId
)}
=
{
query
.
StoreId
}
or a.
{
nameof
(
RB_Reserve_Coupon_Extend
.
StoreId
)}
=0 )"
;
}
else
...
...
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
View file @
69f66bab
This diff is collapsed.
Click to expand it.
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