税率
全部税率存为整形,展示时/100 计算时/10000
db改动
新增
# tbl_tax_rule 税率规则表
id name pinyin abbreviate status create_time modify_time create_user finally_operator
id 规则名 规则名拼音 规则名拼音缩写 状态 创建时间 修改时间 创建人 最后操作者
# tbl_address_tax_rate 税率商家关系表
id tax_rate_id address_id address_name modify_time finally_operator
id 税率规则id 商户id 商户名 修改时间 最后操作者
# tbl_spu_tax_rate 税率spu关系表
id tax_rate_id spu_id spu_name tax_rate status modify_time finally_operator
id 税率规则id 商品id 商品名 税率 状态 修改时间 最后操作者
修改
# station
show_tax_rate 是否展示税率 (刷数据脚本)
# tbl_permission
新增权限
edit_tax 修改税额
view_tax 查看税额
station
/station/profile/update station配置信息修改.
接口名: /station/profile/update
Method: POST
request:
show_sku_outer_id M 商品id展现方式
default_settle_way O 默认结款方式(无权限不传不展示)
show_tax_rate O 是否展示税率(无权限不传不展示)
response:
{
"code": 0,
"msg": "ok"
}
/station/tax/tax_rule/list 获取站点的税率列表(按税率规则查看)
接口名: /station/tax/tax_rule/list
Method: GET
request:
search_text O 搜索内容
status O 状态 0:无效,1:有效 默认拉取有效规则
page_obj O 页面索引信息
peek O 期望窥探的条数 默认100条
offset O 偏移量
limit O 拉取条数
reverse O 拉取方向,0:正向,1:反向,默认0
response:
{
"code": 0,
"msg": "ok",
"data": {
pagination: {
peek, 窥探到的条数
more, 后面是否有数据
page_obj 页面索引信息
}
tax_list: [{
tax_rule_name, 税率规则名
address_count, 商户数量
spu_count, 商品数量
create_user, 创建人
create_time, 创建时间
status 状态
}]
}
}
/station/tax/tax_rule/create 新建税率规则
接口名: /station/tax/tax_rule/create
Method: POST
request:
tax_name M str 规则名
status O int 状态 0:无效 1:有效 默认有效
address M dict 商户id列表 [{'address_id': address_id1', 'address_name': 'address_name1'}, {'address_id': address_id2', 'address_name': 'address_name2'}]
spu M dict 商品id,税率字典 {{'spu_id': ''spu_id_1', 'spu_name': 'spu_name_1', 'tax_rate': 'tax_1'}, {'spu_id': ''spu_id_2', 'spu_name': 'spu_name_2', 'tax_rate': 'tax_2'}}
response:
{
"code": 0,
"msg": "ok",
"data":{
'tax_id' 新建的规则id
}
}
/station/tax/tax_rule/get 查看税率规则详情
接口名: /station/tax/tax_rule/get
Method: GET
request:
tax_id M 税率规则id
response:
{
"code": 0,
"msg": "ok"
"data": {
tax_rule_name, 税率规则名
address_count, 商户数量
spu_count, 商品数量
create_user, 创建人
create_time, 创建时间
modify_time, 最后修改时间
finally_operator, 最后操作人
address: [{
'id', 商户id
'name' 商户名
}], 商户信息列表
spu: [{
'id', 商品id
'name', 商品名
'tax' 税率
}], spu信息列表
status 状态
}
}
/station/tax/tax_rule/edit 编辑税率规则
接口名: /station/tax/tax_rule/edit
Method: POST
request:
tax_id M str 规则id
tax_name O str 规则名
status O int 状态 0:无效 1:有效 默认有效
address M dict 商户id列表 [{'address_id': address_id1', 'address_name': 'address_name1'}, {'address_id': address_id2', 'address_name': 'address_name2'}]
spu M dict 商品id,税率字典 {{'spu_id': ''spu_id_1', 'spu_name': 'spu_name_1', 'tax_rate': 'tax_1'}, {'spu_id': ''spu_id_2', 'spu_name': 'spu_name_2', 'tax_rate': 'tax_2'}}
response:
{
"code": 0,
"msg": "ok"
}
/station/tax/tax_rule/export 导出税率规则模版
接口名: /station/tax/tax_rule/address/export
Method: GET
request:
tax_id M 税率规则id
download_type M 导出类型 customer:商户信息 spu:商品信息
response:
/station/tax/tax_rule/import 导入商户模版
接口名: /station/tax/tax_rule/address/import
Method: POST
request:
upload_type M str customer:商户信息 spu:商品信息
upload_file M file 上传的Excel文件
response:
{
"code": 0,
"msg": "ok",
"data":[{
'id', 商户id
'name' 商户名
}], 商户信息列表
or
[{
'id', 商品id
'name', 商品名
'tax_rate' 税率
}], spu信息列表
}
/station/tax/customer/search 搜索商户
接口名: /station/customer/search
Method: GET
request:
search_text M 搜索内容
response:
{
"code": 0,
"msg": "ok",
"data":[{
'id', 商户id
'name' 商户名
}], 商户信息列表
}
/station/tax/spu/search 搜索商品
接口名: /station/spu/search
Method: GET
request:
search_text M 搜索内容
response:
{
"code": 0,
"msg": "ok",
"data":[{
'id', 商品id
'name', 商品名
}], spu信息列表
}
/station/tax/spu/list 获取站点的税率列表(按商户商品查看)
接口名: /station/tax/spu/list
Method: GET
request:
search_text O 搜索条件 商户id或商户名或商品id或商品名
status O 状态 0:无效,1:有效 默认拉取有效规则
response:
{
"code": 0,
"msg": "ok"
"data": [{
address_id, 商户id
address_name, 商户名
spu_id, 商品id
spu_name, 商品名
tax_rate, 税率
tax_rule_name, 税率规则名
create_user, 创建人
create_time, 创建时间
status 状态
}]
}
/station/orders 拉取订单列表
接口名:/station/orders
Method: GET
request:
query_type M int 搜索类型 [1: 按照下单时间搜索,2: 按照运营周期搜索,3: 按照收货日期搜索]
if query_type == 1
start_date M string 开始下单日期(精确到天)
end_date M string 截止下单日期(精确到天)
if query_type == 2
time_config_id M string 时间配置ID
cycle_start_time M string 开始周期时间(精确到分钟)
cycle_end_time M string 结束周期时间(精确到分钟)
if query_type == 3
receive_start_date M string 开始收货日期(精确到天)
receive_end_date M string 结束收货日期(精确到天)
search_text M string 搜索内容
search_area(新增) O string 搜索地区(通过'_'来拼接市,区,街道三级编号,其中任意一级信息可向后全部缺省)
sort_type O string 排序类型(date_desc日期倒序(默认);date_asc日期升序;price_desc价格倒序;price_asc价格升序
addr_desc商户倒序;addr_asc商户升序;freight_desc运费倒序;freight_asc运费升序;
status_desc订单状态倒序;status_asc订单状态升序;
)
status O int 订单状态
offset O int 分页offset
limit O int 分页limit
response:
{
"code": 0,
"msg": "ok",
"data":{
list:[{
details: [{
新增: detail_tax 商品税额
}]
新增: order_tax 订单税额
sale_money_without_tax 不含运税销售额
}],
pagination: {offset: 0, count: 2, limit: 20}
}
}
订单列表导出
/station/order/order_sku_list 订单列表按商品查看
接口名:/station/order/order_sku_list
Method: GET
response:
新增:
sale_price_without_tax 不含税单价
tax_rate 税率
tax 税额
/station/skus/addr 新建订单,修改订单,追加修改,补单时拉取添加商品信息
接口名:/station/skus/addr
Method: GET
response:
新增 tax_rate 字段 表示税率
税额前端计算,因保存时需要后台重新计算,故此处新增商品税额由前端计算做展示用
/station/order/edit/ 订单详情页
接口名:/station/order/edit/<order_id>
Method: GET
request:
order_id M string 订单ID
response:
{
"code": 0,
"msg": "ok",
"data":{
details: [{
新增: tax_rate 商品税率
sale_price_without_tax 不含税单价
tax 税额
}]
}
}
/station/transport/get_order_by_id_new 获取订单打印信息.
接口名:/station/transport/get_order_by_id_new
Method: GET
request:
ids M list 要获取的订单id列表
response:
[
{
"sort_id": 1,
"address_sign_id": "30400100000",
"refund_money": 0,
"receive_end_time": "2017-12-26 12:00",
"receiver_name": "周",
"freight": 0,
"origin_customer": {},
"child_sort_id": "",
"receiver_phone": "15111111111",
"details": [
{
"union_dispatch": true,
"std_unit_name": "件",
"sale_unit_name": "件",
"specs": "-",
"total_item_price": 154,
"real_item_price": 149.6,
"purchase_station_id": "T8521",
"category_title_1": "水果",
"id": "D2734104",
"sale_price": 11,
"remark": null,
"name": "帝王蕉",
"quantity": 14,
"salemenu_id": "S6977",
"real_weight": 13.6,
"sale_ratio": 1,
"outer_id": "",
"std_sale_price": 11,
"is_price_timing": false
# 新增:
tax_rate 商品税率
sale_price_without_tax 不含税单价
real_item_price_without_tax 不含税应付金额
}
],
"sales_name": "",
"abnormal_money": 0,
"address_sign": "宝安中心区",
"sid": "53681",
"id": "PL1053242",
"refunds": [],
"resname": "zhoumin1",
"total_price": 535,
"real_price": 279.3,
"source_origin_id": "",
"date_time": "2017-12-25 19:13:22",
"total_pay": 279.3,
"abnormals": [],
"address": "宝安中心",
"receive_begin_time": "2017-12-26 06:00"
}
]
/data_center/profit/daily/ 每日报表
接口名:/data_center/profit/daily/
Method: GET
request:
query_type: 1 查找类型
start_date: 2018-03-01 起始时间
end_date: 2018-03-14 截止时间
export: 0 是否为导出
response:
{
"msg": "ok",
"data": [{
"money_per_customer": "1.00",
"amount_ordered": 1,
"real_refund_money": "0.00",
"sale_money": "1.00",
"customer_ordered": 1,
"orderedtime": "2018-03-12",
"gross_profit": "1.00",
"freight": "0.00",
"gross_profit_rate": "100.00%",
"money_delivered": "1.00",
"abnormal_money": "0.00",
"sale_money_with_freight": "1.00",
"money_cost": "0.00",
"money_ordered": "1.00",
"ASP": "1.00"
# 新增:
sale_money_without_tax 不含运税销售额
}],
"code": 0
}
/data_center/profit/detail/customer/ 利润报表按商户查看
接口名:/data_center/profit/detail/customer/
Method: GET
request:
query_type: 1 查找类型
start_date: 2018-03-01 起始时间
end_date: 2018-03-14 截止时间
export: 0 是否为导出
response:
{
"msg": "ok",
"data": {
"daily": [{
"real_refund_money": "0.00",
"address_id": "S070714",
"money_ordered": "1.00",
"money_sales": "1.00",
"address_type": "外部商户",
"money_sales_with_freight": "1.00",
"orderedtime": "2018-03-12",
"money_delivered": "1.00",
"abnormal_money": "0.00",
"profit_rate": "100.00%",
"address_name": "ceshi",
"money_cost": "0.00",
"profit": "1.00"
# 新增:
money_sales_without_tax 不含运税销售额
}],
"whole": [{
"real_refund_money": "0.00",
"address_id": "S034386",
"money_ordered": "1.10",
"money_sales": "2.10",
"address_type": "外部商户",
"money_sales_with_freight": "2.10",
"orderedtime": "2018-03-01 ~ 2018-03-14",
"money_delivered": "1.10",
"abnormal_money": "1.00",
"profit_rate": "100.00%",
"address_name": "gaoyang111",
"money_cost": "0.00",
"profit": "2.10"
# 新增:
money_sales_without_tax 不含运税销售额
}]
},
"code": 0
}
MA
/finance/order/search 商户结算
接口名:/finance/order/search
Method: GET
request:
begin_time M date
end_time M date
paystatus M 支付状态 全部-1,未支付0,已支付1
city M 城市编码
station M 站点 全部0,其他情况传站点id
search_text O 搜索内容
offset M
limit M
count M
response:
{
"data": {
"orders": [
{
"real_price": 3.31,
"status": 1,
"real_pay": 0,
"district_code": "440300",
"customer": {
"address": "你是蹑手蹑脚",
"receiver_name": "jsjajsns",
"extender": {
"order_pay_method": 2,
"resname": "jsjwia"
},
"address_id": "3559",
"receive_begin_time": "2017-12-08 06:00",
"address_sign_id": "30700100000",
"receiver_phone": "6648484",
"receive_end_time": "2017-12-08 12:00",
"uid": "2157",
"supply_station_id": "T002"
},
"margin": -23.31,
"station_id": "T002",
"remark": null,
"freight": 20,
"total_price": 3.31,
"salemenu_id": "S0520",
"id": "PL899979",
"abnormal_money": 0,
"sale_money": 3.31,
"date_time": "2017-12-07T14:40:06.980",
"origin_total_price": 3.31,
"refund_money": 0,
"total_pay": 23.31,
"salemenu_name": "深圳餐厅售卖单"
#新增:
order_tax 订单税额
sale_money_without_tax 不含运税销售额
},
],
"count": 4
},
"code": 0,
"msg": "ok"
}
/finance/order/can_strike_balance 冲账拉取订单
接口名:/finance/order/can_strike_balance
Method: GET
request:
response:
{
"code": 0,
"msg": "ok",
"data": {
"orders": [
{
"total_price": 1438.14,
"station_id": "T3217",
"origin_total_price": 1438.14,
"real_price": 1445.83,
"freight": 0.0,
"customer": {
"receiver_phone": "18998507773",
"address_sign_id": "30600300000",
"receiver_name": "陈",
"receive_end_time": "2017-08-21 08:30",
"extender": "{\"order_pay_method\": 2, \"resname\": \"HJ\"}",
"uid": "44981",
"receive_begin_time": "2017-08-21 08:00", # 收货时间。
"supply_station_id": "T3217",
"address": "福城街道办",
"address_id": "39070"
},
"status": 5,
"details": [
{
"version": 138,
"id": "D1931255"
}
],
"remark": null,
"district_code": "440300",
"total_pay": 1445.83,
"date_time": "2017-08-20T21:49:48.312", # 下单时间
"id": "PL636603",
"sale_money": 1445.83,
"abnormal_money": 0.0,
"margin": -1445.83,
"real_pay": 0.0,
#新增:
order_tax 订单税额
sale_money_without_tax 不含运税销售额
},
]
}
}
/ordermanage/get/ 订单异常页拉取订单详情
接口名:/ordermanage/get/<order_id>
Method: GET
request:
response:
data: {
token: M int session token
order_info M dict 订单数据 中 新增: order_tax 订单税额
base_info: M dict 一些下拉菜单需要的数据
edit_permission: M bool 是否有编辑权限
}
/custommanage/bill/search 商户对账单
接口名:/custommanage/bill/search
Method: GET
request:
cityValue str O 城市ID,不传代表全部
saleEmployee int O 销售经理,不传代表全部
saleBoss int O 销售组长,不传代表全部
sid str O
name str O
station_id str O 站点ID,不传代表全部
type int M 1表示以「站点id」作为搜索条件,0表示以「销售经理等条件」作为搜索条件
export bool O 是否导出为excel,默认不导出
page int O 页数
num int O 每页条数
response:
{
"code": 0,
"msg": "ok"
"data": [
{
"amount": 155400,(销售额)
"lack": 155400,(应付金额)
"KID": "K030135",
"SID": "S024717",
"company_name": "--",
"resname": "客户B(同group跨站绑定)",
"sale_employee_id": null,
"sale_employee_name": "--",
"consignee_name": "sss",
"consignee_phone": "13581386890",
"username": "584520",
"addr_detail": "ffffff",
"payment_name": "sss",
"payment_telephone": "13581386890",
"district_code": "999999",
"district_name": "测试城市",
"pay_method_id": 26578,
"pay_method": 2,
"paid_amount": 0,
"refund_amount": 0,
# 新增:
bill_tax 账单税额
},
]
}
/custommanage/bill/detail/ 查看对账单详情
接口名:/custommanage/bill/detail/<sid>
Method: GET
request:
date_from M 开始日期
date_to M 截止日期
id M 商户ID
search_type M 拉取方式(按收货日期,下单日期,运营时间)
respose:
{
"data": {
"lack": 0,
"paid_amount": 0,
"district_code": "440300",
"refund_amount": 0,
"payment_telephone": "158698756252",
"amount": 0,
"pay_method": 1,
"consignee_name": "xjxc001",
"username": "xjxc001",
"sale_employee_name": "--",
"KID": "K068245",
"addr_detail": "xjxc001",
"district_name": "深圳市",
"sale_employee_id": null,
"resname": "xjxc001",
"company_name": "--",
"orders": [{
"receive_time": "2018-04-03T06:00:00",
"amount": 0.0,
"date_time": "2018-04-02T09:45:37.920",
"paid_amount": 0.0,
"status": "未支付",
"station_name": "先进先出01",
"remark": null,
"id": "PL1418541",
"details": [{
"sale_unit_name": "1.0斤/斤",
"name": "小白菜|斤",
"total_item_pay": 0,
"quantity": "0.00",
"unit_price": 400,
"unit_name": "斤"
# 新增:
tax 商品税额
}],
"refund_amount": 0.0
}],
"payment_name": "xjxc001",
"consignee_phone": "15898745878",
"SID": "S062175"
},
"msg": "ok",
"code": 0
}
/report/sale_profit 销售利润
接口名:/report/sale_profit
Method: GET
request:
search_type M int 类型 1-下单日期 2-时间周期 3-收货日期
time_config_id O string 时间配置
start_time M date 起始日期
end_time M date 截止日期
station_list O list 站点列表
salemenu_list O list 站点所属报价单列表
deal O bool 0-任务处理, 1-业务处理
response:
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
[{
"salemenu_id" : "S4028", # 销售单id
"nosku_abnormal_money" : 0, # 非sku异常金额
"real_refund_money" : 0, # 实退金额
"abnormal_sku_num" : 0, # sku异常数量
"station_id" : "T3877", # 站点id
"station_name": "", # 站点名称
"district_code" : "511100", # 城市码
"abnormal_money" : 0, # 异常金额
"request_refund_money" : 0, # 应退金额
"customer_ordered" : 4, # 商户订单数量
"money_delivered" : 52795.0, # 出库金额
"freight" : 0.0, # 运费
"money_ordered" : 52795.0, # 下单金额
"sku_num" : 9, # sku数量
"amount_delivered" : 4, # 出库数量
"money_cost" : 45791.0, # 成本金额
"orderedtime" : ISODate("2017-05-16T00:00:00.000Z"), # 下单日期
"refund_sku_num" : 0, # 退货商品数
"restaurants_num" : # 餐馆数量
"amount_ordered" : 4 # 订单数量
# 新增:
orders_tax 多订单税额
}]
/report/customer_order 订单分析
接口名:/report/customer_order
Method: GET
request:
search_type M int 类型 1-下单日期 2-时间周期 3-收货日期
time_config_id O string 时间配置
start_time M date 起始日期
end_time M date 截止日期
station_list O list 站点列表
salemenu_list O list 站点所属报价单列表
response:
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
[{
"order_id" : "PL603427", # 订单id
"total_price" : 282120.0, # 下单金额
"date_time" : "2017-07-25 10:09:11", # 下单时间
"fake_total_price" : 282120, # 伪原价:每件商品 max(原价下单金额, 规则价下单金额) 之和
"status" : -1, # 订单状态 -1: '订单已删除', 1: '等待出库', 5: '正在分拣', 10: '正在配送', 15: '已签收', 100: '已支付',
"station_id" : "T4969", # 站点id
"station_name": "", # 站点名称
"is_aggregation" : 0, #
"source_order_ids" : [], # 源订单id
"_lock" : "no",
"real_price" : 282120.0, # 出库金额
"district_code" : "440300", # 地区码
"total_pay" : 282120.0, # 应付金额
"_abnormal_lock" : "no",
"salemenu_ids" : [
"S4794",
"S4788"
], # 销售单id
"freight" : 0, # 运费
"abnormals" : [ # 异常列表
{
"id" : 61298,
"money_delta" : -3555, # 误差金额
"type_id" : 25,
"type_text" : "市场缺货",
"final_amount" : 0.0,
"detail_id" : "D1670534",
"text" : "市场缺货"
}
],
"refunds" : [ # 退货列表
{
"real_amount" : 9.0,
"type_id" : 12,
"type_text" : "质量问题",
"state" : 4,
"detail_id" : "D804496",
"out_order_id" : "LK396478",
"request_amount" : 9.0, # 请求退货数
"sale_price": 63, # 销售单价
"text" : "收到的青瓜冻了 有冻伤,客户今天没有订购冻品",
"station_store_id" : "T002",
"out_sku_id" : "D804496",
"store_amount" : 0.0,
"id" : 942
}
],
"details" : [
{
"sale_price" : 32000.0, # 售价
"total_item_price" : 32000.0, # 该商品下单总价
"sort_station_ids" : [
{
"order_id" : "LK631301",
"amount" : 1.0,
"sku_id" : "D2191553"
}
],
"real_item_price" : 32000.0, # 改商品实际出库金额
"total_item_pay" : 32000.0, # 该商品应付金额
"id" : "D2191554", # 商品id
"is_price_timing" : false, #
"quantity" : 1.0, # 下单数量
"purchase_quantity" : 1.0, # 采购数量
"origins" : [],
"accept_quantity" : 1.0, #
"salemenu_id" : "S4794", # 销售单id
"sale_unit_name" : "袋", # 销售单位
"stock_price": 55, # 库存均价
"version" : 3, # 商品版本号
"sync_origin" : "D2191554",
"name" : "小白菜【袋】", # 商品名称
"real_quantity" : 1.0, # 出库数量
"attrition_rate" : 0.0,
"spu_remark" : "", # 订单备注
"material" : [
{
"std_sale_price" : 320, # 标准售卖单价
"real_std_count" : 100.0, #
"std_unit_name" : "斤", # 标准售卖单位
"spu_id" : "C706303", # id
"accept_std_count" : 100.0, #
"sale_ratio" : 100.0 # 比例
}
]
}
],
"customer" : {
"address_id" : "35495", # 商户id
"address_name": "", # 商户名称
"receive_begin_time" : "2017-07-26 06:00", # 收货时间
"receiver_name" : "总二", # 收货人
"receiver_phone" : "15896369874", # 收货人电话
"supply_station_id" : "T4969", # 供应商id
"extender" : "{\"resname\": \"\\u674e\\u94ed\\u7684\\u603b\\u7ad9\\u5ba2\\u6237\\u4e8cA\", \"order_pay_method\": 2}", # 扩展信息
"address_sign_id" : "30500300000", # 地理位置标记
"receive_end_time" : "2017-07-26 12:00", # 收货截止时间
"uid" : "41250", # 商户用户id
"address" : "坂田街道居里夫人路2—A号" # 收货地址
},
"remark" : null,
"time_config_id" : "ST001", # 时间配置
"origin_total_price" : 282120, # 原价下单金额
"is_purchase_task_synced" : false
# 新增:
order_tax 多订单税额
}]
/report/skus 商品分析
接口名:/report/skus
Method: GET
request:
search_type M int 类型 1-下单日期 2-时间周期 3-收货日期
time_config_id O string 时间配置
start_time M date 起始日期
end_time M date 截止日期
station_list O list 站点列表
salemenu_list O list 站点所属报价单列表
deal O bool 0-任务处理, 1-业务处理
response:
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
[{
"date_time": "", # 日期
"station_id": "", # 站点id
"station_name": "", # 站点名称
"address_id": "", # 商户id
"address_name": "", # 商户名称
"spu_id": "", # spu_id
"spu_name": "", # 商品名字
"sku_id": "", # sku_id
"sku_name": "", # sku_name
"sale_unit_price": "", # 销售价格
"sale_unit_name": "", # 销售单位
"category_id_1": "", # 一级分类
"category_id_1_name": "", # 一级分类名称
"category_id_2": "", # 二级分类名称
"category_id_2_name": "", # 二级分类名称
"quantity_ordered" : 1.0, # 下单数(销售单位)
"sale_ratio": "", # 比例
"quantity_delivered" : 1.0, # 出库数量
"stock_price": "", # 成本单价(库存均价)
"abnormal_quantity": # 异常数量(不是个数)
"money_delivered" : 52795.0, # 出库金额
"abnormal_money" : 0, # 异常金额
"real_refund_money" : 0, # 实退金额
"sale_money": "", # 销售额
# 新增:
sku_tax 多订单税额
}]
测试环境
station 7892
ma 7893
db 0320
db sql
CREATE TABLE `tbl_tax_rule` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(64) NOT NULL,
`pinyin` VARCHAR(255) NOT NULL,
`abbreviate` VARCHAR(64) NOT NULL,
`status` TINYINT NOT NULL DEFAULT 1,
`type` TINYINT(4) NOT NULL DEFAULT 1,
`create_time` DATETIME NOT NULL,
`modify_time` DATETIME NULL,
`create_user` VARCHAR(64) NOT NULL,
`finally_operator` VARCHAR(64) NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
CREATE TABLE `tbl_address_tax_rate` (
`id` INT NOT NULL AUTO_INCREMENT,
`tax_rate_id` INT NOT NULL, #TODO 加索引
`address_id` INT NOT NULL,
`address_name` VARCHAR(100) NULL,
`station_id` VARCHAR(64) NULL,
`status` TINYINT NOT NULL DEFAULT 1,
`modify_time` DATETIME NULL,
`finally_operator` VARCHAR(64) NULL,
PRIMARY KEY (`id`),
INDEX `tax_rate_id` (`tax_rate_id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;
CREATE TABLE `tbl_spu_tax_rate` (
`id` INT NOT NULL AUTO_INCREMENT,
`tax_rate_id` INT NOT NULL,
`spu_id` VARCHAR(20) NOT NULL,
`spu_name` VARCHAR(128) NULL,
`tax_rate` INT NOT NULL,
`station_id` VARCHAR(464) NOT NULL,
`status` TINYINT NOT NULL DEFAULT 1,
`modify_time` DATETIME NULL,
`finally_operator` VARCHAR(64) NULL,
PRIMARY KEY (`id`),
INDEX `tax_rate_id` (`tax_rate_id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;