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
71a37d5e
Commit
71a37d5e
authored
Oct 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d72c618e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
185 additions
and
141 deletions
+185
-141
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+10
-0
OrderModule_Part.cs
Mall.Module.Product/OrderModule_Part.cs
+58
-32
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+13
-9
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+0
-2
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+104
-98
No files found.
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
71a37d5e
...
@@ -380,5 +380,15 @@ namespace Mall.Model.Extend.Product
...
@@ -380,5 +380,15 @@ namespace Mall.Model.Extend.Product
/// 进阶小课堂扩展JSON对象
/// 进阶小课堂扩展JSON对象
/// </summary>
/// </summary>
public
string
EduJsonData
{
get
;
set
;
}
public
string
EduJsonData
{
get
;
set
;
}
/// <summary>
/// 进阶小课堂扩展对象
/// </summary>
public
GoodsJsonItem
EduData
{
get
;
set
;
}
/// <summary>
/// 绑定物品列表
/// </summary>
public
List
<
RB_Goods_Relevance_Extend
>
GoodsRelevanceList
{
get
;
set
;
}
}
}
}
}
Mall.Module.Product/OrderModule_Part.cs
View file @
71a37d5e
...
@@ -1700,22 +1700,33 @@ namespace Mall.Module.Product
...
@@ -1700,22 +1700,33 @@ namespace Mall.Module.Product
string
detailIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
string
detailIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
flist
=
financeRepository
.
GetList
(
new
RB_Finance_Extend
()
{
ECOrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
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
>();
List
<
RB_Material_Info_Extend
>
Mlist
=
new
List
<
RB_Material_Info_Extend
>();
if
(
dlist
.
Any
())
if
(
dlist
.
Any
())
{
{
//剑鱼兄需求 2020=07-30 再查询一次商品表
//剑鱼兄需求 2020=07-30 再查询一次商品表
string
GoodsIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
GoodsId
).
Distinct
());
string
GoodsIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
GoodsId
).
Distinct
());
//获取绑定物品列表
var
goodsRelevanceList
=
goods_RelevanceRepository
.
GetGoodsRelevanceListRepository
(
new
RB_Goods_Relevance_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
QGoodsIds
=
GoodsIds
});
var
GList
=
goodsRepository
.
GetSingleListForGoodsSubName
(
new
RB_Goods_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsIds
=
GoodsIds
},
true
);
var
GList
=
goodsRepository
.
GetSingleListForGoodsSubName
(
new
RB_Goods_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsIds
=
GoodsIds
},
true
);
#
region
查询商品申请售后
#
region
查询商品申请售后
string
OrderDetialIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
string
OrderDetialIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetailIds
=
OrderDetialIds
,
Type
=
1
,
MallBaseId
=
demodel
.
MallBaseId
,
TenantId
=
demodel
.
TenantId
});
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetailIds
=
OrderDetialIds
,
Type
=
1
,
MallBaseId
=
demodel
.
MallBaseId
,
TenantId
=
demodel
.
TenantId
});
#
endregion
#
endregion
foreach
(
var
item
in
dlist
)
foreach
(
var
item
in
dlist
)
{
{
item
.
EduData
=
goodsRepository
.
ParsingEduJsonRepository
(
item
.
EduJsonData
);
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
IsBindExpress
=
erList
.
Where
(
x
=>
x
.
OrderDetailId
==
item
.
Id
).
Any
()
?
1
:
2
;
item
.
IsBindExpress
=
erList
.
Where
(
x
=>
x
.
OrderDetailId
==
item
.
Id
).
Any
()
?
1
:
2
;
item
.
GoodsRelevanceList
=
goodsRelevanceList
?.
Where
(
qitem
=>
qitem
.
GoodsId
==
item
.
GoodsId
)?.
ToList
()
??
new
List
<
RB_Goods_Relevance_Extend
>();
item
.
GoodsSubName
=
GList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
()?.
SubName
??
""
;
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
.
FinanceList
=
flist
.
Where
(
x
=>
x
.
ECOrderDetailId
==
item
.
Id
).
ToList
();
// 2020-08-19 新增财务单据列表
...
@@ -1747,7 +1758,6 @@ namespace Mall.Module.Product
...
@@ -1747,7 +1758,6 @@ namespace Mall.Module.Product
var
arealist
=
destinationRepository
.
GetDictvalueListForIds
(
areaIds
);
var
arealist
=
destinationRepository
.
GetDictvalueListForIds
(
areaIds
);
//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
>();
List
<
RB_Member_DiscountCoupon_Extend
>
memberCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(
list
.
Any
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
CouponsIds
)))
if
(
list
.
Any
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
CouponsIds
)))
{
{
...
@@ -1762,7 +1772,6 @@ namespace Mall.Module.Product
...
@@ -1762,7 +1772,6 @@ namespace Mall.Module.Product
item
.
MemberDiscountCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
item
.
MemberDiscountCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
CouponsIds
))
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
CouponsIds
))
{
{
foreach
(
var
itemCoupons
in
item
.
CouponsIds
.
Split
(
','
))
foreach
(
var
itemCoupons
in
item
.
CouponsIds
.
Split
(
','
))
{
{
item
.
MemberDiscountCouponList
.
AddRange
(
memberCouponList
.
Where
(
x
=>
itemCoupons
==
x
.
Id
.
ToString
()));
item
.
MemberDiscountCouponList
.
AddRange
(
memberCouponList
.
Where
(
x
=>
itemCoupons
==
x
.
Id
.
ToString
()));
...
@@ -6770,8 +6779,17 @@ namespace Mall.Module.Product
...
@@ -6770,8 +6779,17 @@ namespace Mall.Module.Product
{
{
educationCouponList
=
reserveMemberCouponRepository
.
GetList
(
new
RB_Reserve_MemberCoupon_Extend
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
Ids
=
educationCouponIds
});
educationCouponList
=
reserveMemberCouponRepository
.
GetList
(
new
RB_Reserve_MemberCoupon_Extend
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
Ids
=
educationCouponIds
});
}
}
string
goodsIds
=
string
.
Join
(
","
,
dlist
.
Select
(
qitem
=>
qitem
.
GoodsId
));
var
goodsRelevanceList
=
goods_RelevanceRepository
.
GetGoodsRelevanceListRepository
(
new
RB_Goods_Relevance_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
QGoodsIds
=
goodsIds
});
foreach
(
var
item
in
dlist
)
foreach
(
var
item
in
dlist
)
{
{
item
.
GoodsRelevanceList
=
goodsRelevanceList
?.
Where
(
qitem
=>
qitem
.
GoodsId
==
item
.
GoodsId
)?.
ToList
()
??
new
List
<
RB_Goods_Relevance_Extend
>();
item
.
EduData
=
goodsRepository
.
ParsingEduJsonRepository
(
item
.
EduJsonData
);
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
IsBindExpress
=
erList
.
Where
(
x
=>
x
.
OrderDetailId
==
item
.
Id
).
Any
()
?
1
:
2
;
item
.
IsBindExpress
=
erList
.
Where
(
x
=>
x
.
OrderDetailId
==
item
.
Id
).
Any
()
?
1
:
2
;
item
.
ServicepersonalName
=
serviceList
?.
Where
(
qitem
=>
qitem
.
ID
==
item
.
ServicepersonalId
)?.
FirstOrDefault
()?.
Name
??
""
;
item
.
ServicepersonalName
=
serviceList
?.
Where
(
qitem
=>
qitem
.
ID
==
item
.
ServicepersonalId
)?.
FirstOrDefault
()?.
Name
??
""
;
...
@@ -6916,6 +6934,42 @@ namespace Mall.Module.Product
...
@@ -6916,6 +6934,42 @@ namespace Mall.Module.Product
}
}
#
endregion
2020
-
08
-
25
Add
By
:
W
End
#
endregion
2020
-
08
-
25
Add
By
:
W
End
List
<
object
>
infoList
=
new
List
<
object
>();
foreach
(
var
item
in
model
.
DetailList
)
{
infoList
.
Add
(
new
{
item
.
Id
,
item
.
GoodsName
,
item
.
CoverImage
,
item
.
CoverImagePath
,
SpecificationList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>((
item
?.
Specification
??
""
)),
item
.
Unit_Price
,
item
.
Number
,
item
.
Original_Price
,
item
.
Final_Price
,
item
.
IsBindExpress
,
item
.
FreeShippingRemarks
,
item
.
SmallShopsCostPrice
,
item
.
DeductionCommission
,
CouponMoney
=
item
.
CouponMoney
??
0
,
InsuranceMoney
=
item
.
InsuranceMoney
??
0
,
IntegralMoney
=
item
.
IntegralMoney
??
0
,
IntegralNumber
=
item
.
IntegralNumber
??
0
,
item
.
ServiceTime
,
item
.
ServiceDate
,
item
.
ServicepersonalName
,
MemberEducationCouponList
=
item
?.
ReserveCouponList
.
Select
(
z
=>
new
{
z
.
Name
,
z
.
UseHeXiao
,
z
.
HeXiao
}),
item
.
EduData
,
item
.
GoodsRelevanceList
,
});
}
return
ApiResult
.
Success
(
""
,
new
return
ApiResult
.
Success
(
""
,
new
{
{
...
@@ -7019,35 +7073,7 @@ namespace Mall.Module.Product
...
@@ -7019,35 +7073,7 @@ namespace Mall.Module.Product
SmallShopsName
=
x
.
Name
,
SmallShopsName
=
x
.
Name
,
x
.
Commission
x
.
Commission
}),
}),
DetailList
=
model
.
DetailList
.
Select
(
x
=>
new
DetailList
=
infoList
,
{
x
.
Id
,
x
.
GoodsName
,
x
.
CoverImage
,
x
.
CoverImagePath
,
SpecificationList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>((
x
?.
Specification
??
""
)),
x
.
Unit_Price
,
x
.
Number
,
x
.
Original_Price
,
x
.
Final_Price
,
x
.
IsBindExpress
,
x
.
FreeShippingRemarks
,
x
.
SmallShopsCostPrice
,
x
.
DeductionCommission
,
CouponMoney
=
x
.
CouponMoney
??
0
,
InsuranceMoney
=
x
.
InsuranceMoney
??
0
,
IntegralMoney
=
x
.
IntegralMoney
??
0
,
IntegralNumber
=
x
.
IntegralNumber
??
0
,
x
.
ServiceTime
,
x
.
ServiceDate
,
x
.
ServicepersonalName
,
MemberEducationCouponList
=
x
?.
ReserveCouponList
.
Select
(
z
=>
new
{
z
.
Name
,
z
.
UseHeXiao
,
z
.
HeXiao
}),
}),
});
});
}
}
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
71a37d5e
...
@@ -155,11 +155,12 @@ namespace Mall.Repository.Product
...
@@ -155,11 +155,12 @@ namespace Mall.Repository.Product
}
}
string
sql
=
$@"SELECT o.*,u.Name as UserName,sshop.`Name` as SmallShopsName FROM rb_goods_order o
string
sql
=
$@"
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
SELECT o.*,u.Name as UserName,sshop.`Name` as SmallShopsName
INNER JOIN rb_member_user u on o.UserId=u.Id
FROM rb_goods_order o INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
LEFT JOIN rb_smallshops_info as sshop on o.SmallShopsId=sshop.Id
INNER JOIN rb_member_user u on o.UserId=u.Id
where
{
where
}
group by o.OrderId order by o.CreateDate desc"
;
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
();
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
parameters
).
ToList
();
}
}
...
@@ -1127,10 +1128,13 @@ LEFT JOIN rb_goods as c on a.GoodsId=c.Id {where}
...
@@ -1127,10 +1128,13 @@ LEFT JOIN rb_goods as c on a.GoodsId=c.Id {where}
{
{
where
+=
$" AND DATE_FORMAT(b.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
,'%Y-%m-%d' )<= DATE_FORMAT('
{
dmodel
.
EndDate
}
','%Y-%m-%d' )"
;
where
+=
$" AND DATE_FORMAT(b.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
,'%Y-%m-%d' )<= DATE_FORMAT('
{
dmodel
.
EndDate
}
','%Y-%m-%d' )"
;
}
}
string
sql
=
$@" SELECT MAX(c.`Name`) as Name,SUM(a.Final_Price) as PayMoney ,SUM(a.Number) as BuyNum from rb_goods_orderdetail as a
string
sql
=
$@"
LEFT JOIN rb_goods_order as b on a.OrderId=b.OrderId
SELECT MAX(c.`Name`) as Name,SUM(a.Final_Price) as PayMoney ,SUM(a.Number) as BuyNum
LEFT JOIN rb_member_user as c on b.UserId=c.Id
from rb_goods_orderdetail as a LEFT JOIN rb_goods_order as b on a.OrderId=b.OrderId
GROUP BY c.Id ORDER BY SUM(a.Final_Price) desc LIMIT 100 "
;
LEFT JOIN rb_member_user as c on b.UserId=c.Id
GROUP BY c.Id
ORDER BY SUM(a.Final_Price) desc
LIMIT 100 "
;
return
Get
<
DataStatistics_Query
>(
sql
).
ToList
();
return
Get
<
DataStatistics_Query
>(
sql
).
ToList
();
}
}
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
71a37d5e
...
@@ -722,8 +722,6 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -722,8 +722,6 @@ namespace Mall.WebApi.Controllers.MallBase
{
{
openId
=
Common
.
Plugin
.
WeiXinHelper
.
GetWeChatOpenId
(
miniProgram
.
MiniAppId
,
miniProgram
.
MiniAppSecret
,
code
);
openId
=
Common
.
Plugin
.
WeiXinHelper
.
GetWeChatOpenId
(
miniProgram
.
MiniAppId
,
miniProgram
.
MiniAppSecret
,
code
);
}
}
//string newOpenId = "oyEzY5J8llEXYMeC2O7Y06g2SO4M";
//Common.Plugin.WeiXinHelper.GetWeChat(miniProgram.MiniAppId, miniProgram.MiniAppSecret, newOpenId);
}
}
var
newGuid
=
"MiniAppOpenId_"
+
Guid
.
NewGuid
().
ToString
();
var
newGuid
=
"MiniAppOpenId_"
+
Guid
.
NewGuid
().
ToString
();
var
miniAppUserCache
=
new
MiniAppUserCache
()
var
miniAppUserCache
=
new
MiniAppUserCache
()
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
71a37d5e
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