修复用户无法修改邮箱,手机号的问题

pull/84/head
杨柳清风 2024-05-10 10:01:43 +00:00 committed by Friday
parent 1774e0c056
commit 8489e9d3e7
1 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ public interface UserRepository extends JpaRepository<UserEntity, String>,
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Modifying @Modifying
@CacheEvict(allEntries = true) @CacheEvict(allEntries = true)
@Query(value = "UPDATE UserEntity SET id=:id WHERE email=:email") @Query(value = "UPDATE UserEntity SET email=:email WHERE id=:id")
Integer updateByIdAndEmail(@Param(value = "id") String id, Integer updateByIdAndEmail(@Param(value = "id") String id,
@Param(value = "email") String email); @Param(value = "email") String email);
@ -170,7 +170,7 @@ public interface UserRepository extends JpaRepository<UserEntity, String>,
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Modifying @Modifying
@CacheEvict(allEntries = true) @CacheEvict(allEntries = true)
@Query(value = "UPDATE UserEntity SET id=:id WHERE phone=:phone") @Query(value = "UPDATE UserEntity SET phone=:phone WHERE id=:id")
Integer updateByIdAndPhone(@Param(value = "id") String id, Integer updateByIdAndPhone(@Param(value = "id") String id,
@Param(value = "phone") String phone); @Param(value = "phone") String phone);