zhangf
2024-07-26 698995469a3fcdc3164fc486d18bdbe059b6c92e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.gkhy.fourierSpecialGasMonitor.domain.account.repository.jpa;
 
import com.gkhy.fourierSpecialGasMonitor.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<SysUserIdentityBind, Long> {
    @Query(value = "select s.userIdentityId from SysUserIdentityBind s where s.userId = :userId")
    List<Long> getByUserId(Long userId);
    @Modifying
    @Query(value = "delete from SysUserIdentityBind s where s.userId = :userId and s.userIdentityId in (:deleteUserIdentityIdList)")
    int deleteByUserIdAndUserIdentityIds(Long userId, List<Long> deleteUserIdentityIdList);
 
    @Modifying
    @Query(value = "delete from SysUserIdentityBind s where s.userId = :userId")
    int deleteByUserId(Long userId);
}