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
de8cc129
Commit
de8cc129
authored
Sep 29, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
是否有支付过
parent
4bd44892
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
AmercementService.php
application/index/service/AmercementService.php
+6
-6
No files found.
application/index/service/AmercementService.php
View file @
de8cc129
...
@@ -402,9 +402,9 @@ class AmercementService
...
@@ -402,9 +402,9 @@ class AmercementService
public
function
cancelAmercement
(
$id
)
public
function
cancelAmercement
(
$id
)
{
{
//判断是否有支付过
//判断是否有支付过
$payInfo
=
$this
->
isPay
(
$id
,
-
1
);
$payInfo
=
$this
->
isPay
(
$id
);
if
(
$payInfo
)
{
//
有支付订单号
不允许取消
if
(
$payInfo
)
{
//
已支付
不允许取消
return
[
'code'
=>
101
,
'msg'
=>
'失败!该罚款
有支付订单
'
];
return
[
'code'
=>
101
,
'msg'
=>
'失败!该罚款
已支付
'
];
}
else
{
//无支付订单号 允许取消
}
else
{
//无支付订单号 允许取消
$data
=
[];
$data
=
[];
$data
[
'id'
]
=
$id
;
$data
[
'id'
]
=
$id
;
...
@@ -446,11 +446,11 @@ class AmercementService
...
@@ -446,11 +446,11 @@ class AmercementService
*/
*/
public
function
isPay
(
$amercement_id
,
$status
=
1
)
public
function
isPay
(
$amercement_id
,
$status
=
1
)
{
{
$amercementPayModel
=
new
OAmercementPayModel
();
$amercementPayModel
=
new
OAmercementPayModel
();
$where
[
"amercement_id"
]
=
$amercement_id
;
$where
[
"amercement_id"
]
=
$amercement_id
;
$where
[
"status"
]
=
$status
;
$where
[
"status"
]
=
$status
;
//支付状态 0待付款 1已支付 2 支付失败 3支付中
if
(
$status
==
-
1
)
{
if
(
$status
==
-
1
)
{
$where
[
"status"
]
=
array
(
'neq'
,
2
);
//排除支付失败的
$where
[
"status"
]
=
array
(
'neq'
,
2
);
//排除支付失败的
}
}
$payInfo
=
$amercementPayModel
->
getAmercementPayInfo
(
$where
,
"id,status,trade_no"
);
$payInfo
=
$amercementPayModel
->
getAmercementPayInfo
(
$where
,
"id,status,trade_no"
);
return
$payInfo
;
return
$payInfo
;
...
...
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