class UserManagementImpl implements UserManagementService {

    @Override
    public CommonResult updateUserById(User user) {
        if (userMapper.get(user.getId()) == null) {
            return CommonResult.fail(E_602);
        }
        int count = userMapper.update(user);
        if (count == 0) {
            return CommonResult.fail();
        }
        return CommonResult.success(count);
    }

}