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
106dee92
Commit
106dee92
authored
Dec 13, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
and 调整
parent
b9679fd7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
1 deletion
+68
-1
OrderLog.php
application/api_broker/controller/OrderLog.php
+1
-1
PayLog.php
application/api_broker/controller/PayLog.php
+16
-0
PayLogService.php
application/api_broker/service/PayLogService.php
+12
-0
OPayLogAdjustment.php
application/model/OPayLogAdjustment.php
+39
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
106dee92
...
@@ -232,7 +232,7 @@ class OrderLog extends Basic
...
@@ -232,7 +232,7 @@ class OrderLog extends Basic
$params
[
"collecting_bill"
]
=
json_decode
(
$params
[
"collecting_bill"
],
true
);
$params
[
"collecting_bill"
]
=
json_decode
(
$params
[
"collecting_bill"
],
true
);
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$transfer_img
=
isset
(
$params
[
"transfer_img"
])
?
$params
[
"transfer_img"
]
:
""
;
$transfer_img
=
isset
(
$params
[
"transfer_img"
])
?
json_decode
(
$params
[
"transfer_img"
]
,
true
)
:
""
;
$source
=
$params
[
"source"
]
?
$params
[
"source"
]
:
0
;
$source
=
$params
[
"source"
]
?
$params
[
"source"
]
:
0
;
$income_time
=
isset
(
$params
[
"income_time"
])
?
$params
[
"income_time"
]
:
""
;
$income_time
=
isset
(
$params
[
"income_time"
])
?
$params
[
"income_time"
]
:
""
;
...
...
application/api_broker/controller/PayLog.php
View file @
106dee92
...
@@ -22,6 +22,10 @@ class PayLog extends Basic
...
@@ -22,6 +22,10 @@ class PayLog extends Basic
$this
->
service_
=
new
PayLogService
();
$this
->
service_
=
new
PayLogService
();
}
}
/**
* 获取上次提交收款的门牌号等
* @return \think\Response
*/
public
function
getBeForNum
()
public
function
getBeForNum
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
...
@@ -40,4 +44,15 @@ class PayLog extends Basic
...
@@ -40,4 +44,15 @@ class PayLog extends Basic
}
}
}
}
public
function
adjustment
(){
$params
=
$this
->
params
;
$params
=
array
(
"pay_id"
=>
1
,
);
if
(
empty
(
$params
[
"pay_id"
])){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$this
->
service_
->
adjustment
(
$params
[
"pay_id"
]);
}
}
}
\ No newline at end of file
application/api_broker/service/PayLogService.php
View file @
106dee92
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
app\api_broker\service
;
namespace
app\api_broker\service
;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayLogModel
;
use
app\model\OPayLogModel
;
/**
/**
...
@@ -14,10 +15,12 @@ use app\model\OPayLogModel;
...
@@ -14,10 +15,12 @@ use app\model\OPayLogModel;
class
PayLogService
class
PayLogService
{
{
private
$payLogModel
;
private
$payLogModel
;
private
$payLogAdjustmentModel
;
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
payLogModel
=
new
OPayLogModel
();
$this
->
payLogModel
=
new
OPayLogModel
();
$this
->
payLogAdjustmentModel
=
new
OPayLogAdjustment
();
}
}
public
function
getBeForNum
(
$order_id
)
public
function
getBeForNum
(
$order_id
)
...
@@ -26,4 +29,12 @@ class PayLogService
...
@@ -26,4 +29,12 @@ class PayLogService
return
$this
->
payLogModel
->
getBeforeBillInfo
(
$filed
,
[
"order_id"
=>
$order_id
]);
return
$this
->
payLogModel
->
getBeforeBillInfo
(
$filed
,
[
"order_id"
=>
$order_id
]);
}
}
public
function
adjustment
(
$pay_id
){
//todo 1.计算剩余金额 查询调整表
$where_
[
"paylog_id"
]
=
$pay_id
;
$where_
[
"is_del"
]
=
0
;
$this
->
payLogAdjustmentModel
->
getAdjustmentList
(
$where_
,
""
);
}
}
}
\ No newline at end of file
application/model/OPayLogAdjustment.php
0 → 100644
View file @
106dee92
<?php
namespace
app\model
;
use
think\Db
;
use
think\Model
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/12/13
* Time : 4:29 PM
* Intro:
*/
class
OPayLogAdjustment
extends
Model
{
protected
$table
=
"o_paylog_adjustment"
;
private
$db_
;
public
function
__construct
()
{
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAdjustmentList
(
$field
,
$params
){
return
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
select
();
}
}
\ No newline at end of file
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