def update(self, request, *args, **kwargs):
    partial = kwargs.pop('partial', False)
    instance = self.get_object()
    serializer = self.get_serializer(instance, data=request.data, request=request, partial=partial)
    serializer.is_valid(raise_exception=True)
    self.perform_update(serializer)
    if getattr(instance, '_prefetched_objects_cache', None):
        instance._prefetched_objects_cache = {}
    return SuccessResponse(data=serializer.data, msg='更新成功')
def update(self, request, *args, **kwargs):
    partial = kwargs.pop('partial', False)
    instance = self.get_object()
    serializer = self.get_serializer(instance, data=request.data, request=request, partial=partial)
    serializer.is_valid(raise_exception=True)
    self.perform_update(serializer)
    if getattr(instance, '_prefetched_objects_cache', None):
        instance._prefetched_objects_cache = {}
    return SuccessResponse(data=serializer.data, msg='更新成功')