package com.its.api.its.repository.oper;

import com.its.api.its.model.entity.oper.TbUserInfr;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
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;

@Repository
public interface TbUserInfrRepository extends JpaRepository<TbUserInfr, String>, JpaSpecificationExecutor<TbUserInfr> {

    @Modifying
    @Query("UPDATE TbUserInfr m set m.pwd = :pswd where m.userId = :userId")
    void changePwd(@Param("pswd")String pswd, @Param("userId")String userId);

}
