|
|
@@ -73,21 +73,20 @@ class Command(CompatibilityBaseCommand):
|
73
|
73
|
continue
|
74
|
74
|
|
75
|
75
|
for _ in range(right.coupon_num or coupon_num):
|
76
|
|
- # UserCouponInfo.objects.create(
|
77
|
|
- # brand_id=coupon.brand_id,
|
78
|
|
- # brand_name=coupon.brand_name,
|
79
|
|
- # coupon_id=coupon_id,
|
80
|
|
- # user_id=user_id,
|
81
|
|
- # coupon_title=coupon.coupon_title,
|
82
|
|
- # coupon_detail=coupon.coupon_detail,
|
83
|
|
- # coupon_value=coupon.coupon_value,
|
84
|
|
- # coupon_image=coupon.coupon_image,
|
85
|
|
- # active_at=active_at,
|
86
|
|
- # expire_at=expire_at,
|
87
|
|
- # coupon_valid_period=coupon.coupon_valid_period,
|
88
|
|
- # coupon_limit_model_ids=coupon.coupon_limit_model_ids,
|
89
|
|
- # )
|
90
|
|
- print(user_id, coupon_id, user.coupon_expire_at, tc.utc_datetime(user.coupon_expire_at, days=365))
|
|
76
|
+ UserCouponInfo.objects.create(
|
|
77
|
+ brand_id=coupon.brand_id,
|
|
78
|
+ brand_name=coupon.brand_name,
|
|
79
|
+ coupon_id=coupon_id,
|
|
80
|
+ user_id=user_id,
|
|
81
|
+ coupon_title=coupon.coupon_title,
|
|
82
|
+ coupon_detail=coupon.coupon_detail,
|
|
83
|
+ coupon_value=coupon.coupon_value,
|
|
84
|
+ coupon_image=coupon.coupon_image,
|
|
85
|
+ active_at=active_at,
|
|
86
|
+ expire_at=expire_at,
|
|
87
|
+ coupon_valid_period=coupon.coupon_valid_period,
|
|
88
|
+ coupon_limit_model_ids=coupon.coupon_limit_model_ids,
|
|
89
|
+ )
|
91
|
90
|
|
92
|
91
|
user.coupon_expire_at = expire_at
|
93
|
92
|
user.save()
|