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
585d68db
Commit
585d68db
authored
Jul 31, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<>3
parent
b64b8eba
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
2 deletions
+66
-2
PayLog.php
application/api_broker/controller/PayLog.php
+63
-0
ORefundModel.php
application/model/ORefundModel.php
+1
-1
OfficeORefundModel.php
application/model/OfficeORefundModel.php
+1
-1
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/PayLog.php
View file @
585d68db
...
@@ -4,6 +4,17 @@ namespace app\api_broker\controller;
...
@@ -4,6 +4,17 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\PayLogService
;
use
app\api_broker\service\PayLogService
;
use
app\model\GHouses
;
use
app\model\OfficeOImg
;
use
app\model\OfficeOPayLogModel
;
use
app\model\OfficeOrderModel
;
use
app\model\OfficeORefundLogModel
;
use
app\model\OfficeORefundModel
;
use
app\model\OImg
;
use
app\model\OPayLogModel
;
use
app\model\OrderModel
;
use
app\model\ORefundLogModel
;
use
app\model\ORefundModel
;
use
think\Request
;
use
think\Request
;
/**
/**
...
@@ -164,4 +175,55 @@ class PayLog extends Basic
...
@@ -164,4 +175,55 @@ class PayLog extends Basic
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
}
}
}
/**
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
myRefundList
()
{
$page_no
=
empty
(
$this
->
params
[
"page_no"
])
?
1
:
$this
->
params
[
"page_no"
];
$page_size
=
empty
(
$this
->
params
[
"page_size"
])
?
2
:
$this
->
params
[
"page_size"
];
// if (empty($this->params['agent_id']))) {
// return $this->response(101, '参数错误');
// }
// $where['agent_id'] = $this->params['agent_id'];
$field
=
'id,create_time,agent_name,refund_money,order_id,pay_log_id,bank,card_no,name,remark'
;
$where
[
'is_del'
]
=
0
;
if
(
$this
->
params
[
'refund_type'
]
==
1
)
{
$m_refund
=
new
ORefundModel
();
$m_pay
=
new
OPayLogModel
();
$m_order
=
new
OrderModel
();
$m_check_log
=
new
ORefundLogModel
();
$m_img
=
new
OImg
();
$refund_data
=
$m_refund
->
getList
(
$page_no
,
$page_size
,
'ID DESC'
,
$field
,
$where
);
}
else
{
$m_refund
=
new
OfficeORefundModel
();
$m_pay
=
new
OFficeOPayLogModel
();
$m_order
=
new
OfficeOrderModel
();
$m_check_log
=
new
OfficeORefundLogModel
();
$m_img
=
new
OfficeOImg
();
$refund_data
=
$m_refund
->
getList
(
$page_no
,
$page_size
,
'ID DESC'
,
$field
,
$where
);
}
foreach
(
$refund_data
as
$k
=>
$v
)
{
$refund_data
[
$k
][
'pay_create_time'
]
=
$m_pay
->
getFieldValue
(
'create_time'
,
[
'id'
=>
$v
[
'pay_log_id'
]]);
$house_data
=
$m_order
->
getHouseInfoByOrderIdOne
(
'a.house_id,b.internal_address'
,
[
'a.id'
=>
$v
[
'order_id'
]]);
if
(
$house_data
)
{
$refund_data
[
$k
][
'house_id'
]
=
$house_data
[
'house_id'
];
$refund_data
[
$k
][
'house_address'
]
=
$house_data
[
'internal_address'
];
}
else
{
$refund_data
[
$k
][
'house_id'
]
=
0
;
$refund_data
[
$k
][
'house_address'
]
=
''
;
}
$refund_data
[
$k
][
'image_array'
]
=
$m_img
->
getImgList
([
'img_id'
=>
$v
[
'id'
],
'img_type'
=>
3
]);
$refund_data
[
$k
][
'check_log'
]
=
$m_check_log
->
getListAll
(
'create_time,operation_name'
,
[
'refund_id'
=>
$v
[
'id'
],
'is_del'
=>
0
]);
}
return
$this
->
response
(
"101"
,
$refund_data
);
}
}
}
\ No newline at end of file
application/model/ORefundModel.php
View file @
585d68db
...
@@ -13,7 +13,7 @@ use think\Model;
...
@@ -13,7 +13,7 @@ use think\Model;
* Intro:
* Intro:
*/
*/
class
ORefundModel
extends
Model
{
class
ORefundModel
extends
Base
Model
{
protected
$table
=
"o_refund"
;
protected
$table
=
"o_refund"
;
private
$db_
;
private
$db_
;
...
...
application/model/OfficeORefundModel.php
View file @
585d68db
...
@@ -13,7 +13,7 @@ use think\Model;
...
@@ -13,7 +13,7 @@ use think\Model;
* Intro:
* Intro:
*/
*/
class
OfficeORefundModel
extends
Model
{
class
OfficeORefundModel
extends
Base
Model
{
protected
$table
=
"office_o_refund"
;
protected
$table
=
"office_o_refund"
;
private
$db_
;
private
$db_
;
...
...
application/route.php
View file @
585d68db
...
@@ -776,6 +776,7 @@ Route::group('broker', [
...
@@ -776,6 +776,7 @@ Route::group('broker', [
'collectingBillV2'
=>
[
'api_broker/OrderLog/collectingBillV2'
,
[
'method'
=>
'get|post'
]],
'collectingBillV2'
=>
[
'api_broker/OrderLog/collectingBillV2'
,
[
'method'
=>
'get|post'
]],
'refund'
=>
[
'api_broker/PayLog/refund'
,
[
'method'
=>
'get|post'
]],
'refund'
=>
[
'api_broker/PayLog/refund'
,
[
'method'
=>
'get|post'
]],
'getRefund'
=>
[
'api_broker/PayLog/getRefund'
,
[
'method'
=>
'get|post'
]],
'getRefund'
=>
[
'api_broker/PayLog/getRefund'
,
[
'method'
=>
'get|post'
]],
'myRefundList'
=>
[
'api_broker/PayLog/myRefundList'
,
[
'method'
=>
'get'
]],
//退款审核
'bargain'
=>
[
'api_broker/OrderLog/bargain'
,
[
'method'
=>
'get|post'
]],
'bargain'
=>
[
'api_broker/OrderLog/bargain'
,
[
'method'
=>
'get|post'
]],
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]],
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]],
'getIsAccountStatement'
=>
[
'api_broker/OrderLog/getIsAccountStatement'
,
[
'method'
=>
'get|post'
]],
'getIsAccountStatement'
=>
[
'api_broker/OrderLog/getIsAccountStatement'
,
[
'method'
=>
'get|post'
]],
...
...
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