|
|
|
@@ -566,15 +566,16 @@ def exec_unbind_consumer_submit(pk, admin_id):
|
|
566
|
566
|
user.integral -= target_log_info.integral
|
|
567
|
567
|
user.integral = max(user.integral, 0)
|
|
568
|
568
|
|
|
569
|
|
- user.shots_num -= 1
|
|
|
569
|
+ user.shots_num = max(user.shots_num - 1, 0)
|
|
570
|
570
|
|
|
571
|
571
|
user.save()
|
|
|
572
|
+
|
|
|
573
|
+ ConsumeShotUnbindingInfo.objects.update_or_create(user_id=target_log_info.user_id, submit_pk=target_log_info.pk, defaults={
|
|
|
574
|
+ 'model_id': target_log_info.model_id,
|
|
|
575
|
+ 'sn': target_log_info.serialNo,
|
|
|
576
|
+ 'submit_at': target_log_info.created_at,
|
|
|
577
|
+ 'reason': admin_id + u'管理员解绑',
|
|
|
578
|
+ })
|
|
|
579
|
+
|
|
572
|
580
|
except ConsumeInfoSubmitLogInfo.DoesNotExist:
|
|
573
|
|
- pass
|
|
574
|
|
-
|
|
575
|
|
- ConsumeShotUnbindingInfo.objects.update_or_create(user_id=target_log_info.user_id, submit_pk=target_log_info.pk, defaults={
|
|
576
|
|
- 'model_id': target_log_info.model_id,
|
|
577
|
|
- 'sn': target_log_info.serialNo,
|
|
578
|
|
- 'submit_at': target_log_info.created_at,
|
|
579
|
|
- 'reason': admin_id + u'管理员解绑',
|
|
580
|
|
- })
|
|
|
581
|
+ pass
|