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
be0e00a8
Commit
be0e00a8
authored
Nov 02, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
167db761
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
398 additions
and
26 deletions
+398
-26
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+73
-0
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+123
-0
RB_StoresRepository.cs
Mall.Repository/User/RB_StoresRepository.cs
+17
-15
BaseController.cs
Mall.WebApi/Controllers/BaseController.cs
+6
-1
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+133
-0
AppletStoresController.cs
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
+46
-10
No files found.
Mall.Module.Product/OrderModule.cs
View file @
be0e00a8
...
@@ -8424,6 +8424,79 @@ namespace Mall.Module.Product
...
@@ -8424,6 +8424,79 @@ namespace Mall.Module.Product
}
}
/// <summary>
/// 获取教育后台订单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetOfflineServiceOrderPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Order_Extend
demodel
)
{
var
list
=
goods_OrderRepository
.
GetOfflineServiceOrderPageListRepository
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
{
//查询订单明细
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
List
<
RB_Finance_Extend
>
flist
=
new
List
<
RB_Finance_Extend
>();
if
(
pageSize
!=
10000
&&
demodel
.
TenantId
==
1
)
{
//查询所有财务单据
string
detailIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
flist
=
financeRepository
.
GetList
(
new
RB_Finance_Extend
()
{
ECOrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
}
//查询图片
List
<
RB_Material_Info_Extend
>
Mlist
=
new
List
<
RB_Material_Info_Extend
>();
if
(
dlist
.
Any
())
{
//剑鱼兄需求 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
))
{
educationCouponList
=
educationMemberCouponRepository
.
GetList
(
new
RB_Education_MemberCoupon_Extend
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
Ids
=
educationCouponIds
});
}
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 订单详情对应的课程卡
}
}
//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
)))
{
memberCouponList
=
member_CouponRepository
.
GetList
(
new
RB_Member_DiscountCoupon_Extend
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UseState
=
-
1
,
Ids
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
CouponsIds
)).
Select
(
x
=>
x
.
CouponsIds
))
});
}
//2020-08-25 Add By:W End
foreach
(
var
item
in
list
)
{
item
.
DetailList
=
dlist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
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
()));
}
}
}
}
return
list
;
}
/// <summary>
/// <summary>
/// 获取教育后台订单信息
/// 获取教育后台订单信息
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
be0e00a8
...
@@ -2094,5 +2094,128 @@ where {where} group by o.OrderId order by o.CreateDate desc";
...
@@ -2094,5 +2094,128 @@ where {where} group by o.OrderId order by o.CreateDate desc";
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
parameters
).
ToList
();
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
parameters
).
ToList
();
}
}
#
endregion
#
endregion
#
region
线下服务订单
/// <summary>
/// 线下服务订单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetOfflineServiceOrderPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Order_Extend
dmodel
)
{
var
parameters
=
new
DynamicParameters
();
string
where
=
$" 1=1 and o.
{
nameof
(
RB_Goods_Order
.
Status
)}
=0 and o.
{
nameof
(
RB_Goods_Order
.
OrderClassify
)}
=3"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
OrderId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
if
(
dmodel
.
OrderSource
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderSource
)}
=
{(
int
)
dmodel
.
OrderSource
}
"
;
}
if
(
dmodel
.
OrderType
>
0
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
OrderType
)}
=
{
dmodel
.
OrderType
}
"
;
}
if
(
dmodel
.
DeliveryMethod
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
DeliveryMethod
)}
=
{(
int
)
dmodel
.
DeliveryMethod
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
<='
{
dmodel
.
EndTime
}
23:59:59'"
;
}
if
(
dmodel
.
OrderStatus
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
=
{(
int
)
dmodel
.
OrderStatus
}
"
;
}
if
(
dmodel
.
IsNotSelectCancel
==
1
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
<>
{(
int
)
OrderStatusEnum
.
Cancel
}
"
;
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Recycled
)}
=2"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderStatusIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
in(
{
dmodel
.
OrderStatusIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderNo
)}
like @OrderNo "
;
parameters
.
Add
(
"OrderNo"
,
"%"
+
dmodel
.
OrderNo
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
MerchantsNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MerchantsNo
)}
like @MerchantsNo "
;
parameters
.
Add
(
"MerchantsNo"
,
"%"
+
dmodel
.
MerchantsNo
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
Name
)}
like @UserName "
;
parameters
.
Add
(
"UserName"
,
"%"
+
dmodel
.
UserName
.
Trim
()
+
"%"
);
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
UserId
)}
=
{(
int
)
dmodel
.
UserId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsName
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
GoodsName
)}
like '%
{
dmodel
.
GoodsName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Consignee
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Consignee
)}
like '%
{
dmodel
.
Consignee
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Mobile
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Mobile
)}
like '%
{
dmodel
.
Mobile
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ProductCode
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
AnchorName
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
AnchorName
)}
like '%
{
dmodel
.
AnchorName
}
%'"
;
}
if
(
dmodel
.
Recycled
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Recycled
)}
=
{(
int
)
dmodel
.
Recycled
}
"
;
}
if
(
dmodel
.
SmallShopsId
.
HasValue
&&
dmodel
.
SmallShopsId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
SmallShopsId
)}
=
{
dmodel
.
SmallShopsId
}
"
;
}
if
(
dmodel
.
IsSelectPayMoney
==
1
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
PaymentTime
)}
IS NOT NULL"
;
}
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 "
;
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
parameters
).
ToList
();
}
#
endregion
}
}
}
}
Mall.Repository/User/RB_StoresRepository.cs
View file @
be0e00a8
...
@@ -35,64 +35,66 @@ namespace Mall.Repository.User
...
@@ -35,64 +35,66 @@ namespace Mall.Repository.User
float
.
TryParse
(
tempArray
[
1
],
out
lat
);
float
.
TryParse
(
tempArray
[
1
],
out
lat
);
}
}
}
}
builder
.
AppendFormat
(
@" SELECT * "
);
builder
.
AppendFormat
(
@" SELECT
A.
* "
);
if
(
lng
>
0
&&
lat
>
0
)
if
(
lng
>
0
&&
lat
>
0
)
{
{
builder
.
AppendFormat
(
@",lat_lng_distance(
Lng,Lat,{0},{1}) AS KM "
,
lng
,
lat
);
builder
.
AppendFormat
(
@",lat_lng_distance(
A.Lng,A.Lat,{0},{1}) AS KM "
,
lng
,
lat
);
}
}
builder
.
AppendFormat
(
@"
builder
.
AppendFormat
(
@"
FROM RB_Stores
FROM RB_Stores AS A
WHERE 1 = 1 AND Status = 0 "
);
LEFT JOIN
(SELECT StoresId,COUNT(1) AS SCount FROM rb_goods_order where StoresId>0 AND OrderStatus<>7 GROUP BY StoresId) AS B ON A.Id=B.StoresId
WHERE 1 = 1 AND A.Status = 0 "
);
if
(
query
.
TenantId
>
0
)
if
(
query
.
TenantId
>
0
)
{
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
TenantId
),
query
.
TenantId
);
builder
.
AppendFormat
(
" AND
A.
{0}={1} "
,
nameof
(
RB_Stores_Extend
.
TenantId
),
query
.
TenantId
);
}
}
if
(
query
.
MallBaseId
>
0
)
if
(
query
.
MallBaseId
>
0
)
{
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
MallBaseId
),
query
.
MallBaseId
);
builder
.
AppendFormat
(
" AND
A.
{0}={1} "
,
nameof
(
RB_Stores_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
}
if
(
query
.
Id
>
0
)
if
(
query
.
Id
>
0
)
{
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
Id
),
query
.
Id
);
builder
.
AppendFormat
(
" AND
A.
{0}={1} "
,
nameof
(
RB_Stores_Extend
.
Id
),
query
.
Id
);
}
}
if
(
query
.
Name
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Name
.
Trim
()))
if
(
query
.
Name
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Name
.
Trim
()))
{
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Stores_Extend
.
Name
),
query
.
Name
.
Trim
());
builder
.
AppendFormat
(
" AND
A.
{0} LIKE '%{1}%' "
,
nameof
(
RB_Stores_Extend
.
Name
),
query
.
Name
.
Trim
());
}
}
if
(
query
.
OrderByType
==
1
)
if
(
query
.
OrderByType
==
1
)
{
{
builder
.
Append
(
" ORDER BY Name ASC "
);
builder
.
Append
(
" ORDER BY
A.
Name ASC "
);
}
}
else
if
(
query
.
OrderByType
==
2
)
else
if
(
query
.
OrderByType
==
2
)
{
{
builder
.
Append
(
" ORDER BY Name DESC "
);
builder
.
Append
(
" ORDER BY
A.
Name DESC "
);
}
}
else
if
(
query
.
OrderByType
==
3
)
else
if
(
query
.
OrderByType
==
3
)
{
{
if
(
lng
>
0
&&
lat
>
0
)
if
(
lng
>
0
&&
lat
>
0
)
{
{
builder
.
AppendFormat
(
" ORDER BY lat_lng_distance(
Lng,
Lat,{0},{1}) ASC "
,
lng
,
lat
);
builder
.
AppendFormat
(
" ORDER BY lat_lng_distance(
A.Lng,A.
Lat,{0},{1}) ASC "
,
lng
,
lat
);
}
}
}
}
else
if
(
query
.
OrderByType
==
4
)
else
if
(
query
.
OrderByType
==
4
)
{
{
if
(
lng
>
0
&&
lat
>
0
)
if
(
lng
>
0
&&
lat
>
0
)
{
{
builder
.
AppendFormat
(
" ORDER BY lat_lng_distance(
Lng,
Lat,{0},{1}) DESC "
,
lng
,
lat
);
builder
.
AppendFormat
(
" ORDER BY lat_lng_distance(
A.Lng,A.
Lat,{0},{1}) DESC "
,
lng
,
lat
);
}
}
}
}
else
if
(
query
.
OrderByType
==
5
)
else
if
(
query
.
OrderByType
==
5
)
{
{
builder
.
Append
(
" ORDER BY
Score
ASC "
);
builder
.
Append
(
" ORDER BY
IFNULL(B.SCount,0)
ASC "
);
}
}
else
if
(
query
.
OrderByType
==
6
)
else
if
(
query
.
OrderByType
==
6
)
{
{
builder
.
Append
(
" ORDER BY
Score
DESC "
);
builder
.
Append
(
" ORDER BY
IFNULL(B.SCount,0)
DESC "
);
}
}
else
else
{
{
builder
.
Append
(
" ORDER BY Id DESC "
);
builder
.
Append
(
" ORDER BY
A.
Id DESC "
);
}
}
return
GetPage
<
RB_Stores_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_Stores_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
}
...
...
Mall.WebApi/Controllers/BaseController.cs
View file @
be0e00a8
...
@@ -33,7 +33,12 @@ namespace Mall.WebApi.Controllers
...
@@ -33,7 +33,12 @@ namespace Mall.WebApi.Controllers
{
{
#
region
读取
post
参数
#
region
读取
post
参数
var
requestMsg
=
Request
.
HttpContext
.
Items
[
GlobalKey
.
UserPostInfo
];
var
requestMsg
=
Request
.
HttpContext
.
Items
[
GlobalKey
.
UserPostInfo
];
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
requestParm
=
new
RequestParm
();
if
(
requestMsg
!=
null
)
{
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
}
if
(
Request
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
]
!=
null
)
if
(
Request
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
]
!=
null
)
{
{
JObject
parms
=
JObject
.
Parse
(
Request
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
].
ToString
());
JObject
parms
=
JObject
.
Parse
(
Request
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
].
ToString
());
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
be0e00a8
...
@@ -1822,7 +1822,140 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1822,7 +1822,140 @@ namespace Mall.WebApi.Controllers.MallBase
#
endregion
#
endregion
#
region
线下服务订单
/// <summary>
/// 商品订单后台分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOfflineServiceOrderPage
()
{
var
parms
=
RequestParm
;
JObject
newParms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Order_Extend
demodel
=
new
RB_Goods_Order_Extend
()
{
UserName
=
newParms
.
GetStringValue
(
"UserName"
),
OrderSource
=
(
UserSourceEnum
)
newParms
.
GetInt
(
"OrderSource"
),
OrderType
=
newParms
.
GetInt
(
"OrderType"
),
OrderId
=
newParms
.
GetInt
(
"OrderId"
),
StartTime
=
newParms
.
GetStringValue
(
"StartTime"
),
EndTime
=
newParms
.
GetStringValue
(
"EndTime"
),
OrderStatus
=
(
OrderStatusEnum
)
newParms
.
GetInt
(
"OrderStatus"
),
OrderNo
=
newParms
.
GetStringValue
(
"OrderNo"
),
MerchantsNo
=
newParms
.
GetStringValue
(
"MerchantsNo"
),
UserId
=
newParms
.
GetInt
(
"UserId"
),
GoodsName
=
newParms
.
GetStringValue
(
"GoodsName"
),
Consignee
=
newParms
.
GetStringValue
(
"Consignee"
),
Recycled
=
newParms
.
GetInt
(
"Recycled"
),
AnchorName
=
newParms
.
GetStringValue
(
"AnchorName"
),
IsSelectPayMoney
=
newParms
.
GetInt
(
"IsSelectPayMoney"
,
0
)
};
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
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
{
x
.
OrderId
,
x
.
OrderNo
,
x
.
MerchantsNo
,
x
.
OrderSource
,
OrderSourceName
=
x
.
OrderSource
.
GetEnumName
(),
x
.
UserId
,
x
.
UserName
,
x
.
DeliveryMethod
,
DeliveryMethodName
=
x
.
DeliveryMethod
.
GetEnumName
(),
x
.
Income
,
x
.
FreightMoney
,
x
.
PaymentWay
,
PaymentWayName
=
x
.
PaymentWay
.
GetEnumName
(),
CouponMoney
=
x
.
CouponMoney
??
0
,
EducationMoney
=
x
.
EducationMoney
??
0
,
IntegralMoney
=
(
x
.
DetailList
!=
null
&&
x
.
DetailList
.
Any
())
?
(
x
.
DetailList
.
Sum
(
x
=>
x
.
IntegralMoney
??
0
))
:
0
,
IntegralNumber
=
(
x
.
DetailList
!=
null
&&
x
.
DetailList
.
Any
())
?
(
x
.
DetailList
.
Sum
(
x
=>
x
.
IntegralNumber
??
0
))
:
0
,
MemberDiscountCouponList
=
x
.
MemberDiscountCouponList
.
Select
(
y
=>
new
{
y
.
Name
,
y
.
MinConsumePrice
,
y
.
MaxDiscountsPrice
,
y
.
UseType
,
y
.
CouponType
,
y
.
DiscountsPrice
}),
DetailList
=
x
.
DetailList
.
Select
(
y
=>
new
{
y
.
SupplierId
,
y
.
SupplierName
,
y
.
FreightCostMoney
,
y
.
FreightMoney
,
y
.
CostMoney
,
y
.
Id
,
y
.
CoverImage
,
y
.
CoverImagePath
,
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
,
y
.
YFMoney
,
y
.
PayMoney
,
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
,
z
.
Status
,
z
.
Is_Cashier
}),
ZFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
2
).
Select
(
z
=>
new
{
z
.
FrID
,
z
.
Status
,
z
.
Is_Cashier
})
}),
x
.
Consignee
,
x
.
Mobile
,
x
.
DistrictAddress
,
x
.
ShoppingAddress
,
x
.
BuyerMessage
,
x
.
Remark
,
x
.
OrderStatus
,
OrderStatusName
=
x
.
OrderStatus
.
GetEnumName
(),
PaymentTime
=
x
.
PaymentTime
.
HasValue
?
x
.
PaymentTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
DeliveryTime
=
x
.
DeliveryTime
.
HasValue
?
x
.
DeliveryTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
ReceivingTime
=
x
.
ReceivingTime
.
HasValue
?
x
.
ReceivingTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
FinishTime
=
x
.
FinishTime
.
HasValue
?
x
.
FinishTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
Country
,
x
.
Province
,
x
.
City
,
x
.
District
,
x
.
TenantId
,
x
.
MallBaseId
,
x
.
SmallShopsId
,
x
.
SmallShopsName
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
#
endregion
#
region
修改运费成本以及商品成本、供应商
#
region
修改运费成本以及商品成本、供应商
...
...
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
View file @
be0e00a8
...
@@ -43,6 +43,8 @@ namespace Mall.WebApi.Controllers.Reserve
...
@@ -43,6 +43,8 @@ namespace Mall.WebApi.Controllers.Reserve
private
readonly
Module
.
User
.
UserModule
UserModule
=
new
Module
.
User
.
UserModule
();
private
readonly
Module
.
User
.
UserModule
UserModule
=
new
Module
.
User
.
UserModule
();
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
/// <summary>
/// <summary>
/// 线下服务首页获取当前距离最近门店
/// 线下服务首页获取当前距离最近门店
/// </summary>
/// </summary>
...
@@ -53,6 +55,7 @@ namespace Mall.WebApi.Controllers.Reserve
...
@@ -53,6 +55,7 @@ namespace Mall.WebApi.Controllers.Reserve
[
AllowAnonymous
]
[
AllowAnonymous
]
public
virtual
ApiResult
GetCurrentStore
(
object
requestMsg
)
public
virtual
ApiResult
GetCurrentStore
(
object
requestMsg
)
{
{
var
userInfo
=
AppletUserInfo
;
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
parms
.
MallBaseId
<=
0
)
if
(
parms
.
MallBaseId
<=
0
)
{
{
...
@@ -61,12 +64,34 @@ namespace Mall.WebApi.Controllers.Reserve
...
@@ -61,12 +64,34 @@ namespace Mall.WebApi.Controllers.Reserve
JObject
parm
=
JObject
.
Parse
(
parms
.
msg
.
ToString
());
JObject
parm
=
JObject
.
Parse
(
parms
.
msg
.
ToString
());
var
position
=
parm
.
GetStringValue
(
"position"
);
var
position
=
parm
.
GetStringValue
(
"position"
);
int
storeId
=
parm
.
GetInt
(
"storeId"
);
int
storeId
=
parm
.
GetInt
(
"storeId"
);
if
(
userInfo
==
null
)
{
userInfo
=
new
Common
.
AppletUserInfo
()
{
UserId
=
106259
};
}
var
storeModel
=
contentModule
.
GetStoresListModule
(
new
RB_Stores_Extend
()
var
storeModel
=
contentModule
.
GetStoresListModule
(
new
RB_Stores_Extend
()
{
{
CurrentPosition
=
position
,
CurrentPosition
=
position
,
Id
=
storeId
,
Id
=
storeId
,
MallBaseId
=
parms
.
MallBaseId
MallBaseId
=
parms
.
MallBaseId
},
isFirst
:
true
)?.
FirstOrDefault
();
},
isFirst
:
true
)?.
FirstOrDefault
();
var
consumptionObj
=
new
object
();
if
(
userInfo
!=
null
&&
userInfo
.
UserId
>
0
)
{
var
orderModel
=
orderModule
.
GetOfflineServiceOrderPageListModule
(
1
,
1
,
out
long
rowsCount
,
new
RB_Goods_Order_Extend
()
{
UserId
=
userInfo
.
UserId
,
IsNotSelectCancel
=
1
,
})?.
FirstOrDefault
();
if
(
orderModel
!=
null
&&
orderModel
.
StoresId
>
0
)
{
var
useStoreModel
=
contentModule
.
GetStoresModule
(
orderModel
.
StoresId
);
consumptionObj
=
new
{
consumptionStoreId
=
useStoreModel
?.
Id
,
consumptionStoreName
=
useStoreModel
?.
Name
};
}
}
object
result
=
new
object
result
=
new
{
{
storeInfo
=
new
storeInfo
=
new
...
@@ -78,11 +103,7 @@ namespace Mall.WebApi.Controllers.Reserve
...
@@ -78,11 +103,7 @@ namespace Mall.WebApi.Controllers.Reserve
distance
=
storeModel
?.
KM
,
distance
=
storeModel
?.
KM
,
storeCoverImg
=
storeModel
?.
CoverImg
,
storeCoverImg
=
storeModel
?.
CoverImg
,
storeNavImg
=
storeModel
?.
NavImg
,
storeNavImg
=
storeModel
?.
NavImg
,
consumptionObj
=
new
consumptionObj
{
consumptionStoreId
=
0
,
consumptionStoreName
=
"HK门店"
}
},
},
};
};
return
ApiResult
.
Success
(
data
:
result
);
return
ApiResult
.
Success
(
data
:
result
);
...
@@ -124,6 +145,7 @@ namespace Mall.WebApi.Controllers.Reserve
...
@@ -124,6 +145,7 @@ namespace Mall.WebApi.Controllers.Reserve
[
AllowAnonymous
]
[
AllowAnonymous
]
public
virtual
ApiResult
GetStoreInfo
(
object
requestMsg
)
public
virtual
ApiResult
GetStoreInfo
(
object
requestMsg
)
{
{
var
userInfo
=
AppletUserInfo
;
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
parms
.
MallBaseId
<=
0
)
if
(
parms
.
MallBaseId
<=
0
)
{
{
...
@@ -150,6 +172,24 @@ namespace Mall.WebApi.Controllers.Reserve
...
@@ -150,6 +172,24 @@ namespace Mall.WebApi.Controllers.Reserve
serviceTime
=
storeModel
.
StartTime
+
"-"
+
storeModel
.
EndTime
;
serviceTime
=
storeModel
.
StartTime
+
"-"
+
storeModel
.
EndTime
;
}
}
}
}
var
consumptionObj
=
new
object
();
if
(
userInfo
!=
null
&&
userInfo
.
UserId
>
0
)
{
var
orderModel
=
orderModule
.
GetOfflineServiceOrderPageListModule
(
1
,
1
,
out
long
rowsCount
,
new
RB_Goods_Order_Extend
()
{
UserId
=
userInfo
.
UserId
,
IsNotSelectCancel
=
1
,
})?.
FirstOrDefault
();
if
(
orderModel
!=
null
&&
orderModel
.
StoresId
>
0
)
{
var
useStoreModel
=
contentModule
.
GetStoresModule
(
orderModel
.
StoresId
);
consumptionObj
=
new
{
consumptionStoreId
=
useStoreModel
?.
Id
,
consumptionStoreName
=
useStoreModel
?.
Name
};
}
}
object
result
=
new
object
result
=
new
{
{
storeInfo
=
new
storeInfo
=
new
...
@@ -165,11 +205,7 @@ namespace Mall.WebApi.Controllers.Reserve
...
@@ -165,11 +205,7 @@ namespace Mall.WebApi.Controllers.Reserve
storeIntro
=
storeModel
?.
Intro
,
storeIntro
=
storeModel
?.
Intro
,
storeProject
=
storeModel
?.
ServiceProject
,
storeProject
=
storeModel
?.
ServiceProject
,
storeServiceTime
=
serviceTime
,
storeServiceTime
=
serviceTime
,
consumptionObj
=
new
consumptionObj
{
consumptionStoreId
=
0
,
consumptionStoreName
=
"HK门店"
}
},
},
};
};
return
ApiResult
.
Success
(
data
:
result
);
return
ApiResult
.
Success
(
data
:
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