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
617e5102
Commit
617e5102
authored
Mar 04, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
财务日报显示
parent
efea8cba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
MyCenterService.php
application/api_broker/service/MyCenterService.php
+13
-2
AuthGroup.php
application/model/AuthGroup.php
+16
-0
No files found.
application/api_broker/service/MyCenterService.php
View file @
617e5102
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
app\api_broker\service
;
namespace
app\api_broker\service
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\AuthGroup
;
use
app\model\AuthGroup
;
use
app\model\AuthRule
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
...
@@ -62,8 +63,18 @@ class MyCenterService{
...
@@ -62,8 +63,18 @@ class MyCenterService{
if
(
!
empty
(
$result
[
'auth_group_id'
]))
{
if
(
!
empty
(
$result
[
'auth_group_id'
]))
{
$m_auth_group
=
new
AuthGroup
();
$m_auth_group
=
new
AuthGroup
();
$auth_group_name
=
$m_auth_group
->
getValue
(
'title'
,
[
'id'
=>
$result
[
'auth_group_id'
]]);
$auth_group
=
$m_auth_group
->
getAuthGroup
(
$result
[
'auth_group_id'
],
'title,rules'
);
$result
[
'auth_group_name'
]
=
empty
(
$auth_group_name
)
?
''
:
$auth_group_name
;
$result
[
'auth_group_name'
]
=
empty
(
$auth_group
[
'title'
])
?
''
:
$auth_group
[
'title'
];
$m_rule
=
new
AuthRule
();
$id
=
$m_rule
->
getAuthRuleByName
(
'index/addDaily'
,
'id'
);
$rules_arr
=
explode
(
','
,
$auth_group
[
'rules'
]);
$result
[
'show_daily'
]
=
0
;
if
(
in_array
(
$id
,
$rules_arr
))
{
$result
[
'show_daily'
]
=
1
;
//财务日报显示
}
}
}
return
$result
;
return
$result
;
}
}
...
...
application/model/AuthGroup.php
View file @
617e5102
...
@@ -79,4 +79,20 @@ class AuthGroup extends BaseModel
...
@@ -79,4 +79,20 @@ class AuthGroup extends BaseModel
->
where
(
'status'
,
$status
)
->
where
(
'status'
,
$status
)
->
value
(
$fields
);
->
value
(
$fields
);
}
}
/**
* @param $id
* @param $fields
* @param int $status
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAuthGroup
(
$id
,
$fields
,
$status
=
0
)
{
return
$this
->
field
(
$fields
)
->
where
(
'id'
,
$id
)
->
where
(
'status'
,
$status
)
->
find
();
}
}
}
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