Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
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
hujun
tl_estate
Commits
5afba1ab
Commit
5afba1ab
authored
Mar 12, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
122b3c1c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
Coupon.php
application/api/controller/Coupon.php
+2
-5
CouponService.php
application/api/service/CouponService.php
+1
-6
No files found.
application/api/controller/Coupon.php
View file @
5afba1ab
...
@@ -43,20 +43,17 @@ class Coupon extends Basic{
...
@@ -43,20 +43,17 @@ class Coupon extends Basic{
$activity_id
=
array_unique
(
array_values
(
$coupon_data
));
$activity_id
=
array_unique
(
array_values
(
$coupon_data
));
$coupon_id
=
array_keys
(
$coupon_data
);
$coupon_id
=
array_keys
(
$coupon_data
);
$activity_where
[
'id'
]
=
[
'in'
,
$activity_id
];
$activity_where
[
'id'
]
=
[
'in'
,
$activity_id
];
$data
=
$this
->
m_activity
->
getActivity
(
'money,return_type,return_action'
,
$activity_where
);
$data
=
$this
->
m_activity
->
getActivity
(
'
title,
money,return_type,return_action'
,
$activity_where
);
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
switch
(
$v
[
'return_action'
])
{
switch
(
$v
[
'return_action'
])
{
case
1
:
case
1
:
$title
=
'邀请用户'
;
$subheading
=
'成功注册并登陆的奖励'
;
$subheading
=
'成功注册并登陆的奖励'
;
break
;
break
;
case
2
:
case
2
:
$title
=
'邀请用户成交'
;
$subheading
=
'在同联商业成交的奖励'
;
$subheading
=
'在同联商业成交的奖励'
;
break
;
break
;
default
:
default
:
$subheading
=
'APP - 我的现金红包中查看'
;
$subheading
=
'APP - 我的现金红包中查看'
;
$title
=
'新用户专享'
;
}
}
if
(
$v
[
'return_type'
]
==
0
)
{
if
(
$v
[
'return_type'
]
==
0
)
{
$content
=
'现金(可提现)'
;
$content
=
'现金(可提现)'
;
...
@@ -64,7 +61,7 @@ class Coupon extends Basic{
...
@@ -64,7 +61,7 @@ class Coupon extends Basic{
$content
=
'返现红包'
;
$content
=
'返现红包'
;
}
}
$data
[
$k
][
'title'
]
=
$
title
;
$data
[
$k
][
'title'
]
=
$
v
[
'title'
]
;
$data
[
$k
][
'subheading'
]
=
$subheading
;
$data
[
$k
][
'subheading'
]
=
$subheading
;
$data
[
$k
][
'content'
]
=
$content
;
$data
[
$k
][
'content'
]
=
$content
;
}
}
...
...
application/api/service/CouponService.php
View file @
5afba1ab
...
@@ -121,7 +121,6 @@ class CouponService{
...
@@ -121,7 +121,6 @@ class CouponService{
default
:
default
:
$return_action
=
0
;
$return_action
=
0
;
}
}
$where
[
'available'
]
=
[
'>'
,
0
];
$where
[
'total'
]
=
[
'>'
,
0
];
$where
[
'total'
]
=
[
'>'
,
0
];
$where
[
'return_action'
]
=
$return_action
;
$where
[
'return_action'
]
=
$return_action
;
$where
[
'status'
]
=
0
;
//0正常 1手动停止 2数量为空 3时间过期 4删除 5未开始
$where
[
'status'
]
=
0
;
//0正常 1手动停止 2数量为空 3时间过期 4删除 5未开始
...
@@ -153,11 +152,7 @@ class CouponService{
...
@@ -153,11 +152,7 @@ class CouponService{
}
}
if
(
strtotime
(
$v
[
'activity_start_time'
])
<
$time
&&
strtotime
(
$v
[
'activity_end_time'
])
>
$time
)
{
if
(
strtotime
(
$v
[
'activity_start_time'
])
<
$time
&&
strtotime
(
$v
[
'activity_end_time'
])
>
$time
)
{
$count_where
[
'activity_id'
]
=
$v
[
'id'
];
$return_activity
[]
=
$v
;
$num
=
$this
->
m_coupon
->
getCount
(
$count_where
);
if
(
$num
<
$v
[
'available'
])
{
$return_activity
[]
=
$v
;
}
}
}
}
}
return
$return_activity
;
return
$return_activity
;
...
...
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