Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fj-livekit
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xianyang
fj-livekit
Commits
7544f0ac
Commit
7544f0ac
authored
Dec 06, 2023
by
xianyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化2.0.0
parent
576900f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
data_delte.py
src/app/api/friends/data_delte.py
+1
-0
validaters.py
src/app/api/friends/validaters.py
+16
-1
views.py
src/app/api/friends/views.py
+4
-4
orm.py
src/app/orm.py
+1
-0
No files found.
src/app/api/friends/data_delte.py
View file @
7544f0ac
import
datetime
import
json
from
configs.config
import
env
from
src.libs.db_link
import
LinkMysql
...
...
src/app/api/friends/validaters.py
View file @
7544f0ac
...
...
@@ -161,9 +161,24 @@ class FriendsCommentListFrom(BaseForm):
raise
APIException
(
code
=
500
,
message
=
'用户未查询到'
)
class
GiveCommentListFrom
(
BaseForm
):
'''
点赞
'''
uid
=
StringField
(
validators
=
[
DataRequired
(
message
=
"uid不能为空"
)])
fcmid
=
StringField
(
validators
=
[
DataRequired
(
message
=
"朋友圈信息id不能为空"
)])
def
validate_uid
(
self
,
val
):
if
val
.
data
:
sql
=
f
"SELECT * FROM `missu_users` where user_uid='{val.data}'"
user_info
=
LinkMysql
(
env
.
BUSINESS
)
.
query_mysql
(
sql
)
if
user_info
==
():
raise
APIException
(
code
=
500
,
message
=
'用户未查询到'
)
class
CircleListFrom
(
BaseForm
):
'''
评论列表
获取朋友圈详情
'''
uid
=
StringField
(
validators
=
[
DataRequired
(
message
=
"uid不能为空"
)])
...
...
src/app/api/friends/views.py
View file @
7544f0ac
...
...
@@ -8,7 +8,7 @@ from src.app.api.friends.data_delte import FriendMessageNotice, save_friends, ge
CircleOfFriends
from
src.app.api.friends.validaters
import
FriendSendAddFrom
,
FriendsListFrom
,
FriendCommentAddFrom
,
\
FriendCommentDeleteFrom
,
FriendGivetAddFrom
,
FriendGivetDeleteFrom
,
FriendBackgroundFrom
,
FriendsCommentListFrom
,
\
CircleListFrom
,
ContentListFrom
CircleListFrom
,
ContentListFrom
,
GiveCommentListFrom
from
src.app.api.friends
import
api
from
src.libs.functions
import
result_format
,
paginate_info
,
upload_file
,
children_comment
,
list_give
from
src.modules.friend
import
FriendMessage
,
FriendComment
,
FriendGive
...
...
@@ -150,7 +150,7 @@ def circle_comment():
'''
form
=
FriendsCommentListFrom
(
request
.
args
)
.
validate_
()
data
=
children_comment
(
form
.
fcmid
.
data
,
form
.
myUid
.
data
)
return
result_format
(
code
=
200
,
data
=
data
,
message
=
"
查询
成功"
)
return
result_format
(
code
=
200
,
data
=
data
,
message
=
"
操作
成功"
)
@
api
.
route
(
'/give/list'
,
methods
=
[
'GET'
])
...
...
@@ -158,9 +158,9 @@ def give_list():
'''
点赞列表
'''
form
=
Friends
CommentListFrom
(
request
.
args
)
.
validate_
()
form
=
Give
CommentListFrom
(
request
.
args
)
.
validate_
()
data
=
list_give
(
form
.
fcmid
.
data
,
form
.
uid
.
data
)
return
result_format
(
code
=
200
,
data
=
data
,
message
=
"
查询
成功"
)
return
result_format
(
code
=
200
,
data
=
data
,
message
=
"
操作
成功"
)
@
api
.
route
(
'/circle/info'
,
methods
=
[
'GET'
])
...
...
src/app/orm.py
View file @
7544f0ac
...
...
@@ -52,6 +52,7 @@ class Query(BaseQuery):
db
=
SQLAlchemy
(
query_class
=
Query
)
class
Common
(
object
):
"""orm通用操作"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment