|
|
@@ -169,8 +169,8 @@ func QueryNotice(c *gin.Context) {
|
|
|
|
|
|
// NoticeReadedReq 通知公告设置已读请求参数
|
|
|
type NoticeReadedReq struct {
|
|
|
- LoginID int `form:"loginID" binding:"requried"` // 登录账号
|
|
|
- NoticeID int `form:"noticeID" binding:"requried"` // 通知公告ID
|
|
|
+ LoginID int `form:"loginID" binding:"required"` // 登录账号
|
|
|
+ NoticeID int `form:"noticeID" binding:"required"` // 通知公告ID
|
|
|
}
|
|
|
|
|
|
// NoticeReaded 通知公告设置已读请求
|
|
|
@@ -188,7 +188,7 @@ func NoticeReaded(c *gin.Context) {
|
|
|
|
|
|
// 获取请求参数
|
|
|
var req NoticeReadedReq
|
|
|
- if err := appG.C.ShouldBindQuery(&req); err != nil {
|
|
|
+ if err := appG.C.ShouldBind(&req); err != nil {
|
|
|
logger.GetLogger().Errorf("NoticeReaded failed: %s", err.Error())
|
|
|
appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
return
|
|
|
@@ -230,6 +230,7 @@ func NoticeReaded(c *gin.Context) {
|
|
|
m.Managerid = userAccount.Userid
|
|
|
m.Readstatus = 2
|
|
|
m.Receivertype = 2
|
|
|
+ // m.Updatetime = time.Now()
|
|
|
if _, err := engine.Insert(m); err != nil {
|
|
|
// 执行失败
|
|
|
logger.GetLogger().Errorf("NoticeReaded failed: %s", err.Error())
|