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
4e8e8e57
Commit
4e8e8e57
authored
Aug 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邀请人修改记录
parent
148e3f13
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
21 deletions
+33
-21
UserService.php
application/index/service/UserService.php
+3
-4
MPushMessage.php
application/model/MPushMessage.php
+26
-14
UpdateShopStatusTask.php
application/task/controller/UpdateShopStatusTask.php
+4
-3
No files found.
application/index/service/UserService.php
View file @
4e8e8e57
...
@@ -179,13 +179,12 @@ class UserService
...
@@ -179,13 +179,12 @@ class UserService
try
{
try
{
$user_data
=
$this
->
user
->
getUserById
(
'user_name,user_phone'
,
$referrer_id
);
$user_data
=
$this
->
user
->
getUserById
(
'user_name,user_phone'
,
$referrer_id
);
$user_
data
[
'user_phone'
]
=
empty
(
$user_data
[
'user_phone'
])
?
''
:
substr_replace
(
$user_data
[
'user_phone'
],
'****'
,
3
,
4
);
$user_
phone
=
empty
(
$user_data
[
'user_phone'
])
?
''
:
substr_replace
(
$user_data
[
'user_phone'
],
'****'
,
3
,
4
);
if
(
$type
==
'add'
)
{
if
(
$type
==
'add'
)
{
$remark
=
'新增为'
.
$user_data
[
'user_name'
]
.
'-'
.
$user_
data
[
'user_phone'
]
.
',客户ID:'
.
$referrer_id
;
$remark
=
'新增为'
.
$user_data
[
'user_name'
]
.
'-'
.
$user_
phone
.
',客户ID:'
.
$referrer_id
;
}
else
{
}
else
{
if
(
$referrer_id
!=
$referrer_id_old
)
{
if
(
$referrer_id
!=
$referrer_id_old
)
{
$user_data
=
$this
->
user
->
getUserById
(
'user_name,user_phone'
,
$referrer_id
);
$remark
=
'编辑为'
.
$user_data
[
'user_name'
]
.
'-'
.
$user_phone
.
',客户ID:'
.
$referrer_id
;
$remark
=
'编辑为'
.
$user_data
[
'user_name'
]
.
'-'
.
$user_data
[
'user_phone'
]
.
',客户ID:'
.
$referrer_id
;
}
}
}
}
...
...
application/model/MPushMessage.php
View file @
4e8e8e57
...
@@ -70,7 +70,7 @@ class MPushMessage
...
@@ -70,7 +70,7 @@ class MPushMessage
* @param $data
* @param $data
* @return bool
* @return bool
*/
*/
public
function
addHouseIdArray
(
array
$house_id
,
int
$
operation_id
=
0
,
int
$
type
,
$data
)
public
function
addHouseIdArray
(
array
$house_id
,
int
$type
,
$data
)
{
{
if
(
!
is_array
(
$house_id
))
{
if
(
!
is_array
(
$house_id
))
{
return
false
;
return
false
;
...
@@ -78,23 +78,29 @@ class MPushMessage
...
@@ -78,23 +78,29 @@ class MPushMessage
$insert_data
=
[];
$insert_data
=
[];
foreach
(
$house_id
as
$k
=>
$v
)
{
foreach
(
$house_id
as
$k
=>
$v
)
{
$insert_data
[
$k
][
'house_id'
]
=
$v
;
if
(
isset
(
$data
[
'message'
]))
{
$agent_id
=
$this
->
selectAgentHouse
(
$v
);
$insert_data
[
$k
][
'message'
]
=
$data
[
'message'
];
}
if
(
isset
(
$data
[
'user_id'
]))
{
foreach
(
$agent_id
as
$k2
=>
$v2
)
{
$insert_data
[
$k
][
'user_id'
]
=
$data
[
'user_id'
];
$insert_data
[
$k2
][
'house_id'
]
=
$v
;
}
if
(
isset
(
$data
[
'message'
]))
{
$insert_data
[
$k2
][
'message'
]
=
$data
[
'message'
];
}
if
(
isset
(
$data
[
'user_id'
]))
{
$insert_data
[
$k2
][
'user_id'
]
=
$data
[
'user_id'
];
}
if
(
isset
(
$data
[
'addressee_id'
]))
{
if
(
isset
(
$data
[
'addressee_id'
]))
{
$insert_data
[
$k
][
'addressee_id'
]
=
$data
[
'addressee_id'
];
$insert_data
[
$k2
][
'addressee_id'
]
=
$data
[
'addressee_id'
];
}
$insert_data
[
$k2
][
'type'
]
=
$type
;
$insert_data
[
$k2
][
'status'
]
=
0
;
$insert_data
[
$k2
][
'operation_id'
]
=
$v2
;
}
}
$insert_data
[
$k
][
'type'
]
=
$type
;
$insert_data
[
$k
][
'status'
]
=
0
;
$insert_data
[
$k
][
'operation_id'
]
=
$operation_id
;
}
}
$num
=
$this
->
db_
->
insertAll
(
$insert_data
);
$num
=
$this
->
db_
->
insertAll
(
$insert_data
);
...
@@ -153,6 +159,10 @@ class MPushMessage
...
@@ -153,6 +159,10 @@ class MPushMessage
return
$result
;
return
$result
;
}
}
/**
* @param $house_id
* @return array
*/
public
function
selectAgentHouse
(
$house_id
)
{
public
function
selectAgentHouse
(
$house_id
)
{
$m_house
=
new
GHousesToAgents
();
$m_house
=
new
GHousesToAgents
();
$where
[
'a.house_id'
]
=
$house_id
;
$where
[
'a.house_id'
]
=
$house_id
;
...
@@ -160,7 +170,9 @@ class MPushMessage
...
@@ -160,7 +170,9 @@ class MPushMessage
$data
=
[];
$data
=
[];
if
(
$result
[
'status'
]
!=
'fail'
)
{
if
(
$result
[
'status'
]
!=
'fail'
)
{
$data
=
$result
[
'data'
];
foreach
(
$result
[
'agents_id'
]
as
$k
=>
$v
)
{
$data
[]
=
$v
;
}
}
}
return
$data
;
return
$data
;
...
...
application/task/controller/UpdateShopStatusTask.php
View file @
4e8e8e57
...
@@ -141,7 +141,7 @@ class UpdateShopStatusTask
...
@@ -141,7 +141,7 @@ class UpdateShopStatusTask
$push_service
->
record
(
1
,
$this
->
house_id
,
0
,
0
);
$push_service
->
record
(
1
,
$this
->
house_id
,
0
,
0
);
}
}
public
function
__destruct
()
{
//
public function __destruct() {
$this
->
recordPushMessage
();
//
$this->recordPushMessage();
}
//
}
}
}
\ 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