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
c5112361
Commit
c5112361
authored
Sep 03, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品结算
parent
5fccf7ad
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
19 deletions
+81
-19
RB_Goods_Order.cs
Mall.Model/Entity/Product/RB_Goods_Order.cs
+12
-0
RB_Goods_TargetDate_Extend.cs
Mall.Model/Extend/Product/RB_Goods_TargetDate_Extend.cs
+4
-0
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+36
-17
RB_GuideCar_CarRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_CarRepository.cs
+2
-2
RB_Goods_TargetDateRepository.cs
Mall.Repository/Product/RB_Goods_TargetDateRepository.cs
+6
-0
AppletGCOrderController.cs
Mall.WebApi/Controllers/Product/AppletGCOrderController.cs
+21
-0
No files found.
Mall.Model/Entity/Product/RB_Goods_Order.cs
View file @
c5112361
...
...
@@ -308,5 +308,17 @@ namespace Mall.Model.Entity.Product
/// 微店id
/// </summary>
public
int
?
SmallShopsId
{
get
;
set
;
}
/// <summary>
/// 司导服务类型
/// </summary>
public
GuideCarGoodsTypeEnum
?
CarType
{
get
;
set
;
}
/// <summary>
/// 司导预约开始时间
/// </summary>
public
DateTime
?
TripSTime
{
get
;
set
;
}
/// <summary>
/// 司导预约结束时间
/// </summary>
public
DateTime
?
TripETime
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_TargetDate_Extend.cs
View file @
c5112361
...
...
@@ -19,5 +19,9 @@ namespace Mall.Model.Extend.Product
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 日期
/// </summary>
public
string
DateTime
{
get
;
set
;
}
}
}
Mall.Module.Product/GuideCarModule.cs
View file @
c5112361
...
...
@@ -1623,20 +1623,24 @@ namespace Mall.Module.Product
#
region
司导商品
string
SiteName
=
SiteRepository
.
GetGuideCarSiteList
(
new
RB_GuideCar_Site_Extend
()
{
ID
=
model
.
SiteId
??
0
}).
FirstOrDefault
()?.
SiteName
??
""
;
string
GuideName
=
GuideRepository
.
GetGuideCarGuideList
(
new
RB_GuideCar_Guide_Extend
()
{
ID
=
model
.
GuideId
??
0
}).
FirstOrDefault
()?.
Name
??
""
;
string
CarName
=
GuideCarRepository
.
GetGuideCarCarList
(
new
RB_GuideCar_Car_Extend
()
{
ID
=
model
.
GuideId
??
0
}).
FirstOrDefault
()?.
Name
??
""
;
var
guideModel
=
GuideRepository
.
GetGuideCarGuideList
(
new
RB_GuideCar_Guide_Extend
()
{
ID
=
model
.
GuideId
??
0
}).
FirstOrDefault
();
string
GuideName
=
guideModel
?.
Name
??
""
;
var
carModel
=
GuideCarRepository
.
GetGuideCarCarList
(
new
RB_GuideCar_Car_Extend
()
{
ID
=
model
.
GuideId
??
0
}).
FirstOrDefault
();
string
CarName
=
carModel
?.
Name
??
""
;
string
CarColorName
=
CarColorRepository
.
GetCarColorList
(
new
RB_GuideCar_CarColor_Extend
()
{
ID
=
model
.
CarColorId
??
0
}).
FirstOrDefault
()?.
ColorName
??
""
;
decimal
GuideScore
=
guideModel
?.
Score
??
5
;
decimal
CarScore
=
carModel
?.
Score
??
5
;
model
.
LineDescriptionList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
LineDescription
)
&&
model
.
LineDescription
!=
"[]"
)
{
model
.
LineDescriptionList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
LineDescription
);
}
var
targetList
=
goods_TargetDateRepository
.
GetList
(
new
RB_Goods_TargetDate_Extend
()
{
GoodsId
=
goodsId
});
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
();
}
//
var targetList = goods_TargetDateRepository.GetList(new RB_Goods_TargetDate_Extend() { GoodsId = goodsId });
//
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();
//
}
#
endregion
#
region
返回参数
...
...
@@ -1668,8 +1672,10 @@ namespace Mall.Module.Product
site_id
=
model
.
SiteId
,
guide_name
=
GuideName
,
guide_id
=
model
.
GuideId
,
guide_score
=
GuideScore
,
car_name
=
CarName
,
car_id
=
model
.
CarId
,
car_score
=
CarScore
,
carcolor_name
=
CarColorName
,
carcolor_id
=
model
.
CarColorId
,
car_number
=
model
.
CarNumber
,
...
...
@@ -1681,12 +1687,12 @@ namespace Mall.Module.Product
line_descriptionlist
=
model
.
LineDescriptionList
,
is_spell
=
model
.
IsSpell
,
ride_num
=
model
.
RideNum
,
target_list
=
targetList
.
Select
(
x
=>
new
{
x
.
Id
,
Date
=
x
.
Date
.
Value
.
ToString
(
"yyyy-MM-dd"
),
x
.
IsReserve
,
x
.
ReserveNum
}),
//
target_list = targetList.Select(x=>new {
//
x.Id,
//
Date = x.Date.Value.ToString("yyyy-MM-dd"),
//
x.IsReserve,
//
x.ReserveNum
//
}),
advance_day
=
model
.
AdvanceDay
,
give_integral
=
model
.
IntegralPresent
,
give_integral_type
=
model
.
IntegralPresentType
,
...
...
@@ -1803,6 +1809,7 @@ namespace Mall.Module.Product
decimal
CouponsMoney
=
0
;
//优惠总金额
bool
IsPointsDeduction
=
false
;
//是否有商品可使用积分抵扣
bool
address_enable
=
true
;
//地址Ok
bool
date_enable
=
true
;
//日期ok
List
<
object
>
goods_list
=
new
List
<
object
>();
if
(
demodel
.
DetailList
.
Any
())
{
...
...
@@ -2278,10 +2285,20 @@ namespace Mall.Module.Product
#
region
司导信息
string
SiteName
=
sitelist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
SiteId
).
FirstOrDefault
()?.
SiteName
??
""
;
string
GuideName
=
guidelist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
GuideId
).
FirstOrDefault
()?.
Name
??
""
;
decimal
GuideScore
=
guidelist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
GuideId
).
FirstOrDefault
()?.
Score
??
0
;
decimal
GuideScore
=
guidelist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
GuideId
).
FirstOrDefault
()?.
Score
??
5
;
string
CarName
=
carlist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
CarId
).
FirstOrDefault
()?.
Name
??
""
;
decimal
CarScore
=
carlist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
CarId
).
FirstOrDefault
()?.
Score
??
5
;
string
CarColorName
=
carcolorlist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
CarColorId
).
FirstOrDefault
()?.
ColorName
??
""
;
var
targetList
=
goods_TargetDateRepository
.
GetList
(
new
RB_Goods_TargetDate_Extend
()
{
GoodsId
=
gmodel
.
Id
,
IsReserve
=
1
,
DateTime
=
demodel
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
});
if
(
gmodel
.
AdvanceDay
>
0
)
{
DateTime
Mindate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
AddDays
(
gmodel
.
AdvanceDay
??
0
).
ToString
(
"yyyy-MM-dd"
));
targetList
=
targetList
.
Where
(
x
=>
x
.
Date
>=
Mindate
).
ToList
();
}
if
(!
targetList
.
Any
())
{
date_enable
=
false
;
}
#
endregion
goods_list
.
Add
(
new
{
...
...
@@ -2293,6 +2310,7 @@ namespace Mall.Module.Product
forehead_integral_type
=
gmodel
.
PointsDeductionType
,
accumulative
=
gmodel
.
IsMultipleDeduction
,
//累计多件抵扣
address_disabled
,
date_enable
,
unit_price
=
item
.
Unit_Price
,
total_original_price
=
(
item
.
Original_Price
??
0
)
*
(
item
.
Number
??
0
),
total_price
=
(
item
.
Unit_Price
??
0
)
*
(
item
.
Number
??
0
),
//优惠券(有平摊情况) 积分抵扣 (默认从第一个商品抵扣)
...
...
@@ -2301,7 +2319,6 @@ namespace Mall.Module.Product
id
=
0
,
goods_id
=
gmodel
.
Id
,
sign_id
=
item
.
SpecificationSort
,
stock
=
gmodel
.
InventoryNum
,
price
=
item
.
Unit_Price
??
0
,
original_price
=
item
.
Original_Price
??
0
,
pic_url
=
gmodel
.
CoverImage
,
...
...
@@ -2332,8 +2349,10 @@ namespace Mall.Module.Product
site_id
=
gmodel
.
SiteId
,
guide_name
=
GuideName
,
guide_id
=
gmodel
.
GuideId
,
guide_score
=
GuideScore
,
car_name
=
CarName
,
car_id
=
gmodel
.
CarId
,
car_score
=
CarScore
,
carcolor_name
=
CarColorName
,
carcolor_id
=
gmodel
.
CarColorId
,
car_number
=
gmodel
.
CarNumber
,
...
...
@@ -2428,7 +2447,7 @@ namespace Mall.Module.Product
mch_list
,
promptNoSuperiorFY
=
PromptNoSuperiorFY
,
total_price
=
TotalGoodsMoney
,
price_enable
=
tru
e
,
date_enabl
e
,
address
=
new
{
demodel
.
District
,
...
...
Mall.Repository/GuideCar/RB_GuideCar_CarRepository.cs
View file @
c5112361
...
...
@@ -76,11 +76,11 @@ namespace Mall.Repository.GuideCar
{
if
(
query
.
ID
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Car_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
builder
.
Append
(
$" AND
a.
{
nameof
(
RB_GuideCar_Car_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
GuideCarIds
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Car_Extend
.
ID
)}
in(
{
query
.
GuideCarIds
}
)"
);
builder
.
Append
(
$" AND
a.
{
nameof
(
RB_GuideCar_Car_Extend
.
ID
)}
in(
{
query
.
GuideCarIds
}
)"
);
}
if
(
query
.
TenantId
>
0
)
{
...
...
Mall.Repository/Product/RB_Goods_TargetDateRepository.cs
View file @
c5112361
...
...
@@ -31,6 +31,12 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_TargetDate
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
DateTime
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_TargetDate
.
Date
)}
='
{
dmodel
.
DateTime
}
'"
;
}
if
(
dmodel
.
IsReserve
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_TargetDate
.
IsReserve
)}
=
{
dmodel
.
IsReserve
}
"
;
}
string
sql
=
$@"select * from RB_Goods_TargetDate where
{
where
}
order by Date asc"
;
return
Get
<
RB_Goods_TargetDate_Extend
>(
sql
).
ToList
();
...
...
Mall.WebApi/Controllers/Product/AppletGCOrderController.cs
View file @
c5112361
...
...
@@ -53,12 +53,33 @@ namespace Mall.WebApi.Controllers.Product
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
}
if
(!
demodel
.
TripSTime
.
HasValue
)
{
return
ApiResult
.
ParamIsNull
(
"请传递预约起始时间"
);
}
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
SmallShopsId
=
req
.
SmallShopsId
;
return
guideCarModule
.
GetAppletSDGoodsSettlementInfo
(
demodel
);
}
/// <summary>
/// 获取商品可预约日期列表
/// </summary>
/// <returns></returns>
[
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"
);
if
(
GoodsId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品id"
);
}
return
ApiResult
.
Success
();
}
#
endregion
}
...
...
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