正在显示
8 个修改的文件
包含
8 行增加
和
9 行删除
@@ -20,8 +20,6 @@ type AddNoticeSettingCommand struct { | @@ -20,8 +20,6 @@ type AddNoticeSettingCommand struct { | ||
20 | ModuleAction string `json:"moduleAction"` | 20 | ModuleAction string `json:"moduleAction"` |
21 | // 组织id | 21 | // 组织id |
22 | OrgId int64 `json:"orgId"` | 22 | OrgId int64 `json:"orgId"` |
23 | - // 消息对应的编码 | ||
24 | - SysCode string `json:"sysCode"` | ||
25 | } | 23 | } |
26 | 24 | ||
27 | func (addNoticeSettingCommand *AddNoticeSettingCommand) Valid(v *validation.Validation) { | 25 | func (addNoticeSettingCommand *AddNoticeSettingCommand) Valid(v *validation.Validation) { |
@@ -8,7 +8,7 @@ import ( | @@ -8,7 +8,7 @@ import ( | ||
8 | 8 | ||
9 | type ListNoticeSettingQuery struct { | 9 | type ListNoticeSettingQuery struct { |
10 | // 查询偏离量 | 10 | // 查询偏离量 |
11 | - PageIndex int `json:"pageIndex" valid:"Required"` | 11 | + PageIndex int `json:"pageIndex"` |
12 | // 查询限制 | 12 | // 查询限制 |
13 | PageSize int `json:"pageSize" valid:"Required"` | 13 | PageSize int `json:"pageSize" valid:"Required"` |
14 | CompanyId int64 `json:"companyId" valid:"Required"` | 14 | CompanyId int64 `json:"companyId" valid:"Required"` |
@@ -26,8 +26,6 @@ type NoticePersonal struct { | @@ -26,8 +26,6 @@ type NoticePersonal struct { | ||
26 | NoticePersonalId int64 `pg:",pk"` | 26 | NoticePersonalId int64 `pg:",pk"` |
27 | // 组织id | 27 | // 组织id |
28 | OrgId int64 | 28 | OrgId int64 |
29 | - // 消息对应的编码 | ||
30 | - SysCode string | ||
31 | // 接收方用户id | 29 | // 接收方用户id |
32 | UserId int64 | 30 | UserId int64 |
33 | 31 |
@@ -18,6 +18,7 @@ func TransformToNoticePersonalDomainModelFromPgModels(noticePersonalModel *model | @@ -18,6 +18,7 @@ func TransformToNoticePersonalDomainModelFromPgModels(noticePersonalModel *model | ||
18 | ModuleAction: noticePersonalModel.ModuleAction, | 18 | ModuleAction: noticePersonalModel.ModuleAction, |
19 | NoticePersonalId: noticePersonalModel.NoticePersonalId, | 19 | NoticePersonalId: noticePersonalModel.NoticePersonalId, |
20 | OrgId: noticePersonalModel.OrgId, | 20 | OrgId: noticePersonalModel.OrgId, |
21 | + UserBaseId: noticePersonalModel.UserBaseId, | ||
21 | UserId: noticePersonalModel.UserId, | 22 | UserId: noticePersonalModel.UserId, |
22 | }, nil | 23 | }, nil |
23 | } | 24 | } |
1 | package controllers | 1 | package controllers |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | + "log" | ||
4 | "strconv" | 5 | "strconv" |
5 | 6 | ||
6 | "github.com/linmadan/egglib-go/web/beego" | 7 | "github.com/linmadan/egglib-go/web/beego" |
@@ -20,6 +21,7 @@ func (controller *baseController) GetUserId() int64 { | @@ -20,6 +21,7 @@ func (controller *baseController) GetUserId() int64 { | ||
20 | func (controller *baseController) GetCompanyId() int64 { | 21 | func (controller *baseController) GetCompanyId() int64 { |
21 | str := controller.Ctx.Input.Header("companyId") | 22 | str := controller.Ctx.Input.Header("companyId") |
22 | companyId, _ := strconv.Atoi(str) | 23 | companyId, _ := strconv.Atoi(str) |
24 | + log.Println("============>companyId", str) | ||
23 | return int64(companyId) | 25 | return int64(companyId) |
24 | } | 26 | } |
25 | 27 |
@@ -45,8 +45,8 @@ func (controller *NoticeSettingController) ListNoticeSetting() { | @@ -45,8 +45,8 @@ func (controller *NoticeSettingController) ListNoticeSetting() { | ||
45 | listNoticeSettingQuery.CompanyId = controller.GetCompanyId() | 45 | listNoticeSettingQuery.CompanyId = controller.GetCompanyId() |
46 | count, listdata, err := noticeSettingService.ListNoticeSetting(listNoticeSettingQuery) | 46 | count, listdata, err := noticeSettingService.ListNoticeSetting(listNoticeSettingQuery) |
47 | data := map[string]interface{}{ | 47 | data := map[string]interface{}{ |
48 | - "noticeSettings": listdata, | ||
49 | - "count": count, | 48 | + "list": listdata, |
49 | + "count": count, | ||
50 | } | 50 | } |
51 | controller.Response(data, err) | 51 | controller.Response(data, err) |
52 | } | 52 | } |
@@ -9,6 +9,6 @@ func init() { | @@ -9,6 +9,6 @@ func init() { | ||
9 | web.Router("/notice-setting/:settingId", &controllers.NoticeSettingController{}, "Put:UpdateNoticeSetting") | 9 | web.Router("/notice-setting/:settingId", &controllers.NoticeSettingController{}, "Put:UpdateNoticeSetting") |
10 | web.Router("/notice-setting/:settingId", &controllers.NoticeSettingController{}, "Get:GetNoticeSetting") | 10 | web.Router("/notice-setting/:settingId", &controllers.NoticeSettingController{}, "Get:GetNoticeSetting") |
11 | web.Router("/notice-setting/search", &controllers.NoticeSettingController{}, "POST:ListNoticeSetting") | 11 | web.Router("/notice-setting/search", &controllers.NoticeSettingController{}, "POST:ListNoticeSetting") |
12 | - web.Router("/notice-setting", &controllers.NoticeSettingController{}, "Post:UpdateNoticeSetting") | 12 | + web.Router("/notice-setting", &controllers.NoticeSettingController{}, "Post:AddNoticeSetting") |
13 | web.Router("/notice-setting/profile/get", &controllers.NoticeSettingController{}, "Get:NoticeSettingProfile") | 13 | web.Router("/notice-setting/profile/get", &controllers.NoticeSettingController{}, "Get:NoticeSettingProfile") |
14 | } | 14 | } |
-
请 注册 或 登录 后发表评论