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
3bafeed1
Commit
3bafeed1
authored
Sep 03, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f0abe54d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
Amercement.php
application/index/controller/Amercement.php
+1
-1
AmercementService.php
application/index/service/AmercementService.php
+25
-4
No files found.
application/index/controller/Amercement.php
View file @
3bafeed1
...
@@ -136,7 +136,7 @@ class Amercement extends Basic
...
@@ -136,7 +136,7 @@ class Amercement extends Basic
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
return
$this
->
response
(
"101"
,
$checkResult
);
}
}
$this
->
s_amercement
->
editAmercement
(
$params
[
'id'
],
$params
[
'edit_type'
]);
//int(1)
$this
->
s_amercement
->
editAmercement
(
$params
[
'id'
],
$params
[
'edit_type'
]
,
$this
->
userId
);
//int(1)
return
$this
->
response
(
"200"
,
"成功"
);
return
$this
->
response
(
"200"
,
"成功"
);
}
}
...
...
application/index/service/AmercementService.php
View file @
3bafeed1
...
@@ -277,24 +277,32 @@ class AmercementService
...
@@ -277,24 +277,32 @@ class AmercementService
* 更新数据
* 更新数据
* @param $id
* @param $id
* @param $edit_type
* @param $edit_type
* @param $operation_id
* @return bool
* @return bool
*/
*/
public
function
editAmercement
(
$id
,
$edit_type
)
public
function
editAmercement
(
$id
,
$edit_type
,
$operation_id
)
{
{
//0编辑 1取消 2转已支付
switch
(
$edit_type
)
{
switch
(
$edit_type
)
{
case
0
:
case
0
:
//0编辑
$this
->
updateAmercement
(
$id
);
$this
->
updateAmercement
(
$id
);
break
;
break
;
case
1
:
case
1
:
//1取消
$this
->
cancelAmercement
(
$id
);
$this
->
cancelAmercement
(
$id
);
break
;
break
;
default
:
default
:
$this
->
consummationAmercement
(
$id
);
//2转已支付
$this
->
consummationAmercement
(
$id
,
$operation_id
);
}
}
return
true
;
return
true
;
}
}
/**
* 更新数据 编辑
* @param $id
* @return bool
*/
public
function
updateAmercement
(
$id
)
public
function
updateAmercement
(
$id
)
{
{
...
@@ -317,6 +325,11 @@ class AmercementService
...
@@ -317,6 +325,11 @@ class AmercementService
return
true
;
return
true
;
}
}
/**
* 更新数据 取消
* @param $id
* @return bool
*/
public
function
cancelAmercement
(
$id
)
public
function
cancelAmercement
(
$id
)
{
{
$data
=
[];
$data
=
[];
...
@@ -327,11 +340,19 @@ class AmercementService
...
@@ -327,11 +340,19 @@ class AmercementService
}
}
public
function
consummationAmercement
(
$id
)
/**
* 更新数据 转已支付
* @param $id
* @param $operation_id
* @return bool
*/
public
function
consummationAmercement
(
$id
,
$operation_id
)
{
{
$data
=
[];
$data
=
[];
$data
[
'id'
]
=
$id
;
$data
[
'id'
]
=
$id
;
$data
[
'status'
]
=
2
;
$data
[
'status'
]
=
2
;
$data
[
'operation_id'
]
=
$operation_id
;
$data
[
'operation_time'
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$this
->
m_amercement
->
updateAmercementData
(
$data
);
$this
->
m_amercement
->
updateAmercementData
(
$data
);
return
true
;
return
true
;
}
}
...
...
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