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
35e756e8
Commit
35e756e8
authored
Sep 06, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除注释
parent
54133e5d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
64 deletions
+8
-64
Shop.php
application/api_broker/controller/Shop.php
+0
-5
PushMessageService.php
application/api_broker/service/PushMessageService.php
+1
-52
Houses.php
application/index/controller/Houses.php
+6
-5
GHousesToAgents.php
application/model/GHousesToAgents.php
+1
-2
No files found.
application/api_broker/controller/Shop.php
View file @
35e756e8
...
...
@@ -464,11 +464,6 @@ class Shop extends Basic
$result
[
'data'
][
'house_id'
]
=
$house_id
[
'house_id'
];
$result
[
'data'
][
'internal_title'
]
=
empty
(
$this
->
params
[
'internal_title'
])
?
""
:
$this
->
params
[
'internal_title'
];
$result
[
'msg'
]
=
'新增或编辑成功'
;
if
(
isset
(
$house_id
[
'status'
])
&&
$house_id
[
'status'
]
==
2
)
{
$push_service
=
new
PushMessageService
();
$push_service
->
pushHouseDownMessage
(
$house_id
[
'house_id'
]);
}
}
else
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Add houses failure'
;
...
...
application/api_broker/service/PushMessageService.php
View file @
35e756e8
...
...
@@ -210,64 +210,13 @@ class PushMessageService
return
$this
->
pushAgentAllDeviceId
(
$agent_data
[
'id'
],
'新增分佣'
,
$content
);
}
/**
* @param $house_id
* @param $operation_id
* @param $agent_id
* @param $push_str
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
pushHouseMessage
(
$house_id
,
$operation_id
,
$agent_id
,
$push_str
)
{
$agent
=
new
AAgents
();
$ccr_agent_data
=
$agent
->
getAgentInfo
(
'name,phone'
,
$operation_id
);
$house
=
new
GHouses
();
$house_data
=
$house
->
getHouseInfoById
(
'internal_title'
,
[
'id'
=>
$house_id
]);
$content
=
'你的【'
.
$house_data
[
'internal_title'
]
.
'】商铺,盘方被【'
.
$ccr_agent_data
[
'name'
]
.
'-'
.
$ccr_agent_data
[
'phone'
]
.
'】修改为'
.
$push_str
;
foreach
(
$agent_id
as
$k
=>
$v
)
{
$this
->
pushAgentAllDeviceId
(
$v
,
'修改盘方'
,
$content
,
'house_info'
,
$house_id
);
}
return
;
}
/**
* 根据商铺id 推送下架消息
*
* @param $house_id
* @return bool|void
*/
public
function
pushHouseDownMessage
(
$house_id
)
{
$house
=
new
GHouses
();
try
{
$house_data
=
$house
->
getHouseInfoById
(
'internal_title'
,
[
'id'
=>
$house_id
]);
$content
=
'你的【'
.
$house_data
[
'internal_title'
]
.
'】商铺下架,如需要上架,请编辑提交该商铺'
;
$house_agent
=
new
GHousesToAgents
();
$house_agent_data
=
$house_agent
->
getAgentList
(
$house_id
,
2
,
'a.agents_id'
);
}
catch
(
\Exception
$e
)
{
return
false
;
}
foreach
(
$house_agent_data
as
$k
=>
$v
)
{
$this
->
pushAgentAllDeviceId
(
$v
[
'agents_id'
],
'商铺下架'
,
$content
,
'house_info'
,
$house_id
);
}
return
;
}
/**
* @param $id
* @param $title
* @param $content
* @param null $type
* @param null $user_id
* @return bool
* @return
array|
bool
*/
public
function
pushAgentAllDeviceId
(
$id
,
$title
,
$content
,
$type
=
null
,
$user_id
=
null
)
{
...
...
application/index/controller/Houses.php
View file @
35e756e8
...
...
@@ -76,10 +76,10 @@ class Houses extends Basic
if
(
$house_id
[
'house_id'
])
{
$return
=
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
[
'id'
,
$house_id
[
'house_id'
]
]);
if
(
isset
(
$house_id
[
'status'
])
&&
$house_id
[
'status'
]
==
2
)
{
$push_service
=
new
PushMessageService
();
$push_service
->
pushHouseDownMessage
(
$house_id
[
'house_id'
]);
}
//
if (isset($house_id['status']) && $house_id['status'] == 2) {
//
$push_service = new PushMessageService();
//
$push_service->pushHouseDownMessage($house_id['house_id']);
//
}
}
else
{
$return
=
$this
->
response
(
101
,
'add houses is error'
);
}
...
...
@@ -116,7 +116,8 @@ class Houses extends Basic
/**
* 新增和编辑商铺
*
* @return \think\Response|\think\response\View
* @return string|\think\Response|\think\response\View
* @throws \think\exception\PDOException
*/
public
function
editV2
()
{
...
...
application/model/GHousesToAgents.php
View file @
35e756e8
...
...
@@ -137,8 +137,7 @@ class GHousesToAgents extends BaseModel
if
(
!
empty
(
$agent_id_old
)
&&
!
empty
(
$agent_push
))
{
$push
=
new
PushMessageService
();
$agent_str
=
$agent_push_str
.
explode
(
','
,
$agent_push
);
$push
->
pushHouseMessage
(
$houses_id
,
$operation_id
,
$agent_id_old
,
$agent_str
);
$this
->
push
->
record
(
1
,
[
0
=>
$houses_id
],
0
,
$operation_id
);
//记录推送信息
}
return
$res
;
...
...
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