huaz
2022-12-30 c3ad779e9ededcd8b9184da53921f24654e1840b
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/SysUserLevelWageRepository.java
@@ -20,6 +20,8 @@
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
/**
* @website https://eladmin.vip
* @author 赵士淞
@@ -42,4 +44,13 @@
     */
    @Query(value = "SELECT count(1) FROM sys_user_level_wage WHERE level_id IN ?1", nativeQuery = true)
    int countByLevels(Long[] ids);
    /**
     * 根据用户ID查询
     * @param userId /
     * @return /
     */
    @Query(value = "SELECT * FROM sys_user_level_wage WHERE user_id = ?1", nativeQuery = true)
    List<SysUserLevelWage> findByUserId(Long userId);
}