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
70b11cf0
Commit
70b11cf0
authored
Aug 25, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交订单信息
parent
71fafe99
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
25 deletions
+108
-25
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+8
-1
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+79
-21
CouponController.cs
Mall.WebApi/Controllers/MarketingCenter/CouponController.cs
+1
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+19
-3
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+1
-0
No files found.
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
70b11cf0
...
...
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Common.Enum.Goods
;
using
Mall.Model.Entity.User
;
namespace
Mall.Model.Extend.Product
{
...
...
@@ -114,6 +115,12 @@ namespace Mall.Model.Extend.Product
/// 订单返佣列表
/// </summary>
public
List
<
RB_SmallShops_Commission_Extend
>
SmallShopsCommissionOrderList
{
get
;
set
;
}
/// <summary>
/// 优惠券信息 //2020-08-25 Add By:w
/// </summary>
public
List
<
User
.
RB_Member_DiscountCoupon_Extend
>
MemberDiscountCouponList
{
get
;
set
;
}
/// <summary>
/// 是否发放佣金 1是 2否
/// </summary>
...
...
@@ -178,7 +185,7 @@ namespace Mall.Model.Extend.Product
/// <summary>
/// 成本价
/// </summary>
public
decimal
CostMoneyImport
{
get
;
set
;
}
public
decimal
CostMoneyImport
{
get
;
set
;
}
/// <summary>
/// 支付方式
/// </summary>
...
...
Mall.Module.Product/OrderModule.cs
View file @
70b11cf0
...
...
@@ -704,7 +704,8 @@ namespace Mall.Module.Product
foreach
(
var
item
in
list
)
{
item
.
DetailList
=
dlist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
if
(
item
.
DetailList
.
Where
(
x
=>
x
.
PresentFXGrade
>
0
).
Any
())
{
if
(
item
.
DetailList
.
Where
(
x
=>
x
.
PresentFXGrade
>
0
).
Any
())
{
item
.
PresentFXGrade
=
1
;
}
item
.
DistrictAddress
=
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
Province
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
City
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
District
).
FirstOrDefault
()?.
Name
??
""
);
...
...
@@ -768,7 +769,8 @@ namespace Mall.Module.Product
{
item
.
IsApplyForAfterSale
=
1
;
}
if
(
item
.
PresentFXGrade
>
0
)
{
if
(
item
.
PresentFXGrade
>
0
)
{
model
.
PresentFXGrade
=
1
;
}
}
...
...
@@ -2852,9 +2854,11 @@ namespace Mall.Module.Product
{
return
ApiResult
.
Failed
(
"有商品不存在或者商品已失效"
);
}
if
(
gmodel
.
PresentFXGrade
>
0
)
{
if
(
gmodel
.
PresentFXGrade
>
0
)
{
//是赠送VIP商品
if
(
demodel
.
DetailList
.
Count
()
>
1
)
{
if
(
demodel
.
DetailList
.
Count
()
>
1
)
{
//多商品
return
ApiResult
.
Failed
(
"VIP商品不能与其他商品同时下单,请先购买VIP商品"
);
}
...
...
@@ -3553,7 +3557,8 @@ namespace Mall.Module.Product
demodel
.
CompanyProfitRate
=
0
;
demodel
.
CompanyId
=
0
;
var
pUserId
=
member_UserRepository
.
GetMemberFristParentren
(
demodel
.
UserId
??
0
);
if
(
pUserId
>
0
)
{
if
(
pUserId
>
0
)
{
var
pumodel
=
member_UserRepository
.
GetEntity
(
pUserId
);
demodel
.
CompanyProfitRate
=
pumodel
.
CompanyProfitRate
;
demodel
.
CompanyId
=
pUserId
;
...
...
@@ -5932,7 +5937,7 @@ namespace Mall.Module.Product
item
.
GoodsSubName
=
GList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
()?.
SubName
??
""
;
item
.
FinanceList
=
flist
.
Where
(
x
=>
x
.
ECOrderDetailId
==
item
.
Id
).
ToList
();
// 2020-08-19 新增财务单据列表
}
}
}
string
areaIds1
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Province
??
0
).
Distinct
());
string
areaIds2
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
City
??
0
).
Distinct
());
...
...
@@ -5951,11 +5956,30 @@ namespace Mall.Module.Product
areaIds
+=
","
+
areaIds3
;
}
var
arealist
=
destinationRepository
.
GetDictvalueListForIds
(
areaIds
);
//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
.
DistrictAddress
=
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
Province
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
City
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
District
).
FirstOrDefault
()?.
Name
??
""
);
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
;
...
...
@@ -5991,16 +6015,20 @@ namespace Mall.Module.Product
int
accountNum
=
accountIdList
.
Count
();
string
orderdetailIds
=
string
.
Join
(
","
,
orderdetailIdList
);
var
list
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderDetailIds
=
orderdetailIds
});
foreach
(
var
item
in
list
)
{
if
(
item
.
LivePeopleNum
!=
accountNum
)
{
foreach
(
var
item
in
list
)
{
if
(
item
.
LivePeopleNum
!=
accountNum
)
{
return
"订单:"
+
item
.
OrderId
+
"主播数量不正确"
;
}
if
(!
string
.
IsNullOrEmpty
(
item
.
LiveFinanceIds
))
{
if
(!
string
.
IsNullOrEmpty
(
item
.
LiveFinanceIds
))
{
return
"订单:"
+
item
.
OrderId
+
" 已生成单据,无法再次生成"
;
}
}
List
<
RB_Goods_Order_Extend
>
OrderList
=
new
List
<
RB_Goods_Order_Extend
>();
if
(
list
.
Any
())
{
if
(
list
.
Any
())
{
string
orderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
).
Distinct
());
OrderList
=
goods_OrderRepository
.
GetOrderList
(
new
RB_Goods_Order_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderIds
=
orderIds
});
}
...
...
@@ -6029,7 +6057,7 @@ namespace Mall.Module.Product
Number
=
1
,
OriginalMoney
=
dMoney
,
UnitPrice
=
dMoney
,
Remark
=
qitem
.
GoodsName
+
" "
+
qitem
.
Specification
+
" "
+
(
orderModel
?.
OrderNo
??
""
)
Remark
=
qitem
.
GoodsName
+
" "
+
qitem
.
Specification
+
" "
+
(
orderModel
?.
OrderNo
??
""
)
});
ECList
.
Add
(
new
{
...
...
@@ -6037,7 +6065,8 @@ namespace Mall.Module.Product
ECOrderDetailId
=
qitem
.
Id
});
}
foreach
(
var
aitem
in
accountIdList
)
{
foreach
(
var
aitem
in
accountIdList
)
{
var
financeObj
=
new
{
CreateBy
=
erpEmpId
>
0
?
erpEmpId
.
ToString
()
:
Config
.
ExpendDirector
,
...
...
@@ -6052,7 +6081,7 @@ namespace Mall.Module.Product
OrderSource
=
16
,
OtherType
=
20
,
ReFinanceId
=
0
,
Remark
=
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据(主播订单佣金) 直播日期:"
+
LiveTime
,
Remark
=
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据(主播订单佣金) 直播日期:"
+
LiveTime
,
detailList
,
RB_Depart_Id
=
Config
.
ExpendDepartment
,
ECOrderList
=
ECList
...
...
@@ -6065,7 +6094,8 @@ namespace Mall.Module.Product
string
apiResult
=
Mall
.
Common
.
Plugin
.
HttpHelper
.
HttpPost
(
Config
.
PaymentFinanceApi
,
JsonHelper
.
Serialize
(
resultInfo
),
""
);
var
apir
=
JsonConvert
.
DeserializeObject
<
ApiResult
>(
apiResult
);
if
(
apir
.
resultCode
==
1
)
{
if
(
apir
.
resultCode
==
1
)
{
FinanceIds
.
Add
(
Convert
.
ToInt32
(
apir
.
data
.
ToString
()));
}
}
...
...
@@ -6073,7 +6103,8 @@ namespace Mall.Module.Product
if
(
FinanceIds
.
Any
())
{
string
financeIds2
=
string
.
Join
(
","
,
FinanceIds
);
foreach
(
var
qitem
in
list
)
{
foreach
(
var
qitem
in
list
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_OrderDetail
.
LiveFinanceIds
),
financeIds2
}
};
...
...
@@ -8426,7 +8457,7 @@ namespace Mall.Module.Product
{
//验证是否是自动结算
var
ssbaseModel
=
microShop_BasicsRepository
.
GetMicroShopBasicsList
(
new
Model
.
Entity
.
BaseSetUp
.
RB_MicroShop_Basics
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
}).
FirstOrDefault
();
if
((
","
+(
ssbaseModel
?.
SettlementType
??
""
)+
","
).
Contains
(
","
+((
int
)
DistrbutorWithdrawWayEnum
.
ZDXJ
).
ToString
()+
","
))
if
((
","
+
(
ssbaseModel
?.
SettlementType
??
""
)
+
","
).
Contains
(
","
+
((
int
)
DistrbutorWithdrawWayEnum
.
ZDXJ
).
ToString
()
+
","
))
{
var
ssmodel
=
ssList
.
FirstOrDefault
();
//获取微店信息
...
...
@@ -9045,7 +9076,8 @@ namespace Mall.Module.Product
keyValues
.
Add
(
nameof
(
RB_Goods_OrderDetail
.
YFMoney
),
(
model
.
YFMoney
??
0
)
+
money
);
}
}
else
{
else
{
if
(
otherType
==
21
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_OrderDetail
.
RealMoney
),
(
model
.
RealMoney
??
0
)
+
money
);
...
...
@@ -9131,7 +9163,7 @@ namespace Mall.Module.Product
if
(
flag
)
{
//记录日志
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
{
Content
=
"修改订单商品:"
+
item
.
GoodsName
+
((
type
==
1
||
type
==
2
)
?
(
"主播人数:"
+
LivePeopleNum
+
"原主播人数:"
+
item
.
LivePeopleNum
)
:
""
)
+
((
type
==
1
||
type
==
3
)
?
(
"主播返佣金额:"
+
LiveCommission
+
"原佣金:"
+
item
.
LiveCommission
)
:
""
),
CreateDate
=
DateTime
.
Now
,
...
...
@@ -9140,7 +9172,7 @@ namespace Mall.Module.Product
SourceId
=
item
.
OrderId
,
TenantId
=
tenantId
,
Type
=
1
},
trans
);
},
trans
);
}
}
goods_OrderDetailRepository
.
DBSession
.
Commit
();
...
...
@@ -9392,6 +9424,17 @@ namespace Mall.Module.Product
}
#
endregion
#
region
优惠券
2020
-
08
-
25
Add
By
:
W
Start
List
<
RB_Member_DiscountCoupon_Extend
>
memberCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
CouponsIds
))
{
memberCouponList
=
member_CouponRepository
.
GetList
(
new
RB_Member_DiscountCoupon_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UseState
=
-
1
,
Ids
=
model
.
CouponsIds
});
}
#
endregion
2020
-
08
-
25
Add
By
:
W
End
return
ApiResult
.
Success
(
""
,
new
{
model
.
OrderId
,
...
...
@@ -9407,8 +9450,19 @@ namespace Mall.Module.Product
model
.
BuyerMessage
,
model
.
PreferPrice
,
model
.
Income
,
model
.
CouponMoney
,
model
.
FreightMoney
,
CouponMoney
=
model
.
CouponMoney
??
0
,
IntegralMoney
=
(
model
.
DetailList
!=
null
&&
model
.
DetailList
.
Any
())
?
(
model
.
DetailList
.
Sum
(
x
=>
x
.
IntegralMoney
??
0
))
:
0
,
IntegralNumber
=
(
model
.
DetailList
!=
null
&&
model
.
DetailList
.
Any
())
?
(
model
.
DetailList
.
Sum
(
x
=>
x
.
IntegralNumber
??
0
))
:
0
,
MemberDiscountCouponList
=
memberCouponList
.
Select
(
y
=>
new
{
y
.
Name
,
y
.
MinConsumePrice
,
y
.
MaxDiscountsPrice
,
y
.
UseType
,
y
.
CouponType
,
y
.
DiscountsPrice
}),
OrderInfo
=
new
{
model
.
OrderNo
,
...
...
@@ -9428,6 +9482,7 @@ namespace Mall.Module.Product
model
.
District
,
model
.
SmallShopsName
,
model
.
SmallShopsId
,
OrderExpressList
=
oeList
.
Select
(
x
=>
new
{
x
.
Id
,
...
...
@@ -9489,7 +9544,10 @@ namespace Mall.Module.Product
x
.
Final_Price
,
x
.
IsBindExpress
,
x
.
FreeShippingRemarks
,
x
.
SmallShopsCostPrice
x
.
SmallShopsCostPrice
,
CouponMoney
=
x
.
CouponMoney
??
0
,
IntegralMoney
=
x
.
IntegralMoney
??
0
,
IntegralNumber
=
x
.
IntegralNumber
??
0
,
})
});
}
...
...
Mall.WebApi/Controllers/MarketingCenter/CouponController.cs
View file @
70b11cf0
...
...
@@ -429,6 +429,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
memberCoupon
.
MallBaseId
=
oldLogisticsModel
.
MallBaseId
;
memberCoupon
.
Remarks
=
""
;
memberCoupon
.
CouponId
=
oldLogisticsModel
.
ID
;
memberCoupon
.
Name
=
oldLogisticsModel
.
Name
;
if
(
oldLogisticsModel
.
IndateType
==
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
)
{
memberCoupon
.
StartDate
=
System
.
DateTime
.
Now
;
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
70b11cf0
...
...
@@ -93,9 +93,20 @@ namespace Mall.WebApi.Controllers.MallBase
DeliveryMethodName
=
x
.
DeliveryMethod
.
GetEnumName
(),
x
.
Income
,
x
.
FreightMoney
,
x
.
CouponMoney
,
x
.
PaymentWay
,
PaymentWayName
=
x
.
PaymentWay
.
GetEnumName
(),
CouponMoney
=
x
.
CouponMoney
??
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
,
...
...
@@ -120,12 +131,17 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
RealMoney
,
y
.
YFMoney
,
y
.
PayMoney
,
SFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
1
).
Select
(
z
=>
new
{
CouponMoney
=
y
.
CouponMoney
??
0
,
IntegralMoney
=
y
.
IntegralMoney
??
0
,
IntegralNumber
=
y
.
IntegralNumber
??
0
,
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
{
ZFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
2
).
Select
(
z
=>
new
{
z
.
FrID
,
z
.
Status
,
z
.
Is_Cashier
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
70b11cf0
...
...
@@ -1053,6 +1053,7 @@ namespace Mall.WebApi.Controllers.User
memberCoupon
.
MallBaseId
=
userInfo
.
MallBaseId
;
memberCoupon
.
Remarks
=
""
;
memberCoupon
.
CouponId
=
oldLogisticsModel
.
ID
;
memberCoupon
.
Name
=
oldLogisticsModel
.
Name
;
if
(
oldLogisticsModel
.
IndateType
==
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
)
{
memberCoupon
.
StartDate
=
System
.
DateTime
.
Now
;
...
...
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