mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 18:19:11 +08:00
fix: extract only like
feedback to caculate User Satisfaction (#6553)
This commit is contained in:
parent
f019bc4bd7
commit
f17d4fe412
@ -281,7 +281,7 @@ class UserSatisfactionRateStatistic(Resource):
|
|||||||
SELECT date(DATE_TRUNC('day', m.created_at AT TIME ZONE 'UTC' AT TIME ZONE :tz )) AS date,
|
SELECT date(DATE_TRUNC('day', m.created_at AT TIME ZONE 'UTC' AT TIME ZONE :tz )) AS date,
|
||||||
COUNT(m.id) as message_count, COUNT(mf.id) as feedback_count
|
COUNT(m.id) as message_count, COUNT(mf.id) as feedback_count
|
||||||
FROM messages m
|
FROM messages m
|
||||||
LEFT JOIN message_feedbacks mf on mf.message_id=m.id
|
LEFT JOIN message_feedbacks mf on mf.message_id=m.id and mf.rating='like'
|
||||||
WHERE m.app_id = :app_id
|
WHERE m.app_id = :app_id
|
||||||
'''
|
'''
|
||||||
arg_dict = {'tz': account.timezone, 'app_id': app_model.id}
|
arg_dict = {'tz': account.timezone, 'app_id': app_model.id}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user