entcms模块: - 4个数据表(cms_content/cms_categories/cms_leads/cms_site_config) - 22个.dspy API(含公开API和data_filter) - 4个公开页面(首页/新闻/案例)+管理后台 - 完整营销站点CSS/JS(暗色主题/渐变/动画/响应式) - 云宝SVG线稿占位符 - RBAC权限配置 dingdingflow模块: - 2个数据表(dd_approvals/dd_approval_configs) - 10个.dspy API(含钉钉回调endpoint) - 钉钉API客户端(环境变量配置,开发模式mock) - 管理UI 文档: 架构设计/53条测试用例/开发日志
21 lines
880 B
Python
21 lines
880 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""dd_approval_configs delete API"""
|
|
|
|
result = {'widgettype': 'Message', 'options': {'title': 'Error', 'message': 'Invalid request', 'type': 'error'}}
|
|
|
|
try:
|
|
record_id = params_kw.get('id', '')
|
|
if not record_id:
|
|
result['options'] = {'title': 'Error', 'message': 'ID is required', 'type': 'error'}
|
|
else:
|
|
dbname = get_module_dbname('dingdingflow')
|
|
async with DBPools().sqlorContext(dbname) as sor:
|
|
await sor.sqlExe("DELETE FROM dd_approval_configs WHERE id=${id}$", {'id': record_id})
|
|
|
|
result = {'widgettype': 'Message', 'options': {'title': 'Success', 'message': '审批配置删除成功', 'type': 'success'}}
|
|
except Exception as e:
|
|
result['options'] = {'title': 'Error', 'message': f'删除失败: {str(e)}', 'type': 'error'}
|
|
|
|
return json.dumps(result, ensure_ascii=False)
|