询价第三期接口文档
询价第三期接口文档
1、数据库改动
tbl_quoted_price表增加一个字段source 类型为int 长度为默认 备注(询价来源2表示业务平台, 1表示采购app)
把所有询价记录source设为1
另外把creator为null的老数据中的creator字段刷成purchaser_id字段
2、数据库改动涉及到的接口
1、app那边编辑询价接口purchase_assitant/edit_quoted_price 2、station中的task/purchase/quote_price/import和task/purchase/quote_price/edit
3、询价记录搜索接口/station/task/quote_price/search
- METHOD:GET
- 请求
category1_ids O list 一级分类
category2_ids O list 二级分类
pinlei_ids O list 品类
settle_supplier_id O string 供应商ID(不传则选中所有供应商)
begin_time M datetime 起始时间
end_time M datetime 结束时间
search_text O string 搜索内容(根据采购规格id和规格名进行搜索)
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是。默认为否。
limit O int 返回条数,默认20。传0表示返回所有数据。
offset O int 查询起点偏移条数,默认 0 [注1]
peek O int 是否需要 peek,默认不需要 peek。peek 必须大于 limit。
count O bool 是否需要 count,默认不需要 count。(部分接口可能不实现本功能, 因为如果数据量极大,count 会很耗时)
- 响应
code:0
msg:ok
data:[{
create_time M datetime 创建时间
settle_supplier_name M 供应商名称
spec_id M string 规格id
spec_name M string 规格名称
ratio M float 采购比例
purchase_unit_name M string 采购单位
std_unit_name M string 采购基本单位
category1_name M list 一级分类名
category2_name M list 二级分类名
pinlei_name M list 品类名
std_unit_price M int 基本单位询价
purchase_price M int 采购单位询价
creator M int 询价人
origin_place O string 产地
remark O string 描述
source O string 询价来源
customer_id M string 供应商编号
}]
pagination: { M dict
peek: 100, O int 前端传 peek 的话,后端就会返回这个字段
more: true, M bool 是否有更多数据
page_obj: "gtyuhbgyhbvgyhgvgy", M string
count: 2000 O int 前端传 count 的话,后端就会返回这个字段
}
4、询价记录导出接口/station/task/quote_price/import
跟询价记录搜索用同一个接口,offset不传,limit传0则返回所有数据