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
129a259c
Commit
129a259c
authored
Nov 03, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
24e8e159
a53b41be
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
321 additions
and
45 deletions
+321
-45
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+5
-0
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+5
-0
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+10
-1
RB_Reserve_ServicePersonal_Extend.cs
...Model/Extend/Reserve/RB_Reserve_ServicePersonal_Extend.cs
+5
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+151
-14
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+1
-1
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+7
-5
RB_Reserve_ServicePersonalRepository.cs
...epository/Reserve/RB_Reserve_ServicePersonalRepository.cs
+14
-1
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+11
-15
AppletStoresController.cs
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
+0
-4
OSGoodsController.cs
Mall.WebApi/Controllers/Reserve/OSGoodsController.cs
+107
-0
ReserveController.cs
Mall.WebApi/Controllers/Reserve/ReserveController.cs
+5
-4
No files found.
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
129a259c
...
...
@@ -364,5 +364,10 @@ namespace Mall.Model.Entity.Product
/// 服务时间
/// </summary>
public
string
ServiceTime
{
get
;
set
;
}
/// <summary>
/// 商品服务时长
/// </summary>
public
decimal
GoodServiceTime
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
129a259c
...
...
@@ -344,5 +344,10 @@ namespace Mall.Model.Extend.Product
public
string
UserPhoto
{
get
;
set
;
}
#
endregion
/// <summary>
/// 服务人员姓名
/// </summary>
public
string
ServicepersonalName
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
129a259c
...
...
@@ -299,6 +299,16 @@ namespace Mall.Model.Extend.Product
#
endregion
/// <summary>
/// 门店名称
/// </summary>
public
string
StoreName
{
get
;
set
;
}
/// <summary>
/// 门店地址
/// </summary>
public
string
StoresAddress
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -322,6 +332,5 @@ namespace Mall.Model.Extend.Product
/// 优惠券金额
/// </summary>
public
decimal
CouponMoney
{
get
;
set
;
}
}
}
Mall.Model/Extend/Reserve/RB_Reserve_ServicePersonal_Extend.cs
View file @
129a259c
...
...
@@ -14,6 +14,11 @@ namespace Mall.Model.Extend.Reserve
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Reserve_ServicePersonal_Extend
:
RB_Reserve_ServicePersonal
{
/// <summary>
/// 服务人员编号【查询使用】
/// </summary>
public
string
QIds
{
get
;
set
;
}
/// <summary>
/// 标签
/// </summary>
...
...
Mall.Module.Product/OrderModule.cs
View file @
129a259c
This diff is collapsed.
Click to expand it.
Mall.Module.Product/ProductModule.cs
View file @
129a259c
...
...
@@ -3546,7 +3546,7 @@ namespace Mall.Module.Product
var
storeDateModel
=
new
StoreReserveDate
()
{
DayDate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)),
DayDateStr
=
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"MM-dd"
),
DayDateStr
=
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"
yyyy-
MM-dd"
),
WeekDayStr
=
(
i
==
0
?
"今天"
:
"周"
+
Common
.
Plugin
.
CommonHelper
.
GetWeekDay
(
DateTime
.
Now
.
AddDays
(
i
))),
TimeList
=
new
List
<
string
>()
};
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
129a259c
...
...
@@ -2209,11 +2209,13 @@ where {where} group by o.OrderId order by o.CreateDate desc";
}
string
sql
=
$@"
SELECT o.*,u.Name as UserName,sshop.`Name` as SmallShopsName FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
INNER JOIN rb_member_user u on o.UserId=u.Id
LEFT JOIN rb_smallshops_info as sshop on o.SmallShopsId=sshop.Id
where
{
where
}
group by o.OrderId order by o.CreateDate desc "
;
SELECT o.*,u.Name as UserName,sshop.`Name` as SmallShopsName,s.`Name` AS StoreName,s.Address AS StoresAddress
FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
INNER JOIN rb_member_user u on o.UserId=u.Id
LEFT JOIN rb_smallshops_info as sshop on o.SmallShopsId=sshop.Id
LEFT JOIN rb_stores AS s ON O.StoresId=s.Id
WHERE
{
where
}
GROUP BY o.OrderId ORDER BY o.CreateDate DESC "
;
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
parameters
).
ToList
();
}
#
endregion
...
...
Mall.Repository/Reserve/RB_Reserve_ServicePersonalRepository.cs
View file @
129a259c
...
...
@@ -276,10 +276,16 @@ ORDER BY t.orderNum desc ";
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Reserve_ServicePersonal_Extend
.
Name
)}
like '%
{
query
.
Name
}
%'"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
WorkDate
))
{
builder
.
Append
(
$" and DATE_FORMAT(b.Date,'%Y-%m-%d' )=DATE_FORMAT('
{
query
.
WorkDate
}
','%Y-%m-%d'"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Reserve_ServicePersonal_Extend
.
ID
)}
IN(
{
query
.
QIds
}
) "
);
}
}
builder
.
Append
(
$" order by a.
{
nameof
(
RB_Reserve_ServicePersonal_Extend
.
ID
)}
desc"
);
return
Get
<
RB_Reserve_ServicePersonal_Extend
>(
builder
.
ToString
()).
ToList
();
...
...
@@ -299,7 +305,7 @@ ORDER BY t.orderNum desc ";
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT DISTINCT A.*
SELECT DISTINCT A.*
,IFNULL(orderTab.OrderNum,0) AS OrderNum
FROM RB_Reserve_ServicePersonal AS A
INNER JOIN
(
...
...
@@ -309,6 +315,13 @@ INNER JOIN
UNION
SELECT * FROM rb_reserve_servicepersonalproduct WHERE ServiceType=1 AND `Status`=0 AND ProductId IN({1})
) AS B ON A.ID=B.ServiceId
LEFT JOIN
(
SELECT detailB.ServicepersonalId,COUNT(1) AS OrderNum
FROM rb_goods_order AS orderA INNER JOIN rb_goods_orderdetail AS detailB ON orderA.OrderId=detailB.OrderId
WHERE 1=1 AND orderA.OrderStatus NOT IN(7)
GROUP BY detailB.ServicepersonalId
) AS orderTab ON A.ID=orderTab.OrderNum
WHERE A.Status=0 AND A.StoreId={2}
"
,
productId
,
categoryIds
,
storeId
);
return
Get
<
RB_Reserve_ServicePersonal_Extend
>(
builder
.
ToString
()).
ToList
();
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
129a259c
...
...
@@ -1857,7 +1857,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
OrderClassify
=
3
;
var
list
=
orderModule
.
GetOfflineServiceOrderPageListModule
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
var
obj
=
list
.
Select
(
x
=>
new
{
x
.
OrderId
,
x
.
OrderNo
,
...
...
@@ -1886,9 +1886,7 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
DiscountsPrice
}),
DetailList
=
x
.
DetailList
.
Select
(
y
=>
new
{
y
.
SupplierId
,
y
.
SupplierName
,
{
y
.
FreightCostMoney
,
y
.
FreightMoney
,
y
.
CostMoney
,
...
...
@@ -1898,12 +1896,9 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
OrderType
,
OrderTypeName
=
y
.
OrderType
.
GetEnumName
(),
y
.
GoodsName
,
SpecificationList
=
y
.
TeacherList
.
Select
(
x
=>
x
.
Name
),
y
.
ProductCode
,
y
.
Final_Price
,
y
.
Number
,
y
.
IsBindExpress
,
y
.
FreeShippingRemarks
,
y
.
SmallShopsCostPrice
,
y
.
YSMoney
,
y
.
RealMoney
,
...
...
@@ -1912,12 +1907,6 @@ namespace Mall.WebApi.Controllers.MallBase
CouponMoney
=
y
.
CouponMoney
??
0
,
InsuranceMoney
=
y
.
InsuranceMoney
??
0
,
InsuranceCostMoney
=
y
.
InsuranceCostMoney
??
0
,
IntegralMoney
=
y
.
IntegralMoney
??
0
,
IntegralNumber
=
y
.
IntegralNumber
??
0
,
MemberEducationCouponList
=
y
.
MemberEducationCouponList
.
Select
(
z
=>
new
{
z
.
Name
,
}),
SFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
1
).
Select
(
z
=>
new
{
z
.
FrID
,
...
...
@@ -1929,7 +1918,11 @@ namespace Mall.WebApi.Controllers.MallBase
z
.
FrID
,
z
.
Status
,
z
.
Is_Cashier
})
}),
y
.
ServiceDate
,
y
.
ServiceTime
,
y
.
GoodServiceTime
,
y
.
ServicepersonalName
}),
x
.
Consignee
,
x
.
Mobile
,
...
...
@@ -1951,8 +1944,11 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
MallBaseId
,
x
.
SmallShopsId
,
x
.
SmallShopsName
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
StoreName
,
x
.
StoresAddress
,
});
pagelist
.
pageData
=
obj
;
return
ApiResult
.
Success
(
""
,
pagelist
);
}
#
endregion
...
...
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
View file @
129a259c
...
...
@@ -64,10 +64,6 @@ namespace Mall.WebApi.Controllers.Reserve
JObject
parm
=
JObject
.
Parse
(
parms
.
msg
.
ToString
());
var
position
=
parm
.
GetStringValue
(
"position"
);
int
storeId
=
parm
.
GetInt
(
"storeId"
);
if
(
userInfo
==
null
)
{
userInfo
=
new
Common
.
AppletUserInfo
()
{
UserId
=
106259
};
}
var
storeModel
=
contentModule
.
GetStoresListModule
(
new
RB_Stores_Extend
()
{
CurrentPosition
=
position
,
...
...
Mall.WebApi/Controllers/Reserve/OSGoodsController.cs
View file @
129a259c
...
...
@@ -7,8 +7,11 @@ using Mall.Common.API;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.User
;
using
Mall.Module.Product
;
using
Mall.Module.User
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
...
...
@@ -31,6 +34,10 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
private
readonly
OfflineGoodsModule
offlineGoodsModule
=
AOPHelper
.
CreateAOPObject
<
OfflineGoodsModule
>();
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
private
readonly
Module
.
User
.
MiniProgramModule
programModule
=
new
Module
.
User
.
MiniProgramModule
();
private
readonly
UserModule
userModule
=
new
UserModule
();
/// <summary>
/// 商品后台分页列表
/// </summary>
...
...
@@ -77,6 +84,7 @@ namespace Mall.WebApi.Controllers.Reserve
}
/// <summary>
/// 商品导出
/// </summary>
...
...
@@ -622,5 +630,104 @@ namespace Mall.WebApi.Controllers.Reserve
bool
flag
=
offlineGoodsModule
.
SetGoodsBatchStatusInfo
(
GoodsIds
,
Type
,
req
.
TenantId
,
req
.
MallBaseId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 我的线下服务订单分页列表【小程序】
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOfflineGoodsMyOrderPageList
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
Recycled
=
2
;
demodel
.
OrderClassify
=
3
;
if
(
demodel
.
OrderStatus
==
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitSendGoods
)
{
demodel
.
OrderStatusIds
=
"2,6"
;
//待处理也是待发货状态才有的
demodel
.
OrderStatus
=
0
;
}
var
list
=
orderModule
.
GetOfflineServiceOrderPageListModule
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
//获取订阅消息
var
miniModel
=
programModule
.
GetMiniProgramModule
(
new
RB_MiniProgram_Extend
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
List
<
string
>
template_message_list
=
new
List
<
string
>();
if
(
miniModel
!=
null
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
miniModel
.
RefundTpl
))
{
template_message_list
.
Add
(
miniModel
.
RefundTpl
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
miniModel
.
OrderCancelTpl
))
{
template_message_list
.
Add
(
miniModel
.
OrderCancelTpl
);
}
}
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
template_message_list
,
x
.
OrderId
,
x
.
OrderNo
,
x
.
Income
,
x
.
CouponMoney
,
x
.
PaymentWay
,
PaymentWayName
=
x
.
PaymentWay
.
GetEnumName
(),
DetailList
=
x
.
DetailList
.
Select
(
y
=>
new
{
y
.
Id
,
y
.
GoodsId
,
y
.
CoverImagePath
,
y
.
OrderType
,
OrderTypeName
=
y
.
OrderType
.
GetEnumName
(),
y
.
GoodsName
,
y
.
ProductCode
,
y
.
Final_Price
,
y
.
Number
,
y
.
IsComment
,
y
.
ServiceDate
,
y
.
ServiceTime
,
y
.
GoodServiceTime
,
y
.
ServicepersonalName
}),
x
.
OrderStatus
,
OrderStatusName
=
x
.
OrderStatus
.
GetEnumName
(),
x
.
TenantId
,
x
.
MallBaseId
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
StoreName
,
x
.
StoresAddress
,
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取我的订单详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOfflineOrderInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
//HK2020-08-08新增
if
(
parms
.
GetInt
(
"NewUserId"
)
>
0
)
{
userInfo
.
UserId
=
parms
.
GetInt
(
"NewUserId"
);
}
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetOfflineMyOrderModule
(
OrderId
,
userInfo
.
UserId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
}
}
}
Mall.WebApi/Controllers/Reserve/ReserveController.cs
View file @
129a259c
...
...
@@ -8,6 +8,7 @@ using Mall.Common.Enum.Reserve;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Entity.Reserve
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.Reserve
;
using
Mall.Model.Extend.User
;
using
Mall.Module.Reserve
;
...
...
@@ -26,12 +27,14 @@ namespace Mall.WebApi.Controllers.Reserve
[
EnableCors
(
"AllowCors"
)]
public
class
ReserveController
:
BaseController
{
private
readonly
ReserveModule
reserveModule
=
new
ReserveModule
();
private
Module
.
User
.
UserModule
UserModule
=
new
Module
.
User
.
UserModule
();
/// <summary>
/// 门店处理类对象
/// </summary>
private
readonly
Module
.
User
.
ContentModule
contentModule
=
AOPHelper
.
CreateAOPObject
<
Module
.
User
.
ContentModule
>();
/// <summary>
/// 线下服务商品处理类对象
/// </summary>
...
...
@@ -999,7 +1002,7 @@ namespace Mall.WebApi.Controllers.Reserve
}
if
(
day
==
nowStartTime
)
{
if
(
isAddTime
)
...
...
@@ -1031,12 +1034,10 @@ namespace Mall.WebApi.Controllers.Reserve
LogHelper
.
WriteInfo
(
"门店时间转换错误"
+
ex
.
ToString
());
}
}
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
#
endregion
}
}
\ No newline at end of file
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