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
7cfdc92b
Commit
7cfdc92b
authored
Nov 04, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
6e736994
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
ReserveModule.cs
Mall.Module.Reserve/ReserveModule.cs
+11
-11
ReserveController.cs
Mall.WebApi/Controllers/Reserve/ReserveController.cs
+6
-1
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+7
-0
No files found.
Mall.Module.Reserve/ReserveModule.cs
View file @
7cfdc92b
...
...
@@ -1142,7 +1142,7 @@ namespace Mall.Module.Reserve
#
region
网课小程序个人中心
-
学习卡中心
/// <summary>
/// 领劵中心
优惠券
/// 领劵中心
套餐卡
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
...
...
@@ -1179,7 +1179,7 @@ namespace Mall.Module.Reserve
/// <summary>
/// 会员
优惠券
/// 会员
套餐卡
/// </summary>
/// <returns></returns>
public
List
<
RB_Reserve_MemberCoupon_Extend
>
GetMemberDiscountCouponList
(
RB_Reserve_MemberCoupon_Extend
query
)
...
...
@@ -1189,9 +1189,9 @@ namespace Mall.Module.Reserve
#
endregion
#
region
自动发放给会员
优惠券
#
region
自动发放给会员
套餐卡
/// <summary>
/// 自动给会员发放
优惠券
/// 自动给会员发放
套餐卡
/// </summary>
/// <param name="userId"></param>
/// <param name="getType">1-分享,2-购买并付款,3-新人领券</param>
...
...
@@ -1205,22 +1205,22 @@ namespace Mall.Module.Reserve
{
return
resultModel
;
}
//根据发放类型获取对应的
优惠券
信息
//根据发放类型获取对应的
套餐卡
信息
model
.
SmallShopId
=
memberUserModel
.
SmallShopId
;
if
(
model
.
TriggerType
==
4
)
{
model
.
RegisterDate
=
memberUserModel
.
CreateDate
;
}
var
couponList
=
discountCouponRepository
.
GetSelfmotionCouponList
(
model
);
if
(
couponList
!=
null
&&
couponList
.
Any
(
x
=>
x
.
TotalNum
==
-
1
||
x
.
TotalNum
>
0
))
//存在满足条件的
优惠券
可以发放
if
(
couponList
!=
null
&&
couponList
.
Any
(
x
=>
x
.
TotalNum
==
-
1
||
x
.
TotalNum
>
0
))
//存在满足条件的
套餐卡
可以发放
{
bool
isReceive
=
false
;
//查询已发放的
优惠券
信息
//查询已发放的
套餐卡
信息
var
memberCouponList
=
memberCouponRepository
.
GetAutoMemberCouponPageList
(
new
RB_Reserve_MemberCoupon_Extend
{
UserId
=
model
.
UserId
,
GetType
=
model
.
TriggerType
,
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
});
foreach
(
var
item
in
couponList
.
Where
(
x
=>
x
.
TotalNum
==
-
1
||
x
.
TotalNum
>
0
))
//判断当前
优惠券
是否已超过领取数
foreach
(
var
item
in
couponList
.
Where
(
x
=>
x
.
TotalNum
==
-
1
||
x
.
TotalNum
>
0
))
//判断当前
套餐卡
是否已超过领取数
{
int
membercouponCoun
=
memberCouponList
.
Where
(
x
=>
x
.
CouponId
==
item
.
ID
).
Count
();
if
(!
isReceive
&&
membercouponCoun
<
item
.
GrantNum
)
//此次没有领取,并且当前
优惠券
没有超过领取数量
if
(!
isReceive
&&
membercouponCoun
<
item
.
GrantNum
)
//此次没有领取,并且当前
套餐卡
没有超过领取数量
{
var
trans
=
memberCouponRepository
.
DbTransaction
;
try
...
...
@@ -1233,7 +1233,7 @@ namespace Mall.Module.Reserve
Status
=
0
,
CreateDate
=
System
.
DateTime
.
Now
,
UserId
=
model
.
UserId
,
Description
=
item
.
TriggerType
==
1
?
"分享自动发放
优惠券"
:
(
item
.
TriggerType
==
2
?
"购买并付款自动发放优惠券"
:
(
item
.
TriggerType
==
3
?
"新人领劵自动发放优惠券"
:
"新人购买并付款自动发放优惠券
"
)),
Description
=
item
.
TriggerType
==
1
?
"分享自动发放
套餐卡"
:
(
item
.
TriggerType
==
2
?
"购买并付款自动发放套餐卡"
:
(
item
.
TriggerType
==
3
?
"新人领劵自动发放套餐卡"
:
"新人购买并付款自动发放套餐卡
"
)),
Remarks
=
item
.
TriggerType
==
1
?
"分享"
:
(
item
.
TriggerType
==
2
?
"购买并付款"
:
(
item
.
TriggerType
==
3
?
"新人领劵"
:
"新人购买并付款"
)),
CouponId
=
item
.
ID
,
StartDate
=
item
.
IndateType
==
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
?
System
.
DateTime
.
Now
:
item
.
StartDate
,
...
...
@@ -1246,7 +1246,7 @@ namespace Mall.Module.Reserve
};
isReceive
=
memberCouponRepository
.
Insert
(
nowMemberCoupon
,
trans
)
>
0
;
if
(
isReceive
)
//更新当前
优惠券
的领取数量
if
(
isReceive
)
//更新当前
套餐卡
的领取数量
{
Dictionary
<
string
,
object
>
cols1
;
...
...
Mall.WebApi/Controllers/Reserve/ReserveController.cs
View file @
7cfdc92b
...
...
@@ -964,6 +964,11 @@ namespace Mall.WebApi.Controllers.Reserve
//看门店营业时间半小时一个节点
try
{
if
(
oldLogisticsModel
.
IsAllDay
==
1
)
{
oldLogisticsModel
.
StartTime
=
"00:00"
;
oldLogisticsModel
.
EndTime
=
"23:00"
;
}
int
startTime
=
Convert
.
ToInt32
(
oldLogisticsModel
.
StartTime
.
Split
(
':'
)[
0
]);
int
endTime
=
Convert
.
ToInt32
(
oldLogisticsModel
.
EndTime
.
Split
(
':'
)[
0
]);
DateTime
tempStartTime
=
Convert
.
ToDateTime
(
query
.
WorkDate
+
" "
+
oldLogisticsModel
.
StartTime
);
...
...
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
7cfdc92b
...
...
@@ -38,7 +38,9 @@ namespace Mall.WebApi.Controllers.User
/// 商户小程序处理类
/// </summary>
private
readonly
MiniProgramModule
programModule
=
new
MiniProgramModule
();
private
readonly
Module
.
Education
.
EducationModule
educationModule
=
new
Module
.
Education
.
EducationModule
();
private
readonly
Module
.
Reserve
.
ReserveModule
reserveModule
=
new
Module
.
Reserve
.
ReserveModule
();
#
region
小程序登录
/// <summary>
/// 登录注册
...
...
@@ -80,6 +82,9 @@ namespace Mall.WebApi.Controllers.User
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
couponResult
=
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
();
Model
.
Extend
.
Education
.
RB_Education_Coupon_Extend
educationCouponResult
=
new
Model
.
Extend
.
Education
.
RB_Education_Coupon_Extend
();
Model
.
Extend
.
Reserve
.
RB_Reserve_Coupon_Extend
reserveCouponResult
=
new
Model
.
Extend
.
Reserve
.
RB_Reserve_Coupon_Extend
();
//验证是否新用户
if
(!
userModule
.
ValidateUserOpenId
(
demodel
.
OpenId
,
demodel
.
Source
,
requestParm
.
TenantId
,
requestParm
.
MallBaseId
))
{
...
...
@@ -148,6 +153,8 @@ namespace Mall.WebApi.Controllers.User
//自动发放新人优惠券 2020-08-04 Add By:W
couponResult
=
couponModule
.
AutoCoupon
(
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
{
UserId
=
UserId
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
TriggerType
=
3
});
educationCouponResult
=
educationModule
.
AutoEducationCoupon
(
new
Model
.
Extend
.
Education
.
RB_Education_Coupon_Extend
{
UserId
=
UserId
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
TriggerType
=
3
});
reserveCouponResult
=
reserveModule
.
AutoEducationCoupon
(
new
Model
.
Extend
.
Reserve
.
RB_Reserve_Coupon_Extend
{
UserId
=
UserId
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
TriggerType
=
3
});
#
region
粉象返佣
自动注册分销商
普通会员等级
...
...
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