|
@@ -424,7 +424,7 @@ class CloudStorageView(View):
|
|
|
"Effect": "Allow",
|
|
|
"Action": "s3:*",
|
|
|
"Resource": ["{aws_arn}:::{bucket_name}/{uid_channel}*".
|
|
|
- format(aws_arn=aws_arn, bucket_name=bucket_name, uid_channel=storage)]
|
|
|
+ format(aws_arn=aws_arn, bucket_name=bucket_name, uid_channel=storage)]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -1828,10 +1828,13 @@ class CloudStorageView(View):
|
|
|
uid_bucket_qs = UID_Bucket.objects.filter(uid=uid).values("id", "bucket_id", "bucket__region",
|
|
|
"endTime", "use_status")
|
|
|
expire = store_qs[0]['expire']
|
|
|
- uid_set_qs = UidSetModel.objects.filter(uid=uid).values('is_ai')
|
|
|
+ uid_set_qs = UidSetModel.objects.filter(uid=uid).values('is_ai', 'ucode')
|
|
|
if not uid_set_qs.exists():
|
|
|
return response.json(173)
|
|
|
is_ai = 1 if uid_set_qs[0]['is_ai'] != 2 else 0
|
|
|
+ if is_ai != 1:
|
|
|
+ is_ai = self.check_ucode_exists(uid_set_qs[0]['ucode'])
|
|
|
+
|
|
|
order_type = 1 if is_ai and CONFIG_INFO != CONFIG_CN else 0
|
|
|
use_flag = True
|
|
|
end_time = CommonService.calcMonthLater(expire)
|
|
@@ -2510,3 +2513,13 @@ class CloudStorageView(View):
|
|
|
logger = logging.getLogger('info')
|
|
|
logger.info('异常详情,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
+
|
|
|
+ def check_ucode_exists(self, ucode):
|
|
|
+ if not ucode:
|
|
|
+ return 0
|
|
|
+ ucode_set = {'823C01552AA', '823C01550AA', '823C01550XA', '522001352AA', '823C01550TA', '823C01550VA',
|
|
|
+ '823C01850XA', 'C18201850KA', '823C01850TA', 'C22501850VA', 'V82301850AA',
|
|
|
+ 'V82301850XA', '730201350AA', '730201450AA', '730201450MA', '730201450NA',
|
|
|
+ '72V201252AA', '72V201253AA', '72V201353AA', '72V201354AA', '72V201355AA',
|
|
|
+ '72V201254AA', '72V201256AA', '72V201257AA'}
|
|
|
+ return 1 if ucode in ucode_set else 0
|