| 
                
               | 
              
                
               | 
              
                @@ -334,36 +334,37 @@ def consumer_info_api(request): 
               | 
            
            
            
              | 
                334
               | 
              
                334
               | 
              
                         submit_during_activity=during_activity 
               | 
            
            
            
              | 
                335
               | 
              
                335
               | 
              
                     ) 
               | 
            
            
            
              | 
                336
               | 
              
                336
               | 
              
                  
               | 
            
            
            
              | 
                337
               | 
              
                
               | 
              
                -    for act in activities: 
               | 
            
            
            
              | 
                338
               | 
              
                
               | 
              
                -        try: 
               | 
            
            
            
              | 
                339
               | 
              
                
               | 
              
                -            coupon = CouponInfo.objects.get(coupon_id=act['coupon_id']) 
               | 
            
            
            
              | 
                340
               | 
              
                
               | 
              
                -        except CouponInfo.DoesNotExist: 
               | 
            
            
            
              | 
                341
               | 
              
                
               | 
              
                -            continue 
               | 
            
            
            
              | 
                342
               | 
              
                
               | 
              
                - 
               | 
            
            
            
              | 
                343
               | 
              
                
               | 
              
                -        try: 
               | 
            
            
            
              | 
                344
               | 
              
                
               | 
              
                -            activity = ActivityInfo.objects.get(activity_id=act['activity_id']) 
               | 
            
            
            
              | 
                345
               | 
              
                
               | 
              
                -        except ActivityInfo.DoesNotExist: 
               | 
            
            
            
              | 
                346
               | 
              
                
               | 
              
                -            continue 
               | 
            
            
            
              | 
                347
               | 
              
                
               | 
              
                - 
               | 
            
            
            
              | 
                348
               | 
              
                
               | 
              
                -        UserCouponInfo.objects.create( 
               | 
            
            
            
              | 
                349
               | 
              
                
               | 
              
                -            brand_id=coupon.brand_id, 
               | 
            
            
            
              | 
                350
               | 
              
                
               | 
              
                -            brand_name=coupon.brand_name, 
               | 
            
            
            
              | 
                351
               | 
              
                
               | 
              
                -            coupon_id=coupon.coupon_id, 
               | 
            
            
            
              | 
                352
               | 
              
                
               | 
              
                -            user_id=user_id, 
               | 
            
            
            
              | 
                353
               | 
              
                
               | 
              
                -            coupon_title=coupon.coupon_title, 
               | 
            
            
            
              | 
                354
               | 
              
                
               | 
              
                -            coupon_detail=coupon.coupon_detail, 
               | 
            
            
            
              | 
                355
               | 
              
                
               | 
              
                -            coupon_value=coupon.coupon_value, 
               | 
            
            
            
              | 
                356
               | 
              
                
               | 
              
                -            coupon_image=coupon.coupon_image, 
               | 
            
            
            
              | 
                357
               | 
              
                
               | 
              
                -            active_at=tc.utc_datetime(), 
               | 
            
            
            
              | 
                358
               | 
              
                
               | 
              
                -            expire_at=coupon.final_expire_at, 
               | 
            
            
            
              | 
                359
               | 
              
                
               | 
              
                -            is_coupon_admin_writeoff=coupon.is_coupon_admin_writeoff, 
               | 
            
            
            
              | 
                360
               | 
              
                
               | 
              
                -            coupon_valid_period=coupon.coupon_valid_period, 
               | 
            
            
            
              | 
                361
               | 
              
                
               | 
              
                -            coupon_limit_model_ids=coupon.coupon_limit_model_ids, 
               | 
            
            
            
              | 
                362
               | 
              
                
               | 
              
                -            coupon_from='PROMOTION', 
               | 
            
            
            
              | 
                363
               | 
              
                
               | 
              
                -            activity_id=activity.activity_id, 
               | 
            
            
            
              | 
                364
               | 
              
                
               | 
              
                -            activity_name=activity.activity_name, 
               | 
            
            
            
              | 
                365
               | 
              
                
               | 
              
                -            submit_pk=log.pk, 
               | 
            
            
            
              | 
                366
               | 
              
                
               | 
              
                -        ) 
               | 
            
            
            
              | 
                
               | 
              
                337
               | 
              
                +    if not dupload: 
               | 
            
            
            
              | 
                
               | 
              
                338
               | 
              
                +        for act in activities: 
               | 
            
            
            
              | 
                
               | 
              
                339
               | 
              
                +            try: 
               | 
            
            
            
              | 
                
               | 
              
                340
               | 
              
                +                coupon = CouponInfo.objects.get(coupon_id=act['coupon_id']) 
               | 
            
            
            
              | 
                
               | 
              
                341
               | 
              
                +            except CouponInfo.DoesNotExist: 
               | 
            
            
            
              | 
                
               | 
              
                342
               | 
              
                +                continue 
               | 
            
            
            
              | 
                
               | 
              
                343
               | 
              
                + 
               | 
            
            
            
              | 
                
               | 
              
                344
               | 
              
                +            try: 
               | 
            
            
            
              | 
                
               | 
              
                345
               | 
              
                +                activity = ActivityInfo.objects.get(activity_id=act['activity_id']) 
               | 
            
            
            
              | 
                
               | 
              
                346
               | 
              
                +            except ActivityInfo.DoesNotExist: 
               | 
            
            
            
              | 
                
               | 
              
                347
               | 
              
                +                continue 
               | 
            
            
            
              | 
                
               | 
              
                348
               | 
              
                + 
               | 
            
            
            
              | 
                
               | 
              
                349
               | 
              
                +            UserCouponInfo.objects.create( 
               | 
            
            
            
              | 
                
               | 
              
                350
               | 
              
                +                brand_id=coupon.brand_id, 
               | 
            
            
            
              | 
                
               | 
              
                351
               | 
              
                +                brand_name=coupon.brand_name, 
               | 
            
            
            
              | 
                
               | 
              
                352
               | 
              
                +                coupon_id=coupon.coupon_id, 
               | 
            
            
            
              | 
                
               | 
              
                353
               | 
              
                +                user_id=user_id, 
               | 
            
            
            
              | 
                
               | 
              
                354
               | 
              
                +                coupon_title=coupon.coupon_title, 
               | 
            
            
            
              | 
                
               | 
              
                355
               | 
              
                +                coupon_detail=coupon.coupon_detail, 
               | 
            
            
            
              | 
                
               | 
              
                356
               | 
              
                +                coupon_value=coupon.coupon_value, 
               | 
            
            
            
              | 
                
               | 
              
                357
               | 
              
                +                coupon_image=coupon.coupon_image, 
               | 
            
            
            
              | 
                
               | 
              
                358
               | 
              
                +                active_at=tc.utc_datetime(), 
               | 
            
            
            
              | 
                
               | 
              
                359
               | 
              
                +                expire_at=coupon.final_expire_at, 
               | 
            
            
            
              | 
                
               | 
              
                360
               | 
              
                +                is_coupon_admin_writeoff=coupon.is_coupon_admin_writeoff, 
               | 
            
            
            
              | 
                
               | 
              
                361
               | 
              
                +                coupon_valid_period=coupon.coupon_valid_period, 
               | 
            
            
            
              | 
                
               | 
              
                362
               | 
              
                +                coupon_limit_model_ids=coupon.coupon_limit_model_ids, 
               | 
            
            
            
              | 
                
               | 
              
                363
               | 
              
                +                coupon_from='PROMOTION', 
               | 
            
            
            
              | 
                
               | 
              
                364
               | 
              
                +                activity_id=activity.activity_id, 
               | 
            
            
            
              | 
                
               | 
              
                365
               | 
              
                +                activity_name=activity.activity_name, 
               | 
            
            
            
              | 
                
               | 
              
                366
               | 
              
                +                submit_pk=log.pk, 
               | 
            
            
            
              | 
                
               | 
              
                367
               | 
              
                +            ) 
               | 
            
            
            
              | 
                367
               | 
              
                368
               | 
              
                  
               | 
            
            
            
              | 
                368
               | 
              
                369
               | 
              
                     # 更新注册时间 
               | 
            
            
            
              | 
                369
               | 
              
                370
               | 
              
                     if not dupload: 
               |