feat: notice_config access messenger

This commit is contained in:
hu.sima
2023-10-09 17:29:47 +08:00
parent 2758c5e468
commit 417d6fe2ad
8 changed files with 220 additions and 42 deletions

View File

@@ -156,3 +156,15 @@ class GetEmployeeNoticeByIds(APIView):
else:
result = EmployeeCRUD.get_employee_notice_by_ids(employee_ids)
return self.jsonify(result)
class EmployeeBindNoticeWithACLID(APIView):
url_prefix = (f'{prefix}/by_uid/bind_notice/<string:platform>/<int:_uid>',)
def put(self, platform, _uid):
data = EmployeeCRUD.bind_notice_by_uid(platform, _uid)
return self.jsonify(info=data)
def delete(self, platform, _uid):
data = EmployeeCRUD.remove_bind_notice_by_uid(platform, _uid)
return self.jsonify(info=data)

View File

@@ -69,3 +69,11 @@ class NoticeConfigGetView(APIView):
def get(self):
res = NoticeConfigCRUD.get_all()
return self.jsonify(res)
class NoticeAppBotView(APIView):
url_prefix = (f'{prefix}/app_bot',)
def get(self):
res = NoticeConfigCRUD.get_app_bot()
return self.jsonify(res)