cms/entcms/wwwroot/api/cms_content_create.dspy
yumoqing 5cfb0e867b feat: 开元云科技官网CMS系统初始版本
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条测试用例/开发日志
2026-05-27 15:44:26 +08:00

61 lines
1.3 KiB
Plaintext

import json
from appPublic.uniqueID import getID
config = getConfig('.')
DBPools(config.databases)
dbname = get_module_dbname('entcms')
sor = DBPools().sqlorContext(dbname)
data = {'id': getID()}
v = params_kw.get('org_id', None)
if v is not None:
data['org_id'] = v
v = params_kw.get('content_type', None)
if v is not None:
data['content_type'] = v
v = params_kw.get('category_id', None)
if v is not None:
data['category_id'] = v
v = params_kw.get('title', None)
if v is not None:
data['title'] = v
v = params_kw.get('subtitle', None)
if v is not None:
data['subtitle'] = v
v = params_kw.get('summary_text', None)
if v is not None:
data['summary_text'] = v
v = params_kw.get('body', None)
if v is not None:
data['body'] = v
v = params_kw.get('image_url', None)
if v is not None:
data['image_url'] = v
v = params_kw.get('tags', None)
if v is not None:
data['tags'] = v
v = params_kw.get('sort_order', None)
if v is not None:
data['sort_order'] = v
v = params_kw.get('status', None)
if v is not None:
data['status'] = v
v = params_kw.get('extra_json', None)
if v is not None:
data['extra_json'] = v
await sor.C('cms_content', data)
print(json.dumps({'widgettype': 'Message', 'options': {'text': '创建成功', 'messagetype': 'success'}}, ensure_ascii=False))