作者 yangfu

公告修改

@@ -133,7 +133,7 @@ type TemplateItem struct { @@ -133,7 +133,7 @@ type TemplateItem struct {
133 133
134 type VisibleObject struct { 134 type VisibleObject struct {
135 Id int `json:"id"` 135 Id int `json:"id"`
136 - Name string `json:"name,omitempty"` 136 + Name string `json:"name"`
137 Type int `json:"type"` //0:指定人员 1:部门 137 Type int `json:"type"` //0:指定人员 1:部门
138 } 138 }
139 139
@@ -7,7 +7,6 @@ import ( @@ -7,7 +7,6 @@ import (
7 "oppmg/common/log" 7 "oppmg/common/log"
8 "oppmg/models" 8 "oppmg/models"
9 "oppmg/protocol" 9 "oppmg/protocol"
10 - "oppmg/services/agg"  
11 "oppmg/utils" 10 "oppmg/utils"
12 "oppmg/utils/exceltool" 11 "oppmg/utils/exceltool"
13 "strconv" 12 "strconv"
@@ -189,14 +188,14 @@ func BulletinList(uid, companyId int64, request *protocol.BulletinListRequest) ( @@ -189,14 +188,14 @@ func BulletinList(uid, companyId int64, request *protocol.BulletinListRequest) (
189 Status: int8(bulletin.Status), 188 Status: int8(bulletin.Status),
190 CreateAt: bulletin.CreateAt.Format("2006-01-02 15:04:05"), 189 CreateAt: bulletin.CreateAt.Format("2006-01-02 15:04:05"),
191 } 190 }
192 - //if e:=json.Unmarshal([]byte(bulletin.Receiver),&item.Receiver);e!=nil{  
193 - // log.Error(e.Error())  
194 - // return  
195 - //}  
196 - if item.Receiver, err = agg.GetVisibleObject(bulletin.Receiver); err != nil {  
197 - log.Error(bulletin.Receiver, err.Error())  
198 - continue 191 + if e := json.Unmarshal([]byte(bulletin.Receiver), &item.Receiver); e != nil {
  192 + log.Error(e.Error())
  193 + return
199 } 194 }
  195 + //if item.Receiver, err = agg.GetVisibleObject(bulletin.Receiver); err != nil {
  196 + // log.Error(bulletin.Receiver, err.Error())
  197 + // continue
  198 + //}
200 rsp.List = append(rsp.List, item) 199 rsp.List = append(rsp.List, item)
201 } 200 }
202 201
@@ -274,10 +273,14 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest) @@ -274,10 +273,14 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest)
274 return 273 return
275 } 274 }
276 } 275 }
277 - if rsp.Receiver, err = agg.GetVisibleObject(bulletin.Receiver); err != nil {  
278 - log.Error(err.Error()) 276 + if e := json.Unmarshal([]byte(bulletin.Receiver), &rsp.Receiver); e != nil {
  277 + log.Error(e.Error())
279 return 278 return
280 } 279 }
  280 + //if rsp.Receiver, err = agg.GetVisibleObject(bulletin.Receiver); err != nil {
  281 + // log.Error(err.Error())
  282 + // return
  283 + //}
281 return 284 return
282 } 285 }
283 286