Skip to content

授信

数据库

tbl_credit_limit    # 授信表
    id                  int
    kid                 int not null
    group_id            int not null
    is_credit           tinyint  default 0          是否授信
    credit_limit        unsigned bigint default 0   授信额度
    # 以下是后续所需要的字段
    whitelist           tinyint default 0           白名单
    finance_status      tinyint default 0           冻结
    create_time         datetime        
    modify_time         datetime

    kid和group_id组合唯一

修改接口

下单接口

接口:      station/order/create
Method:   POST
请求:
    请求无改动
    逻辑变更

下单补录接口

接口:      station/order/create_old
Method:   POST
请求:
    请求无改动
    逻辑变更

批量建单接口

接口:      order/batch/create
Method:   POST
请求:
    请求无改动
    逻辑变更

检查有无欠款接口

接口:      /station/check_unpay
Method:   GET
请求:
    请求无改动
    逻辑变更
返回:
    返回改成以下
    {
      "msg": "ok",
      "code": 0,  
      "data": {
            "credit_limit": 6666.77,    授信额度
            "available_credit": 1111.11,    可用额度
            "over_credit": 3333.33,      超出额度 
            "is_credit":1,  
            "type":0, # 0,正常;11,白名单;12,信用额度内;13,超额;14,欠款12.34(当没授信的时候返回);15,冻结;16,先款后货用户无法在此下单;100,其他  
            "msg",       
        }
    }

ma商户修改信息接口

接口:      custommanage/edit/S061040
Method:   POST
请求:
    status          M       str     根据传的status修改对应字段,传 modifyCredit
    credit_limit    M       float   小数,0.01-100000000.00    # 当 is_credit为1时传这个值,0,可以不传
    is_credit       M       int     0,1
响应:
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息

Response:
{
    "msg": "success",
    "code": 0
}

ma商户拉去信息接口

接口:      custommanage/edit/S061040
Method:   GET
请求:
   无
响应:
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息

Response:
{
    "msg": "success",
    "code": 0,
    "data":{
        "data":{
            "credit_limit": 100.00,
            "is_credit": 1,
            "available_credit": 1111.11,    可用额度 有正负,付表示超额
            其他不变
        },
        其他不变
    }
}

ma商户拉去信息接口

接口:      custommanage/customer/search
Method:   GET
请求:
   不变

Response:
{
    "msg": "success",
    "code": 0,
    "data":[{
        "is_credit": 1,
        "credit_limit": 100.00,
        其他不变
    }]
}

ma商户添加

接口:      /custommanage/restaurant/add

Method:   GET
请求:
    credit_limit    M       float   小数,0.01-100000000.00    # 当 is_credit为1时传这个值,is_credit为0,可以不传
    is_credit       M       int     0,1


Response:
{
    "msg": "success",
    "code": 0,
    "data":{

        不变
    }
}

bshop建单接口

接口:      order/submit
Method:   POST
请求:
    请求无改动
    逻辑变更

bshop获取店铺信息接口

接口:      user/account
Method:   GET
请求:
    请求无改动
请求:
    无
返回:

{
    "msg": "ok",
    "code": 0,
    "data":{
            "is_credit": 1, # 是否授信
            其他不变
        },
}

新增接口

bshop授信额度接口(新增)

接口:      user/credit/get
Method:   GET
请求:
    无
返回:

{
    "msg": "ok",
    "code": 0,
    "data":{
            "credit_limit": 10000.00, # 授信额度
            "available_credit": 1111.11,    可用额度
            "over_credit": 3333.33,      超出额度
        },
}