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
cabad9cb
Commit
cabad9cb
authored
Aug 05, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
cec841bf
21da0253
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
7 deletions
+25
-7
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+13
-4
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+10
-2
RB_FreeShippingRepository.cs
Mall.Repository/BaseSetUp/RB_FreeShippingRepository.cs
+2
-1
No files found.
Mall.Module.Product/OrderModule.cs
View file @
cabad9cb
...
...
@@ -333,14 +333,23 @@ namespace Mall.Module.Product
{
var
nowcategory
=
categoryList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
Select
(
x
=>
x
.
CategoryId
);
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
FirstOrDefault
();
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
FirstOrDefault
();
}
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
==
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
}
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
==
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
FirstOrDefault
();
}
item
.
FreeShippingModel
=
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
?
new
RB_FreeShipping_Extend
()
:
fullNumPinkageModel
;
}
else
{
else
{
item
.
FreeShippingModel
=
new
RB_FreeShipping_Extend
();
}
...
...
@@ -4157,7 +4166,7 @@ namespace Mall.Module.Product
{
var
supplierModel
=
supplist
.
Where
(
x
=>
x
.
ID
==
item
.
SupplierId
).
FirstOrDefault
();
var
qscList
=
scList
.
Where
(
x
=>
x
.
SupplierId
==
item
.
SupplierId
).
ToList
();
if
(
item
.
CostMoney
>
0
&&
((
item
.
Final_Price
??
0
)
-
(
item
.
CostMoney
??
0
)
*
(
item
.
Number
??
0
)
-
item
.
TCommissionMoney
)
>
0
&&
qscList
.
Any
())
if
(
item
.
CostMoney
>
0
&&
((
item
.
Final_Price
??
0
)
-
(
item
.
CostMoney
??
0
)
*
(
item
.
Number
??
0
)
-
item
.
TCommissionMoney
)
>
0
&&
qscList
.
Any
())
{
decimal
Profit
=
(
item
.
Final_Price
??
0
)
-
(
item
.
CostMoney
??
0
)
*
(
item
.
Number
??
0
)
-
item
.
TCommissionMoney
;
decimal
GrossMargin
=
Math
.
Round
(
Profit
/
(
item
.
Final_Price
??
0
),
2
,
MidpointRounding
.
AwayFromZero
);
...
...
Mall.Module.Product/ProductModule.cs
View file @
cabad9cb
...
...
@@ -1059,10 +1059,18 @@ namespace Mall.Module.Product
var
freeShippingList
=
freeShippingRepository
.
GetFreeShippingListByCategoryIds
(
new
RB_FreeShipping_Extend
{
MallBaseId
=
model
.
MallBaseId
,
TenantId
=
model
.
TenantId
,
CategoryIds
=
categoryIds
});
if
(
freeShippingList
!=
null
&&
freeShippingList
.
Any
())
{
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
FirstOrDefault
();
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
FirstOrDefault
();
}
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
==
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
}
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
==
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
FirstOrDefault
();
}
model
.
FreeShippingModel
=
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
?
new
RB_FreeShipping_Extend
()
:
fullNumPinkageModel
;
}
...
...
Mall.Repository/BaseSetUp/RB_FreeShippingRepository.cs
View file @
cabad9cb
...
...
@@ -90,7 +90,7 @@ namespace Mall.Repository.BaseSetUp
INNER
JOIN
rb_mallbase
as
c
on
a
.
MallBaseId
=
c
.
ID
and
a
.
TenantId
=
c
.
TenantId
WHERE
a
.{
nameof
(
RB_FreeShipping_Extend
.
Status
)}=
0
");
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_FreeShipping_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
...
...
@@ -101,6 +101,7 @@ INNER JOIN rb_mallbase as c on a.MallBaseId = c.ID and a.TenantId = c.TenantId W
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
CategoryIds
))
{
query
.
CategoryIds
+=
query
.
CategoryIds
+
",0"
;
builder
.
Append
(
$" AND b.
{
nameof
(
RB_FreeShippingCategory_Extend
.
CategoryId
)}
in(
{
query
.
CategoryIds
}
)"
);
}
}
...
...
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