修复手机号,邮箱无法更新的问题

Signed-off-by: 杨柳清风 <git@dev86.site>
pull/83/head
杨柳清风 2024-05-10 09:56:27 +00:00 committed by Gitee
parent 1774e0c056
commit 19dccb9ee5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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)
@Modifying
@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,
@Param(value = "email") String email);
@ -170,7 +170,7 @@ public interface UserRepository extends JpaRepository<UserEntity, String>,
@Transactional(rollbackFor = Exception.class)
@Modifying
@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,
@Param(value = "phone") String phone);