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
a562a2b8
Commit
a562a2b8
authored
Apr 03, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聊天bug
parent
c7f24cd0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
30 deletions
+33
-30
AppChat.php
application/chat/controller/AppChat.php
+5
-5
ChatService.php
application/chat/service/ChatService.php
+1
-2
Banner.php
application/index/controller/Banner.php
+24
-23
AAgents.php
application/model/AAgents.php
+3
-0
No files found.
application/chat/controller/AppChat.php
View file @
a562a2b8
...
...
@@ -118,10 +118,10 @@ class AppChat extends Basic
if
(
!
isset
(
$params
[
'only_id'
])
||
!
isset
(
$params
[
'source'
]))
{
return
$this
->
response
(
ErrorCodeConst
::
ERROR_CODE_PARAM_NOT_EXIST
,
"请求参数错误"
);
}
/*
$params
= array(
"only_id" => "agent_9
",
"source" => 2,// 1经纪人 or 2用户
);*/
/*
$params
= array(
"only_id" => "agent_5
",
"source" => 2,// 1经纪人 or 2用户
);*/
$result
=
$this
->
_chat
->
getUserInfo
(
$params
[
'only_id'
],
$params
[
"source"
]);
if
(
$result
)
{
...
...
@@ -166,7 +166,7 @@ class AppChat extends Basic
return
$this
->
response
(
ErrorCodeConst
::
ERROR_CODE_TARGET_TYPE_ERROR
,
"错误的消息类型"
);
}
$result
=
$this
->
_chat
->
sendMsg
(
$user_name
,
$target_type
,
$target
,
$source
,
$is_user
,
$type
,
$msg_content
,
$from
,
$this
->
accessToken
);
$result
=
$this
->
_chat
->
sendMsg
(
$user_name
,
$target_type
,
$target
,
$source
,
$is_user
,
$type
,
$msg_content
,
$from
,
$this
->
accessToken
);
if
(
$result
)
{
return
$this
->
response
(
"200"
,
""
,
[
"msg"
=>
"消息发送成功"
]);
}
else
{
...
...
application/chat/service/ChatService.php
View file @
a562a2b8
...
...
@@ -247,8 +247,7 @@ class ChatService
$field
=
"a.id,a.name as user_nick,a.phone as user_phone,a.img as user_pic,CONCAT(c.district_name,'-',b.store_name) as shop_name"
;
$where_agent
[
"a.phone"
]
=
array
(
"in"
,
$agent_phone
);
$where_agent
[
"phone"
]
=
array
(
"in"
,
$agent_phone
);
$agentsResult
=
$this
->
agentsV2Model
->
getAgentsInfoByAgentId
(
$field
,
$where_agent
);
foreach
(
$agentsResult
as
$v
)
{
...
...
application/index/controller/Banner.php
View file @
a562a2b8
...
...
@@ -48,14 +48,14 @@ class Banner extends Basic
*/
public
function
getBannerList
()
{
$field
=
"id,title,pic_path,url,sort,hits,is_show,up_user,create_time,update_time"
;
$field
=
"id,title,pic_path,url,sort,hits,is_show,up_user,create_time,update_time"
;
$params
[
'is_show'
]
=
array
(
"eq"
,
0
);
$params
[
'type'
]
=
array
(
"eq"
,
0
);
$pageNo
=
empty
(
$_POST
[
'pageNo'
])
?
1
:
$_POST
[
'pageNo'
];
$pageSize
=
empty
(
$_POST
[
'pageSize'
])
?
15
:
$_POST
[
'pageSize'
];
$result
[
"list"
]
=
$this
->
bannerModel
$params
[
'type'
]
=
array
(
"eq"
,
0
);
$pageNo
=
empty
(
$_POST
[
'pageNo'
])
?
1
:
$_POST
[
'pageNo'
];
$pageSize
=
empty
(
$_POST
[
'pageSize'
])
?
15
:
$_POST
[
'pageSize'
];
$result
[
"list"
]
=
$this
->
bannerModel
->
getBannerList
(
$pageNo
,
$pageSize
,
"sort desc"
,
$field
,
$params
);
$result
[
"total"
]
=
$this
->
bannerModel
$result
[
"total"
]
=
$this
->
bannerModel
->
getBannerTotal
(
$params
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
...
...
@@ -66,14 +66,14 @@ class Banner extends Basic
*/
public
function
getPopList
()
{
$field
=
"id,title,pic_path,url,sort,hits,is_show,up_user,create_time,update_time"
;
$field
=
"id,title,pic_path,url,sort,hits,is_show,up_user,create_time,update_time"
;
$params
[
'is_show'
]
=
array
(
"eq"
,
0
);
$params
[
'type'
]
=
array
(
"eq"
,
1
);
$pageNo
=
empty
(
$_POST
[
'pageNo'
])
?
1
:
$_POST
[
'pageNo'
];
$pageSize
=
empty
(
$_POST
[
'pageSize'
])
?
15
:
$_POST
[
'pageSize'
];
$result
[
"list"
]
=
$this
->
bannerModel
$params
[
'type'
]
=
array
(
"eq"
,
1
);
$pageNo
=
empty
(
$_POST
[
'pageNo'
])
?
1
:
$_POST
[
'pageNo'
];
$pageSize
=
empty
(
$_POST
[
'pageSize'
])
?
15
:
$_POST
[
'pageSize'
];
$result
[
"list"
]
=
$this
->
bannerModel
->
getBannerList
(
$pageNo
,
$pageSize
,
"sort desc"
,
$field
,
$params
);
$result
[
"total"
]
=
$this
->
bannerModel
$result
[
"total"
]
=
$this
->
bannerModel
->
getBannerTotal
(
$params
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
...
...
@@ -117,7 +117,7 @@ class Banner extends Basic
if
(
isset
(
$params
[
'id'
]))
{
$msg
=
"修改"
;
}
else
{
$msg
=
"新增"
;
$msg
=
"新增"
;
$params
[
"is_show"
]
=
0
;
}
$result
=
$this
->
bannerModel
->
addOrUpdate
(
$params
);
...
...
@@ -135,15 +135,15 @@ class Banner extends Basic
*/
public
function
upIsShow
()
{
$params
=
array
(
"id"
=>
$_POST
[
"id"
],
"is_show"
=>
$_POST
[
"is_show"
]
);
$result
=
$this
->
bannerModel
->
upIsShow
(
$params
);
if
(
$result
[
'code'
]
==
200
)
{
return
$this
->
response
(
"200"
,
"update success"
,
$result
[
"msg"
]);
}
else
{
return
$this
->
response
(
"101"
,
"update error"
);
}
$params
=
array
(
"id"
=>
$_POST
[
"id"
],
"is_show"
=>
$_POST
[
"is_show"
]
);
$result
=
$this
->
bannerModel
->
upIsShow
(
$params
);
if
(
$result
[
'code'
]
==
200
)
{
return
$this
->
response
(
"200"
,
"update success"
,
$result
[
"msg"
]);
}
else
{
return
$this
->
response
(
"101"
,
"update error"
);
}
}
}
\ No newline at end of file
application/model/AAgents.php
View file @
a562a2b8
...
...
@@ -427,6 +427,9 @@ class AAgents extends BaseModel
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"phone"
]))
{
$where_
[
"a.phone"
]
=
$params
[
"phone"
];
}
if
(
isset
(
$params
[
"store_id"
]))
{
$where_
[
"b.id"
]
=
$params
[
"store_id"
];
$where_
[
"a.level"
]
=
array
(
"in"
,
"20,40"
);
...
...
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