|
@@ -4,6 +4,8 @@ import cc.iotkit.data.dao.SysUserRoleRepository;
|
|
|
import cc.iotkit.data.system.ISysUserRoleData;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
+import static cc.iotkit.data.model.QTbSysUserRole.tbSysUserRole;
|
|
|
+
|
|
|
/**
|
|
|
* @Author:tfd
|
|
|
* @Date:2023/5/30 16:36
|
|
@@ -16,4 +18,9 @@ public class SysUserRoleDataImpl implements ISysUserRoleData {
|
|
|
public int deleteByUserId(Long userId) {
|
|
|
return sysUserRoleRepository.deleteAllByUserId(userId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public long countUserRoleByRoleId(Long roleId) {
|
|
|
+ return sysUserRoleRepository.count(tbSysUserRole.roleId.eq(roleId));
|
|
|
+ }
|
|
|
}
|