All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cory.dao.ResourceDao Maven / Gradle / Ivy

There is a newer version: 0.0.35
Show newest version
package com.cory.dao;

import com.cory.db.annotations.Dao;
import com.cory.db.annotations.Param;
import com.cory.db.annotations.Select;
import com.cory.model.Resource;

import java.util.List;

/**
 * generated by CodeGenerator on 2017/5/10.
 */
@Dao(model = Resource.class)
public interface ResourceDao extends BaseDao {

    @Select(customSql = "SELECT r.* FROM BASE_RESOURCE r WHERE r.IS_DELETED = 0 AND EXISTS(SELECT 1 FROM BASE_ROLE_RESOURCE_REL rel WHERE rel.IS_DELETED = 0 AND r.ID = rel.RESOURCE_ID AND rel.ROLE_ID = #{roleId})")
    List getByRole(@Param("roleId") Integer roleId);

    @Select(whereSql = "value = #{value}")
    Resource getByValue(@Param("value") String value);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy