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
7a6ccd88
Commit
7a6ccd88
authored
May 14, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序下单
parent
2ab772a8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
939 additions
and
9 deletions
+939
-9
RB_Goods_Order.cs
Mall.Model/Entity/Product/RB_Goods_Order.cs
+8
-0
RB_DiscountCoupon_Extend.cs
....Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
+4
-0
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+24
-0
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+2
-1
RB_Member_DiscountCoupon_Extend.cs
Mall.Model/Extend/User/RB_Member_DiscountCoupon_Extend.cs
+4
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+825
-6
RB_DiscountCouponRepository.cs
...Repository/MarketingCenter/RB_DiscountCouponRepository.cs
+4
-0
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+24
-0
RB_Member_CouponRepository.cs
Mall.Repository/User/RB_Member_CouponRepository.cs
+38
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+4
-1
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+2
-1
No files found.
Mall.Model/Entity/Product/RB_Goods_Order.cs
View file @
7a6ccd88
...
...
@@ -268,6 +268,14 @@ namespace Mall.Model.Entity.Product
/// </summary>
public
DateTime
?
ReceivingTime
{
get
;
set
;
}
/// <summary>
/// 完成时间
/// </summary>
public
DateTime
?
FinishTime
{
get
;
set
;
}
/// <summary>
/// 取消时间
/// </summary>
public
DateTime
?
CancelTime
{
get
;
set
;
}
/// <summary>
/// 是否申请取消订单 1是 2否
/// </summary>
public
int
?
IsApplyForCancel
{
get
;
set
;
}
...
...
Mall.Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
View file @
7a6ccd88
...
...
@@ -27,6 +27,10 @@ namespace Mall.Model.Extend.MarketingCenter
/// 发放数量
/// </summary>
public
int
GrantNum
{
get
;
set
;
}
/// <summary>
/// 优惠卷ids
/// </summary>
public
string
CouponIds
{
get
;
set
;
}
/// <summary>
/// 会员等级
...
...
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
7a6ccd88
...
...
@@ -29,5 +29,29 @@ namespace Mall.Model.Extend.Product
/// 是否已发货
/// </summary>
public
int
?
IsBindExpress
{
get
;
set
;
}
/// <summary>
/// 商品分类ids
/// </summary>
public
List
<
int
>
CategoryIdList
{
get
;
set
;
}
/// <summary>
/// 剩余库存
/// </summary>
public
int
InventoryNum
{
get
;
set
;
}
/// <summary>
/// 规格价格列表id
/// </summary>
public
int
SpeciPriceId
{
get
;
set
;
}
/// <summary>
/// 是否开启单独返佣 1是 2否
/// </summary>
public
int
?
SeparateDistribution
{
get
;
set
;
}
/// <summary>
/// 分销类型 1普通 2详细
/// </summary>
public
int
?
SeparateDistributionType
{
get
;
set
;
}
/// <summary>
/// 分销佣金类型 1百分比 2固定值
/// </summary>
public
int
?
SeparateDistributionMoneyType
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
7a6ccd88
...
...
@@ -13,10 +13,11 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Order_Extend
:
RB_Goods_Order
{
public
int
?
IsFormShoppingCart
{
get
;
set
;
}
/// <summary>
/// 收货地址id
/// </summary>
public
int
?
Sh
i
ppingAddressId
{
get
;
set
;
}
public
int
?
Sh
o
ppingAddressId
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
...
...
Mall.Model/Extend/User/RB_Member_DiscountCoupon_Extend.cs
View file @
7a6ccd88
...
...
@@ -53,5 +53,9 @@ namespace Mall.Model.Extend.User
/// 下单结束时间
/// </summary>
public
DateTime
?
EndDate
{
get
;
set
;
}
/// <summary>
/// 优惠卷ids
/// </summary>
public
string
CouponIds
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
7a6ccd88
This diff is collapsed.
Click to expand it.
Mall.Repository/MarketingCenter/RB_DiscountCouponRepository.cs
View file @
7a6ccd88
...
...
@@ -71,6 +71,10 @@ namespace Mall.Repository.MarketingCenter
{
builder
.
Append
(
$" AND
{
nameof
(
RB_DiscountCoupon_Extend
.
Name
)}
like '%
{
query
.
Name
}
%'"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_DiscountCoupon_Extend
.
ID
)}
in(
{
query
.
CouponIds
}
)"
);
}
}
return
Get
<
RB_DiscountCoupon_Extend
>(
builder
.
ToString
()).
ToList
();
}
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
7a6ccd88
...
...
@@ -273,5 +273,29 @@ inner join rb_goods_category c on g.Id=c.GoodsId
where
{
where
}
group by g.Id order by col.Id desc"
;
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
public
List
<
RB_Goods_Extend
>
GetGoodsInventoryNumList
(
RB_Goods_Extend
dmodel
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Id
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
if
(
dmodel
.
GoodsStatus
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsStatus
)}
=
{
dmodel
.
GoodsStatus
}
"
;
}
string
sql
=
$@"select g.Id,g. from RB_Goods g where
{
where
}
group by g.Id asc"
;
return
Get
<
RB_Goods_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/User/RB_Member_CouponRepository.cs
View file @
7a6ccd88
...
...
@@ -30,6 +30,44 @@ namespace Mall.Repository.User
/// </summary>
public
string
OrderTableName
{
get
{
return
nameof
(
RB_Goods_Order
);
}
}
/// <summary>
/// 会员优惠券
/// </summary>
/// <returns></returns>
public
List
<
RB_Member_DiscountCoupon_Extend
>
GetList
(
RB_Member_DiscountCoupon_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
PlatformType
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
PlatformType
)}
=
{
query
.
PlatformType
}
"
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UserId
)}
=
{
query
.
UserId
}
"
);
}
if
(
query
.
CouponId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
CouponId
)}
=
{
query
.
CouponId
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
CouponId
)}
in (
{
query
.
CouponIds
}
)"
);
}
if
(
query
.
UseState
>=
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UseState
)}
=
{
query
.
UseState
}
"
);
}
}
string
sql
=
@
$" select * FROM
{
TableName
}
AS a where 1=1
{
builder
.
ToString
()}
"
;
return
Get
<
RB_Member_DiscountCoupon_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 会员优惠券
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
7a6ccd88
...
...
@@ -191,7 +191,7 @@ namespace Mall.WebApi.Controllers.MallBase
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
req
.
msg
.
ToString
());
if
((
demodel
.
Sh
i
ppingAddressId
??
0
)
<=
0
)
{
if
((
demodel
.
Sh
o
ppingAddressId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递收货地址id"
);
}
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
...
...
@@ -258,6 +258,9 @@ namespace Mall.WebApi.Controllers.MallBase
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
if
(
string
.
IsNullOrEmpty
(
item
.
Specification
))
{
return
ApiResult
.
ParamIsNull
(
"请传递规格名"
);
}
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
7a6ccd88
...
...
@@ -84,6 +84,7 @@ namespace Mall.WebApi.Controllers.MallBase
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
,
...
...
@@ -343,7 +344,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
var
omodel
=
orderModule
.
GetOrderInfo
(
demodel
.
OrderId
??
0
);
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitSendGoods
)
{
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitSendGoods
&&
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitReceiving
)
{
return
ApiResult
.
ParamIsNull
(
"状态不对"
);
}
...
...
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