用户
用户
- 用户
- /user/address/add 增加店铺 (注册时还未添加店铺时调用)
- /user/address/edit 编辑店铺信息
- /user/payment/add 添加商户结算信息 -- 未找到调用
- /user/salemenu/add GET 获取可绑定销售单的店铺 -- 未找到调用
- /user/salemenu/add POST 店铺绑定销售单 -- 未找到调用
- /user/account 获取帐号信息
- /user/address/set 设置当前会话操作的店铺
- /user/change_pwd 修改密码
- /user/get_change 获取余额流水
- /user/subaccount GET 获取子帐号信息
- /user/subaccount POST 编辑子帐号信息
- /user/available_res 编辑可用的店铺信息 -- 未找到调用
- /user/telephone/exist 验证手机号是否存在
- /user/telephone/update 修改用户绑定的手机号
- /user/telephone/verify 验证用户手机号
- /user/info/by_telephone 通过手机号获取用户信息
- /user/password/reset 重置密码
- /user/username/check 验证用户名是否存在
- /user/cms_key/set 设置 cms_key
- /user/bill_info/get 用户账单管理
- /user/credit/get 获取授信数据
- /user/optional_info 获取商户可选择注册类型
- /user/reset_sub_password/update 重置子账户登录密码
/user/address/add 增加店铺 (注册时还未添加店铺时调用)
接口名: /user/address/add
class: website/user/views/customer.py/AddAdressView
Method: POST
请求:
resname M String 商户名称
name M String 收货人名称
telephone M String 收货人电话
area M Int 地理标签的二级区域id
addr_detail M String 收货地址
lng M Float 经度
lat M Float 纬度
map_address M String 商户位置
响应:
code M Int 状态码
msg M String 状态信息
data M String 响应信息
示例:
请求:
{
resname: "nick_test_01"
name: "nick"
telephone: "13112341234"
area: 30101600000
addr_detail: "广东省深圳市福田区福田街道深圳市中医院"
lng: 114.085672
lat: 22.537059
map_address: "广东省深圳市福田区福田街道深圳市中医院"
}
响应:
{
code: 0,
msg: "ok",
data: "ok"
}
逻辑:
获取用户店铺信息
店铺存在返回错误
增加店铺
/user/address/edit 编辑店铺信息
接口名: /user/address/edit
class: website/user/views/customer.py/EditAdressView
Method: POST
请求:
address_id M Int 商户id(地点id)
resname M String 商户名称
name M String 收货人名称
telephone M String 收货人电话
addr_detail M String 收货地址
lng M Float 经度
lat M Float 纬度
map_address M String 商户位置
响应:
code M Int 状态码
msg M String 状态信息
data M String 响应信息
示例:
请求:
{
address_id: 217341
resname: "ssskasd"
name: "ssskasd"
telephone: 19283928191
addr_detail: "广东省深圳市福田区华强北街道深纺大厦"
lng: 114.085655
lat: 22.544687
map_address: "广东省深圳市福田区华强北街道深纺大厦"
}
响应:
{
code: 0,
msg: "ok",
data: "ok"
}
逻辑:
编辑店铺信息
/user/payment/add 添加商户结算信息 -- 未找到调用
接口名: /user/payment/add
class: website/user/views/customer.py/AddPaymentView
Method: POST
请求:
name M string 结款人姓名
telephone M string 结款人联系方式
bill_receiver O string 账单接收人
bill_address O string 账单接收地址
响应:
code M Int 状态码
msg M String 状态信息
data M String 响应信息
示例:
待添加
逻辑:
添加商户结算信息
/user/salemenu/add GET 获取可绑定销售单的店铺 -- 未找到调用
接口名: /user/salemenu/add
Method: GET
请求:
invitation_code M String 邀请码
响应:
code M Int 状态码
msg M String 状态信息
data M String 响应信息
示例:
待添加
逻辑:
获取邀请码信息
获取商户存在的店铺
获取店铺的销售单
判断是否所有店铺已绑定邀请码携带的销售单
返回结果
/user/salemenu/add POST 店铺绑定销售单 -- 未找到调用
接口名: /user/salemenu/add
Method: POST
请求:
sid M 销售单id
invitation_code M String 邀请码
响应:
code M Int 状态码
msg M String 状态信息
data M String 响应信息
示例:
待添加
逻辑:
店铺绑定销售单
/user/account 获取帐号信息
接口名: /user/account
Method: GET
请求:
无
响应:
code M Int 状态码
msg M String 状态信息
data M Dict 响应信息
{
addresses M List<Dict> 商户信息
[
{
id M Int 商户id
addr_detail M String 商户地址
area_id M Int 地理标签的二级区域id
begintime M DateTime 收货开始时间
endtime M DateTime 收货结束时间
name M String 收货人姓名
telephone M String 收货人电话
user_id M String 帐户id
cms_info M List<Dict> cms_key信息
[
{
key M String cms_key
title M String 店铺名称(bshop的名字)
},
...
]
create_time M DateTiem 创建时间
district_code M String 地理标签的城市code
employee_id M Int 开户经理id
finance_status M Int 餐馆的状态
freight M Int 运费
keycustomer M Int 重点客户
last_use_time M DateTime 最近使用时间
lnt M Float 经度
lat M Float 纬度
location_info:
{
area1_name M String 区/县
area2_name M String 街道/镇
city_name M String 市
}
map_address M String 商户位置
remarks M String 备注
resname M String 商户名称
sales_employee_id M String 维护经理
service_station_id M String 服务的转配点
}
]
balance M Int 余额
bill_address M String 账单地址
bill_receiver M String 账单接收人
check_out M Int 检测
customer_type M Int 商户类型
district_code M String 地理标签的城市code
employee_id M Int 开户经理id
finance_status M Int 餐馆的状态
first_order_time M DateTime 首次下单时间
id M Int 帐户id
is_credit M Int 是否授信
last_login M DateTime 上次登录时间
last_modify_password_time M DateTime 上次修改密码时间
name M String 昵称
openid M Int 用户的微信身份id
order_num M Int 订单数量
parent_id M Int 上级帐号id
pay_method M Int 支付方式
payment_name M String 结款人姓名
payment_telephone M String 结款人联系方式
register_time M DateTime 注册时间
salemenu_id M Int 销售单
sales_employee_id M Int 维护经理id
settle_way M Int 结款方式
station_id M Int 服务站点
sub_permissions M Int 子权限
telephone M String 联系方式
username M String 帐户名
whitelist M Int 是否是白名单
}
示例:
请求:
无
响应:
code: 0,
msg: "ok",
data:
{
addresses:
[
{
addr_detail: "广东省深圳市福田区福田街道深圳市中医院",
area_id: 30101600000,
begintime: null,
cms_info:
[
{
key: "miaotest",
title: "1233"
}
],
create_time: "2019-08-03T19:56:20",
district_code: "440300",
employee_id: null,
endtime: null,
finance_status: 0,
freight: 0,
id: 267068,
keycustomer: 0,
last_use_time: null,
lat: 22.53706,
lng: 114.08567,
location_info:
{
area1_name: "福田区",
area2_name: "其他街道",
city_name: "深圳市"
},
map_address: "广东省深圳市福田区福田街道深圳市中医院",
name: "nick",
remarks: null,
resname: "nick_test_01",
sales_employee_id: -1,
service_station_id: "",
telephone: "13112341234",
user_id: 281261,
}
],
balance: 0,
bill_address: null,
bill_receiver: null,
check_out: 0,
customer_type: 1,
district_code: "440300",
employee_id: null,
finance_status: 0,
first_order_time: null,
id: 281261,
is_credit: 0,
last_login: "2019-08-04T22:56:58",
last_modify_password_time: "2019-08-03T23:49:26",
name: "",
openid: "",
order_num: 0,
parent_id: null,
pay_method: 1,
payment_name: "nick",
payment_telephone: "13112341234",
register_time: "2019-08-03T19:55:01",
salemenu_id: "S12731",
sales_employee_id: -1,
settle_way: 1,
station_id: "T7936",
sub_permissions: 0,
telephone: "",
username: "nick001",
whitelist: 0
}
逻辑:
获取帐号信息
/user/address/set 设置当前会话操作的店铺
接口名: /user/address/set
Method: POST
请求:
address_id M Int 商户id
receive_way O Int 收货方式
pick_up_st_id O Int 自提点id
响应:
code M Int 状态码
msg M String 状态信息
data M Dict 响应信息
{
id M Int 商户id(商家的id)
addr_detail M String 收货地址
user_id M Int 帐户id(登录bshop的帐号)
remarks M String 备注
resname M String 商户名称
area_id M Int 地理标签的二级区域id
name M String 收货人姓名
telephone M String 收货人电话
begintime M DateTime 收货开始时间
endtime M DateTime 收货结束时间
cms_info M List<Dict> cms_key信息
[
{
key M String cms_key
title M String 店铺名称
},
...
]
create_time M DateTime 创建时间
district_code M String 地理标签的城市code
employee_id M Int 开户经理id
finance_status M Int 餐馆的状态
freight M Int 运费
keycustomer M Int 重点客户
last_use_time M DateTime 最近使用时间
lnt M Float 经度
lat M Float 纬度
map_address M String 商户位置
sales_employee_id M String 维护经理
service_station_id M String 服务的转配点
}
示例:
请求:
{
address_id: 88348,
receive_way: 1
}
响应:
{
code: 0,
msg: "ok",
data:
{
addr_detail: "广东省深圳市南山区科技南一路1号",
area_id: 30100100000,
begintime: null,
cms_info:
[
{key: "miaotest", title: "miaotest"},
{key: "qcg2", title: "222"},
{key: "qcg", title: "123ss"}
],
create_time: "2018-05-22T17:04:49",
district_code: "440300",
employee_id: 0,
endtime: null,
finance_status: 0,
freight: 0,
id: 88348,
keycustomer: 0,
last_use_time: "2019-08-03T11:53:46",
lat: 22.535122,
lng: 113.941422,
map_address: "黑龙江省绥化市肇东市街道",
name: "福田",
remarks: null,
resname: "海底捞(深圳总店)",
sales_employee_id: -1,
service_station_id: "",
telephone: "23323",
user_id: 73655
}
}
逻辑:
设置当前会话操作的店铺
/user/change_pwd 修改密码
接口名: /user/change_pwd
Method: POST
请求:
old_pwd M String 旧密码
new_pwd M String 新密码
响应:
code M Int 状态码
msg M String 状态信息
data M String 响应信息
示例:
请求:
{
old_pwd: "1qaz2wsx",
new_pwd: "4rfv5tgb"
}
响应:
{
code: 0,
msg: "ok",
data: "ok"
}
逻辑:
修改当前用户密码
/user/get_change 获取余额流水
接口名: /user/get_change
Method: GET
请求:
todo
响应:
todo
示例:
请求:
响应:
逻辑:
获取当前用户的余额流水
/user/subaccount GET 获取子帐号信息
接口名: /user/subaccount
Method: GET
请求:
无
响应:
code M Int 状态码
msg M String 状态信息
data M List<Dict> 响应信息
[
{
addresses M List<Dict> 商户信息
[
{
id M Int 商户id
addr_detail M String 商户地址
area_id M Int 地理标签的二级区域id
begintime M DateTime 收货开始时间
endtime M DateTime 收货结束时间
name M String 收货人姓名
telephone M String 收货人电话
user_id M String 帐户id
cms_info M List<Dict> cms_key信息
[
{
key M String cms_key
title M String 店铺名称(bshop的名字)
},
...
]
create_time M DateTiem 创建时间
district_code M String 地理标签的城市code
employee_id M Int 开户经理id
finance_status M Int 餐馆的状态
freight M Int 运费
keycustomer M Int 重点客户
last_use_time M DateTime 最近使用时间
lnt M Float 经度
lat M Float 纬度
location_info:
{
area1_name M String 区/县
area2_name M String 街道/镇
city_name M String 市
}
map_address M String 商户位置
remarks M String 备注
resname M String 商户名称
sales_employee_id M String 维护经理
service_station_id M String 服务的转配点
}
]
balance M Int 余额
bill_address M String 账单地址
bill_receiver M String 账单接收人
check_out M Int 检测
customer_type M Int 用户类型
district_code M String 地理标签的城市code
employee_id M Int 开户经理id
finance_status M Int 餐馆的状态
first_order_time M DateTime 首次下单时间
id M Int 帐户id
is_credit M Int 是否授信
last_login M DateTime 上次登录时间
last_modify_password_time M DateTime 上次修改密码时间
name M String 昵称
openid M Int 用户的微信身份id
order_num M Int 订单数量
parent_id M Int 上级帐号id
pay_method M Int 支付方式
payment_name M String 结款人姓名
payment_telephone M String 结款人联系方式
register_time M DateTime 注册时间
salemenu_id M Int 销售单
sales_employee_id M Int 维护经理id
settle_way M Int 结款方式
station_id M Int 服务站点
sub_permissions M Int 子权限
telephone M String 联系方式
username M String 帐户名
whitelist M Int 是否是白名单
},
...
]
示例:
请求:
无
响应:
code: 0,
msg: "ok",
data:
[
{
addresses:
[
{
addr_detail: "广东省深圳市福田区福田街道深圳市中医院",
area_id: 30101600000,
begintime: null,
cms_info:
[
{
key: "miaotest",
title: "1233"
}
],
create_time: "2019-08-03T19:56:20",
district_code: "440300",
employee_id: null,
endtime: null,
finance_status: 0,
freight: 0,
id: 267068,
keycustomer: 0,
last_use_time: null,
lat: 22.53706,
lng: 114.08567,
location_info:
{
area1_name: "福田区",
area2_name: "其他街道",
city_name: "深圳市"
},
map_address: "广东省深圳市福田区福田街道深圳市中医院",
name: "nick",
remarks: null,
resname: "nick_test_01",
sales_employee_id: -1,
service_station_id: "",
telephone: "13112341234",
user_id: 281261,
}
],
balance: 0,
bill_address: null,
bill_receiver: null,
check_out: 0,
customer_type: 1,
district_code: "440300",
employee_id: null,
finance_status: 0,
first_order_time: null,
id: 281261,
is_credit: 0,
last_login: "2019-08-04T22:56:58",
last_modify_password_time: "2019-08-03T23:49:26",
name: "",
openid: "",
order_num: 0,
parent_id: null,
pay_method: 1,
payment_name: "nick",
payment_telephone: "13112341234",
register_time: "2019-08-03T19:55:01",
salemenu_id: "S12731",
sales_employee_id: -1,
settle_way: 1,
station_id: "T7936",
sub_permissions: 0,
telephone: "",
username: "nick001",
whitelist: 0
},
...
]
逻辑:
获取当前用户的子帐号信息
/user/subaccount POST 编辑子帐号信息
接口:
/user/subaccount
方法:
POST
请求:
sub_id M Int 帐号id
username M String 帐户名(登录帐户)
name M String 帐户名(昵称)
sub_permissions M Int 子账号权限
addresses M List<Int> 商户id
响应:
code M Int 状态码
msg M String 状态信息
data M String 响应信息
示例:
请求:
{
sub_id: 211082,
username: "17688929244",
name: "17688929244",
sub_permissions: 7,
addresses: [77839,77838],
}
响应:
{
code: 0,
msg: "ok",
data: "ok"
}
逻辑:
编辑当前用户的子帐号信息
删除子账户也是走的这个接口,传了一个 delete 字段来标识删除
/user/available_res 编辑可用的店铺信息 -- 未找到调用
接口:
/user/available_res
class:
website/user/views/customer.py/AvailableResView
方法:
GET
请求:
todo
响应:
todo
示例:
请求:
响应:
逻辑:
编辑当前用户的可用店铺信息
/user/telephone/exist 验证手机号是否存在
跳转连接: /user/telephone/exist
/user/telephone/update 修改用户绑定的手机号
跳转连接: /user/telephone/update
/user/telephone/verify 验证用户手机号
跳转连接: /user/telephone/verify
/user/info/by_telephone 通过手机号获取用户信息
跳转连接: /user/info/by_telephone
/user/password/reset 重置密码
跳转连接: /user/password/reset
/user/username/check 验证用户名是否存在
跳转连接: /user/username/check
/user/cms_key/set 设置 cms_key
跳转连接: /user/cms_key/set
/user/bill_info/get 用户账单管理
接口:
/user/bill_info/get
class:
website/user/views/customer.py/BillInfo
方法:
GET
请求:
无
响应:
code M Int 状态码
msg M String 状态信息
data M Dict 响应信息
{
id M Int 账户 id
begin_day M Int 账单起始日
settle_day M Int 账单结算日
bill_begin_date M String 账单开始日期
bill_end_date M String 账单结束日期
bill_settle_date M String 账单结算日期
history_pay_price M Int 往期未支付
paid_price M Int 当期已支付金额
pay_price M Int 当期未支付金额
total_price M Int 当期总金额
pay_method M Int 支付方式
settle_date_type M Int 商户结算的账期时间维度
settle_remind M Int 结算提醒,-1表示不开启,1-7天表示结算日前几天提醒
}
示例:
请求:
无
响应:
{
code: 0,
msg: "ok",
data:
{
begin_day: 1
bill_begin_date: "08-05"
bill_end_date: "08-11"
bill_settle_date: "08-14"
history_pay_price: 8622970
id: 371765
paid_price: 0
pay_method: 2
pay_price: 0
settle_date_type: 1
settle_day: 3
settle_remind: -1
total_price: 0
}
}
说明:
/user/credit/get 获取授信数据
接口:
/user/credit/get
class:
website/user/views/customer.py/CreditView
方法:
GET
请求:
无
响应:
code M Int 状态码
msg M String 状态信息
data M Dict 响应信息
{
available_credit M Float 可用额度
credit_limit M Int 授信额度
is_credit M Int 是否授信
over_credit M Float 授信超额
}
示例:
请求:
无
响应:
{
code: 0,
msg: "ok",
data:
{
available_credit: 0,
credit_limit: 0,
is_credit: 0,
over_credit: 205.81
}
}
说明:
为找到调用链接,直接输入 URL 获取
/user/optional_info 获取商户可选择注册类型
接口:
/user/optional_info
class:
website/user/views/customer.py/UserOptionalInfoView
方法:
GET
请求:
无
响应:
{
code M Int 状态码
msg M String 状态信息
data M Dict 响应信息
{
customer_regist_type M Int 商户可选注册类型
optional_receive_way M Int 可选收货方式
}
}
示例:
请求:
无
响应:
{
code: 0,
msg: "ok",
data:
{
customer_regist_type: 3
optional_receive_way: 10
show_driver_location: 0
}
}
说明:
> 商户可选注册类型: 1为店铺,2为个人,3为店铺+个人
> 可选收货方式: 1为配送,2为自提,10为配送+自提
/user/reset_sub_password/update 重置子账户登录密码
接口:
/user/reset_sub_password/update
class:
website/user/views/customer.py/SubAccountPasswordResetView
方法:
POST
请求:
user_id M String 子账号的 id
响应:
code M Int 状态码
msg M String 状态信息
data M Dict 响应信息
示例:
请求
{user_id: 211082}
响应:
{
code: 0,
data: "ok",
msg: "ok"
}
说明:
主账号在子账号管理页面中,直接将子账号的密码重置为初始密码(6个8)