Commit b992c7e0 by 阳浪

我的配置信息角色校验

parent 69ccf164
......@@ -18,5 +18,5 @@ public interface MyItemConfigMapper extends BaseMapper<MyItemConfig> {
List<MyItemConfig> queryMyitemConfigByCondition(@Param("name") String name, @Param("showable") Integer showable, @Param("terminalType")Integer terminalType,@Param("siteId")Long siteId);
List<MyItemConfig> queryByAuthoity(@Param("siteId") Long siteId, @Param("terminalType") List<Integer> terminalType, @Param("showAble") Integer showAble);
List<MyItemConfig> queryByAuthoity(@Param("siteId") Long siteId, @Param("terminalType") List<Integer> terminalType, @Param("showAble") Integer showAble,@Param("accountId") Long accountId);
}
......@@ -97,7 +97,11 @@ public class MyItemConfigServiceImpl extends ServiceImpl<MyItemConfigMapper, MyI
@Override
public List<MyItemConfig> queryByAuthoity(Long siteId, List<Integer> terminalType, Integer showAble) {
return myItemConfigmapper.queryByAuthoity(siteId, terminalType, showAble);
Long accountId = ContextHolder.get().getAccountId();
if(accountId==0L){
accountId = null;
}
return myItemConfigmapper.queryByAuthoity(siteId, terminalType, showAble,accountId);
}
@Override
......
......@@ -66,6 +66,11 @@
<if test="siteId !=null">
and my.site_id = #{siteId}
</if>
<if test="accountId !=null">
my.id in(
select item_id from my_item_config_role where role_id in(
select role_id from cloud_system.authz_account_role aar where account_id =#{accountId}))
</if>
<if test="terminalType !=null">
and my.terminal_type in
<foreach collection="terminalType" item="t" open="(" close=")" separator=",">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment