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
78ddd270
Commit
78ddd270
authored
Jul 31, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
393c1a55
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
123 additions
and
50 deletions
+123
-50
PayLog.php
application/api_broker/controller/PayLog.php
+84
-29
Basic.php
application/api_broker/extend/Basic.php
+1
-1
PayLogService.php
application/api_broker/service/PayLogService.php
+0
-0
OPayLogModel.php
application/model/OPayLogModel.php
+17
-0
route.php
application/route.php
+21
-20
No files found.
application/api_broker/controller/PayLog.php
View file @
78ddd270
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\controller
;
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\PayLogService
;
use
app\api_broker\service\PayLogService
;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\OfficeOImg
;
use
app\model\OfficeOImg
;
...
@@ -116,31 +117,31 @@ class PayLog extends Basic
...
@@ -116,31 +117,31 @@ class PayLog extends Basic
);*/
);*/
$refund_id
=
isset
(
$params
[
"refund_id"
])
?
$params
[
"refund_id"
]
:
0
;
$refund_id
=
isset
(
$params
[
"refund_id"
])
?
$params
[
"refund_id"
]
:
0
;
if
(
$refund_id
==
0
&&
!
isset
(
$params
[
"remark_img"
]))
{
if
(
$refund_id
==
0
&&
!
isset
(
$params
[
"remark_img"
]))
{
return
$this
->
response
(
"101"
,
"请上传图片"
);
return
$this
->
response
(
"101"
,
"请上传图片"
);
}
}
$agent_id
=
$params
[
"agent_id"
];
$agent_id
=
$params
[
"agent_id"
];
$agent_name
=
$params
[
"agent_name"
];
$agent_name
=
$params
[
"agent_name"
];
$report_id
=
$params
[
"report_id"
];
$report_id
=
$params
[
"report_id"
];
$order_id
=
$params
[
"order_id"
];
$order_id
=
$params
[
"order_id"
];
$order_no
=
$params
[
"order_no"
];
$order_no
=
$params
[
"order_no"
];
$refund_money
=
$params
[
"refund_money"
];
$refund_money
=
$params
[
"refund_money"
];
$name
=
$params
[
"name"
];
$name
=
$params
[
"name"
];
$phone
=
$params
[
"phone"
];
$phone
=
$params
[
"phone"
];
$bank
=
$params
[
"bank"
];
$bank
=
$params
[
"bank"
];
$card_no
=
$params
[
"card_no"
];
$card_no
=
$params
[
"card_no"
];
$receipt_number
=
$params
[
"receipt_number"
];
$receipt_number
=
$params
[
"receipt_number"
];
$type
=
$params
[
"type"
];
$type
=
$params
[
"type"
];
$refund_cause
=
$params
[
"refund_cause"
];
$refund_cause
=
$params
[
"refund_cause"
];
$pay_log_id
=
$params
[
"pay_log_id"
];
$pay_log_id
=
$params
[
"pay_log_id"
];
$refund_way
=
$params
[
"refund_way"
];
$refund_way
=
$params
[
"refund_way"
];
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$remark_img
=
isset
(
$params
[
"remark_img"
])
?
json_decode
(
$params
[
"remark_img"
],
true
)
:
""
;
$remark_img
=
isset
(
$params
[
"remark_img"
])
?
json_decode
(
$params
[
"remark_img"
],
true
)
:
""
;
$del_img
=
isset
(
$params
[
"del_img"
])
?
$params
[
"del_img"
]
:
""
;
$del_img
=
isset
(
$params
[
"del_img"
])
?
$params
[
"del_img"
]
:
""
;
//todo 判断此单是否有付款
//todo 判断此单是否有付款
$is_ok
=
$this
->
service_
->
addRefund
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$refund_money
,
$name
,
$is_ok
=
$this
->
service_
->
addRefund
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$refund_money
,
$name
,
$phone
,
$bank
,
$card_no
,
$receipt_number
,
$type
,
$refund_cause
,
$pay_log_id
,
$refund_way
,
$remark
,
$remark_img
$phone
,
$bank
,
$card_no
,
$receipt_number
,
$type
,
$refund_cause
,
$pay_log_id
,
$refund_way
,
$remark
,
$remark_img
,
$refund_id
,
$del_img
);
,
$refund_id
,
$del_img
);
if
(
$is_ok
>
0
)
{
if
(
$is_ok
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[]);
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
elseif
(
$is_ok
==
-
2
)
{
}
elseif
(
$is_ok
==
-
2
)
{
...
@@ -158,21 +159,22 @@ class PayLog extends Basic
...
@@ -158,21 +159,22 @@ class PayLog extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getRefund
(){
public
function
getRefund
()
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"refund_id" =>1
"refund_id" =>1
);*/
);*/
if
(
!
isset
(
$params
[
"refund_id"
]))
{
if
(
!
isset
(
$params
[
"refund_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$result
=
$this
->
service_
->
getRefundDetail
(
$params
[
"refund_id"
]);
$result
=
$this
->
service_
->
getRefundDetail
(
$params
[
"refund_id"
]);
if
(
$result
[
"code"
]
==
200
)
{
if
(
$result
[
"code"
]
==
200
)
{
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"data"
]);
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"data"
]);
}
elseif
(
$result
[
"code"
]
==
101
)
{
}
elseif
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
}
}
}
...
@@ -227,4 +229,56 @@ class PayLog extends Basic
...
@@ -227,4 +229,56 @@ class PayLog extends Basic
}
}
return
$this
->
response
(
"101"
,
$refund_data
);
return
$this
->
response
(
"101"
,
$refund_data
);
}
}
/**我的收款记录列表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getPayLogList
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 1,
"search_type" => 1,//1商铺编号,2商铺地址 3收款id,4带看id
"keyword" => "121",
"submit_time_start" => '123123123123',//时间戳
"submit_time_end" => '123123',
"type" => 10,//入账类型, 10.意向金 30.保管金 91.中介费 92.案场费
"source" => 0,//来源0app 1智能pos机 2调整
"is_open" => 0, //是否开业:0未开业 1开业
"is_all" => 0, //是否查看全部:0自己 1全部
"page_no" => 1,
"page_size" => 15
);*/
if
(
!
isset
(
$params
[
"agent_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$agentModel
=
new
AAgents
();
$agents_data
=
$agentModel
->
getAgentInfo
(
'id,level'
,
$this
->
agentId
);
$result
=
[];
$check_type
=
0
;
if
(
isset
(
$params
[
"is_all"
])
&&
$params
[
"is_all"
]
==
1
)
{
$check_type
=
1
;
if
(
$agents_data
[
"level"
]
<
30
)
{
$orderLogService
=
new
ReportService
();
$check_type
=
$orderLogService
->
getCheckType
(
$this
->
agentId
);
if
(
$check_type
==
0
)
{
return
$this
->
response
(
101
,
"暂无权限"
);
}
}
}
$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
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
}
\ No newline at end of file
application/api_broker/extend/Basic.php
View file @
78ddd270
...
@@ -113,7 +113,7 @@ class Basic extends Controller
...
@@ -113,7 +113,7 @@ class Basic extends Controller
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
//过滤掉不需要验证token的接口
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
$this
->
tokenVerify
();
//
$this->tokenVerify();
//$this->userAuth(trim($requestPath));
//$this->userAuth(trim($requestPath));
}
}
unset
(
$this
->
params
[
"AuthToken"
]);
unset
(
$this
->
params
[
"AuthToken"
]);
...
...
application/api_broker/service/PayLogService.php
View file @
78ddd270
This diff is collapsed.
Click to expand it.
application/model/OPayLogModel.php
View file @
78ddd270
...
@@ -631,5 +631,21 @@ class OPayLogModel extends Model
...
@@ -631,5 +631,21 @@ class OPayLogModel extends Model
->
find
();
->
find
();
}
}
public
function
getPayLogList
(
$params
,
$field
,
$page_no
,
$page_size
)
{
$params
[
"a.is_del"
]
=
0
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"g_houses h"
,
"b.house_id = h.id"
,
"left"
)
->
where
(
$params
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
select
();
//echo $this->getLastSql();
return
$result
;
}
}
}
\ No newline at end of file
application/route.php
View file @
78ddd270
...
@@ -540,28 +540,28 @@ Route::group('index', [
...
@@ -540,28 +540,28 @@ Route::group('index', [
'checkCostFour/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
3
]],
//费用报销审核二审
'checkCostFour/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
3
]],
//费用报销审核二审
'checkCostFive/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
4
]],
//费用报销审核三审
'checkCostFive/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
4
]],
//费用报销审核三审
'getDetailCost'
=>
[
'index/Cost/getDetailCost'
,
[
'method'
=>
'GET'
]],
//费用报销详情
'getDetailCost'
=>
[
'index/Cost/getDetailCost'
,
[
'method'
=>
'GET'
]],
//费用报销详情
'delStoreFeeImage'
=>
[
'index/StoreFee/delStoreFeeImage'
,
[
'method'
=>
'POST'
]],
//删除图片
'delStoreFeeImage'
=>
[
'index/StoreFee/delStoreFeeImage'
,
[
'method'
=>
'POST'
]],
//删除图片
'getCostDetailList'
=>
[
'index/CostDetail/getCostDetailList'
,
[
'method'
=>
'POST|GET'
]],
'getCostDetailList'
=>
[
'index/CostDetail/getCostDetailList'
,
[
'method'
=>
'POST|GET'
]],
'getCostDetailListExcel'
=>
[
'index/CostDetail/getCostDetailListExcel'
,
[
'method'
=>
'POST|GET'
]],
'getCostDetailListExcel'
=>
[
'index/CostDetail/getCostDetailListExcel'
,
[
'method'
=>
'POST|GET'
]],
'getAllStoreCost'
=>
[
'index/CostDetail/getAllStoreCost'
,
[
'method'
=>
'POST|GET'
]],
'getAllStoreCost'
=>
[
'index/CostDetail/getAllStoreCost'
,
[
'method'
=>
'POST|GET'
]],
'getCostInfo'
=>
[
'index/CostDetail/getCostInfo'
,
[
'method'
=>
'POST|GET'
]],
'getCostInfo'
=>
[
'index/CostDetail/getCostInfo'
,
[
'method'
=>
'POST|GET'
]],
'addApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//新增报销申请
'addApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//新增报销申请
'editApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//修改报销申请
'editApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//修改报销申请
'getApplyForFeeStore'
=>
[
'index/StoreFee/getApplyForFeeStore'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'getApplyForFeeStore'
=>
[
'index/StoreFee/getApplyForFeeStore'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'addFeeImage'
=>
[
'index/StoreFee/addFeeImage'
,
[
'method'
=>
'POST'
]],
//新增报销申请图片
'addFeeImage'
=>
[
'index/StoreFee/addFeeImage'
,
[
'method'
=>
'POST'
]],
//新增报销申请图片
'getStoreOffice'
=>
[
'index/Store/getStoreOffice'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'getStoreOffice'
=>
[
'index/Store/getStoreOffice'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'creationStoreFee'
=>
[
'index/StoreFee/creationStoreFee'
,
[
'method'
=>
'POST|GET'
]
],
'creationStoreFee'
=>
[
'index/StoreFee/creationStoreFee'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreFeeDetail'
=>
[
'index/StoreFee/getStoreFeeDetail'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreFeeDetail'
=>
[
'index/StoreFee/getStoreFeeDetail'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreCostParameterList'
=>
[
'index/CostParameter/getStoreCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreCostParameterList'
=>
[
'index/CostParameter/getStoreCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'editCostParameter'
=>
[
'index/CostParameter/editCostParameter'
,
[
'method'
=>
'POST|GET'
]
],
'editCostParameter'
=>
[
'index/CostParameter/editCostParameter'
,
[
'method'
=>
'POST|GET'
]
],
'checkCostParameter'
=>
[
'index/CostParameter/checkCostParameter'
,
[
'method'
=>
'POST'
]
],
//核对参数
'checkCostParameter'
=>
[
'index/CostParameter/checkCostParameter'
,
[
'method'
=>
'POST'
]
],
//核对参数
'getCostParameter'
=>
[
'index/CostParameter/getCostParameter'
,
[
'method'
=>
'GET'
]
],
//核对记录
'getCostParameter'
=>
[
'index/CostParameter/getCostParameter'
,
[
'method'
=>
'GET'
]
],
//核对记录
'getCompanyCostParameterList'
=>
[
'index/CostParameter/getCompanyCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'getCompanyCostParameterList'
=>
[
'index/CostParameter/getCompanyCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'editCompanyData'
=>
[
'index/CostParameter/editCompanyData'
,
[
'method'
=>
'POST|GET'
]
],
'editCompanyData'
=>
[
'index/CostParameter/editCompanyData'
,
[
'method'
=>
'POST|GET'
]
],
'editDiscounts'
=>
[
'index/CostParameter/editDiscounts'
,
[
'method'
=>
'POST|GET'
]
],
'editDiscounts'
=>
[
'index/CostParameter/editDiscounts'
,
[
'method'
=>
'POST|GET'
]
],
]);
]);
...
@@ -860,7 +860,7 @@ Route::group('broker', [
...
@@ -860,7 +860,7 @@ Route::group('broker', [
'center'
=>
[
'api_broker/MyCenter/center'
,
[
'method'
=>
'get|post'
]],
'center'
=>
[
'api_broker/MyCenter/center'
,
[
'method'
=>
'get|post'
]],
'centerV2'
=>
[
'api_broker/MyCenter/centerV2'
,
[
'method'
=>
'get|post'
]],
'centerV2'
=>
[
'api_broker/MyCenter/centerV2'
,
[
'method'
=>
'get|post'
]],
// 'houseEdit' => [ 'api_broker/shop/edit', [ 'method' => 'get|post' ] ], //编辑商铺
// 'houseEdit' => [ 'api_broker/shop/edit', [ 'method' => 'get|post' ] ], //编辑商铺
// 'houseEditV2' => [ 'api_broker/shop/editV2', [ 'method' => 'get|post' ] ], //编辑商铺
// 'houseEditV2' => [ 'api_broker/shop/editV2', [ 'method' => 'get|post' ] ], //编辑商铺
'houseEditV2'
=>
[
'api_broker/shop/edit'
,
[
'method'
=>
'get|post'
]],
//编辑商铺
'houseEditV2'
=>
[
'api_broker/shop/edit'
,
[
'method'
=>
'get|post'
]],
//编辑商铺
...
@@ -977,6 +977,7 @@ Route::group('broker', [
...
@@ -977,6 +977,7 @@ Route::group('broker', [
'getBeForNum'
=>
[
'api_broker/PayLog/getBeForNum'
,
[
'method'
=>
'get|post'
]],
'getBeForNum'
=>
[
'api_broker/PayLog/getBeForNum'
,
[
'method'
=>
'get|post'
]],
'adjustment'
=>
[
'api_broker/PayLog/adjustment'
,
[
'method'
=>
'get|post'
]],
'adjustment'
=>
[
'api_broker/PayLog/adjustment'
,
[
'method'
=>
'get|post'
]],
'getPayLogList'
=>
[
'api_broker/PayLog/getPayLogList'
,
[
'method'
=>
'get|post'
]],
//原生客户详情
//原生客户详情
'getUserLabels'
=>
[
'api_broker/User/getUserLabels'
,
[
'method'
=>
'get|post'
]],
//获取电话跟进标签列表
'getUserLabels'
=>
[
'api_broker/User/getUserLabels'
,
[
'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