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
f76c7972
Commit
f76c7972
authored
May 08, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
53234f58
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
7 deletions
+30
-7
RB_DiscountCoupon.cs
Mall.Model/Entity/MarketingCenter/RB_DiscountCoupon.cs
+13
-3
RB_DiscountCoupon_Extend.cs
....Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
+5
-0
CouponModule.cs
Mall.Module.MarketingCenter/CouponModule.cs
+2
-2
CouponController.cs
Mall.WebApi/Controllers/MarketingCenter/CouponController.cs
+10
-2
No files found.
Mall.Model/Entity/MarketingCenter/RB_DiscountCoupon.cs
View file @
f76c7972
...
...
@@ -11,7 +11,7 @@ namespace Mall.Model.Entity.MarketingCenter
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_DiscountCoupon
public
class
RB_DiscountCoupon
{
public
int
ID
{
get
;
set
;
}
...
...
@@ -106,8 +106,18 @@ namespace Mall.Model.Entity.MarketingCenter
/// <summary>
/// 领取方式设置
1-会员专享
2-领劵中心
/// 领取方式设置2-领劵中心
/// </summary>
public
PickupTypeEnum
PickupType
{
get
;
set
;
}
public
int
PickupCenter
{
get
;
set
;
}
/// <summary>
/// 1-会员专享
/// </summary>
public
int
OnlyMember
{
get
;
set
;
}
/// <summary>
/// 会员专享
/// </summary>
public
string
MemberLevel
{
get
;
set
;
}
}
}
Mall.Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
View file @
f76c7972
...
...
@@ -27,5 +27,10 @@ namespace Mall.Model.Extend.MarketingCenter
/// 发放数量
/// </summary>
public
int
GrantNum
{
get
;
set
;
}
/// <summary>
/// 会员等级
/// </summary>
public
int
[]
MemberLevelList
{
get
;
set
;
}
}
}
Mall.Module.MarketingCenter/CouponModule.cs
View file @
f76c7972
...
...
@@ -301,7 +301,7 @@ namespace Mall.Module.MarketingCenter
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_DiscountCoupon
.
Pickup
Type
),
model
.
PickupType
==
Common
.
Enum
.
MarketingCenter
.
PickupTypeEnum
.
CouponCenter
?
Common
.
Enum
.
MarketingCenter
.
PickupTypeEnum
.
OnlyMember
:
Common
.
Enum
.
MarketingCenter
.
PickupTypeEnum
.
CouponCenter
},
{
nameof
(
RB_DiscountCoupon
.
Pickup
Center
),
model
.
PickupCenter
==
0
?
1
:
0
},
{
nameof
(
RB_DiscountCoupon
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
...
...
@@ -444,7 +444,7 @@ namespace Mall.Module.MarketingCenter
{
id
=
model
.
ID
;
flag
=
selfMotionRepository
.
Update
(
model
,
trans
);
var
listProduct
=
selfMotionMemberRepository
.
GetListRepository
(
new
RB_Coupon_SelfMotionMember_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
SelfMotionId
=
id
});
var
listProduct
=
selfMotionMemberRepository
.
GetListRepository
(
new
RB_Coupon_SelfMotionMember_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
SelfMotionId
=
id
});
if
(
listProduct
!=
null
&&
listProduct
.
Any
())
{
foreach
(
var
item
in
model
.
UserList
)
...
...
Mall.WebApi/Controllers/MarketingCenter/CouponController.cs
View file @
f76c7972
...
...
@@ -194,7 +194,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
x
.
Name
,
x
.
MinConsumePrice
,
x
.
DiscountsPrice
,
UseTypeStr
=
Mall
.
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
x
.
UseType
),
UseTypeStr
=
Mall
.
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
x
.
UseType
),
x
.
CouponType
,
x
.
StartDate
,
x
.
IndateType
,
...
...
@@ -202,7 +202,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
x
.
EndDate
,
x
.
TotalNum
,
ResidueNum
=
x
.
TotalNum
-
x
.
ReceiveNum
,
x
.
Pickup
Type
x
.
Pickup
Center
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
@@ -225,6 +225,10 @@ namespace Mall.WebApi.Controllers.MarketingCenter
oldLogisticsModel
=
new
RB_DiscountCoupon_Extend
();
oldLogisticsModel
.
IndateType
=
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
oldLogisticsModel
.
MemberLevel
))
{
oldLogisticsModel
.
MemberLevelList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
oldLogisticsModel
.
MemberLevel
).
ToArray
();
}
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
...
...
@@ -290,6 +294,10 @@ namespace Mall.WebApi.Controllers.MarketingCenter
{
query
.
CreateDate
=
System
.
DateTime
.
Now
;
}
if
(
query
.
MemberLevelList
!=
null
&&
query
.
MemberLevelList
.
Length
>
0
)
{
query
.
MemberLevel
=
JsonConvert
.
SerializeObject
(
query
.
MemberLevelList
);
}
query
.
UpdateDate
=
System
.
DateTime
.
Now
;
bool
result
=
IntegralModule
.
AddOrUpdateDiscountCoupon
(
query
);
if
(
result
)
...
...
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