Authored by qianjun

Update questionnaire.md

... ... @@ -20,7 +20,7 @@
### 4. 根据question_type问题类型( 问题(题目)类型: 1--单选题,2--多选题,3--填空题)存储相应的内容,
如果选择题question_content问题内容,则存储json数组, "questionContents":[{ "option":"选项1",//带文字补充 "addon":1 },{ "option":"选项2" }],如果是填空题,question_content问题内容为null ,存储填空题数目fillBlankNum:3
---
### 1、获取问卷列表(QuestionnaireController.getList)
### 1、获取问卷列表(QuestionnaireController.getList.do)
#### 请求参数
| Param Name | Param Type | Required | Param Value | Desc |
... ... @@ -90,14 +90,14 @@
}
```
### 2、编辑问卷(QuestionnaireController.edit)
### 2、编辑问卷(QuestionnaireController.edit.do)
#### 请求参数
| Param Name | Param Type | Required | Param Value | Desc |
| :-- | --: | --: | --: | --: |
| id | int | false |1| 问卷标识 |id为null新增 id不为null为编辑|
| title | String | false | "YOHO!品牌大调查"| 问卷标题|
| startTimeStr |String | false | 0 |问卷开始时间 |
| endTimeStr |String | false | 0 |问卷结束时间 |
| startTime |int | false | 0 |问卷开始时间 |
| endTime |int | false | 0 |问卷结束时间 |
| questions |String | false | 0 |问题json数组 |
| share |String | false | 0 |分享设置json对象 |
### questions入参
... ... @@ -142,8 +142,8 @@
{
"id": 2,
"title": "YOHO!品牌大调查",
"startTimeStr": "2017-03-07 14:28:49",
"endTimeStr": "2017-03-24 14:28:51",
"startTime": 1487462400,
"endTimeStr": 1490839162,
"questions": [
{
"questionType": 1,
... ... @@ -215,7 +215,7 @@
```
### 3、获取问卷(QuestionnaireController.getById)
### 3、获取问卷(QuestionnaireController.getById.do)
#### 请求参数
| Param Name | Param Type | Required | Param Value | Desc |
... ... @@ -269,95 +269,79 @@
},
"md5": "6fa464cf72538ad2c25fa24d20dcdd20"
}
```
```json
{
"code": 200,
"message": "success",
"data": {
"endTime": 1490336931,
"id": 2,
"title": "YOHO!品牌大调查",
"statusName": null,
"num": null,
"startTimeStr": "2017-03-07 14:28:49",
"endTimeStr": "2017-03-24 14:28:51",
"modifyTimeStr": null,
"link": null,
"questions": [
{
"questionIndex": 0,
"questionType": 1,
"questionTitle": "您通过什么渠道知道有货的呢",
"questionContents": [
{
"option": "A.朋友介绍",
"addon": null
"option": "A.朋友介绍"
},
{
"option": "B. 视频广告",
"addon": null
"option": "B. 视频广告"
},
{
"option": "C.平面广告",
"addon": null
"option": "C.平面广告"
},
{
"option": "D.线下活动",
"addon": null
"option": "D.线下活动"
},
{
"option": "E.其他渠道",
"addon": 1
"addon": 1,
"option": "E.其他渠道"
}
],
"fillBlankNum": null
"questionIndex": 0,
"questionTitle": "您通过什么渠道知道有货的呢",
"questionType": 1
},
{
"questionIndex": 1,
"questionType": 2,
"questionTitle": "您通过什么渠道知道有货的呢",
"questionContents": [
{
"option": "A.朋友介绍",
"addon": null
"option": "A.朋友介绍"
},
{
"option": "B. 视频广告",
"addon": null
"option": "B. 视频广告"
},
{
"option": "C.平面广告",
"addon": null
"option": "C.平面广告"
},
{
"option": "D.线下活动",
"addon": null
"option": "D.线下活动"
},
{
"option": "E.其他渠道",
"addon": 1
"addon": 1,
"option": "E.其他渠道"
}
],
"fillBlankNum": null
"questionIndex": 1,
"questionTitle": "您通过什么渠道知道有货的呢",
"questionType": 2
},
{
"fillBlankNum": 3,
"questionIndex": 2,
"questionType": 3,
"questionTitle": "YOHO!的代言人是",
"questionContents": null,
"fillBlankNum": 3
"questionType": 3
}
],
"share": {
"imgUrl": "http://cdn.yoho.cn/yohobuy-node/assets/img/layout/qr-weixin.png",
"title": "YOHO!品牌大调查",
"subtitle": "YOHO!品牌大调查"
}
}
"subtitle": "YOHO!品牌大调查",
"title": "YOHO!品牌大调查"
},
"startTime": 1488868129,
"title": "YOHO!品牌大调查"
},
"message": "success"
}
```
### 4、删除问卷(QuestionnaireController.deleteById)
### 4、删除问卷(QuestionnaireController.deleteById.do)
#### 注意: 处于收集中和已结束的问卷不能删除,其余状态的都可删除
#### 请求参数
... ... @@ -376,106 +360,19 @@
```
### 5、发布问卷(QuestionnaireController.release)
### 5、发布问卷(QuestionnaireController.release.do)
#### 请求参数
| Param Name | Param Type | Required | Param Value | Desc |
| :-- | --: | --: | --: | --: |
| id | int | true |1| |问卷标识|
| status |int | false | 1 |问卷状态: 1--未发布,2--已发布 已发布需要传2|
#### 响应内容
```json
{
"code": 200,
"message": "success",
"data": {
"title": null,
"questions": [
{
"questionIndex": 0,
"questionType": 1,
"questionTitle": "您通过什么渠道知道有货的呢",
"questionContents": [
{
"option": "A.朋友介绍",
"addon": null
},
{
"option": "B. 视频广告",
"addon": null
},
{
"option": "C.平面广告",
"addon": null
},
{
"option": "D.线下活动",
"addon": null
},
{
"option": "E.其他渠道",
"addon": 1
}
],
"fillBlankNum": null,
"questionAnswers": [
0,
0,
0,
0,
0
],
"fillBlankAnswerNum": null
},
{
"questionIndex": 1,
"questionType": 2,
"questionTitle": "您通过什么渠道知道有货的呢",
"questionContents": [
{
"option": "A.朋友介绍",
"addon": null
},
{
"option": "B. 视频广告",
"addon": null
},
{
"option": "C.平面广告",
"addon": null
},
{
"option": "D.线下活动",
"addon": null
},
{
"option": "E.其他渠道",
"addon": 1
}
],
"fillBlankNum": null,
"questionAnswers": [
0,
0,
0,
4,
0
],
"fillBlankAnswerNum": null
},
{
"questionIndex": 2,
"questionType": 3,
"questionTitle": "YOHO!的代言人是",
"questionContents": null,
"fillBlankNum": 3,
"questionAnswers": [],
"fillBlankAnswerNum": 3
}
]
}
"data": 1,
"message": "success"
}
```
### 6、结果分析(QuestionnaireController.resultAnalysis)
... ...