package com.gkhy.labRiskManage.domain.account.repository.jpa; import com.gkhy.labRiskManage.domain.account.entity.SysUserIdentityBind; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import java.util.List; /** * @email 1603559716@qq.com * @author: zf * @date: 2023/4/28 * @time: 17:07 */ @Repository public interface SysUserIdentityBindReposity extends JpaRepository { @Query(value = "select s.userIdentityId from SysUserIdentityBind s where s.userId = :userId") List getByUserId(Long userId); @Modifying @Query(value = "delete from SysUserIdentityBind s where s.userId = :userId and s.userIdentityId in (:deleteUserIdentityIdList)") int deleteByUserIdAndUserIdentityIds(Long userId, List deleteUserIdentityIdList); @Modifying @Query(value = "delete from SysUserIdentityBind s where s.userId = :userId") int deleteByUserId(Long userId); }