所以要做就认真做,珍惜你的每一个用户。产品要容易使用,正常人的思维要能理解 在推广前期,想积累用户很困难,一定要尽可能的把用户留下。
向后兼容:新标准通常兼容旧设备。标准化程度高:IEEE 802.3 全球统一标准,互操作性强。
sundablog sundablog-spring-boot-starter-pf4j provided org.
定义book_list将数据加入 然后下面是分类的链接表 返回查询列表 总数量 当前查询数量2.查询指定数据@book_api.get("/{book_id}", summary="根据ID查询图书详情")async def get_book_detail(book_id: int): """ 依据图书id查询单本图书完整信息 book_id:图书主键id,路径参数 返回:包含状态、提示、图书详情 """ return await BookService.get_detail_by_id(book_id)@staticmethod async def get_detail_by_id(book_id: int): """根据ID查询图书详情""" try: # 根据id查图书,顺带查出分类名称 book = await Book.get(id=book_id).prefetch_related("category") return { "code": 200, "msg": "查询成功", "data": { "id": book.id, "name": book.name, "price": book.price, "numbers": book.numbers, "category_id": book.category.id, "category": book.category.name } } except DoesNotExist: # 不存在 return {"code": 400, "msg": "图书不存在", "data": None}从前端返回要查询的book_id 然后传到接口 进行查询 如果book_id存在就返回信息 如果不再就返回不存在的提示信息就可以了3.添加数据@book_api.post("/", summary="新增图书")async def add_book(form: BookCreateSchema): """ 新增一本图书,请求体BookCreateSchema做字段校验,所有字段必须全部传入 form:前端提交的图书表单信息 返回:新增成功/失败的状态提示 """ return await BookService.create_book(form.model_dump())@staticmethod async def create_book(info: dict): """新增图书入库""" await Book.create(**info) return {"code": 200, "msg": "新增成功"}请求体
美媒披露特朗普暂停空袭伊朗原因:导弹不够了!美方:因阿曼斡旋停火 隶属于美国国防部的“国防伤亡分析系统”网站当地时间7月26日更新的美军伤亡统计显示,自2月28日美国和以色列联合发动对伊朗的大规模军事行动以来,美军累计伤亡人数达642人,其中18人死亡。