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
43b24407
Commit
43b24407
authored
Sep 09, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
等级大于vip的 无法购买vip商品
parent
97f5affd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
9 deletions
+94
-9
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+29
-6
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+8
-0
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+57
-3
No files found.
Mall.Module.Product/GuideCarModule.cs
View file @
43b24407
...
...
@@ -2304,12 +2304,12 @@ 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
??
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
??
""
;
//
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 ?? 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
)
{
...
...
@@ -2320,6 +2320,24 @@ namespace Mall.Module.Product
{
date_enable
=
false
;
}
var
targetModel
=
targetList
.
FirstOrDefault
();
if
(
targetModel
.
ReserveNum
+
(
item
.
Number
??
0
)
>
(
gmodel
.
RideNum
??
0
))
{
date_enable
=
false
;
}
string
SiteName
=
sitelist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
SiteId
).
FirstOrDefault
()?.
SiteName
??
""
;
var
guideModel
=
guidelist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
GuideId
).
FirstOrDefault
();
string
GuideName
=
guideModel
?.
Name
??
""
;
string
GuidePhoto
=
guideModel
?.
GuidePhoto
??
""
;
decimal
GuideScore
=
guideModel
?.
Score
??
5
;
string
Introduction
=
guideModel
?.
Introduction
??
""
;
decimal
GuideWorkYears
=
guideModel
?.
WorkYears
??
1
;
var
carModel
=
carlist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
CarId
).
FirstOrDefault
();
string
CarName
=
carModel
?.
Name
??
""
;
string
CarColorName
=
carcolorlist
.
Where
(
x
=>
x
.
ID
==
gmodel
.
CarColorId
).
FirstOrDefault
()?.
ColorName
??
""
;
decimal
CarScore
=
carModel
?.
Score
??
5
;
string
CarModel
=
carModel
?.
CarType
??
""
;
#
endregion
goods_list
.
Add
(
new
...
...
@@ -2328,6 +2346,7 @@ namespace Mall.Module.Product
name
=
gmodel
.
Name
,
categoryIdList
=
item
.
CategoryIdList
,
num
=
item
.
Number
,
surplus_num
=
(
gmodel
.
RideNum
??
0
)
-
targetModel
.
ReserveNum
,
forehead_integral
=
gmodel
.
PointsDeduction
,
forehead_integral_type
=
gmodel
.
PointsDeductionType
,
accumulative
=
gmodel
.
IsMultipleDeduction
,
//累计多件抵扣
...
...
@@ -2372,10 +2391,14 @@ namespace Mall.Module.Product
guide_name
=
GuideName
,
guide_id
=
gmodel
.
GuideId
,
guide_score
=
GuideScore
,
guide_photo
=
GuidePhoto
,
guide_introduction
=
Introduction
,
guide_workyears
=
GuideWorkYears
,
car_name
=
CarName
,
car_id
=
gmodel
.
CarId
,
car_score
=
CarScore
,
carcolor_name
=
CarColorName
,
car_model
=
CarModel
,
carcolor_id
=
gmodel
.
CarColorId
,
car_number
=
gmodel
.
CarNumber
,
car_buyyear
=
gmodel
.
CarBuyYear
,
...
...
Mall.Module.Product/OrderModule.cs
View file @
43b24407
...
...
@@ -2881,6 +2881,14 @@ namespace Mall.Module.Product
//多商品
return
ApiResult
.
Failed
(
"VIP商品不能与其他商品同时下单,请先购买VIP商品"
);
}
var
disModel
=
distributor_InfoRepository
.
GetListForSingle
(
new
RB_Distributor_Info_Extend
()
{
UserId
=
umodel
.
Id
}).
FirstOrDefault
();
if
(
disModel
!=
null
)
{
var
fxgradeList
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
()
{
TenantId
=
umodel
.
TenantId
,
MallBaseId
=
umodel
.
MallBaseId
});
fxgradeList
=
fxgradeList
.
Where
(
x
=>
x
.
IsGuest
==
1
||
x
.
IsGuest
==
3
).
ToList
();
if
(!
fxgradeList
.
Select
(
x
=>
x
.
Id
).
Contains
(
disModel
.
FXGradeId
??
0
))
{
return
ApiResult
.
Failed
(
"您当前等级无法购买VIP商品"
);
}
}
}
var
categoryList
=
clist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
ToList
();
if
((
mallbaseModel
?.
IsFreeShipping
??
0
)
==
1
&&
(
gmodel
.
FullMoneyPinkage
??
0
)
==
0
&&
(
gmodel
.
FullNumPinkage
??
0
)
==
0
)
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
43b24407
...
...
@@ -371,7 +371,7 @@ namespace Mall.WebApi.Controllers.MallBase
public
ApiResult
GetGoodsTargetDateList
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
DayType
=
parms
.
GetInt
(
"DayType"
,
1
);
//类型 1时间范围 2
按周 3按月份
int
DayType
=
parms
.
GetInt
(
"DayType"
,
1
);
//类型 1时间范围 2
月份 3周
string
StartDate
=
parms
.
GetStringValue
(
"StartDate"
);
string
EndDate
=
parms
.
GetStringValue
(
"EndDate"
);
string
Year
=
parms
.
GetStringValue
(
"Year"
);
//年
...
...
@@ -416,7 +416,10 @@ namespace Mall.WebApi.Controllers.MallBase
{
if
(!
DateList
.
Contains
(
dt
.
ToString
(
"yyyy-MM-dd"
)))
{
DateList
.
Add
(
dt
.
ToString
(
"yyyy-MM-dd"
));
if
(
dt
>=
DateTime
.
Now
)
{
DateList
.
Add
(
dt
.
ToString
(
"yyyy-MM-dd"
));
}
}
dt
=
dt
.
AddDays
(
1
);
}
...
...
@@ -451,7 +454,10 @@ namespace Mall.WebApi.Controllers.MallBase
{
if
(!
DateList
.
Contains
(
dt
.
ToString
(
"yyyy-MM-dd"
)))
{
DateList
.
Add
(
dt
.
ToString
(
"yyyy-MM-dd"
));
if
(
dt
>=
DateTime
.
Now
)
{
DateList
.
Add
(
dt
.
ToString
(
"yyyy-MM-dd"
));
}
}
}
dt
=
dt
.
AddDays
(
1
);
...
...
@@ -660,6 +666,31 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
ParamIsNull
(
"请传递分销佣金列表"
);
}
//转换
List
<
RB_Goods_DistributionCommission_Extend
>
Rlist
=
new
List
<
RB_Goods_DistributionCommission_Extend
>();
foreach
(
var
item
in
demodel
.
DistributionCommissionList
)
{
if
(
item
.
GradeCommissionList
==
null
||
!
item
.
GradeCommissionList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递分销佣金列表"
);
}
foreach
(
var
qitem
in
item
.
GradeCommissionList
)
{
Rlist
.
Add
(
new
RB_Goods_DistributionCommission_Extend
()
{
DistributorGrade
=
qitem
.
DistributorGrade
,
Id
=
0
,
SpecificationSort
=
item
.
SpecificationSort
,
OneCommission
=
qitem
.
OneCommission
,
TwoCommission
=
qitem
.
TwoCommission
,
ThreeCommission
=
qitem
.
ThreeCommission
});
}
}
if
(
Rlist
.
Any
())
{
demodel
.
DistributionCommissionList
=
Rlist
;
}
//普通设置 直接根据等级验证数量
if
(
DGradeList
.
Count
()
!=
demodel
.
DistributionCommissionList
.
Count
())
{
...
...
@@ -706,6 +737,29 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
ParamIsNull
(
"请传递会员价格列表"
);
}
//转换
List
<
RB_Goods_MemberPrice_Extend
>
Rlist
=
new
List
<
RB_Goods_MemberPrice_Extend
>();
foreach
(
var
item
in
demodel
.
MemberPriceList
)
{
if
(
item
.
GradePriceList
==
null
||
!
item
.
GradePriceList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递会员价格列表"
);
}
foreach
(
var
qitem
in
item
.
GradePriceList
)
{
Rlist
.
Add
(
new
RB_Goods_MemberPrice_Extend
()
{
MemberGrade
=
qitem
.
MemberGrade
,
Id
=
0
,
SpecificationSort
=
item
.
SpecificationSort
,
MemberPrice
=
qitem
.
MemberPrice
});
}
}
if
(
Rlist
.
Any
())
{
demodel
.
MemberPriceList
=
Rlist
;
}
if
(
MGradeList
.
Count
()
!=
demodel
.
MemberPriceList
.
Count
())
{
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