This commit is contained in:
1 parent
e8318db7c5
commit
306eb905d0
2 files changed
+2
-49
No files matched your search
-42
@@ -9,9 +9,6 @@ from celery import Task
|
||||
from app.utils.utils import *
|
||||
from app.utils.yd_utils import get_token, get_activity_info
|
||||
from app.utils.feishu import (
|
||||
create_doc,
|
||||
get_doc_block,
|
||||
create_doc_block,
|
||||
get_messages,
|
||||
send_groud_message,
|
||||
)
|
||||
@@ -326,45 +323,6 @@ def check_activity_help_link():
|
||||
send_groud_message(client, chat_id, message_content)
|
||||
|
||||
|
||||
@shared_task(include_result=False)
|
||||
def process_new_demand(app_id, app_secret, table_id, record_id, data):
|
||||
|
||||
title = data.get("title")
|
||||
background = data.get("background")
|
||||
features = data.get("features")
|
||||
category = data.get("category")
|
||||
|
||||
client = (
|
||||
lark.Client.builder()
|
||||
.app_id(app_id)
|
||||
.app_secret(app_secret)
|
||||
.log_level(lark.LogLevel.DEBUG)
|
||||
.build()
|
||||
)
|
||||
|
||||
space_id = "7268552249415319554"
|
||||
bitable_token = os.environ["OFFICE_XBOT_BITABLE_TOKEN"]
|
||||
|
||||
# 放官方应用下
|
||||
if category == "opt5xydmUE":
|
||||
parent_node_token = "F4ivwKrgyiQ4zOkuLVFcTq9Bnee"
|
||||
# 放到官方指令下
|
||||
if category == "optRTwYcra":
|
||||
parent_node_token = "SvWCwlWJ8iuFKpkXp1rcd9u2n3c"
|
||||
|
||||
doc_node_token, doc_obj_token = create_doc(
|
||||
client, space_id, parent_node_token, title
|
||||
)
|
||||
block_id = get_doc_block(client, doc_obj_token)
|
||||
|
||||
create_doc_block(client, doc_obj_token, block_id, background, features)
|
||||
|
||||
doc_node_url = f"https://ying-dao.feishu.cn/wiki/{doc_node_token}"
|
||||
|
||||
update_data = {"需求文档链接": doc_node_url, "状态": "待评估"}
|
||||
update_record(client, bitable_token, table_id, record_id, update_data)
|
||||
|
||||
|
||||
@shared_task(include_result=False)
|
||||
def process_new_robot(app_id, app_secret, action_data):
|
||||
user_id = action_data["deal_person_id"]
|
||||
|
||||
Reference in new issue
Block a user