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
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
...
...
@@ -12,6 +12,7 @@ using Mall.Common.Enum.User;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.Finance
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Model.Extend.Education
;
using
Mall.Model.Extend.Finance
;
...
...
@@ -25,6 +26,7 @@ using Mall.Repository.Finance;
using
Mall.Repository.GuideCar
;
using
Mall.Repository.MarketingCenter
;
using
Mall.Repository.Product
;
using
Mall.Repository.Reserve
;
using
Mall.Repository.User
;
using
Mall.ThirdCore.Message
;
using
Microsoft.Extensions.Configuration
;
...
...
@@ -317,6 +319,17 @@ namespace Mall.Module.Product
/// 教育对应的订单课程卡
/// </summary>
private
Mall
.
Repository
.
Education
.
RB_Education_MemberCouponRepository
educationMemberCouponRepository
=
new
Mall
.
Repository
.
Education
.
RB_Education_MemberCouponRepository
();
/// <summary>
/// 服务人员仓储层对象
/// </summary>
private
readonly
RB_Reserve_ServicePersonalRepository
reserve_ServicePersonalRepository
=
new
RB_Reserve_ServicePersonalRepository
();
/// <summary>
/// 门店仓储层对象
/// </summary>
private
readonly
RB_StoresRepository
storesRepository
=
new
RB_StoresRepository
();
#
region
购物车
/// <summary>
...
...
@@ -921,6 +934,133 @@ namespace Mall.Module.Product
});
}
/// <summary>
/// 获取线下服务我的订单详情
/// </summary>
/// <param name="orderId"></param>
/// <param name="userId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
ApiResult
GetOfflineMyOrderModule
(
int
orderId
,
int
userId
,
int
tenantId
,
int
mallBaseId
)
{
var
model
=
goods_OrderRepository
.
GetEntity
(
orderId
).
RefMapperTo
<
RB_Goods_Order_Extend
>();
if
(
model
==
null
||
model
.
UserId
!=
userId
)
{
return
ApiResult
.
Failed
(
"订单信息不存在,请核实后再试"
);
}
//门店实体信息
var
storeModel
=
new
RB_Stores
();
if
(
model
.
StoresId
>
0
)
{
storeModel
=
storesRepository
.
GetEntity
(
model
.
StoresId
);
}
//查询订单明细
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
});
if
(
dlist
.
Any
())
{
string
orderDetailIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
var
oasList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetailIds
=
orderDetailIds
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
},
false
);
string
servicePersions
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
ServicepersonalId
));
var
serviceList
=
reserve_ServicePersonalRepository
.
GetServicePersonalList
(
new
Model
.
Extend
.
Reserve
.
RB_Reserve_ServicePersonal_Extend
()
{
QIds
=
servicePersions
});
foreach
(
var
item
in
dlist
)
{
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
IsApplyForAfterSale
=
2
;
if
(
oasList
.
Where
(
x
=>
x
.
OrderDetialId
==
item
.
Id
).
Any
())
{
item
.
IsApplyForAfterSale
=
1
;
}
if
(
item
.
PresentFXGrade
>
0
)
{
model
.
PresentFXGrade
=
1
;
}
item
.
ServicepersonalName
=
serviceList
?.
Where
(
qitem
=>
qitem
.
ID
==
item
.
ServicepersonalId
)?.
FirstOrDefault
()?.
Name
??
""
;
}
}
model
.
DetailList
=
dlist
;
//是否可以申请售后
var
mallModel
=
mallBaseRepository
.
GetEntity
(
mallBaseId
);
model
.
IsCanApplyForAfterSale
=
2
;
if
(
model
.
OrderStatus
==
OrderStatusEnum
.
WaitReceiving
)
{
model
.
IsCanApplyForAfterSale
=
1
;
}
else
if
(
model
.
OrderStatus
==
OrderStatusEnum
.
Received
||
model
.
OrderStatus
==
OrderStatusEnum
.
Completed
)
{
if
(
mallModel
!=
null
&&
mallModel
.
AfterTime
>
0
&&
model
.
ReceivingTime
.
HasValue
)
{
if
(
model
.
ReceivingTime
.
Value
.
AddDays
(
mallModel
.
AfterTime
)
>
DateTime
.
Now
)
{
model
.
IsCanApplyForAfterSale
=
1
;
}
}
}
//获取订阅消息
var
miniModel
=
miniProgramRepository
.
GetListRepository
(
new
RB_MiniProgram_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
}).
FirstOrDefault
();
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
);
}
}
return
ApiResult
.
Success
(
""
,
new
{
template_message_list
,
model
.
OrderId
,
model
.
OrderNo
,
model
.
OrderStatus
,
OrderStatusName
=
model
.
OrderStatus
.
GetEnumName
(),
CreateDate
=
model
.
CreateDate
.
HasValue
?
model
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
CancelTime
=
model
.
CancelTime
.
HasValue
?
model
.
CancelTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
model
.
PaymentWay
,
PaymentWayName
=
model
.
PaymentWay
.
GetEnumName
(),
model
.
PreferPrice
,
model
.
Income
,
model
.
CouponMoney
,
model
.
Consignee
,
model
.
Mobile
,
model
.
ShoppingAddress
,
DetailList
=
model
.
DetailList
.
Select
(
x
=>
new
{
DetailId
=
x
.
Id
,
x
.
GoodsId
,
x
.
GoodsName
,
x
.
CoverImagePath
,
x
.
Number
,
x
.
Final_Price
,
x
.
IsComment
,
x
.
IsApplyForAfterSale
,
x
.
FreeShippingRemarks
,
x
.
ServiceDate
,
x
.
ServiceTime
,
x
.
GoodServiceTime
,
x
.
ServicepersonalName
,
}),
model
.
IsApplyForCancel
,
model
.
RejectRemark
,
model
.
IsCanApplyForAfterSale
,
model
.
PresentFXGrade
,
model
.
BuyerMessage
,
model
.
Remark
,
model
.
CancelRemark
,
storeName
=
storeModel
?.
Name
,
storeAddress
=
storeModel
?.
Address
});
}
/// <summary>
/// 获取我的订单快递信息
/// </summary>
...
...
@@ -4626,6 +4766,7 @@ namespace Mall.Module.Product
disList
.
Add
(
demodel
.
City
??
0
);
disList
.
Add
(
demodel
.
District
??
0
);
var
goodModel
=
goodsRepository
.
GetEntity
(
demodel
.
GoodsId
);
decimal
TotalExpress
=
0
;
decimal
TotalMoney
=
0
;
...
...
@@ -5212,6 +5353,7 @@ namespace Mall.Module.Product
TotalMoney
+=
(
item
.
Final_Price
??
0
);
item
.
OrderType
=
OrderTypeEnum
.
OfflineService
;
item
.
GoodServiceTime
=
goodModel
?.
ServiceTime
??
0
;
item
.
GoodsName
=
gmodel
.
Name
;
item
.
CoverImage
=
""
;
if
(!
string
.
IsNullOrEmpty
(
gmodel
.
CarouselImage
)
&&
gmodel
.
CarouselImage
!=
"[]"
)
...
...
@@ -7179,6 +7321,7 @@ namespace Mall.Module.Product
ServiceDate
=
item
.
ServiceDate
,
ServicepersonalId
=
item
.
ServicepersonalId
,
ServiceTime
=
item
.
ServiceTime
,
GoodServiceTime
=
item
.
GoodServiceTime
,
},
trans
);
item
.
Id
=
detailId
;
if
(
detailId
>
0
&&
SatisfiedGoodsList
.
Any
())
...
...
@@ -8453,27 +8596,22 @@ namespace Mall.Module.Product
//剑鱼兄需求 2020=07-30 再查询一次商品表
string
GoodsIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
GoodsId
).
Distinct
());
var
GList
=
goodsRepository
.
GetSingleListForGoodsSubName
(
new
RB_Goods_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsIds
=
GoodsIds
},
true
);
//查询订单对应的老师
var
teacherList
=
goodsWKTeacherRepository
.
GetList
(
new
RB_Goods_WK_Teacher_Extend
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsIds
=
GoodsIds
});
//查询订单详情对应的课程卡信息
string
educationCouponIds
=
string
.
Join
(
","
,
dlist
.
Where
(
x
=>
x
.
EducationCouponId
>
0
).
Select
(
x
=>
x
.
EducationCouponId
).
Distinct
());
List
<
RB_Education_MemberCoupon_Extend
>
educationCouponList
=
new
List
<
RB_Education_MemberCoupon_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
educationCouponIds
))
//获取服务人员
string
persionIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
ServicepersonalId
).
Distinct
());
var
persionList
=
reserve_ServicePersonalRepository
.
GetServicePersonalList
(
new
Model
.
Extend
.
Reserve
.
RB_Reserve_ServicePersonal_Extend
()
{
educationCouponList
=
educationMemberCouponRepository
.
GetList
(
new
RB_Education_MemberCoupon_Extend
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
Ids
=
educationCouponIds
});
}
QIds
=
persionIds
}
);
foreach
(
var
item
in
dlist
)
{
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
GoodsSubName
=
GList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
()?.
SubName
??
""
;
item
.
FinanceList
=
flist
.
Where
(
x
=>
x
.
ECOrderDetailId
==
item
.
Id
).
ToList
();
// 2020-08-19 新增财务单据列表
item
.
TeacherList
=
teacherList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
ToList
();
// 2020-10-11 订单对应的老师
item
.
MemberEducationCouponList
=
educationCouponList
.
Where
(
x
=>
x
.
Id
==
item
.
EducationCouponId
).
ToList
();
// 2020-10-11 订单详情对应的课程卡
item
.
ServicepersonalName
=
persionList
?.
Where
(
qitem
=>
qitem
.
ID
==
item
.
ServicepersonalId
)?.
FirstOrDefault
()?.
Name
??
""
;
}
}
//2020-08-25 Add By:W Start
//2020-08-25 Add By:W Start
List
<
RB_Member_DiscountCoupon_Extend
>
memberCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(
list
.
Any
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
CouponsIds
)))
{
...
...
@@ -8486,7 +8624,6 @@ namespace Mall.Module.Product
item
.
MemberDiscountCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
CouponsIds
))
{
foreach
(
var
itemCoupons
in
item
.
CouponsIds
.
Split
(
','
))
{
item
.
MemberDiscountCouponList
.
AddRange
(
memberCouponList
.
Where
(
x
=>
itemCoupons
==
x
.
Id
.
ToString
()));
...
...
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