|
@@ -15,7 +15,7 @@ http://192.168.136.45:8077/appInfo?operation=update&token=test&appBundleId=1234&
|
|
|
http://127.0.0.1:8000/appInfo?operation=query&token=stest&page=1&line=10
|
|
|
http://192.168.136.45:8077/appInfo?operation=delete&token=test&id=1&id=2&id=3&id=4&id=5
|
|
|
|
|
|
-http://192.168.136.39:8000/appVer/views?lang=43523453
|
|
|
+http://192.168.136.39:8000/appVer/views?lang=cn&appBundleId=com.ansjer.accloud&app_type=1
|
|
|
'''
|
|
|
|
|
|
|
|
@@ -94,8 +94,9 @@ class AppInfo(View):
|
|
|
app_type = request_dict.get('app_type', None)
|
|
|
bundleVersion = request_dict.get('bundleVersion', None)
|
|
|
downloadLink = request_dict.get('downloadLink', None)
|
|
|
+ minAppversion = request_dict.get('minAppversion', None)
|
|
|
param_flag = CommonService.get_param_flag(
|
|
|
- data=[appBundleId, appName, systemLanguage, newAppversion, content, app_type, bundleVersion])
|
|
|
+ data=[appBundleId, appName, systemLanguage,minAppversion, newAppversion, content, app_type, bundleVersion])
|
|
|
if param_flag is not True:
|
|
|
return response.json(444)
|
|
|
has_app_info = App_Info.objects.filter(appBundleId=appBundleId)
|
|
@@ -111,6 +112,7 @@ class AppInfo(View):
|
|
|
content=content,
|
|
|
app_type=app_type,
|
|
|
bundleVersion=bundleVersion,
|
|
|
+ minAppversion =minAppversion,
|
|
|
downloadLink=downloadLink)
|
|
|
app_Info.save()
|
|
|
except Exception:
|
|
@@ -127,6 +129,7 @@ class AppInfo(View):
|
|
|
'app_type': app_Info.app_type,
|
|
|
'id': app_Info.id,
|
|
|
'downloadLink': downloadLink,
|
|
|
+ 'minAppversion':app_Info.minAppversion,
|
|
|
'bundleVersion': app_Info.bundleVersion}
|
|
|
return response.json(0, res)
|
|
|
else:
|
|
@@ -161,9 +164,10 @@ class AppInfo(View):
|
|
|
content = request_dict.get('content', None)
|
|
|
app_type = request_dict.get('app_type', None)
|
|
|
bundleVersion = request_dict.get('bundleVersion', None)
|
|
|
+ minAppversion = request_dict.get('minAppversion', None)
|
|
|
downloadLink = request_dict.get('downloadLink', None)
|
|
|
if not all(
|
|
|
- [appBundleId, appName, systemLanguage, newAppversion, content, app_type, bundleVersion, downloadLink]):
|
|
|
+ [appBundleId, appName, systemLanguage,minAppversion, newAppversion, content, app_type, bundleVersion, downloadLink]):
|
|
|
return response.json(444)
|
|
|
try:
|
|
|
app_info = App_Info.objects.get(id=id)
|
|
@@ -173,6 +177,7 @@ class AppInfo(View):
|
|
|
app_info.newAppversion = newAppversion
|
|
|
app_info.content = content
|
|
|
app_info.app_type = app_type
|
|
|
+ app_info.minAppversion = minAppversion
|
|
|
app_info.bundleVersion = bundleVersion
|
|
|
app_info.downloadLink = downloadLink
|
|
|
app_info.save()
|