add quntiganhi and gptfenxi
This commit is contained in:
+37
-36
@@ -59,42 +59,43 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView):
|
||||
else:
|
||||
# 查询列表
|
||||
if 'b9b101e' == page_tag:
|
||||
# belong_to = []
|
||||
old_class = json.loads(user.select_class)['class']
|
||||
old_xiaozu = json.loads(user.select_xiaozu)['xiaozu']
|
||||
# for select_class,select_xiaozu in (old_class,old_xiaozu):
|
||||
# belong_to = ["class1","class2"]
|
||||
# ["class1"]
|
||||
# new_belong = json.dumps({'belong': belong_to})
|
||||
# 我的文件
|
||||
aa = []
|
||||
zipped_lists = zip(old_class, old_xiaozu)
|
||||
for select_class,select_xiaozu in zipped_lists:
|
||||
belong_to = []
|
||||
belong_to.append(str(select_class + str(select_xiaozu)))
|
||||
new_belong = json.dumps({'belong': belong_to})
|
||||
print(new_belong)
|
||||
aa.append(CooperationMind.objects.filter(belong_to=new_belong, deleted=0).values('id', 'coop_mind_name',
|
||||
"client_uuid",
|
||||
"data_format"))
|
||||
# queryset.save()
|
||||
|
||||
# for i in range(len(aa) - 1):
|
||||
# if i == 0:
|
||||
# bb = str(aa[i])
|
||||
# bb = bb + "|" + str(aa[i + 1])
|
||||
if len(aa) -1 == 0:
|
||||
self.queryset = aa[0]
|
||||
elif len(aa) == 0:
|
||||
self.queryset = 0
|
||||
else:
|
||||
for i in range(len(aa) -1):
|
||||
if i == 0:
|
||||
self.queryset = aa[i]
|
||||
self.queryset = self.queryset | aa[i + 1]
|
||||
print("=============================")
|
||||
print(self.queryset)
|
||||
print("=============================")
|
||||
self.queryset = CooperationMind.objects.all()
|
||||
# # belong_to = []
|
||||
# old_class = json.loads(user.select_class)['class']
|
||||
# old_xiaozu = json.loads(user.select_xiaozu)['xiaozu']
|
||||
# # for select_class,select_xiaozu in (old_class,old_xiaozu):
|
||||
# # belong_to = ["class1","class2"]
|
||||
# # ["class1"]
|
||||
# # new_belong = json.dumps({'belong': belong_to})
|
||||
# # 我的文件
|
||||
# aa = []
|
||||
# zipped_lists = zip(old_class, old_xiaozu)
|
||||
# for select_class,select_xiaozu in zipped_lists:
|
||||
# belong_to = []
|
||||
# belong_to.append(str(select_class + str(select_xiaozu)))
|
||||
# new_belong = json.dumps({'belong': belong_to})
|
||||
# print(new_belong)
|
||||
# aa.append(CooperationMind.objects.filter(belong_to=new_belong, deleted=0).values('id', 'coop_mind_name',
|
||||
# "client_uuid",
|
||||
# "data_format"))
|
||||
# # queryset.save()
|
||||
#
|
||||
# # for i in range(len(aa) - 1):
|
||||
# # if i == 0:
|
||||
# # bb = str(aa[i])
|
||||
# # bb = bb + "|" + str(aa[i + 1])
|
||||
# if len(aa) -1 == 0:
|
||||
# self.queryset = aa[0]
|
||||
# elif len(aa) == 0:
|
||||
# self.queryset = 0
|
||||
# else:
|
||||
# for i in range(len(aa) -1):
|
||||
# if i == 0:
|
||||
# self.queryset = aa[i]
|
||||
# self.queryset = self.queryset | aa[i + 1]
|
||||
# print("=============================")
|
||||
# print(self.queryset)
|
||||
# print("=============================")
|
||||
elif 'share' == page_tag:
|
||||
# 我的分享
|
||||
share = CooperationMindShare.objects.filter(coop_mind_id=OuterRef('id'), operator_user_id=user.id)
|
||||
|
||||
Reference in New Issue
Block a user