Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/oppmg into dev
正在显示
5 个修改的文件
包含
8 行增加
和
20 行删除
@@ -32,7 +32,7 @@ func (this *BulletinController) BulletinRelease() { | @@ -32,7 +32,7 @@ func (this *BulletinController) BulletinRelease() { | ||
32 | msg = protocol.BadRequestParam("1") | 32 | msg = protocol.BadRequestParam("1") |
33 | return | 33 | return |
34 | } | 34 | } |
35 | - if !(request.Type == 1 || request.Type == 2) { | 35 | + if !(request.Type == 0 || request.Type == 1) { |
36 | msg = protocol.BadRequestParam("1") | 36 | msg = protocol.BadRequestParam("1") |
37 | log.Error("type error :%v", request.Type) | 37 | log.Error("type error :%v", request.Type) |
38 | return | 38 | return |
@@ -32,8 +32,8 @@ const ( | @@ -32,8 +32,8 @@ const ( | ||
32 | ) | 32 | ) |
33 | 33 | ||
34 | const ( | 34 | const ( |
35 | + VisibleObject_User = 0 | ||
35 | VisibleObject_Department = 1 | 36 | VisibleObject_Department = 1 |
36 | - VisibleObject_User = 2 | ||
37 | ) | 37 | ) |
38 | 38 | ||
39 | func (t *AuditTemplate) TableName() string { | 39 | func (t *AuditTemplate) TableName() string { |
@@ -134,7 +134,7 @@ type TemplateItem struct { | @@ -134,7 +134,7 @@ type TemplateItem struct { | ||
134 | type VisibleObject struct { | 134 | type VisibleObject struct { |
135 | Id string `json:"id"` | 135 | Id string `json:"id"` |
136 | Name string `json:"name,omitempty"` | 136 | Name string `json:"name,omitempty"` |
137 | - Type int `json:"type"` //1:部门 2:指定人员 | 137 | + Type int `json:"type"` //0:指定人员 1:部门 |
138 | } | 138 | } |
139 | 139 | ||
140 | /*TemplateEditVisible */ | 140 | /*TemplateEditVisible */ |
@@ -34,11 +34,7 @@ type QuestionContent struct { | @@ -34,11 +34,7 @@ type QuestionContent struct { | ||
34 | Id int `json:"id"` | 34 | Id int `json:"id"` |
35 | Content string `json:"content"` | 35 | Content string `json:"content"` |
36 | } | 36 | } |
37 | -type Cover struct { | ||
38 | - Path string `json:"path"` | ||
39 | - H int `json:"h"` | ||
40 | - W int `json:"w"` | ||
41 | -} | 37 | +type Cover string |
42 | type BulletinReleaseResponse struct { | 38 | type BulletinReleaseResponse struct { |
43 | } | 39 | } |
44 | 40 | ||
@@ -87,7 +83,7 @@ type Receiver struct { | @@ -87,7 +83,7 @@ type Receiver struct { | ||
87 | /*UpdateBulletin */ | 83 | /*UpdateBulletin */ |
88 | type UpdateBulletinRequest struct { | 84 | type UpdateBulletinRequest struct { |
89 | Id int `json:"id" valid:"Required"` | 85 | Id int `json:"id" valid:"Required"` |
90 | - Type int `json:"type" valid:"Required"` | 86 | + Type int `json:"type"` |
91 | Title string `json:"title" valid:"Required"` | 87 | Title string `json:"title" valid:"Required"` |
92 | Content string `json:"content" valid:"Required"` | 88 | Content string `json:"content" valid:"Required"` |
93 | AllowClose int `json:"allow_close"` | 89 | AllowClose int `json:"allow_close"` |
@@ -36,9 +36,7 @@ func BulletinRelease(uid, companyId int64, request *protocol.BulletinReleaseRequ | @@ -36,9 +36,7 @@ func BulletinRelease(uid, companyId int64, request *protocol.BulletinReleaseRequ | ||
36 | Title: request.Title, | 36 | Title: request.Title, |
37 | Type: int8(request.Type), | 37 | Type: int8(request.Type), |
38 | Content: request.Content, | 38 | Content: request.Content, |
39 | - Cover: request.Cover.Path, | ||
40 | - H: request.Cover.H, | ||
41 | - W: request.Cover.W, | 39 | + Cover: string(request.Cover), |
42 | Receiver: string(receiver), | 40 | Receiver: string(receiver), |
43 | QuestionSwitch: int8(request.QuestionSwitch), | 41 | QuestionSwitch: int8(request.QuestionSwitch), |
44 | //AllowCondition: int8(request.AllowCondition), | 42 | //AllowCondition: int8(request.AllowCondition), |
@@ -253,11 +251,7 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest) | @@ -253,11 +251,7 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest) | ||
253 | Content: bulletin.Content, | 251 | Content: bulletin.Content, |
254 | AllowClose: int(bulletin.AllowClose), | 252 | AllowClose: int(bulletin.AllowClose), |
255 | //AllowCondition: int(bulletin.AllowCondition), | 253 | //AllowCondition: int(bulletin.AllowCondition), |
256 | - Cover: protocol.Cover{ | ||
257 | - Path: bulletin.Cover, | ||
258 | - W: bulletin.W, | ||
259 | - H: bulletin.H, | ||
260 | - }, | 254 | + Cover: protocol.Cover(bulletin.Cover), |
261 | } | 255 | } |
262 | if bulletin.QuestionSwitch == 1 { | 256 | if bulletin.QuestionSwitch == 1 { |
263 | if question, err = models.GetBulletinQuestionByBulletinId(bulletin.Id); err != nil { | 257 | if question, err = models.GetBulletinQuestionByBulletinId(bulletin.Id); err != nil { |
@@ -308,9 +302,7 @@ func UpdateBulletin(companyId int64, request *protocol.UpdateBulletinRequest) (r | @@ -308,9 +302,7 @@ func UpdateBulletin(companyId int64, request *protocol.UpdateBulletinRequest) (r | ||
308 | bulletin.Title = request.Title | 302 | bulletin.Title = request.Title |
309 | bulletin.Type = int8(request.Type) | 303 | bulletin.Type = int8(request.Type) |
310 | bulletin.Content = request.Content | 304 | bulletin.Content = request.Content |
311 | - bulletin.Cover = request.Cover.Path | ||
312 | - bulletin.H = request.Cover.H | ||
313 | - bulletin.W = request.Cover.W | 305 | + bulletin.Cover = string(request.Cover) |
314 | bulletin.Receiver = string(receiver) | 306 | bulletin.Receiver = string(receiver) |
315 | bulletin.QuestionSwitch = int8(request.QuestionSwitch) | 307 | bulletin.QuestionSwitch = int8(request.QuestionSwitch) |
316 | //bulletin.AllowCondition = int8(request.AllowCondition) | 308 | //bulletin.AllowCondition = int8(request.AllowCondition) |
-
请 注册 或 登录 后发表评论