Home - 自助售卖系统 登录  
最后修改者: root  2018-10-13 15:18:50 

售卖机商品操作历史

编号  :  20

POST - mobile/index.php?act=seller_device&op=operate_log
售卖机商品操作历史
请求参数
参数名 参数类型 必传 缺省值 描述
device_no string Y 设备编号
curpage string N 当前页
key_words string N 商品名称检索
key_time string N 形如2018-10-13
返回值
{
    "code": 200,
    "hasmore": true,
    "page_total": 41,
    "datas": {
        "log_list": [
            {
                "id": "6",
                "device_no": "1010000000000002",
                "goods_id": "104575",
                "goods_name": "WWW",
                "seller_num": "1",
                "buyer_num": "0",
                "update_time": "1539411818",
                "operate_id": "124814",
                "operate_name": "15196638218",
                "goods_image": "http://127.0.0.1/goushihui/data/upload/shop/common/default_goods_image_240.gif"
            },
            {
                "id": "7",
                "device_no": "1010000000000002",
                "goods_id": "104575",
                "goods_name": "WWW",
                "seller_num": "2",
                "buyer_num": "0",
                "update_time": "1539411917",
                "operate_id": "124814",
                "operate_name": "15196638218",
                "goods_image": "http://127.0.0.1/goushihui/data/upload/shop/common/default_goods_image_240.gif"
            },
            {
                "id": "8",
                "device_no": "1010000000000002",
                "goods_id": "104575",
                "goods_name": "WWW",
                "seller_num": "2",
                "buyer_num": "0",
                "update_time": "1539411971",
                "operate_id": "124814",
                "operate_name": "15196638218",
                "goods_image": "http://127.0.0.1/goushihui/data/upload/shop/common/default_goods_image_240.gif"
            },
            {
                "id": "9",
                "device_no": "1010000000000002",
                "goods_id": "104575",
                "goods_name": "WWW",
                "seller_num": "2",
                "buyer_num": "0",
                "update_time": "1539411985",
                "operate_id": "124814",
                "operate_name": "15196638218",
                "goods_image": "http://127.0.0.1/goushihui/data/upload/shop/common/default_goods_image_240.gif"
            },
            {
                "id": "10",
                "device_no": "1010000000000002",
                "goods_id": "104575",
                "goods_name": "WWW",
                "seller_num": "2",
                "buyer_num": "0",
                "update_time": "1539411985",
                "operate_id": "124814",
                "operate_name": "15196638218",
                "goods_image": "http://127.0.0.1/goushihui/data/upload/shop/common/default_goods_image_240.gif"
            }
        ]
    }
}
最后修改者: root  2018-08-03 10:45:28 

售卖机未扣款订单支付

编号  :  19

POST - mobile/index.php?act=member_vend&op=unpay_to_pay
售卖机未扣款订单支付
请求参数
参数名 参数类型 必传 缺省值 描述
order_id int Y 订单id
返回值
{
  "code": 200,
  "msg": "支付成功!"
}
最后修改者: root  2018-04-18 14:00:51 

商品分类(新)

编号  :  018

POST - mobile/index.php?act=seller_device&op=device_class
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y
返回值
{
    "0": {
        "gc_id": "1155",
        "gc_name": "肉类"
    },
    "1": {
        "gc_id": "1318",
        "gc_name": "11的一级分类"
    },
    "2": {
        "gc_id": "1319",
        "gc_name": "11的二级分类"
    },
    "3": {
        "gc_id": "1333",
        "gc_name": "cs分类2"
    },
    "4": {
        "gc_id": "1361",
        "gc_name": "whj数据统计分类1"
    },
    "5": {
        "gc_id": "1362",
        "gc_name": "whj数据统计分类2"
    },
    "6": {
        "gc_id": "1374",
        "gc_name": "三级分类"
    },
    "code": 200
}
最后修改者: root  2018-04-13 14:57:38 

商品列表(新)

编号  :  017

POST - /mobile/index.php?act=seller_device&op=device_goods_list
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y
device_id int Y 设备id
store_id int Y 店铺id
gc_id int N 分类
keyword string N 关键字
返回值
{
    "code": 200,
    "device_id":1,
    "goods_list": [
        {
            "storage": "1",
            "goods_id": "104507",
            "goods_name": "水果a",
            "gc_id": "1374",
            "goods_price": "0.10",
            "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_360.gif",
            "store_id": "8",
            "goods_amount": "0.10",
            "goods_num": "1"
        },
        {
            "storage": "1",
            "goods_id": "104523",
            "goods_name": "售卖机商品",
            "gc_id": "1374",
            "goods_price": "5.80",
            "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_360.gif",
            "store_id": "8",
            "goods_amount": "1125.20",
            "goods_num": "194"
        }
    ],
   
}
最后修改者: root  2018-04-13 14:57:20 

未识别标签绑定商品(新)

编号  :  015

POST - mobile/index.php?act=seller_device&op=bind_tag_goods
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y
device_id int Y
goods_id int Y
返回值
{
  "code": 200,
  "msg": "绑定成功"
}
错误
{
  "code": 201,
  "msg": "绑定失败"
}
最后修改者: root  2018-02-28 09:38:43 

获取最新版本信息

编号  :  014

POST - machine_api/index.php?act=vend&op=getVersionInfo
获取最新版本信息
请求参数
参数名 参数类型 必传 缺省值 描述
machine_sn string Y 设备sn
返回值
{
    "code": 200,
    "datas":
        {
            "version_id": "28",
            "client_version": "1010",   //版本号
            "version_url": "http://container.test.ifoodtube.com/data/upload/admin/version/v_20170524-0105489366717052360.rar",//下载地址
            "add_time": "1495592671", //版本提交时间
            "is_forece": "0" //是否强制升级 0否 1是
        }
}
最后修改者: root  2018-02-07 10:33:37 

购食汇-设备详情

编号  :  01

POST - /mobile/index.php?act=member_vend&op=device_info
请求参数
参数名 参数类型 必传 缺省值 描述
device_imei string Y 设备imei
返回值
{
    "code": 200,
    "datas": {
        "id": "2",
        "device_no": "0212254565457890",
        "device_name": "售卖柜0002",
        "decive_city_id": "390",
        "device_position": "绵阳园艺山办公室",
        "online_state": "1",
        "device_state": "7",
        "compressor_state": "1",
        "temperature": "6",
        "temperature_hysteresis": "2",
        "add_time": "1514875343",
        "update_time": "1517970781",
        "store_id": "1",
        "device_abnormal_type": "00",
        "latitudes": "1.00000000000",
        "longitudes": "2.00000000000",
        "alipay_state": "0",
        "wxpay_state": "0",
        "gshpay_state": "0",
        "door_state": "0",
        "lock_state": "0",
        "power_state": "0",
        "device_unusual_state": "0"
    }
}
最后修改者: root  2018-01-26 13:33:06 

商家开门流程信息获取

编号  :  1

POST - /mobile/index.php?act=seller_device&op=rotation_device_state
请求参数
参数名 参数类型 必传 缺省值 描述
device_imei string Y 售卖机设备imei
sign_user_id_key string Y 开门请求发送成功同步返回
key string Y 登陆后的key
返回值
{
    "code": 200,
    "datas": {
           "device_imei": 'aaaa' //绑定成
            "lock_state": "0",//0-开锁中,1-开锁成功,-1,开锁失败
            'door_state':0,//0-开门中,1-开门成功,-1,开门失败
            'transaction_state':1,//1-流程中,0-流程已结束
            "order_id":0,////0-未有结算信息,大于0有结算信息
        },
       
    }
}
最后修改者: root  2018-01-26 13:34:18 

商家开门补货

编号  :  1

POST - /mobile/index.php?act=seller_device&op=scan_open
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y 登陆后的key
device_imei string Y 售卖机IMEI
返回值
{
    "code": 200,
    "datas": {
           "open_door": 1 //开门状态 1-已开门 0-未开门
           "sign_user_id_key" : 'aaaa'
        },
       
    }
}
最后修改者: root  2018-01-19 10:21:19 

交易流程信息轮训

编号  :  9

POST - /mobile/index.php?act=member_vend&op=rotation_device_state
发起开门接口,并成功返回, 此时,进入此轮训接口 查询门锁状态, 当transaction_state 为 0时 交易流程结算, 如果订单id大于0就跳转至查看订单基础信息页面
请求参数
参数名 参数类型 必传 缺省值 描述
device_imei string Y 设备imei
sign_user_id_key string Y 用户user_id_key
返回值
{
    "code": 200,
    "datas": {
           "device_imei": 'aaaa' //绑定成
            "lock_state": "0",//0-开锁中,1-开锁成功,-1,开锁失败
            'door_state':0,//0-开门中,1-开门成功,-1,开门失败
            'transaction_state':1,//1-流程中,0-流程已结束
            "order_id":0,////0-未有结算信息,大于0有结算信息
        },
       
    }
}
最后修改者: root  2018-01-18 13:50:59 

设备控制

编号  :  013

POST - mobile/index.php?act=seller_device&op=device_control
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y key
device_no int Y 设备no
device_state int Y 设备状态 0 停用 1 启用
compressor_state int Y 空调状态 0 关闭 1 开启(压缩机)
temperature int Y 温度(0-20)
返回值
{
    "code": 200,
    "msg": 1
}
最后修改者: root  2018-01-18 11:40:43 

购食汇APP-扫码开门-3-修改绑定账号

编号  :  1

POST - /mobile/index.php?act=member_vend&op=change_bind
请求参数
参数名 参数类型 必传 缺省值 描述
sign_user_id_key string Y url获取的sign_user_id_key
password string Y 用户输入的原账号登录密码
返回值
{
    "code": 200,
    "datas": {
           "bind": 1 //绑定成
            "msg": "绑定成功",
            'sign_user_id_key':aaaaa
            "member_name": 18981850204
            "old_member_name": 18668313509
        },
       
    }
}
最后修改者: root  2018-01-17 15:36:39 

购食汇APP-扫码开门-1-鉴权

编号  :  9

POST - /mobile/index.php?act=member_vend&op=user_sign
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y 登录后的key
device_imei string Y 售卖设备IMEI
返回值
{
    "code": 200,
    "datas": {
        "signed": 1,  //是否已签约 0-未签约,1-已签约
        "scheme": {
            "alipay": "alipays://platformapi/startapp?appId=20000067&url=https%3A%2F%2Fopenauth.alipay.com%2Foauth2%2FpublicAppAuthorize.htm%3Fapp_id%3D2016051801415201%26scope%3Dauth_base%26redirect_uri%3Dhttp%3A%2F%2Fb2.ifoodtube.com%2Fmachine_api%2Findex.php%3Fact%3Dvend%26op%3Dscan_open%26device_imei%3D%26gsh_token%3Dc2c4134c6a41de67a98c08ff19ccf28c" //未签约时,打开app的协议链接
        },
     'sign_user_id_key' : 'AAAAA';
    }
}
最后修改者: root  2018-01-23 16:49:28 

查看订单基础信息

编号  :  5

POST - /mobile/index.php?act=member_vend&op=show_order
请求参数
参数名 参数类型 必传 缺省值 描述
order_id int Y 订单id
sign_user_id_key string Y 用户user_id key
返回值
{
    "code": 200,
    "datas": {
           "voucher_price": 0.00 //优惠券金额
            "balance_pay": "0.00",用户余额支付
            'user_sign_pay':0.01,//第三方自动扣款金额
            "order_amount":0.01,//订单总金额
            "order_state":10,//10-需要支付,大于10不需要支付
        },
       
    }
}
最后修改者: root  2018-01-10 14:53:13 

验证设备编号有效性

编号  :  12

POST - machine_api/index.php?act=vend&op=check_machine_sn
验证设备编号有效性
请求参数
参数名 参数类型 必传 缺省值 描述
machine_sn string Y 设备编号
返回值
{
    "code": -1,
    "msg": "设备编号不存在,请联系平台添加"
}
{
    "code": 0,
    "msg": "设备编号有效"
}
最后修改者: root  2018-01-30 15:27:59 

设备订单列表

编号  :  011

POST - mobile/index.php?act=seller_device&op=device_order_list
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y
time time N
返回值
{
    "code": 200,
    "data_list": [
        {
            "day": "2018-01-26",
            "order_id": "188435",
            "order_amount": "0.01",
            "order_state": "40",
            "payment_code": "alipay",
            "payment_time": "1516956801",
            "device_id": "7",
            "device_name": "售卖柜0002",
            "device_no": "0212254565457890",
            "goods_list": [
                {
                    "goods_id": "104440",
                    "goods_name": "DDDS",
                    "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_240.gif",
                    "goods_num": "1"
                }
            ],
            "goods_num": "1"
        },
        {
            "day": "2018-01-26",
            "order_id": "188436",
            "order_amount": "0.01",
            "order_state": "40",
            "payment_code": "alipay",
            "payment_time": "1516956876",
            "device_id": "7",
            "device_name": "售卖柜0002",
            "device_no": "0212254565457890",
            "goods_list": [
                {
                    "goods_id": "104440",
                    "goods_name": "DDDS",
                    "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_240.gif",
                    "goods_num": "1"
                }
            ],
            "goods_num": "1"
        },
        {
            "day": "2018-01-26",
            "order_id": "188437",
            "order_amount": "0.02",
            "order_state": "40",
            "payment_code": "alipay",
            "payment_time": "1516956911",
            "device_id": "7",
            "device_name": "售卖柜0002",
            "device_no": "0212254565457890",
            "goods_list": [
                {
                    "goods_id": "104440",
                    "goods_name": "DDDS",
                    "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_240.gif",
                    "goods_num": "2"
                }
            ],
            "goods_num": "2"
        },
        {
            "day": "2018-01-26",
            "order_id": "188438",
            "order_amount": "0.03",
            "order_state": "40",
            "payment_code": "alipay",
            "payment_time": "1516956937",
            "device_id": "7",
            "device_name": "售卖柜0002",
            "device_no": "0212254565457890",
            "goods_list": [
                {
                    "goods_id": "104440",
                    "goods_name": "DDDS",
                    "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_240.gif",
                    "goods_num": "3"
                }
            ],
            "goods_num": "3"
        },
        {
            "day": "2018-01-26",
            "order_id": "188439",
            "order_amount": "0.02",
            "order_state": "40",
            "payment_code": "alipay",
            "payment_time": "1516956960",
            "device_id": "7",
            "device_name": "售卖柜0002",
            "device_no": "0212254565457890",
            "goods_list": [
                {
                    "goods_id": "104440",
                    "goods_name": "DDDS",
                    "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_240.gif",
                    "goods_num": "2"
                }
            ],
            "goods_num": "2"
        },
        {
            "day": "2018-01-26",
            "order_id": "188440",
            "order_amount": "0.02",
            "order_state": "40",
            "payment_code": "alipay",
            "payment_time": "1516957668",
            "device_id": "7",
            "device_name": "售卖柜0002",
            "device_no": "0212254565457890",
            "goods_list": [
                {
                    "goods_id": "104440",
                    "goods_name": "DDDS",
                    "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_240.gif",
                    "goods_num": "2"
                }
            ],
            "goods_num": "2"
        }
    ]
}
最后修改者: root  2018-01-17 17:19:00 

月报表

编号  :  010

POST - mobile/index.php?act=seller_data&op=month_operation_report
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y
time string N
返回值
{
    "code": 200,
    "data": {
        "predeposit_order_amount": 42,
        "wxpay_order_amount": 0,
        "alipay_order_amount": 0,
        "order_sum": 2,
        "order_amount": 42,
        "goods_top6": [
            {
                "goods_id": "104196",
                "order_total": 1,
                "goods_name": "西瓜-宁夏 1"
            }
        ],
        "device_top5": [
            {
                "device_id": 1,
                "order_sum": 2,
                "order_amount": 42,
                "device_name": "造滴滴数据1",
                "device_no": "121366278"
            }
        ]
    }
}
最后修改者: root  2018-01-17 15:14:42 

购食汇APP-扫码开门-2-开门

编号  :  1

POST - /mobile/index.php?act=member_vend&op=scan_open
请求参数
参数名 参数类型 必传 缺省值 描述
device_imei string Y 售卖机IMEI 二维码解析获得
key string Y 登录后的key
sign_user_id_key string Y 鉴权返回的sign_user_id_key
返回值
{
    "code": 200,
    "datas": {
           "open_door": 1 //开门状态 1-已开门 0-未开门
        },
       
    }
}
最后修改者: root  2018-01-10 11:32:55 

销售报表

编号  :  9

POST - mobile/index.php?act=seller_data&op=daily_operation_report
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y
time string N 2017-12-26 时间
返回值
{
    "code": 200,
    "suggest_procurement_num": 0,
    "networks_offline": 0,
    "device_stop": 0,
    "device_count": 1,
    "today": {
        "predeposit": 2,
        "wxpaywap": 0,
        "wxpay": 0,
        "alipay": 0,
        "order_sum": 2,
        "order_amount": 42,
        "max_device": {
            "id": 1,
            "device_name": "造滴滴数据1",
            "device_no": "121366278",
            "order_sum": 2
        },
        "min_device_num": 0
    },
    "yesterday": {
        "predeposit": 2,
        "wxpaywap": 0,
        "wxpay": 0,
        "alipay": 0,
        "order_sum": 2,
        "order_amount": 42,
        "max_device": {
            "id": 1,
            "device_name": "造滴滴数据1",
            "device_no": "121366278",
            "order_sum": 2
        },
        "min_device_num": 0
    },
    "month": {
        "predeposit": 2,
        "wxpaywap": 0,
        "wxpay": 0,
        "alipay": 0,
        "order_sum": 2,
        "order_amount": 42,
        "max_device": {
            "id": 1,
            "device_name": "造滴滴数据1",
            "device_no": "121366278",
            "order_sum": 2
        },
        "min_device_num": 0
    }
}
最后修改者: root  2017-12-20 14:13:40 

设备日志上报

编号  :  07

POST - machine_api/index.php?act=vend&op=uploadVendMachineLog
售卖机日志上报
请求参数
参数名 参数类型 必传 缺省值 描述
data_upload json Y 日志 json格式
返回值
{
    "code": 0,
    "msg": "上报成功!"
}
备注
数据格式 leg:
[
    {
        "a": "123",      //售卖设备编号
        "b": "log日志",  //日志内容
        "c": "1",        //日志类型
        "d": "1513738374"  //日志时间
    },
    {
        "a": "1234",
        "b": "log日志1",
        "c": "2",
        "d": "1513738388"
    }
]
最后修改者: root  2018-10-13 14:50:12 

设备详情(新)

编号  :  06

POST - mobile/index.php?act=seller_device&op=device_detail
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y 用户登录token
device_no int Y 设备编号
keyword string N 关键字
gc_id int N 分类id
返回值
{
    "code": 200,
    "device_info": {
        "id": "9",
        "device_no": "1010000000000002",
        "device_state": "1",
        "compressor_state": "0",
        "temperature": "0",
        "temperature_hysteresis": "2"
    },
    "goods_class": [
        {
            "gc_id": "1374",
            "gc_name": "三级分类"
        }
    ],
    "goods_list": [
        {
            "storage": "1",
            "goods_id": "104507",
            "goods_name": "水果a",
            "gc_id": "1374",
            "goods_price": "0.10",
            "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_360.gif",
            "store_id": "8",
            "goods_amount": "0.10",
            "goods_num": "1",
           "goods_num_mod":'上次盘存增加2个'
        },
        {
            "storage": "1",
            "goods_id": "104523",
            "goods_name": "售卖机商品",
            "gc_id": "1374",
            "goods_price": "5.80",
            "goods_image": "http://local.goushihui.com/data/upload/shop/common/default_goods_image_360.gif",
            "store_id": "8",
            "goods_amount": "1125.20",
            "goods_num": "194"
        }
    ],
    "stat_list": []
}
备注
goods_class ----  分类

新零售补货变化提醒 --新增goods_num_mod字段
最后修改者: root  2017-08-02 10:05:02 

需改密码

编号  :  05

POST - mobile/index.php?act=seller_device&op=change_password
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y 用户登录token
original_pwd string Y 原始密码
new_pwd string Y 新密码
repeat_pwd string Y 新密码
返回值
{
  "code": 200,
  "msg": "1"
}
错误:
{
  "code": 201,
  "msg": "两次输入密码不相同,请重新输入"
}
最后修改者: root  2017-07-24 11:04:21 

注销登陆

编号  :  04

POST - mobile/index.php?act=seller_device&op=seller_logout
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y 用户登录token
返回值
{
  "code": 200,
  "msg": "1"
}
最后修改者: root  2018-07-10 17:58:14 

设备列表

编号  :  03

POST - mobile/index.php?act=seller_device&op=device_list
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y token
online_state int N 在线状态
device_state int N 设备状态
is_lock int Y 锁定
返回值
{
    "code": 200,
    "data_list": [
        {
            "id": "1",
            "device_no": "121366278",
            "device_name": "造滴滴数据1",
            "device_position": "长虹科技大厦36",
            "device_state": "1",
            "online_state": "1"
        }
    ],
    "stat_device": {
        "lock": 0,
        "stop": 0,
        "offline": 1
    }
}
备注
`online_state` : '在线状态 0 离线 1 在线'
`device_state`  :  '设备状态 0 停用 1 启用'
‘is_lock’:锁定 1锁定
最后修改者: root  2017-07-21 10:27:50 

设备列表界面

编号  :  02

POST - mobile/index.php?act=seller_device&op=device_type_list
请求参数
参数名 参数类型 必传 缺省值 描述
key string Y 用户登录token
返回值
{
  "code": 200,
  "store_info": {
    "member_id": "1",
    "member_avatar_url": "http://127.0.0.1/goushihui/data/upload/shop/common/default_user_portrait.gif",
    "store_id": "1"
  },
  "type_list": [
    {
      "type_id": 1,
      "type_name": "自助售卖机"
    },
    {
      "type_id": 2,
      "type_name": "自助榨汁机"
    }
  ]
}
最后修改者: root  2017-08-02 09:37:33 

商家中心h5登陆接口

编号  :  1

POST - mobile/index.php?act=seller_index&op=seller_login
请求参数
参数名 参数类型 必传 缺省值 描述
seller_name string Y 商家用户名
password string Y 密码(原始密码)
返回值
{
  "code": 200,
  "key": "bcbb6c03a2666c6c46ed2a3db06fcbac",
  "store_id": "1",
  "store_name": "购食汇绵阳官方旗舰店"
}
错误:
{
  "code": 201,
  "msg": "用户名密码错误"
}