# friday-backend **Repository Path**: nazha/friday-backend ## Basic Information - **Project Name**: friday-backend - **Description**: python, tiger's friday backend(newfriday新friday-python) - **Primary Language**: Python - **License**: Not specified - **Default Branch**: chn - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-12-24 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 公司管理 #### 添加公司 **URI**: /merchants/
**METHOD**: POST
**PARAMS**: | name | type | required | description | | -------- | -------- |-------- | -------- | | name | string | Y | 公司名 | | description | string | N | 公司描述 | | profit_percentage | float | N | 分成比例 | | admin_name | string | Y | 管理员登录名 | | online_perms | list\ | N | CPS实时字段权限 | | offline_perms | list\ | N | CPS次日字段权限 | **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": null } ``` #### 删除公司 **URI**: /merchants/
**METHOD**: DELETE
**PARAMS**: **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": null } ``` #### 修改公司 **URI**: /merchants/
**METHOD**: POST
**PARAMS**: | name | type | required | description | | -------- | -------- |-------- | -------- | | name | string | Y | 公司名 | | description | string | N | 公司描述 | | profit_percentage | float | N | 分成比例 | | admin_name | string | Y | 管理员登录名 | **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": null } ``` #### 获取公司详情 **URI**: /merchants/
**METHOD**: POST
**PARAMS**: | name | type | required | description | | -------- | -------- |-------- | -------- | | name | string | Y | 公司名 | | description | string | N | 公司描述 | | profit_percentage | float | N | 分成比例 | | admin_name | string | Y | 管理员登录名 | | online_perms | list | N | CPS实时字段权限 | | offline_perms | list | N | CPS次日字段权限 | **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": { "id": 1, "name": "merchant11", "description": "this is a description", "profit_percentage": 0.7, "admin_name": "admin_name", "admin_password": "adminpassword", // 登录密码 "online_perms": ['xx', 'yy'], "offline_perms": ['xx', 'yy'] } } ``` #### 获取公司列表 **URI**: /merchants/
**METHOD**: GET
**PARAMS**: | name | type | required | description | | -------- | -------- |-------- | -------- | | name | string | Y | 公司名 | **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": { "total": 10, "items": [] } } ``` ### 渠道管理 #### 添加渠道 **URI**: /channels/
**METHOD**: POST
**PARAMS**: | name | type | required | description | | -------- | -------- |-------- | -------- | | merchant_id | int | N | 所属公司 | | name | string | Y | 渠道名 | | description | string | N | 描述 | | platform | int | N | 平台类型:1 - Android, 2 - IOS | | version | string | N | 版本 | | rate_tax_base | float | Y | 初始税收扣量 | | rate_tax_reduction | float | Y | 税收扣量每日递减 | | rate_tax_bottom | float | Y | 税收扣量保底值 | | recharge_base | int | Y | 充值保底 | | exchange_base | int | Y | 兑换保底 | | tax_base | int | Y | 税收保底 | | link_user | string | N | 关联商务 | **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": { } } ``` #### 删除渠道 **URI**: /channels//
**METHOD**: DELETE
**PARAMS**: **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": { } } ``` #### 修改渠道 **URI**: /channels//
**METHOD**: PUT
**PARAMS**: | name | type | required | description | | -------- | -------- |-------- | -------- | | merchant_id | int | N | 所属公司 | | name | string | Y | 渠道名 | | description | string | N | 描述 | | platform | int | N | 平台类型:1 - Android, 2 - IOS | | version | string | N | 版本 | | rate_tax_base | float | Y | 初始税收扣量 | | rate_tax_reduction | float | Y | 税收扣量每日递减 | | rate_tax_bottom | float | Y | 税收扣量保底值 | | recharge_base | int | Y | 充值保底 | | exchange_base | int | Y | 兑换保底 | | tax_base | int | Y | 税收保底 | | link_user | string | N | 关联商务 | **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": { } } ``` #### 获取渠道详情 **URI**: /channels//
**METHOD**: GET
**PARAMS**: **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": { "id": 1, "merchant": { "id": 2, "name": "merchant11" }, "name": "xiaomi", "platform": 1, "version": "v1.1", "description": "desc...", "link_user": "lily", "rate_tax_base": 0.9, "rate_tax_reduction": 0.1, "rate_tax_bottom": 0.5, "recharge_base": 100, "exchange_base": 400, "tax_base": 2000 } } ``` #### 获取渠道列表 **URI**: /channels/
**METHOD**: GET
**PARAMS**: | name | type | required | description | | -------- | -------- |-------- | -------- | | merchant_id | int | N | 所属公司 | | name | string | N | 渠道名 | | platform | int | N | 平台类型:1 - Android, 2 - IOS | | version | string | N | 版本 | | link_user | string | N | 关联商务 | | created_at_start | date | N | 创建开始时间, 2018-01-12 22:12:00 | **RESPONSE**: ```javascript { "status": 0, "msg": "OK", "data": { } } ```