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
371c2dde
Commit
371c2dde
authored
Jun 15, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置使用redis
parent
d97798c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
Setting.php
application/index/controller/Setting.php
+14
-4
No files found.
application/index/controller/Setting.php
View file @
371c2dde
...
...
@@ -10,6 +10,7 @@ namespace app\index\controller;
use
app\api_broker\service\LookShopService
;
use
app\extra\RedisExt
;
use
app\index\extend\Basic
;
use
app\model\SystemConfig
;
use
think\Cache
;
...
...
@@ -35,9 +36,10 @@ class Setting extends Basic
$data
=
$config
->
getSetting
();
}
else
{
//新增或编辑数据
$data
[
'is_privacy'
]
=
$this
->
params
[
'is_privacy'
];
$data
[
'day_num'
]
=
$this
->
params
[
'day_num'
];
$data
[
'is_privacy'
]
=
(
int
)
$this
->
params
[
'is_privacy'
];
$data
[
'day_num'
]
=
(
int
)
$this
->
params
[
'day_num'
];
$data
[
'down_time'
]
=
$this
->
params
[
'down_time'
];
$data
[
'landlord_phone_day'
]
=
(
int
)
$this
->
params
[
'landlord_phone_day'
];
$config_data
=
[];
$config_data
[
0
][
'id'
]
=
1
;
...
...
@@ -51,7 +53,8 @@ class Setting extends Basic
$config_data
[
1
][
'config_type'
]
=
20
;
$config_data
[
1
][
'rule'
]
=
json_encode
([
'is_privacy'
=>
$data
[
'is_privacy'
],
'day_num'
=>
$data
[
'day_num'
]
'day_num'
=>
$data
[
'day_num'
],
'landlord_phone_day'
=>
$data
[
'landlord_phone_day'
]
]);
$config_data
[
1
][
'agent_id'
]
=
$this
->
userId
;
...
...
@@ -72,7 +75,14 @@ class Setting extends Basic
$config
->
insertSetting
(
$config_data
,
true
);
$look
=
new
LookShopService
();
$look
->
setLookNum
(
$agent_shop_num
);
Cache
::
set
(
'Setting'
,
$data
);
$redis
=
RedisExt
::
getRedis
();
$redis
->
set
(
's_down_time'
,
$data
[
'down_time'
]);
//商铺自动下架天数
$redis
->
set
(
's_is_privacy'
,
$data
[
'is_privacy'
]);
//是否使用隐号系统
$redis
->
set
(
's_day_num'
,
$data
[
'day_num'
]);
//客户隐号绑定有效期(天数):
$redis
->
set
(
's_landlord_phone_day'
,
$data
[
'landlord_phone_day'
]);
//房东隐号绑定有效期(天数):
$redis
->
set
(
's_new_client_hours'
,
$new_client_hours
);
//新客户保护期有效小时数
$redis
->
set
(
's_lookNum'
,
$agent_shop_num
);
//业务员最多可查看的商铺数量
}
return
$this
->
response
(
200
,
''
,
$data
);
...
...
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