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
0c4c0e0d
Commit
0c4c0e0d
authored
Aug 08, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d87a3adb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
14 deletions
+32
-14
PayLog.php
application/api_broker/controller/PayLog.php
+32
-14
No files found.
application/api_broker/controller/PayLog.php
View file @
0c4c0e0d
...
...
@@ -7,6 +7,7 @@ use app\api_broker\service\PayLogService;
use
app\api_broker\service\ReportService
;
use
app\model\AAgents
;
use
app\model\OImg
;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayLogModel
;
use
app\model\OrderModel
;
use
app\model\ORefundLogModel
;
...
...
@@ -238,7 +239,7 @@ class PayLog extends Basic
}
$refund_data
[
$k
][
'return_type'
]
=
$this
->
params
[
'type'
];
}
return
$this
->
response
(
200
,
''
,
$refund_data
);
return
$this
->
response
(
200
,
''
,
$refund_data
);
}
/**我的收款记录列表
...
...
@@ -286,6 +287,21 @@ class PayLog extends Basic
}
$field
=
"a.type,a.id,a.create_time,a.income_time,a.money,a.type_ext,a.bargain_id,a.is_open,a.source,a.agent_id,a.agent_name"
;
$result
=
$this
->
service_
->
getPayLogList
(
$field
,
$params
,
$pageNo
,
$pageSize
,
$check_type
);
$adjustmentModel
=
new
OPayLogAdjustment
();
$refundModel
=
new
ORefundModel
();
$status
=
0
;
foreach
(
$result
as
$key
=>
$item
)
{
$is_adjustment
=
$adjustmentModel
->
getFieldValue
(
'id'
,
[
'paylog_id'
=>
$item
[
"id"
],
'is_del'
=>
0
]);
$is_refund
=
$refundModel
->
getFind
(
'id'
,
[
'pay_log_id'
=>
$item
[
"id"
],
'is_del'
=>
0
]);
if
(
$is_adjustment
&&
$is_refund
)
{
$status
=
3
;
}
else
if
(
$is_adjustment
)
{
$status
=
1
;
}
else
if
(
$is_refund
)
{
$status
=
2
;
}
$result
[
$key
][
"status"
]
=
$status
;
}
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
...
...
@@ -348,7 +364,8 @@ class PayLog extends Basic
* 收款列表记录上传图片
* 朱伟 2018-07-04
*/
public
function
addReceiptImg
(){
public
function
addReceiptImg
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$result
=
0
;
...
...
@@ -357,29 +374,29 @@ class PayLog extends Basic
"img_name" => 123,
);*/
if
(
!
isset
(
$params
[
"img_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
if
(
!
isset
(
$params
[
"img_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
if
(
!
isset
(
$params
[
"img_name"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
if
(
!
isset
(
$params
[
"img_name"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$order
=
new
OImg
();
$img_arr
=
explode
(
','
,
$params
[
"img_name"
]);
foreach
(
$img_arr
as
$k
=>
$v
){
$img_arr
=
explode
(
','
,
$params
[
"img_name"
]);
foreach
(
$img_arr
as
$k
=>
$v
)
{
$time
=
date
(
"Y-m-d H:i:s"
);
$save_data
[
"img_id"
]
=
$params
[
"img_id"
];
//id根据img_type区分是收款还是进场还是其他'
$save_data
[
"img_type"
]
=
2
;
//图片类型:1进场,2收款
$save_data
[
"img_type"
]
=
2
;
//图片类型:1进场,2收款
$save_data
[
"img_name"
]
=
$v
;
//图片名称
$save_data
[
"img_status"
]
=
0
;
//删除状态 0正常 1删除
$save_data
[
"img_status"
]
=
0
;
//删除状态 0正常 1删除
$save_data
[
"update_time"
]
=
$time
;
//更新时间
$save_data
[
"create_time"
]
=
$time
;
//创建时间
$result
=
$order
->
addImgOnce
(
$save_data
);
}
if
(
$result
)
{
return
$this
->
response
(
"200"
,
"成功"
);
}
else
{
return
$this
->
response
(
"101"
,
"失败"
);
if
(
$result
)
{
return
$this
->
response
(
"200"
,
"成功"
);
}
else
{
return
$this
->
response
(
"101"
,
"失败"
);
}
}
}
\ 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