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
64ddbd57
Commit
64ddbd57
authored
Aug 18, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
3b83c283
28b4a61f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
181 additions
and
2 deletions
+181
-2
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+4
-0
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+8
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+48
-2
RB_Goods_OrderDetailRepository.cs
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
+26
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+89
-0
SmallShopsController.cs
Mall.WebApi/Controllers/User/SmallShopsController.cs
+3
-0
UserController.cs
Mall.WebApi/Controllers/User/UserController.cs
+3
-0
No files found.
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
64ddbd57
...
@@ -246,5 +246,9 @@ namespace Mall.Model.Entity.Product
...
@@ -246,5 +246,9 @@ namespace Mall.Model.Entity.Product
/// 主播佣金生成的财务单据 逗号分隔
/// 主播佣金生成的财务单据 逗号分隔
/// </summary>
/// </summary>
public
string
LiveFinanceIds
{
get
;
set
;
}
public
string
LiveFinanceIds
{
get
;
set
;
}
/// <summary>
/// 主播数量
/// </summary>
public
int
?
LivePeopleNum
{
get
;
set
;
}
}
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
64ddbd57
...
@@ -13,6 +13,14 @@ namespace Mall.Model.Extend.Product
...
@@ -13,6 +13,14 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_OrderDetail_Extend
:
RB_Goods_OrderDetail
public
class
RB_Goods_OrderDetail_Extend
:
RB_Goods_OrderDetail
{
{
/// <summary>
/// 是否直播订单
/// </summary>
public
int
?
IsLiveOrder
{
get
;
set
;
}
/// <summary>
/// 单据状态 1已制单 2未制单
/// </summary>
public
int
?
FinanceStatus
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 会员优惠
/// 会员优惠
/// </summary>
/// </summary>
...
...
Mall.Module.Product/OrderModule.cs
View file @
64ddbd57
...
@@ -2851,6 +2851,7 @@ namespace Mall.Module.Product
...
@@ -2851,6 +2851,7 @@ namespace Mall.Module.Product
item
.
ProductCode
=
gmodel
.
GoodsNumbers
;
item
.
ProductCode
=
gmodel
.
GoodsNumbers
;
item
.
CategoryIdList
=
categoryList
.
Select
(
x
=>
x
.
CategoryId
??
0
).
ToList
();
item
.
CategoryIdList
=
categoryList
.
Select
(
x
=>
x
.
CategoryId
??
0
).
ToList
();
int
GoodsWeight
=
gmodel
.
GoodsWeight
??
0
;
//商品重量
int
GoodsWeight
=
gmodel
.
GoodsWeight
??
0
;
//商品重量
#
region
规格
#
region
规格
//验证规格是否已失效
//验证规格是否已失效
if
(
gmodel
.
IsCustomSpecification
==
1
)
if
(
gmodel
.
IsCustomSpecification
==
1
)
...
@@ -3027,6 +3028,15 @@ namespace Mall.Module.Product
...
@@ -3027,6 +3028,15 @@ namespace Mall.Module.Product
}
}
#
endregion
#
endregion
#
region
直播返佣
item
.
LiveCommission
=
0
;
item
.
LiveFinanceIds
=
""
;
if
(
gmodel
.
IsLiveGoods
==
1
)
{
item
.
LiveCommission
=
(
item
.
CommissionPrice
/
4
)
*
(
item
.
Number
??
0
);
}
#
endregion
item
.
SmallShopsCostPrice
=
(
item
.
SmallShopsCostPrice
??
0
)
*
(
item
.
Number
??
0
);
item
.
SmallShopsCostPrice
=
(
item
.
SmallShopsCostPrice
??
0
)
*
(
item
.
Number
??
0
);
item
.
NorGoodsMoney
=
item
.
Final_Price
??
0
;
//用于计算 运费的 202-08-05 ld
item
.
NorGoodsMoney
=
item
.
Final_Price
??
0
;
//用于计算 运费的 202-08-05 ld
item
.
GoodsWeight
=
GoodsWeight
;
item
.
GoodsWeight
=
GoodsWeight
;
...
@@ -5054,7 +5064,11 @@ namespace Mall.Module.Product
...
@@ -5054,7 +5064,11 @@ namespace Mall.Module.Product
PresentFXGrade
=
item
.
PresentFXGrade
,
PresentFXGrade
=
item
.
PresentFXGrade
,
PresentFXMonth
=
item
.
PresentFXMonth
,
PresentFXMonth
=
item
.
PresentFXMonth
,
FreeShippingRemarks
=
item
.
FreeShippingRemarks
,
FreeShippingRemarks
=
item
.
FreeShippingRemarks
,
SmallShopsCostPrice
=
item
.
SmallShopsCostPrice
SmallShopsCostPrice
=
item
.
SmallShopsCostPrice
,
PaidCostMoney
=
0
,
LiveCommission
=
item
.
LiveCommission
,
LiveFinanceIds
=
""
,
LivePeopleNum
=
1
},
trans
);
},
trans
);
item
.
Id
=
detailId
;
item
.
Id
=
detailId
;
if
(
detailId
>
0
&&
SatisfiedGoodsList
.
Any
())
if
(
detailId
>
0
&&
SatisfiedGoodsList
.
Any
())
...
@@ -5898,6 +5912,38 @@ namespace Mall.Module.Product
...
@@ -5898,6 +5912,38 @@ namespace Mall.Module.Product
return
list
;
return
list
;
}
}
/// <summary>
/// 获取直播订单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderDetail_Extend
>
GetLiveGoodsOrderPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_OrderDetail_Extend
demodel
)
{
//查询订单明细
var
dlist
=
goods_OrderDetailRepository
.
GetSupplierOrderPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
return
dlist
;
}
/// <summary>
/// 直播订单创建财务单据
/// </summary>
/// <param name="isPublic"></param>
/// <param name="accountIdList"></param>
/// <param name="orderdetailIdList"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <param name="eRPEmpId"></param>
/// <returns></returns>
public
string
SetLiveGoodsOrderFinance
(
int
isPublic
,
List
<
int
>
accountIdList
,
List
<
int
>
orderdetailIdList
,
int
tenantId
,
int
mallBaseId
,
int
eRPEmpId
)
{
string
orderdetailIds
=
string
.
Join
(
","
,
orderdetailIdList
);
return
""
;
}
/// <summary>
/// <summary>
/// 获取分销订单
/// 获取分销订单
/// </summary>
/// </summary>
...
...
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
View file @
64ddbd57
...
@@ -157,6 +157,19 @@ namespace Mall.Repository.Product
...
@@ -157,6 +157,19 @@ namespace Mall.Repository.Product
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
}
}
if
(
dmodel
.
IsLiveOrder
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveCommission
)}
>0"
;
}
if
(
dmodel
.
FinanceStatus
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveFinanceIds
)}
<> ''"
;
}
else
if
(
dmodel
.
FinanceStatus
==
2
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveFinanceIds
)}
= ''"
;
}
string
sql
=
$@"SELECT od.*,o.OrderNo FROM rb_goods_orderdetail od
string
sql
=
$@"SELECT od.*,o.OrderNo FROM rb_goods_orderdetail od
INNER JOIN rb_goods_order o on o.OrderId=od.OrderId
INNER JOIN rb_goods_order o on o.OrderId=od.OrderId
where
{
where
}
order by o.CreateDate desc"
;
where
{
where
}
order by o.CreateDate desc"
;
...
@@ -268,6 +281,19 @@ where {where} order by o.CreateDate desc";
...
@@ -268,6 +281,19 @@ where {where} order by o.CreateDate desc";
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
}
}
if
(
dmodel
.
IsLiveOrder
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveCommission
)}
>0"
;
}
if
(
dmodel
.
FinanceStatus
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveFinanceIds
)}
<> ''"
;
}
else
if
(
dmodel
.
FinanceStatus
==
2
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveFinanceIds
)}
= ''"
;
}
string
sql
=
$@"SELECT od.*,o.OrderNo FROM rb_goods_orderdetail od
string
sql
=
$@"SELECT od.*,o.OrderNo FROM rb_goods_orderdetail od
INNER JOIN rb_goods_order o on o.OrderId=od.OrderId
INNER JOIN rb_goods_order o on o.OrderId=od.OrderId
where
{
where
}
order by o.CreateDate desc"
;
where
{
where
}
order by o.CreateDate desc"
;
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
64ddbd57
...
@@ -1103,6 +1103,95 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1103,6 +1103,95 @@ namespace Mall.WebApi.Controllers.MallBase
#
endregion
#
endregion
#
region
主播返佣
/// <summary>
/// 直播订单后台分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetLiveGoodsOrderPageList
()
{
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_OrderDetail_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_OrderDetail_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
orderModule
.
GetLiveGoodsOrderPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
y
=>
new
{
y
.
OrderId
,
y
.
OrderNo
,
OrderDetailId
=
y
.
Id
,
y
.
CoverImage
,
y
.
GoodsName
,
SpecificationList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
y
.
Specification
),
y
.
Final_Price
,
y
.
Number
,
y
.
Unit_Price
,
y
.
LiveCommission
,
y
.
LivePeopleNum
,
y
.
LiveFinanceIds
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 直播订单创建财务单据
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetLiveGoodsOrderFinance
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
IsPublic
=
parms
.
GetInt
(
"IsPublic"
,
0
);
//账户类型
string
AccountIds
=
parms
.
GetStringValue
(
"AccountIds"
);
//账户ids
string
OrderDetailIds
=
parms
.
GetStringValue
(
"OrderDetailIds"
);
//订单明细ids
if
(
string
.
IsNullOrEmpty
(
AccountIds
))
{
return
ApiResult
.
ParamIsNull
(
"账户不存在"
);
}
if
(
string
.
IsNullOrEmpty
(
OrderDetailIds
))
{
return
ApiResult
.
ParamIsNull
(
"订单明细不存在"
);
}
List
<
int
>
AccountIdList
=
new
List
<
int
>();
List
<
int
>
OrderdetailIdList
=
new
List
<
int
>();
try
{
AccountIdList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
AccountIds
);
}
catch
(
Exception
)
{
return
ApiResult
.
ParamIsNull
(
"账户格式有误"
);
}
try
{
OrderdetailIdList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
OrderDetailIds
);
}
catch
(
Exception
)
{
return
ApiResult
.
ParamIsNull
(
"订单明细格式有误"
);
}
if
(!
AccountIdList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请选择账户"
);
}
if
(!
OrderdetailIdList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请选择订单列表"
);
}
string
msg
=
orderModule
.
SetLiveGoodsOrderFinance
(
IsPublic
,
AccountIdList
,
OrderdetailIdList
,
req
.
TenantId
,
req
.
MallBaseId
,
req
.
ERPEmpId
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
#
region
会员购买
#
region
会员购买
/// <summary>
/// <summary>
...
...
Mall.WebApi/Controllers/User/SmallShopsController.cs
View file @
64ddbd57
...
@@ -236,6 +236,9 @@ namespace Mall.WebApi.Controllers.User
...
@@ -236,6 +236,9 @@ namespace Mall.WebApi.Controllers.User
var
parms
=
JObject
.
Parse
(
re
.
msg
.
ToString
());
var
parms
=
JObject
.
Parse
(
re
.
msg
.
ToString
());
int
RemitId
=
parms
.
GetInt
(
"RemitId"
,
0
);
int
RemitId
=
parms
.
GetInt
(
"RemitId"
,
0
);
int
ErpEmpId
=
parms
.
GetInt
(
"ErpEmpId"
,
0
);
//erp用户id
int
ErpEmpId
=
parms
.
GetInt
(
"ErpEmpId"
,
0
);
//erp用户id
if
(
ErpEmpId
<=
0
)
{
ErpEmpId
=
re
.
ERPEmpId
;
}
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
//1审核通过 2打款 3驳回
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
//1审核通过 2打款 3驳回
string
Remark
=
parms
.
GetStringValue
(
"Remark"
);
string
Remark
=
parms
.
GetStringValue
(
"Remark"
);
if
(
RemitId
<=
0
)
if
(
RemitId
<=
0
)
...
...
Mall.WebApi/Controllers/User/UserController.cs
View file @
64ddbd57
...
@@ -1873,6 +1873,9 @@ namespace Mall.WebApi.Controllers.User
...
@@ -1873,6 +1873,9 @@ namespace Mall.WebApi.Controllers.User
var
parms
=
JObject
.
Parse
(
re
.
msg
.
ToString
());
var
parms
=
JObject
.
Parse
(
re
.
msg
.
ToString
());
int
RemitId
=
parms
.
GetInt
(
"RemitId"
,
0
);
int
RemitId
=
parms
.
GetInt
(
"RemitId"
,
0
);
int
ErpEmpId
=
parms
.
GetInt
(
"ErpEmpId"
,
0
);
//erp用户id
int
ErpEmpId
=
parms
.
GetInt
(
"ErpEmpId"
,
0
);
//erp用户id
if
(
ErpEmpId
<=
0
)
{
ErpEmpId
=
re
.
ERPEmpId
;
}
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
//1审核通过 2打款 3驳回
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
//1审核通过 2打款 3驳回
string
Remark
=
parms
.
GetStringValue
(
"Remark"
);
string
Remark
=
parms
.
GetStringValue
(
"Remark"
);
if
(
RemitId
<=
0
)
if
(
RemitId
<=
0
)
...
...
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