feat(docs): enhance README and backend documentation for new user onboarding and backend conventions

- Added a "Start Here" section in both English and Chinese README files to guide new users on running the project locally and exploring its features.
- Introduced backend conventions for date and serialization handling, clarifying the use of Pydantic v2 and PostgreSQL.
- Updated the "Quick Start" section with detailed steps for first-time local setup, including environment requirements and backend setup instructions.
- Improved overall structure and clarity of documentation to facilitate better understanding for developers and contributors.
This commit is contained in:
zhangtao
2026-03-29 07:25:09 +08:00
parent bf26563083
commit d2a863652e
88 changed files with 4846 additions and 2558 deletions
@@ -166,12 +166,14 @@ class ParamsService:
new_obj = await ParamsCRUD(auth).update_obj_crud(id=id, data=data)
if not new_obj:
raise CustomException(msg="更新失败,系统配置不存在")
new_obj_dict = ParamsOutSchema.model_validate(new_obj).model_dump()
out = ParamsOutSchema.model_validate(new_obj)
new_obj_dict = out.model_dump()
redis_payload = out.model_dump(mode="json")
# 同步redis
redis_key = f"{RedisInitKeyConfig.SYSTEM_CONFIG.key}:{new_obj.config_key}"
try:
value = json.dumps(new_obj_dict, ensure_ascii=False)
value = json.dumps(redis_payload, ensure_ascii=False)
result = await RedisCURD(redis).set(
key=redis_key,
value=value,
@@ -306,8 +308,10 @@ class ParamsService:
# 保存到Redis并设置过期时间
for config in config_obj:
redis_key = f"{RedisInitKeyConfig.SYSTEM_CONFIG.key}:{config.config_key}"
config_obj_dict = ParamsOutSchema.model_validate(config).model_dump()
value = json.dumps(config_obj_dict, ensure_ascii=False)
out = ParamsOutSchema.model_validate(config)
config_obj_dict = out.model_dump()
redis_payload = out.model_dump(mode="json")
value = json.dumps(redis_payload, ensure_ascii=False)
result = await RedisCURD(redis).set(
key=redis_key,
value=value,