fix 会员活动分享 同一个用户同一个群重复分享。

FFIB %!s(int64=4) %!d(string=hace) años
padre
commit
865ffb4e93
Se han modificado 1 ficheros con 12 adiciones y 12 borrados
  1. 12 12
      api/member_views.py

+ 12 - 12
api/member_views.py

@@ -486,18 +486,18 @@ def activity_group_share(request):
486 486
         user.integral += integral
487 487
         user.save()
488 488
         
489
-
490
-    MemberActivityGroupShareInfo.objects.create(**{
491
-        'brand_id': act.brand_id,
492
-        'brand_name': act.brand_name,
493
-        'share_user_id': share_user_id,
494
-        'click_user_id': click_user_id,
495
-        'open_gid': open_gid,
496
-        'activity_id': activity_id,
497
-        'title': act.title,
498
-        'is_integral': is_integral,
499
-        'integral': integral,
500
-    })
489
+    if is_integral:
490
+        MemberActivityGroupShareInfo.objects.create(**{
491
+            'brand_id': act.brand_id,
492
+            'brand_name': act.brand_name,
493
+            'share_user_id': share_user_id,
494
+            'click_user_id': click_user_id,
495
+            'open_gid': open_gid,
496
+            'activity_id': activity_id,
497
+            'title': act.title,
498
+            'is_integral': is_integral,
499
+            'integral': integral,
500
+        })
501 501
 
502 502
     if isOffline:
503 503
         return response(400002, 'Activity has been offline', '会员活动已下线')