package com.cloud.device.dao;
|
|
import com.cloud.device.model.Org;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.List;
|
import java.util.Map;
|
|
@Repository
|
@Mapper
|
public interface OrgDao {
|
|
@Select("select count(mu.id) from sys_user2.sys_menu mu,(select sm.menuId from sys_user2.sys_role_menu sm where sm.roleId in(select roleId from sys_user2.sys_role_user su where su.userId=#{userId})) sm2 where mu.module='AUTH' and sm2.menuId=mu.id")
|
int findUserNameById(@Param("userId") long userId);
|
/**
|
* 删除
|
* @param id
|
* @return
|
*/
|
int deleteById(Long id);
|
|
/**
|
* 插入所有字段
|
* @param
|
* @return
|
*/
|
int insert(Org org);
|
|
/**
|
* 插入某些字段
|
* @param
|
* @return
|
*/
|
int insertSelective(Org org);
|
|
/**
|
* 获取一条数据
|
* @param id
|
* @return
|
*/
|
Org selectById(Long id);
|
|
|
/**
|
* 更新
|
* @param
|
* @return
|
*/
|
int updateById(Org org);
|
|
int updateByIdSelective(Org org);
|
|
List<Org> findAll(Map<String,Object> param);
|
|
List<Org> findChildById(Long id);
|
}
|