|
@@ -5,6 +5,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.Lock;
|
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
+import org.springframework.data.repository.query.Param;
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
|
|
import javax.persistence.LockModeType;
|
|
@@ -58,4 +59,10 @@ public interface RoomMemberDao extends JpaRepository<RoomMember, Long> {
|
|
|
int updateMusicByRidAndUid(String rid, String uid, boolean musicMode);
|
|
|
|
|
|
boolean existsByRidAndUid(String rid, String uid);
|
|
|
+
|
|
|
+
|
|
|
+ @Modifying
|
|
|
+ @Query(value = "update rongyun_room_member set (case ?3 when 1 then mic =?4 when 2 then camera =?4 when 3 then music_mode = ?4 else hand = ?4) " +
|
|
|
+ "where rid=?1 and role=?2", nativeQuery = true)
|
|
|
+ void updateAll(String userId, int role, int type, boolean enable);
|
|
|
}
|