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
5af8ff51
Commit
5af8ff51
authored
Sep 04, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单
parent
1747dd22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
937 additions
and
157 deletions
+937
-157
OrderTypeEnum.cs
Mall.Common/Enum/Goods/OrderTypeEnum.cs
+6
-1
RB_Goods_TargetDate_Extend.cs
Mall.Model/Extend/Product/RB_Goods_TargetDate_Extend.cs
+4
-0
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+27
-1
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+813
-153
RB_Goods_TargetDateRepository.cs
Mall.Repository/Product/RB_Goods_TargetDateRepository.cs
+4
-0
AppletGCOrderController.cs
Mall.WebApi/Controllers/Product/AppletGCOrderController.cs
+3
-2
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+80
-0
No files found.
Mall.Common/Enum/Goods/OrderTypeEnum.cs
View file @
5af8ff51
...
...
@@ -61,6 +61,11 @@ namespace Mall.Common.Enum.Goods
/// 商品预售
/// </summary>
[
EnumField
(
"商品预售"
)]
GoodsToBooking
=
10
GoodsToBooking
=
10
,
/// <summary>
/// 司导商品
/// </summary>
[
EnumField
(
"司导商品"
)]
SDGoods
=
11
}
}
Mall.Model/Extend/Product/RB_Goods_TargetDate_Extend.cs
View file @
5af8ff51
...
...
@@ -23,5 +23,9 @@ namespace Mall.Model.Extend.Product
/// 日期
/// </summary>
public
string
DateTime
{
get
;
set
;
}
/// <summary>
/// 月份
/// </summary>
public
string
Month
{
get
;
set
;
}
}
}
Mall.Module.Product/GuideCarModule.cs
View file @
5af8ff51
...
...
@@ -1767,7 +1767,6 @@ namespace Mall.Module.Product
#
endregion
}
/// <summary>
/// 获取小程序司导商品结算页面详情
/// </summary>
...
...
@@ -2462,6 +2461,33 @@ namespace Mall.Module.Product
return
ApiResult
.
Success
(
""
,
Robj
);
}
/// <summary>
/// 获取商品可预定日期列表
/// </summary>
/// <param name="goodsId"></param>
/// <param name="month"></param>
/// <returns></returns>
public
object
GetAppletSDGoodsTargetDateList
(
int
goodsId
,
string
month
)
{
var
model
=
goodsRepository
.
GetEntity
(
goodsId
);
var
targetList
=
goods_TargetDateRepository
.
GetList
(
new
RB_Goods_TargetDate_Extend
()
{
GoodsId
=
goodsId
,
Month
=
month
});
if
(
model
.
AdvanceDay
>
0
)
{
DateTime
Mindate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
AddDays
(
model
.
AdvanceDay
??
0
).
ToString
(
"yyyy-MM-dd"
));
targetList
=
targetList
.
Where
(
x
=>
x
.
Date
>=
Mindate
).
ToList
();
}
return
targetList
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
GoodsId
,
Date
=
x
.
Date
.
Value
.
ToString
(
"yyyy-MM-dd"
),
x
.
IsReserve
,
x
.
ReserveNum
,
SurplusNum
=
(
model
.
RideNum
??
0
)
-
x
.
ReserveNum
});
}
#
endregion
#
region
站点配置
...
...
Mall.Module.Product/OrderModule.cs
View file @
5af8ff51
This diff is collapsed.
Click to expand it.
Mall.Repository/Product/RB_Goods_TargetDateRepository.cs
View file @
5af8ff51
...
...
@@ -34,6 +34,10 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
DateTime
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_TargetDate
.
Date
)}
='
{
dmodel
.
DateTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Month
))
{
where
+=
$@" and DATE_FORMAT(Date,'%Y-%m') ='
{
dmodel
.
Month
}
'"
;
}
if
(
dmodel
.
IsReserve
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_TargetDate
.
IsReserve
)}
=
{
dmodel
.
IsReserve
}
"
;
}
...
...
Mall.WebApi/Controllers/Product/AppletGCOrderController.cs
View file @
5af8ff51
...
...
@@ -70,7 +70,6 @@ namespace Mall.WebApi.Controllers.Product
[
HttpPost
]
public
ApiResult
GetAppletSDGoodsTargetDateList
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
GoodsId
=
parms
.
GetInt
(
"GoodsId"
,
0
);
string
Month
=
parms
.
GetStringValue
(
"Month"
);
...
...
@@ -78,8 +77,10 @@ namespace Mall.WebApi.Controllers.Product
return
ApiResult
.
ParamIsNull
(
"请传递商品id"
);
}
return
ApiResult
.
Success
();
var
list
=
guideCarModule
.
GetAppletSDGoodsTargetDateList
(
GoodsId
,
Month
);
return
ApiResult
.
Success
(
""
,
list
);
}
#
endregion
}
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
5af8ff51
...
...
@@ -507,6 +507,86 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
/// <summary>
/// 司导下单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletSDGoodsOrderInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Consignee
))
{
return
ApiResult
.
ParamIsNull
(
"请传递联系人"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"请传递联系人手机号码"
);
}
demodel
.
DeliveryMethod
=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
;
if
((
demodel
.
District
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"接送地址有误"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
ShoppingAddress
))
{
return
ApiResult
.
ParamIsNull
(
"接送地址地址不能为空"
);
}
if
(!
demodel
.
TripSTime
.
HasValue
)
{
return
ApiResult
.
ParamIsNull
(
"请传递出发时间"
);
}
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
}
foreach
(
var
item
in
demodel
.
DetailList
)
{
if
((
item
.
GoodsId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品id"
);
}
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
}
if
((
demodel
.
Income
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"订单金额不正确"
);
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
demodel
.
OrderSource
??=
Common
.
Enum
.
User
.
UserSourceEnum
.
WeiXin
;
#
region
赋默认值
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
Country
??=
2
;
demodel
.
OrderStatus
=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
Fee
??=
0
;
demodel
.
FreightMoney
??=
0
;
demodel
.
HistoryOrderStatus
??=
0
;
demodel
.
IsApplyForCancel
??=
2
;
demodel
.
IsOrderCommission
??=
2
;
demodel
.
MerchantsNo
??=
""
;
demodel
.
Recycled
??=
2
;
demodel
.
Refund
??=
0
;
demodel
.
Status
=
0
;
demodel
.
AnchorName
??=
""
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
SmallShopsId
=
req
.
SmallShopsId
;
#
endregion
return
orderModule
.
SetAppletSDGoodsOrderInfo
(
demodel
);
}
/// <summary>
/// 返佣初始化
/// </summary>
...
...
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