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
a9b58c82
Commit
a9b58c82
authored
Apr 08, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步缓存
parent
11699609
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
District.php
application/index/controller/District.php
+5
-0
Store.php
application/index/controller/Store.php
+7
-1
BrokerService.php
application/index/service/BrokerService.php
+8
-1
UserService.php
application/index/service/UserService.php
+3
-0
No files found.
application/index/controller/District.php
View file @
a9b58c82
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\api_broker\service\RedisCacheService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ADistrict
;
use
app\model\ADistrict
;
...
@@ -95,6 +96,10 @@ class District extends Basic
...
@@ -95,6 +96,10 @@ class District extends Basic
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
params
[
'department_name'
])
{
if
(
$this
->
params
[
'department_name'
])
{
$this
->
data
=
$district
->
addDepartmentAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
$this
->
data
=
$district
->
addDepartmentAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
if
(
$this
->
params
[
'agents_id'
]
>
0
)
{
$redis_service
=
new
RedisCacheService
();
$redis_service
->
agentCache
(
$this
->
params
[
'agents_id'
]);
}
}
else
{
}
else
{
$this
->
code
=
101
;
$this
->
code
=
101
;
$this
->
msg
=
'department or district is null'
;
$this
->
msg
=
'department or district is null'
;
...
...
application/index/controller/Store.php
View file @
a9b58c82
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\api_broker\service\RedisCacheService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\index\validate\StoreValidate
;
use
app\index\validate\StoreValidate
;
use
app\model\ADistrict
;
use
app\model\ADistrict
;
...
@@ -104,7 +105,12 @@ class Store extends Basic
...
@@ -104,7 +105,12 @@ class Store extends Basic
}
}
$this
->
data
=
$store
->
addStoreAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
$this
->
data
=
$store
->
addStoreAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
if
(
$this
->
params
[
'agents_id'
]
>
0
)
{
$redis_service
=
new
RedisCacheService
();
$redis_service
->
agentCache
(
$this
->
params
[
'agents_id'
]);
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
...
...
application/index/service/BrokerService.php
View file @
a9b58c82
...
@@ -11,6 +11,7 @@ namespace app\index\service;
...
@@ -11,6 +11,7 @@ namespace app\index\service;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\RedisCacheService
;
use
app\index\validate\AAgentValidate
;
use
app\index\validate\AAgentValidate
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\AAgentsBlackListImg
;
use
app\model\AAgentsBlackListImg
;
...
@@ -161,11 +162,12 @@ class BrokerService
...
@@ -161,11 +162,12 @@ class BrokerService
}
}
}
}
}
}
$redis_service
=
new
RedisCacheService
();
if
(
empty
(
$data
[
'confirm_old'
]))
{
if
(
empty
(
$data
[
'confirm_old'
]))
{
$id
=
$this
->
m_agent
->
saveAgent
(
$data
);
//正常新增或编辑
$id
=
$this
->
m_agent
->
saveAgent
(
$data
);
//正常新增或编辑
if
(
$id
>
0
)
{
if
(
$id
>
0
)
{
$redis_service
->
agentCache
(
$id
);
$result
[
'msg'
]
=
$msg
;
$result
[
'msg'
]
=
$msg
;
$result
[
'status'
]
=
'successful'
;
$result
[
'status'
]
=
'successful'
;
}
else
{
}
else
{
...
@@ -195,6 +197,7 @@ class BrokerService
...
@@ -195,6 +197,7 @@ class BrokerService
if
(
$is_ok
)
{
if
(
$is_ok
)
{
$id
=
$this
->
m_agent
->
saveAgent
(
$data
);
//正常新增或编辑
$id
=
$this
->
m_agent
->
saveAgent
(
$data
);
//正常新增或编辑
if
(
$id
>
0
)
{
if
(
$id
>
0
)
{
$redis_service
->
agentCache
(
$id
);
$data
[
'agent_id'
]
=
$id
;
$data
[
'agent_id'
]
=
$id
;
$data
[
'type'
]
=
1
;
$data
[
'type'
]
=
1
;
$data
[
'operation_id'
]
=
$operation_id
;
$data
[
'operation_id'
]
=
$operation_id
;
...
@@ -214,6 +217,10 @@ class BrokerService
...
@@ -214,6 +217,10 @@ class BrokerService
$id
=
$this
->
transferAgent
(
$data
,
$agent_old
,
$is_new_id
,
$operation_id
);
//转勤
$id
=
$this
->
transferAgent
(
$data
,
$agent_old
,
$is_new_id
,
$operation_id
);
//转勤
if
(
$id
>
0
)
{
if
(
$id
>
0
)
{
if
(
$agent_old
[
0
][
'id'
]
>
0
)
{
$redis_service
->
agentCache
(
$agent_old
[
'id'
]);
}
$redis_service
->
agentCache
(
$id
);
$result
[
'msg'
]
=
'转勤成功'
;
$result
[
'msg'
]
=
'转勤成功'
;
$result
[
'status'
]
=
'successful'
;
$result
[
'status'
]
=
'successful'
;
}
else
{
}
else
{
...
...
application/index/service/UserService.php
View file @
a9b58c82
...
@@ -98,6 +98,9 @@ class UserService
...
@@ -98,6 +98,9 @@ class UserService
}
else
{
}
else
{
$result
[
'status'
]
=
'successful'
;
$result
[
'status'
]
=
'successful'
;
$result
[
'msg'
]
=
''
;
$result
[
'msg'
]
=
''
;
$redis_service
=
new
RedisCacheService
();
$redis_service
->
userCache
(
$id
);
}
}
$this
->
setUserSites
(
$id
,
$data
[
'site_id'
]);
//设置站点
$this
->
setUserSites
(
$id
,
$data
[
'site_id'
]);
//设置站点
...
...
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