Search in sources :

Example 1 with Qe

use of com.artlongs.framework.utils.Qe in project act-eagle-allone by mailtous.

the class SysPermissionDao method getPermissionOf.

public SysPermission getPermissionOf(Integer funcid, Integer roleid) {
    // String sql = " select * from sys_permission where func_id=? and role_id = ?";
    // SysPermission sysPermission = getObj(sql, funcId, roleId);
    String sql = new Qe(SysPermission.class).where(new Qe().eq(funcId, funcid).and(new Qe().eq(roleId, roleid))).build();
    SysPermission sysPermission = getObj(sql);
    return sysPermission;
}
Also used : Qe(com.artlongs.framework.utils.Qe) SysPermission(com.artlongs.sys.model.SysPermission)

Example 2 with Qe

use of com.artlongs.framework.utils.Qe in project act-eagle-allone by mailtous.

the class SysPermissionDao method realDelByFuncId.

public boolean realDelByFuncId(Long func_id) {
    // String sql = " delete from sys_permission where func_id = ?";
    String sql = Qe.del(table).where(new Qe().eq(funcId, func_id)).build();
    super.sqlm.executeUpdate(new SQLReady(sql, new Object[] { funcId }));
    return true;
}
Also used : Qe(com.artlongs.framework.utils.Qe) SQLReady(org.beetl.sql.core.SQLReady)

Example 3 with Qe

use of com.artlongs.framework.utils.Qe in project act-eagle-allone by mailtous.

the class SysPermissionDao method getPermissionListByRoleid.

public List<SysPermission> getPermissionListByRoleid(Long roleid) {
    // String sql = " select * from sys_permission where role_id = ?";
    String sql = new Qe(SysPermission.class).where(new Qe().eq(roleId, roleid)).build();
    List<SysPermission> permissionList = getList(sql);
    return permissionList;
}
Also used : Qe(com.artlongs.framework.utils.Qe) SysPermission(com.artlongs.sys.model.SysPermission)

Aggregations

Qe (com.artlongs.framework.utils.Qe)3 SysPermission (com.artlongs.sys.model.SysPermission)2 SQLReady (org.beetl.sql.core.SQLReady)1