update
This commit is contained in:
+3
-3
@@ -37,7 +37,7 @@ class CooperationMindLog(AbstractModel):
|
||||
"""
|
||||
操作日志表
|
||||
"""
|
||||
coop_mind_id = models.BigIntegerField(verbose_name='脑图ID', null=False, blank=False)
|
||||
coop_mind = models.ForeignKey(to="CooperationMind", to_field="id", verbose_name="脑图ID", on_delete=models.CASCADE)
|
||||
log_uuid = models.CharField(verbose_name='操作UUID', max_length=64, null=False, blank=False)
|
||||
log_content = models.CharField(verbose_name='操作内容', max_length=1024, null=False, blank=False)
|
||||
operator_user_id = models.BigIntegerField(verbose_name='操作人', null=True)
|
||||
@@ -59,7 +59,7 @@ class CooperationMindShare(AbstractModel):
|
||||
"""
|
||||
分享记录表
|
||||
"""
|
||||
coop_mind_id = models.BigIntegerField(verbose_name='脑图ID', null=False, blank=False)
|
||||
coop_mind = models.ForeignKey(to="CooperationMind", to_field="id", verbose_name="脑图ID", on_delete=models.CASCADE)
|
||||
coop_mind_name = models.CharField(verbose_name='脑图名称', max_length=128, null=False, blank=False)
|
||||
share_uuid = models.CharField(verbose_name='分享uuid', max_length=128, null=False, blank=False)
|
||||
share_uuid_hash = models.BigIntegerField(verbose_name='分享uuid_hash', null=False, blank=False)
|
||||
@@ -80,7 +80,7 @@ class CooperationMindStar(AbstractModel):
|
||||
收藏记录表
|
||||
"""
|
||||
user_id = models.BigIntegerField(verbose_name='收藏人', null=False)
|
||||
coop_mind_id = models.BigIntegerField(verbose_name='脑图ID', null=False, blank=False)
|
||||
coop_mind = models.ForeignKey(to="CooperationMind", to_field="id", verbose_name="脑图ID", on_delete=models.CASCADE)
|
||||
coop_mind_name = models.CharField(verbose_name='脑图名称', max_length=128, null=False, blank=False)
|
||||
|
||||
class Meta:
|
||||
|
||||
@@ -49,7 +49,7 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView):
|
||||
self.queryset = CooperationMind.objects.filter(creator_user_id=user.id, deleted=0).values('id', 'coop_mind_name', "client_uuid", "data_format")
|
||||
elif 'share' == src_page:
|
||||
share = CooperationMindShare.objects.filter(coop_mind_id=OuterRef('id'))
|
||||
self.queryset = CooperationMind.objects.annotate(share_new=Exists(share), ).filter(share_new=1)
|
||||
self.queryset = CooperationMind.objects.annotate(share_new=Exists(share), ).filter(share_new=1).values('id', 'coop_mind_name', "client_uuid", "data_format")
|
||||
else:
|
||||
# 不返回数据
|
||||
self.queryset = CooperationMind.objects.filter(creator_user_id=-100).values('id', 'coop_mind_name', "client_uuid", "data_format")
|
||||
@@ -123,7 +123,7 @@ class JsMindShareView(LoginRequiredJSONMixin, ListAPIView):
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
"""
|
||||
通过链接即uuid获得分享的导图,默认有uuid就能进入界面查看
|
||||
通过链接即uuid、hash获得分享的导图详情
|
||||
"""
|
||||
share_uuid_hash = request.GET.get('h')
|
||||
share_uuid = request.GET.get('u')
|
||||
|
||||
Reference in New Issue
Block a user