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
4a2ecfbd
Commit
4a2ecfbd
authored
Dec 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整详情
parent
08c912cb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
2 deletions
+36
-2
Finance.php
application/index/controller/Finance.php
+22
-1
OPayLogAdjustment.php
application/model/OPayLogAdjustment.php
+1
-1
OPayLogModel.php
application/model/OPayLogModel.php
+12
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Finance.php
View file @
4a2ecfbd
...
@@ -3126,7 +3126,7 @@ class Finance extends Basic
...
@@ -3126,7 +3126,7 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
'无调整信息'
);
return
$this
->
response
(
$code
,
'无调整信息'
);
}
}
$num
=
$m_pay_adjustment
->
editData
([
'is_del'
=>
0
],
$this
->
params
[
'id'
]);
$num
=
$m_pay_adjustment
->
editData
([
'is_del'
=>
1
],
$this
->
params
[
'id'
]);
if
(
$num
>
0
)
{
if
(
$num
>
0
)
{
$m_pay
=
new
OPayLogModel
();
$m_pay
=
new
OPayLogModel
();
...
@@ -3141,4 +3141,25 @@ class Finance extends Basic
...
@@ -3141,4 +3141,25 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
$msg
);
return
$this
->
response
(
$code
,
$msg
);
}
}
public
function
getAdjustmentDetail
()
{
$code
=
101
;
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
response
(
$code
,
'参数错误'
);
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$adjustment_data
=
$m_pay_adjustment
->
getAdjustmentList
(
'id,new_paylog_id,paylog_id,money'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
if
(
empty
(
$adjustment_data
[
0
][
'id'
]))
{
return
$this
->
response
(
$code
,
'没有该调整详情'
);
}
$m_pay
=
new
OPayLogModel
();
$result
[
'adjustment'
]
=
$m_pay
->
getOrderHouse
(
'a.id,a.order_id,b.house_id,c.internal_address,a.income_time,a.type,a.money'
,
[
'a.id'
=>
$adjustment_data
[
0
][
'new_paylog_id'
]]);
$result
[
'adjustment_old'
]
=
$m_pay
->
getOrderHouse
(
'a.id,a.order_id,b.house_id,c.internal_address,a.income_time,a.type,a.type'
,
[
'a.id'
=>
$adjustment_data
[
0
][
'paylog_id'
]]);
$result
[
'money'
]
=
$adjustment_data
[
0
][
'money'
];
$result
[
'id'
]
=
$adjustment_data
[
0
][
'id'
];
$code
=
200
;
return
$this
->
response
(
$code
,
''
,
$result
);
}
}
}
application/model/OPayLogAdjustment.php
View file @
4a2ecfbd
...
@@ -28,7 +28,7 @@ class OPayLogAdjustment extends BaseModel{
...
@@ -28,7 +28,7 @@ class OPayLogAdjustment extends BaseModel{
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getAdjustmentList
(
$field
,
$params
){
public
function
getAdjustmentList
(
$field
,
$params
){
return
$this
->
db_
return
$this
->
db_
->
field
(
$field
)
->
field
(
$field
)
->
where
(
$params
)
->
where
(
$params
)
...
...
application/model/OPayLogModel.php
View file @
4a2ecfbd
...
@@ -456,6 +456,7 @@ class OPayLogModel extends Model
...
@@ -456,6 +456,7 @@ class OPayLogModel extends Model
->
select
();
->
select
();
}
}
/**
/**
* @param $filed
* @param $filed
* @param $params
* @param $params
...
@@ -472,6 +473,16 @@ class OPayLogModel extends Model
...
@@ -472,6 +473,16 @@ class OPayLogModel extends Model
->
join
(
"o_bargain c"
,
"c.order_id = b.id"
,
"left"
)
->
join
(
"o_bargain c"
,
"c.order_id = b.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
where
(
$params
)
->
where
(
$params
)
public
function
getOrderHouse
(
$field
,
$where
,
$limit
=
0
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'o_order b'
,
'a.order_id=b.id'
,
'left'
)
->
join
(
'g_houses c'
,
'b.house_id=c.id'
,
'left'
)
->
where
(
$where
)
->
limit
(
$limit
)
->
select
();
->
select
();
}
}
}
}
\ No newline at end of file
application/route.php
View file @
4a2ecfbd
...
@@ -279,6 +279,7 @@ Route::group('index', [
...
@@ -279,6 +279,7 @@ Route::group('index', [
'getBeForNum'
=>
[
'index/Finance/getBeForNum'
,
[
'method'
=>
'get'
]],
//getBeForNum
'getBeForNum'
=>
[
'index/Finance/getBeForNum'
,
[
'method'
=>
'get'
]],
//getBeForNum
'getAdjustment'
=>
[
'index/Finance/getAdjustment'
,
[
'method'
=>
'get'
]],
//剩余可以调整或退款的钱
'getAdjustment'
=>
[
'index/Finance/getAdjustment'
,
[
'method'
=>
'get'
]],
//剩余可以调整或退款的钱
'delAdjustment'
=>
[
'index/Finance/delAdjustment'
,
[
'method'
=>
'post'
]],
//撤销调整
'delAdjustment'
=>
[
'index/Finance/delAdjustment'
,
[
'method'
=>
'post'
]],
//撤销调整
'getAdjustmentDetail'
=>
[
'index/Finance/getAdjustmentDetail'
,
[
'method'
=>
'get'
]],
//调整详情
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'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