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
b484f72d
Commit
b484f72d
authored
Jun 12, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠券查询
parent
e2cc26c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+4
-4
RB_DiscountCouponRepository.cs
...Repository/MarketingCenter/RB_DiscountCouponRepository.cs
+9
-2
RB_DiscountCoupon_ProductRepository.cs
...ry/MarketingCenter/RB_DiscountCoupon_ProductRepository.cs
+9
-2
No files found.
Mall.Module.Product/OrderModule.cs
View file @
b484f72d
...
...
@@ -1112,8 +1112,8 @@ namespace Mall.Module.Product
if
(
cList
.
Any
())
{
string
cIds
=
string
.
Join
(
","
,
cList
.
Select
(
x
=>
x
.
CouponId
).
Distinct
());
dcList
=
discountCouponRepository
.
GetDiscountCouponList
(
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
()
{
CouponIds
=
cIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
dcpList
=
discountCoupon_ProductRepository
.
GetListByDiscountCouponIds
(
new
Model
.
Entity
.
MarketingCenter
.
RB_DiscountCoupon
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
},
cIds
);
dcList
=
discountCouponRepository
.
GetDiscountCouponList
(
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
()
{
CouponIds
=
cIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}
,
true
);
dcpList
=
discountCoupon_ProductRepository
.
GetListByDiscountCouponIds
(
new
Model
.
Entity
.
MarketingCenter
.
RB_DiscountCoupon
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
},
cIds
,
true
);
if
(
dcList
.
Any
())
{
foreach
(
var
item
in
cList
)
...
...
@@ -2032,8 +2032,8 @@ namespace Mall.Module.Product
if
(
cList
.
Any
())
{
string
cIds
=
string
.
Join
(
","
,
cList
.
Select
(
x
=>
x
.
CouponId
).
Distinct
());
dcList
=
discountCouponRepository
.
GetDiscountCouponList
(
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
()
{
CouponIds
=
cIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
dcpList
=
discountCoupon_ProductRepository
.
GetListByDiscountCouponIds
(
new
Model
.
Entity
.
MarketingCenter
.
RB_DiscountCoupon
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
},
cIds
);
dcList
=
discountCouponRepository
.
GetDiscountCouponList
(
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
()
{
CouponIds
=
cIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}
,
true
);
dcpList
=
discountCoupon_ProductRepository
.
GetListByDiscountCouponIds
(
new
Model
.
Entity
.
MarketingCenter
.
RB_DiscountCoupon
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
},
cIds
,
true
);
if
(
dcList
.
Any
())
{
foreach
(
var
item
in
cList
)
...
...
Mall.Repository/MarketingCenter/RB_DiscountCouponRepository.cs
View file @
b484f72d
...
...
@@ -57,10 +57,17 @@ namespace Mall.Repository.MarketingCenter
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_DiscountCoupon_Extend
>
GetDiscountCouponList
(
RB_DiscountCoupon_Extend
query
)
public
List
<
RB_DiscountCoupon_Extend
>
GetDiscountCouponList
(
RB_DiscountCoupon_Extend
query
,
bool
IsSelectDel
=
false
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_DiscountCoupon_Extend
.
Status
)}
=0 "
);
if
(
IsSelectDel
)
{
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE 1=1 "
);
}
else
{
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_DiscountCoupon_Extend
.
Status
)}
=0 "
);
}
if
(
query
!=
null
)
{
if
(
query
.
ID
>
0
)
...
...
Mall.Repository/MarketingCenter/RB_DiscountCoupon_ProductRepository.cs
View file @
b484f72d
...
...
@@ -60,7 +60,7 @@ namespace Mall.Repository.MarketingCenter
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_DiscountCoupon_Product_Extend
>
GetListByDiscountCouponIds
(
RB_DiscountCoupon
query
,
string
DiscountCouponIds
)
public
List
<
RB_DiscountCoupon_Product_Extend
>
GetListByDiscountCouponIds
(
RB_DiscountCoupon
query
,
string
DiscountCouponIds
,
bool
IsSelectDel
=
false
)
{
StringBuilder
builder
=
new
StringBuilder
();
...
...
@@ -80,7 +80,14 @@ namespace Mall.Repository.MarketingCenter
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_DiscountCoupon_Product
.
DiscountCouponId
)}
in (
{
DiscountCouponIds
}
)"
);
}
string
sql
=
$"SELECT a.* from
{
TableName
}
as a WHERE a.
{
nameof
(
RB_DiscountCoupon_Product
.
Status
)}
=0
{
builder
.
ToString
()}
"
;
string
sql
=
""
;
if
(
IsSelectDel
)
{
sql
=
$"SELECT a.* from
{
TableName
}
as a WHERE 1=1 "
;
}
else
{
sql
=
$"SELECT a.* from
{
TableName
}
as a WHERE a.
{
nameof
(
RB_DiscountCoupon_Product
.
Status
)}
=0
{
builder
.
ToString
()}
"
;
}
if
(
query
.
UseType
==
Common
.
Enum
.
MarketingCenter
.
UseTypeEnum
.
Category
)
{
sql
=
$" SELECT a.*,b.`Name` as Relevance from
{
TableName
}
as a LEFT JOIN
{
PCategoryTableName
}
as b on a.ProductId=b.Id WHERE a.
{
nameof
(
RB_DiscountCoupon_Product
.
Status
)}
=0
{
builder
.
ToString
()}
"
;
...
...
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