Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/oppmg into dev
# Conflicts: # 接口模型.md
正在显示
4 个修改的文件
包含
50 行增加
和
52 行删除
| @@ -19,8 +19,8 @@ type Bulletin struct { | @@ -19,8 +19,8 @@ type Bulletin struct { | ||
| 19 | QuestionSwitch int8 `orm:"column(question_switch);null" description:"设置问题开关 (是否有问题)"` | 19 | QuestionSwitch int8 `orm:"column(question_switch);null" description:"设置问题开关 (是否有问题)"` |
| 20 | CreateAt time.Time `orm:"column(create_at);type(timestamp);null" description:"创建时间"` | 20 | CreateAt time.Time `orm:"column(create_at);type(timestamp);null" description:"创建时间"` |
| 21 | UpdateAt time.Time `orm:"column(update_at);type(timestamp);null" description:"更新时间"` | 21 | UpdateAt time.Time `orm:"column(update_at);type(timestamp);null" description:"更新时间"` |
| 22 | - AllowClose int8 `orm:"column(allow_close);null" description:"允许关闭公告(0允许,1禁止)"` | ||
| 23 | - AllowCondition int8 `orm:"column(allow_condition);null" description:"关闭条件 (1(bit 0):公告内容查看完 2(bit 1):回答完问题)"` | 22 | + AllowClose int8 `orm:"column(allow_close);null" description:"允许关闭公告(0允许关闭窗口,1阅读完才能关闭,2选项打勾后才能关闭)"` |
| 23 | + //AllowCondition int8 `orm:"column(allow_condition);null" description:"关闭条件 (1(bit 0):公告内容查看完 2(bit 1):回答完问题)"` | ||
| 24 | CompanyId int64 `orm:"column(company_id);null" description:"公司Id"` | 24 | CompanyId int64 `orm:"column(company_id);null" description:"公司Id"` |
| 25 | Status uint8 `orm:"column(status)" description:"状态 1-下架 2-上架"` | 25 | Status uint8 `orm:"column(status)" description:"状态 1-下架 2-上架"` |
| 26 | } | 26 | } |
| @@ -17,7 +17,7 @@ type BulletinReleaseRequest struct { | @@ -17,7 +17,7 @@ type BulletinReleaseRequest struct { | ||
| 17 | Title string `json:"title" valid:"Required"` | 17 | Title string `json:"title" valid:"Required"` |
| 18 | Content string `json:"content" valid:"Required"` | 18 | Content string `json:"content" valid:"Required"` |
| 19 | AllowClose int `json:"allow_close"` | 19 | AllowClose int `json:"allow_close"` |
| 20 | - AllowCondition int `json:"allow_condition"` | 20 | + //AllowCondition int `json:"allow_condition"` |
| 21 | QuestionSwitch int `json:"question_switch"` | 21 | QuestionSwitch int `json:"question_switch"` |
| 22 | Receiver []string `json:"receiver" valid:"Required"` | 22 | Receiver []string `json:"receiver" valid:"Required"` |
| 23 | Question Question `json:"question"` | 23 | Question Question `json:"question"` |
| @@ -70,7 +70,7 @@ type GetBulletinResponse struct { | @@ -70,7 +70,7 @@ type GetBulletinResponse struct { | ||
| 70 | Title string `json:"title" valid:"Required"` | 70 | Title string `json:"title" valid:"Required"` |
| 71 | Content string `json:"content" valid:"Required"` | 71 | Content string `json:"content" valid:"Required"` |
| 72 | AllowClose int `json:"allow_close"` | 72 | AllowClose int `json:"allow_close"` |
| 73 | - AllowCondition int `json:"allow_condition"` | 73 | + //AllowCondition int `json:"allow_condition"` |
| 74 | QuestionSwitch int `json:"question_switch"` | 74 | QuestionSwitch int `json:"question_switch"` |
| 75 | Receiver []Receiver `json:"receiver" valid:"Required"` | 75 | Receiver []Receiver `json:"receiver" valid:"Required"` |
| 76 | Question Question `json:"question"` | 76 | Question Question `json:"question"` |
| @@ -89,7 +89,7 @@ type UpdateBulletinRequest struct { | @@ -89,7 +89,7 @@ type UpdateBulletinRequest struct { | ||
| 89 | Title string `json:"title" valid:"Required"` | 89 | Title string `json:"title" valid:"Required"` |
| 90 | Content string `json:"content" valid:"Required"` | 90 | Content string `json:"content" valid:"Required"` |
| 91 | AllowClose int `json:"allow_close"` | 91 | AllowClose int `json:"allow_close"` |
| 92 | - AllowCondition int `json:"allow_condition"` | 92 | + //AllowCondition int `json:"allow_condition"` |
| 93 | QuestionSwitch int `json:"question_switch"` | 93 | QuestionSwitch int `json:"question_switch"` |
| 94 | Receiver []string `json:"receiver" valid:"Required"` | 94 | Receiver []string `json:"receiver" valid:"Required"` |
| 95 | Question Question `json:"question"` | 95 | Question Question `json:"question"` |
| @@ -32,7 +32,7 @@ func BulletinRelease(uid, companyId int64, request *protocol.BulletinReleaseRequ | @@ -32,7 +32,7 @@ func BulletinRelease(uid, companyId int64, request *protocol.BulletinReleaseRequ | ||
| 32 | W: request.Cover.W, | 32 | W: request.Cover.W, |
| 33 | Receiver: string(receiver), | 33 | Receiver: string(receiver), |
| 34 | QuestionSwitch: int8(request.QuestionSwitch), | 34 | QuestionSwitch: int8(request.QuestionSwitch), |
| 35 | - AllowCondition: int8(request.AllowCondition), | 35 | + //AllowCondition: int8(request.AllowCondition), |
| 36 | AllowClose: int8(request.AllowClose), | 36 | AllowClose: int8(request.AllowClose), |
| 37 | CompanyId: companyId, | 37 | CompanyId: companyId, |
| 38 | CreateAt: time.Now(), | 38 | CreateAt: time.Now(), |
| @@ -172,7 +172,7 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest) | @@ -172,7 +172,7 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest) | ||
| 172 | Title: bulletin.Title, | 172 | Title: bulletin.Title, |
| 173 | Content: bulletin.Content, | 173 | Content: bulletin.Content, |
| 174 | AllowClose: int(bulletin.AllowClose), | 174 | AllowClose: int(bulletin.AllowClose), |
| 175 | - AllowCondition: int(bulletin.AllowCondition), | 175 | + //AllowCondition: int(bulletin.AllowCondition), |
| 176 | Cover: protocol.Cover{ | 176 | Cover: protocol.Cover{ |
| 177 | Path: bulletin.Cover, | 177 | Path: bulletin.Cover, |
| 178 | W: bulletin.W, | 178 | W: bulletin.W, |
| @@ -233,7 +233,7 @@ func UpdateBulletin(companyId int64, request *protocol.UpdateBulletinRequest) (r | @@ -233,7 +233,7 @@ func UpdateBulletin(companyId int64, request *protocol.UpdateBulletinRequest) (r | ||
| 233 | bulletin.W = request.Cover.W | 233 | bulletin.W = request.Cover.W |
| 234 | bulletin.Receiver = string(receiver) | 234 | bulletin.Receiver = string(receiver) |
| 235 | bulletin.QuestionSwitch = int8(request.QuestionSwitch) | 235 | bulletin.QuestionSwitch = int8(request.QuestionSwitch) |
| 236 | - bulletin.AllowCondition = int8(request.AllowCondition) | 236 | + //bulletin.AllowCondition = int8(request.AllowCondition) |
| 237 | bulletin.AllowClose = int8(request.AllowClose) | 237 | bulletin.AllowClose = int8(request.AllowClose) |
| 238 | bulletin.UpdateAt = time.Now() | 238 | bulletin.UpdateAt = time.Now() |
| 239 | if err = models.UpdateBulletinById(bulletin); err != nil { | 239 | if err = models.UpdateBulletinById(bulletin); err != nil { |
| @@ -155,32 +155,32 @@ token 的响应内容 | @@ -155,32 +155,32 @@ token 的响应内容 | ||
| 155 | 155 | ||
| 156 | ```json | 156 | ```json |
| 157 | { | 157 | { |
| 158 | - "type": 2, | ||
| 159 | - "title": "标题", | ||
| 160 | - "content": "公告内容", | ||
| 161 | - "allow_close": 0, | ||
| 162 | - "allow_condition": 3, | ||
| 163 | - "question_switch": 1, | ||
| 164 | - "receiver": ["1", "2"], | ||
| 165 | - "question": { | ||
| 166 | - "id": 1, | ||
| 167 | - "type": 1, | ||
| 168 | - "title": "今天星期几?", | ||
| 169 | - "content": [ | 158 | + "type":2, |
| 159 | + "title":"标题", | ||
| 160 | + "content":"公告内容", | ||
| 161 | + "allow_close":0, | ||
| 162 | + "question_switch":1, | ||
| 163 | + "receiver":["1","2"], | ||
| 164 | + "question": | ||
| 170 | { | 165 | { |
| 171 | - "id": 1, | ||
| 172 | - "content": "星期1" | 166 | + "id":1, |
| 167 | + "type":1, | ||
| 168 | + "title":"今天星期几?", | ||
| 169 | + "content":[ | ||
| 170 | + { | ||
| 171 | + "id":1, | ||
| 172 | + "content":"星期1" | ||
| 173 | }, | 173 | }, |
| 174 | { | 174 | { |
| 175 | - "id": 2, | ||
| 176 | - "content": "星期2" | 175 | + "id":2, |
| 176 | + "content":"星期2" | ||
| 177 | } | 177 | } |
| 178 | ] | 178 | ] |
| 179 | }, | 179 | }, |
| 180 | - "cover": { | ||
| 181 | - "path": "/xx/xx.img", | ||
| 182 | - "w": 50, | ||
| 183 | - "h": 70 | 180 | + "cover":{ |
| 181 | + "path":"/xx/xx.img", | ||
| 182 | + "w":50, | ||
| 183 | + "h":70 | ||
| 184 | } | 184 | } |
| 185 | } | 185 | } |
| 186 | ``` | 186 | ``` |
| @@ -189,8 +189,7 @@ token 的响应内容 | @@ -189,8 +189,7 @@ token 的响应内容 | ||
| 189 | obj.type 公告类型(1图+跳转链接、2纯文本) | 189 | obj.type 公告类型(1图+跳转链接、2纯文本) |
| 190 | obj.title 标题 | 190 | obj.title 标题 |
| 191 | obj.content 公告内容 | 191 | obj.content 公告内容 |
| 192 | -obj.allow_close 允许关闭公告(0允许,1禁止) | ||
| 193 | -obj.allow_condition 关闭条件 (1(bit 0):公告内容查看完 2(bit 1):回答完问题) | 192 | +obj.allow_close 允许关闭公告(0允许关闭窗口,1阅读完才能关闭,2选项打勾后才能关闭) |
| 194 | obj.question_switch 设置问题开关 (是否有问题) 1:是 0:否 | 193 | obj.question_switch 设置问题开关 (是否有问题) 1:是 0:否 |
| 195 | obj.receiver 接收者 | 194 | obj.receiver 接收者 |
| 196 | obj.question.type 类型:0-单选,1-多选 | 195 | obj.question.type 类型:0-单选,1-多选 |
| @@ -286,7 +285,6 @@ obj.status 状态 0-所有 1-下架 2-上架 | @@ -286,7 +285,6 @@ obj.status 状态 0-所有 1-下架 2-上架 | ||
| 286 | "title": "测试公告", | 285 | "title": "测试公告", |
| 287 | "content": "今天发布了一则公告", | 286 | "content": "今天发布了一则公告", |
| 288 | "allow_close": 0, | 287 | "allow_close": 0, |
| 289 | - "allow_condition": 3, | ||
| 290 | "question_switch": 1, | 288 | "question_switch": 1, |
| 291 | "receiver": [ | 289 | "receiver": [ |
| 292 | { | 290 | { |
| @@ -330,33 +328,33 @@ obj.status 状态 0-所有 1-下架 2-上架 | @@ -330,33 +328,33 @@ obj.status 状态 0-所有 1-下架 2-上架 | ||
| 330 | 328 | ||
| 331 | ```json | 329 | ```json |
| 332 | { | 330 | { |
| 333 | - "id": 3, | ||
| 334 | - "type": 2, | ||
| 335 | - "title": "测试公告3", | ||
| 336 | - "content": "今天发布了一则公告3", | ||
| 337 | - "allow_close": 0, | ||
| 338 | - "allow_condition": 2, | ||
| 339 | - "question_switch": 1, | ||
| 340 | - "receiver": ["1", "2", "3"], | ||
| 341 | - "question": { | ||
| 342 | - "id": 2, | ||
| 343 | - "type": 1, | ||
| 344 | - "title": "今天星期几?", | ||
| 345 | - "content": [ | 331 | + "id":3, |
| 332 | + "type":2, | ||
| 333 | + "title":"测试公告3", | ||
| 334 | + "content":"今天发布了一则公告3", | ||
| 335 | + "allow_close":0, | ||
| 336 | + "question_switch":1, | ||
| 337 | + "receiver":["1","2","3"], | ||
| 338 | + "question": | ||
| 346 | { | 339 | { |
| 347 | - "id": 1, | ||
| 348 | - "content": "星期2" | 340 | + "id":2, |
| 341 | + "type":1, | ||
| 342 | + "title":"今天星期几?", | ||
| 343 | + "content":[ | ||
| 344 | + { | ||
| 345 | + "id":1, | ||
| 346 | + "content":"星期2" | ||
| 349 | }, | 347 | }, |
| 350 | { | 348 | { |
| 351 | - "id": 2, | ||
| 352 | - "content": "星期3" | 349 | + "id":2, |
| 350 | + "content":"星期3" | ||
| 353 | } | 351 | } |
| 354 | ] | 352 | ] |
| 355 | }, | 353 | }, |
| 356 | - "cover": { | ||
| 357 | - "path": "/xx/xx.img", | ||
| 358 | - "w": 50, | ||
| 359 | - "h": 70 | 354 | + "cover":{ |
| 355 | + "path":"/xx/xx.img", | ||
| 356 | + "w":50, | ||
| 357 | + "h":70 | ||
| 360 | } | 358 | } |
| 361 | } | 359 | } |
| 362 | ``` | 360 | ``` |
-
请 注册 或 登录 后发表评论