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
d5c61163
Commit
d5c61163
authored
Nov 12, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化下
parent
24bb5e8f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
1 deletion
+101
-1
AppChat.php
application/chat/controller/AppChat.php
+3
-1
RankingList.php
application/index/controller/RankingList.php
+27
-0
RankingListService.php
application/index/service/RankingListService.php
+49
-0
AAgents.php
application/model/AAgents.php
+17
-0
TAgentTotalModel.php
application/model/TAgentTotalModel.php
+5
-0
No files found.
application/chat/controller/AppChat.php
View file @
d5c61163
...
@@ -541,6 +541,7 @@ class AppChat extends Basic
...
@@ -541,6 +541,7 @@ class AppChat extends Basic
}
}
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$param
[
"is_read"
]
=
0
;
$param
[
"type"
]
=
2
;
$param
[
"type"
]
=
2
;
//TODO 获取未读个数
//TODO 获取未读个数
$data
[
"user_count"
]
=
$msgModel
->
getListCountByWhere
(
$param
);
$data
[
"user_count"
]
=
$msgModel
->
getListCountByWhere
(
$param
);
...
@@ -564,7 +565,8 @@ class AppChat extends Basic
...
@@ -564,7 +565,8 @@ class AppChat extends Basic
}
}
//todo 先获取是否有店铺或客户修改消息是否为0,大于0返回true,否则查询聊天消息是否有未读
//todo 先获取是否有店铺或客户修改消息是否为0,大于0返回true,否则查询聊天消息是否有未读
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$param
[
"type"
]
=
2
;
$param
[
"type"
]
=
2
;
$param
[
"is_read"
]
=
0
;
//TODO 获取未读个数
//TODO 获取未读个数
$msgModel
=
new
MPushMessage
();
$msgModel
=
new
MPushMessage
();
$user_count
=
$msgModel
->
getListCountByWhere
(
$param
);
$user_count
=
$msgModel
->
getListCountByWhere
(
$param
);
...
...
application/index/controller/RankingList.php
0 → 100644
View file @
d5c61163
<?php
namespace
app\index
;
use
app\api\service\RankingListService
;
use
app\index\extend\Basic
;
use
think\Request
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/11/12
* Time : 2:04 PM
* Intro: pk榜
*/
class
RankingList
extends
Basic
{
private
$service_
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
RankingListService
();
}
public
function
getRandKingList
(){
$siteId
=
$this
->
siteId
;
$this
->
service_
->
RankingList
(
0
,
$siteId
);
}
}
\ No newline at end of file
application/index/service/RankingListService.php
0 → 100644
View file @
d5c61163
<?php
namespace
app\api\service
;
use
app\model\AAgents
;
use
app\model\TAgentTotalModel
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/11/12
* Time : 2:06 PM
* Intro:
*/
class
RankingListService
{
private
$agentModel
;
private
$agentTotalModel
;
public
function
__construct
()
{
$this
->
agentModel
=
new
AAgents
();
$this
->
agentTotalModel
=
new
TAgentTotalModel
();
}
public
function
RankingList
(
$position
,
$siteId
)
{
//todo 1.查询出此职称的经纪人 获取10月份某个职称的排行 职称 1店长 2经理 3主任 4顾问 0新人
//todo 2.根据上月的业绩排行获取本月业绩排行,
//todo 3.根据此职称的总经纪人数分组
$fields
=
"id,store_id,district_id"
;
$params
[
"site_id"
]
=
$siteId
;
$params
[
"position"
]
=
$position
;
$params
[
"status"
]
=
array
(
"in"
,
"0,3"
);
$resultArr
=
$this
->
agentModel
->
getAgentsListByPK
(
$fields
,
$params
);
if
(
count
(
$resultArr
)
<=
0
)
{
return
false
;
}
$ids
=
""
;
foreach
(
$resultArr
as
$item
)
{
$ids
.=
$item
[
"id"
]
.
","
;
}
$ids
=
rtrim
(
$ids
,
","
);
$this
->
agentTotalModel
->
getSortPerformance
();
}
}
\ No newline at end of file
application/model/AAgents.php
View file @
d5c61163
...
@@ -409,6 +409,23 @@ class AAgents extends BaseModel
...
@@ -409,6 +409,23 @@ class AAgents extends BaseModel
->
select
();
->
select
();
}
}
/**
* @param string $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAgentsListByPK
(
$field
=
"id"
,
$params
)
{
$params
[
"district_id"
]
=
array
(
'not in'
,
array
(
'13'
,
'14'
,
'15'
)
);
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$params
)
->
select
();
}
/**
/**
* 获取经纪人列表--排掉店子和总监
* 获取经纪人列表--排掉店子和总监
*
*
...
...
application/model/TAgentTotalModel.php
View file @
d5c61163
...
@@ -313,4 +313,8 @@ class TAgentTotalModel extends Model
...
@@ -313,4 +313,8 @@ class TAgentTotalModel extends Model
return
$result
;
return
$result
;
}
}
public
function
getSortPerformance
(){
}
}
}
\ 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