feat: 更新用户信息,判断评论、文章是否被点赞

This commit is contained in:
sjm
2024-07-20 17:21:01 +08:00
parent 2da886e204
commit 872845de23
16 changed files with 86 additions and 39 deletions

View File

@@ -418,5 +418,16 @@ public class SchisandraAuthUserController {
return Result.ok(schisandraAuthUserDTOList);
}
/**
* 用户设置安全信息
* @param schisandraAuthUserDTO
* @return
*/
@PostMapping("update")
public Result update(@RequestBody SchisandraAuthUserDTO schisandraAuthUserDTO){
SchisandraAuthUserBO schisandraAuthUserBO = SchisandraAuthUserDTOConverter.INSTANCE.convertDTOToBO(schisandraAuthUserDTO);
return Result.ok(schisandraAuthUserDomainService.update(schisandraAuthUserBO));
}
}

View File

@@ -168,7 +168,7 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
* @date 2024/3/21 23:14
*/
@Override
public Object update(SchisandraAuthUserBO schisandraAuthUserBO) {
public Boolean update(SchisandraAuthUserBO schisandraAuthUserBO) {
SchisandraAuthUser schisandraAuthUser = SchisandraAuthUserBOConverter.INSTANCE.convertBOToEntity(schisandraAuthUserBO);
Integer count = schisandraAuthUserService.update(schisandraAuthUser);
return count > 0;
@@ -529,5 +529,4 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
String permissionKey = redisUtil.buildKey(AUTH_PERMISSION_PREFIX, String.valueOf(authUserId));
redisUtil.set(permissionKey, new Gson().toJson(permissionList));
}
}