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
c5d21b23
Commit
c5d21b23
authored
Sep 07, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品调整
parent
072f08ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+6
-3
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+5
-2
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+6
-0
No files found.
Mall.Module.Product/OrderModule.cs
View file @
c5d21b23
...
...
@@ -3838,7 +3838,7 @@ namespace Mall.Module.Product
return
ApiResult
.
Failed
(
"商品服务类型不一致"
);
}
int
uday
=
Convert
.
ToInt32
((
gmodel
.
UseDay
??
0
).
Equals
(
0.5
)
?
1
:
(
gmodel
.
UseDay
??
0
));
if
(
demodel
.
TripSTime
.
Value
.
AddDays
(
uday
-
1
)
!=
demodel
.
TripETime
)
if
(
demodel
.
TripSTime
.
Value
.
AddDays
(
uday
-
1
)
.
ToString
(
"yyyy-MM-dd"
)
!=
demodel
.
TripETime
.
Value
.
ToString
(
"yyyy-MM-dd"
))
{
return
ApiResult
.
Failed
(
"预定日期与商品使用天数不一致"
);
}
...
...
@@ -3854,6 +3854,8 @@ namespace Mall.Module.Product
item
.
CarColorId
=
gmodel
.
CarColorId
;
item
.
CarNumber
=
gmodel
.
CarNumber
;
item
.
LineName
=
gmodel
.
LineName
;
item
.
Specification
=
"[]"
;
item
.
SpecificationSort
=
"0"
;
var
tdlist
=
goods_TargetDateRepository
.
GetList
(
new
RB_Goods_TargetDate_Extend
()
{
GoodsId
=
item
.
GoodsId
??
0
,
StartTime
=
item
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
),
EndTime
=
item
.
TripETime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
});
var
targetList
=
tdlist
.
Where
(
x
=>
x
.
IsReserve
==
1
&&
x
.
Date
==
Convert
.
ToDateTime
(
demodel
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
))).
ToList
();
...
...
@@ -5991,7 +5993,8 @@ namespace Mall.Module.Product
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_TargetDate
.
Id
),
FiledValue
=
qitem
FiledValue
=
qitem
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_TargetDateRepository
.
Update
(
keyValues1
,
wheres1
,
trans
);
...
...
@@ -6792,7 +6795,7 @@ namespace Mall.Module.Product
{
//剑鱼兄需求 2020=07-30 再查询一次商品表
string
GoodsIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
GoodsId
).
Distinct
());
var
GList
=
goodsRepository
.
GetSingleListForGoodsSubName
(
new
RB_Goods_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsIds
=
GoodsIds
});
var
GList
=
goodsRepository
.
GetSingleListForGoodsSubName
(
new
RB_Goods_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsIds
=
GoodsIds
}
,
true
);
foreach
(
var
item
in
dlist
)
{
item
.
CoverImagePath
=
item
.
CoverImage
;
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
c5d21b23
...
...
@@ -305,9 +305,12 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetSingleListForGoodsSubName
(
RB_Goods_Extend
dmodel
)
public
List
<
RB_Goods_Extend
>
GetSingleListForGoodsSubName
(
RB_Goods_Extend
dmodel
,
bool
IsSelectAll
=
false
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0 and g.GoodsClassify=0"
;
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0 "
;
if
(
IsSelectAll
==
false
)
{
where
+=
$@" and g.GoodsClassify=0 "
;
}
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
c5d21b23
...
...
@@ -551,6 +551,12 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
IsSpell
??=
1
;
demodel
.
AdvanceDay
??=
0
;
if
(
demodel
.
TargetDateList
!=
null
&&
demodel
.
TargetDateList
.
Any
())
{
//去除重复
if
(
demodel
.
TargetDateList
.
Count
()
!=
demodel
.
TargetDateList
.
Select
(
x
=>
x
.
Date
).
Distinct
().
Count
())
{
return
ApiResult
.
ParamIsNull
(
"可预定日期有重复"
);
}
}
if
(
demodel
.
Id
>
0
)
{
string
vmsg
=
guideCarModule
.
ValidateGoodsTargetDate
(
demodel
.
Id
,
demodel
.
TargetDateList
);
...
...
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