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
0cb44bc6
Commit
0cb44bc6
authored
Jul 31, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
office
parent
78ddd270
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
11 deletions
+51
-11
OfficePayLog.php
application/api_broker/controller/OfficePayLog.php
+49
-0
PayLog.php
application/api_broker/controller/PayLog.php
+1
-11
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/OfficePayLog.php
View file @
0cb44bc6
...
...
@@ -4,6 +4,11 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\OfficePayLogService
;
use
app\model\OfficeOImg
;
use
app\model\OfficeOPayLogModel
;
use
app\model\OfficeOrderModel
;
use
app\model\OfficeORefundLogModel
;
use
app\model\OfficeORefundModel
;
use
think\Request
;
/**
...
...
@@ -164,4 +169,47 @@ class OfficePayLog extends Basic
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
;
$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
]);
$refund_data
[
$k
][
'file_path'
]
=
'static/chat_image/'
;
}
return
$this
->
response
(
"101"
,
$refund_data
);
}
}
\ No newline at end of file
application/api_broker/controller/PayLog.php
View file @
0cb44bc6
...
...
@@ -196,21 +196,12 @@ class PayLog extends Basic
$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'
]]);
...
...
@@ -229,6 +220,7 @@ class PayLog extends Basic
}
return
$this
->
response
(
"101"
,
$refund_data
);
}
/**我的收款记录列表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
...
...
@@ -279,6 +271,5 @@ class PayLog extends Basic
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
\ No newline at end of file
application/route.php
View file @
0cb44bc6
...
...
@@ -1092,6 +1092,7 @@ Route::group('office', [
'adjustment'
=>
[
'api_broker/OfficePayLog/adjustment'
,
[
'method'
=>
'get|post'
]],
'refund'
=>
[
'api_broker/OfficePayLog/refund'
,
[
'method'
=>
'get|post'
]],
'getRefund'
=>
[
'api_broker/OfficePayLog/getRefund'
,
[
'method'
=>
'get|post'
]],
'myRefundList'
=>
[
'api_broker/OfficePayLog/myRefundList'
,
[
'method'
=>
'get'
]],
//退款审核
'bargainListSearchBargainId'
=>
[
'api_broker/OfficeBargain/bargainListSearchBargainId'
,
[
'method'
=>
'POST|GET'
]],
'bargainMain'
=>
[
'api_broker/OfficeBargain/bargainList'
,
[
'method'
=>
'POST|GET'
]],
...
...
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