class UserController {

    @RequestMapping(value = "/update", method = RequestMethod.PUT)
    public ServiceResult<String> update(@Validated(UpdateUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors) throws Exception {
        user.setUpdate_user_no(currentUser.getUserNo());
        ValidateResult validateRes = userService.validatePermision(currentUser, errors)
                .addAssert(() -> loginUserDao.getUserById(user.getId()) != null, message.user_add_fail_not_exist)
                .addAssert(() -> userService.canUpdateOrDeleteUser(currentUser, user), message.permisson_user_crud)
                .addAssert(() -> userService.update(user), message.db_message_update_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}