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
0f18c375
Commit
0f18c375
authored
Jul 09, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agentBargainIncome
parent
9f5357ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
OBargainModel.php
application/model/OBargainModel.php
+20
-1
No files found.
application/model/OBargainModel.php
View file @
0f18c375
...
@@ -640,7 +640,7 @@ class OBargainModel extends Model
...
@@ -640,7 +640,7 @@ class OBargainModel extends Model
if
(
isset
(
$params
[
"create_time"
]))
{
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"c.income_time"
]
=
$params
[
"create_time"
];
$where_
[
"c.income_time"
]
=
$params
[
"create_time"
];
}
}
$where_
[
"status"
]
=
array
(
"in"
,
"10,11,13"
);
return
Db
::
table
(
$this
->
table
)
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
...
@@ -1702,4 +1702,22 @@ class OBargainModel extends Model
...
@@ -1702,4 +1702,22 @@ class OBargainModel extends Model
->
where
(
$where
)
->
where
(
$where
)
->
find
();
->
find
();
}
}
/**
* @param $field
* @param $where
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
agentBargainIncome
(
$field
,
$where
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
'o_partial_commission c'
,
'a.id = c.bargain_id'
,
'left'
)
->
join
(
'o_real_income d'
,
'c.real_income_id = d.id'
,
'left'
)
->
where
(
$where
)
->
select
();
}
}
}
\ 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