liuxiaolong
2019-05-06 71af9c46c24b562acc00a71ec6c97c04eb048d9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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);
}