|
@@ -30,6 +30,7 @@ from Model.models import Order_Model, Store_Meal, DeviceLogModel, VodBucketModel
|
|
TestSerialRepetition, TestDeviceFindSerial, UIDCompanySerialModel, CompanySerialModel, LogModel, Device_User
|
|
TestSerialRepetition, TestDeviceFindSerial, UIDCompanySerialModel, CompanySerialModel, LogModel, Device_User
|
|
from Object.AWS.AmazonS3Util import AmazonS3Util
|
|
from Object.AWS.AmazonS3Util import AmazonS3Util
|
|
from Object.AliPayObject import AliPayObject
|
|
from Object.AliPayObject import AliPayObject
|
|
|
|
+from Object.ContentSecurityObject import ContentSecurity
|
|
from Object.IPWeatherObject import IPQuery
|
|
from Object.IPWeatherObject import IPQuery
|
|
from Object.RedisObject import RedisObject
|
|
from Object.RedisObject import RedisObject
|
|
from Object.ResponseObject import ResponseObject
|
|
from Object.ResponseObject import ResponseObject
|
|
@@ -123,6 +124,8 @@ class testView(View):
|
|
return self.get_serial_details(request_dict, response, request)
|
|
return self.get_serial_details(request_dict, response, request)
|
|
elif operation == 'find_device_serial': # 查找设备序列号接口:306低功耗无Wi-Fi产品
|
|
elif operation == 'find_device_serial': # 查找设备序列号接口:306低功耗无Wi-Fi产品
|
|
return self.find_device_serial(request_dict, response)
|
|
return self.find_device_serial(request_dict, response)
|
|
|
|
+ elif operation == 'ali_text_review': # 阿里云文本审核
|
|
|
|
+ return self.ali_text_review(request_dict, response)
|
|
# elif operation == 'funboost': # funboost测试
|
|
# elif operation == 'funboost': # funboost测试
|
|
# return self.funboost_test(request_dict, response)
|
|
# return self.funboost_test(request_dict, response)
|
|
else:
|
|
else:
|
|
@@ -905,6 +908,13 @@ class testView(View):
|
|
password = make_password(password)
|
|
password = make_password(password)
|
|
return response.json(0)
|
|
return response.json(0)
|
|
|
|
|
|
|
|
+ @staticmethod
|
|
|
|
+ def ali_text_review(request_dict, response):
|
|
|
|
+ service = 'nickname_detection'
|
|
|
|
+ service_parameters = request_dict.get('service_parameters', None)
|
|
|
|
+ review_result = ContentSecurity().text_review(service, service_parameters)
|
|
|
|
+ return response.json(0, review_result)
|
|
|
|
+
|
|
# @staticmethod
|
|
# @staticmethod
|
|
# @boost("task_queue_name1", qps=0.5, broker_kind=BrokerEnum.REDIS_ACK_ABLE) # 入参包括20种,运行控制方式非常多,想得到的控制都会有。
|
|
# @boost("task_queue_name1", qps=0.5, broker_kind=BrokerEnum.REDIS_ACK_ABLE) # 入参包括20种,运行控制方式非常多,想得到的控制都会有。
|
|
# def task_fun(x, y):
|
|
# def task_fun(x, y):
|