# 接口URL

  • 测试环境: http://apitest.dudubashi.com/index.php/api/user/set_user_bus_line_white
  • 线上环境: http://wx.dudubashi.com/index.php/api/user/set_user_bus_line_white

# 请求方法

post

# 请求参数

名称 类型 说明 是否必须
token string 临时票据(有效期:2小时) Y
bus_line_white_list string 设置用户列表(用户json字符串,DES加密后的结果。说明:加解密方法使用DES-CBC,output 输出格式为 hex ,options = OPENSSL_NO_PADDING,key = 嘟嘟提供的app_secrect,iv="dudu1234"明细字段参考样例) Y

# bus_line_white_list 提交参数说明

名称 类型 说明 必须存在
bus_line_id string 线路id Y
job_no string 工号 N
phone string 手机号 N
card_no string 卡号 N
type string 设置类型 0 长期, 1 临时 Y
start_time string 有效开始时间,当设置类型type= 1 时生效,且必传字段,格式:2021-01-05 12:34:50 N
end_time string 有效结束时间,当设置类型type= 1 时生效,且必传字段,格式:2021-01-05 22:34:50 N
role_type string 员工角色类型0:普通员工,1:外部员工 Y
flag string 状态,0:删除,1:新增/更新 Y

注:其中job_no、phone、card_no传一种即可, 当flag = 0(删除) 时,type、start_time、end_time、role_type可不传 .

$bus_line_white_list = '[
    {
        "bus_line_id": "12",
        "job_no": "OP.26375",
        "phone": "15899758288",
        "card_no": "",
        "type": "0",
        "start_time": "",
        "end_time": "",
        "role_type": "0",
        "flag": "0"
    },
    {
        "bus_line_id": "123",
        "job_no": "OP.02784",
        "phone": "",
        "card_no": "",
        "type": "1",
        "start_time": "2021-01-05 12:34:50",
        "end_time": "2021-01-05 22:34:50",
        "role_type": "0",
        "flag": "1"
    }
]
';

$bus_line_white_list = php_des_encode($bus_line_white_list, $app_secrect);

// (1)PHP、JAVA DES 加解密参考:http://php-note.com/article/1236.html
// (2)key = 嘟嘟提供的app_secrect,iv="dudu1234";

# 返回参数

名称 类型 说明 必须存在
result string 结果状态码('0000': '操作成功') Y
info string 结果提示语 Y
{
    "result": "0000",
    "info": "成功"
}