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
3c2f8364
Commit
3c2f8364
authored
Feb 01, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型方法名修改
parent
a147d46d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
23 deletions
+24
-23
Agent.php
application/index/controller/Agent.php
+1
-1
Broker.php
application/index/controller/Broker.php
+21
-1
AAgents.php
application/model/AAgents.php
+1
-1
AuthGroup.php
application/model/AuthGroup.php
+0
-20
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Agent.php
View file @
3c2f8364
...
@@ -83,7 +83,7 @@ class Agent extends Basic
...
@@ -83,7 +83,7 @@ class Agent extends Basic
[
'a_store s'
,
' a.store_id=a.id'
,
'left'
],
[
'a_store s'
,
' a.store_id=a.id'
,
'left'
],
[
'a_district d'
,
'a.district_id=d.id'
,
'left'
]
[
'a_district d'
,
'a.district_id=d.id'
,
'left'
]
];
];
$data
[
'list'
]
=
$table
->
getList
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where
);
$data
[
'list'
]
=
$table
->
getList
Join
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where
);
$data
[
'total'
]
=
$table
->
getTotal2
(
$where
);
$data
[
'total'
]
=
$table
->
getTotal2
(
$where
);
// prt($list);//转化arr
// prt($list);//转化arr
//prt(collection($list)->toArray());//转化arr
//prt(collection($list)->toArray());//转化arr
...
...
application/index/controller/Broker.php
View file @
3c2f8364
...
@@ -16,6 +16,9 @@ use app\model\GHousesToAgents;
...
@@ -16,6 +16,9 @@ use app\model\GHousesToAgents;
class
Broker
extends
Basic
class
Broker
extends
Basic
{
{
protected
$code
=
200
;
protected
$data
=
''
;
protected
$msg
=
''
;
/**
/**
* 获取经纪人列表
* 获取经纪人列表
...
@@ -72,7 +75,7 @@ class Broker extends Basic
...
@@ -72,7 +75,7 @@ class Broker extends Basic
if
(
$where
)
{
if
(
$where
)
{
$agent
=
new
AAgents
();
$agent
=
new
AAgents
();
$field
=
'id,name,phone'
;
$field
=
'id,name,phone'
;
$data
[
'data'
]
=
$agent
->
getList
(
$pageNo
,
$pageSize
,
''
,
$field
,
$where
);
$data
[
'data'
]
=
$agent
->
getList
Join
(
$pageNo
,
$pageSize
,
''
,
$field
,
$where
);
}
else
{
}
else
{
$data
[
'msg'
]
=
'没有经纪人信息'
;
$data
[
'msg'
]
=
'没有经纪人信息'
;
}
}
...
@@ -166,4 +169,20 @@ class Broker extends Basic
...
@@ -166,4 +169,20 @@ class Broker extends Basic
}
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
* 总监列表
*
* @return \think\Response
*/
public
function
getDistrictList
()
{
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$agents
=
new
AAgents
();
$field
=
'id,name,create_time,phone'
;
$where
[
'level'
]
=
[
'IN'
,
'30,40'
];
$where
[
'status'
]
=
0
;
$this
->
data
=
$agents
->
getList
(
$pageNo
,
$pageSize
,
''
,
$field
,
''
,
$where
);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
}
\ No newline at end of file
application/model/AAgents.php
View file @
3c2f8364
...
@@ -17,7 +17,7 @@ public function saveList(){
...
@@ -17,7 +17,7 @@ public function saveList(){
}
}
//分页列表
//分页列表
public
function
getList
(
$p
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$join
=
''
,
$where
=
''
)
public
function
getList
Join
(
$p
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$join
=
''
,
$where
=
''
)
{
{
$data
=
$this
->
field
(
$field
)
$data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
alias
(
'a'
)
...
...
application/model/AuthGroup.php
View file @
3c2f8364
...
@@ -165,27 +165,7 @@ class AuthGroup extends BaseModel
...
@@ -165,27 +165,7 @@ class AuthGroup extends BaseModel
public
function
checkGroupId
(
$gid
){
public
function
checkGroupId
(
$gid
){
return
$this
->
checkId
(
'AuthGroup'
,
$gid
,
'以下用户组id不存在:'
);
return
$this
->
checkId
(
'AuthGroup'
,
$gid
,
'以下用户组id不存在:'
);
}
}
/**
* 返回角色分组
*
* @param type $pageNo
* @param type $pageSize
* @param type $order_
* @param type $field
* @param type $params
* @return type
*/
public
function
getList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
public
function
getList2
(
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
public
function
getList2
(
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
return
$this
->
field
(
$field
)
->
where
(
$params
)
->
where
(
$params
)
...
...
application/route.php
View file @
3c2f8364
...
@@ -121,6 +121,7 @@ Route::group('index', [
...
@@ -121,6 +121,7 @@ Route::group('index', [
'editExclusive'
=>
[
'index/houses/editExclusive'
,
[
'method'
=>
'post'
]],
//添加和编辑楼盘独家
'editExclusive'
=>
[
'index/houses/editExclusive'
,
[
'method'
=>
'post'
]],
//添加和编辑楼盘独家
'getExclusive'
=>
[
'index/houses/getExclusive'
,
[
'method'
=>
'get'
]],
//获取楼盘独家
'getExclusive'
=>
[
'index/houses/getExclusive'
,
[
'method'
=>
'get'
]],
//获取楼盘独家
'getRecords'
=>
[
'index/houses/getRecords'
,[
'method'
=>
'get'
]],
//操作记录
'getRecords'
=>
[
'index/houses/getRecords'
,[
'method'
=>
'get'
]],
//操作记录
'getDistrictList'
=>
[
'index/broker/getDistrictList'
,[
'method'
=>
'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