作者 tangxuhui

更新个人消息推送

@@ -8,7 +8,10 @@ import ( @@ -8,7 +8,10 @@ import (
8 8
9 type AgreeJoinCreationProjectCommand struct { 9 type AgreeJoinCreationProjectCommand struct {
10 // 接收方用户id 10 // 接收方用户id
11 - UserId int64 `json:"userId" valid:"Required"` 11 + UserId int64 `json:"userId"`
  12 + UserBaseId int64 `json:"userBaseId" valid:"Required"`
  13 + CompanyId int64 `json:"companyId"`
  14 + OrgId int64 `json:"orgId"`
12 // 共创项目id 15 // 共创项目id
13 CreationProjectId int64 `json:"creationProjectId" valid:"Required"` 16 CreationProjectId int64 `json:"creationProjectId" valid:"Required"`
14 // 共创项目名称 17 // 共创项目名称
@@ -8,9 +8,14 @@ import ( @@ -8,9 +8,14 @@ import (
8 8
9 type InformExpectedDividendsCommand struct { 9 type InformExpectedDividendsCommand struct {
10 // 用户id 10 // 用户id
11 - UserId int64 `json:"userId" valid:"Required"` 11 + UserId int64 `json:"userId"`
  12 + CompanyId int64 `json:"companyId"`
  13 + OrgId int64 `json:"orgId"`
  14 + UserBaseId int64 `json:"userBaseId" valid:"Required"`
12 // 共创项目id 15 // 共创项目id
13 CreationProjectId int64 `json:"creationProjectId" valid:"Required"` 16 CreationProjectId int64 `json:"creationProjectId" valid:"Required"`
  17 + //共创项目编号
  18 + CreationProjectNumber string `json:"creationProjectNumber" valid:"Required"`
14 // 共创项目名称 19 // 共创项目名称
15 CreationProjectName string `json:"creationProjectName" valid:"Required"` 20 CreationProjectName string `json:"creationProjectName" valid:"Required"`
16 // 共创合约id 21 // 共创合约id
@@ -20,7 +25,11 @@ type InformExpectedDividendsCommand struct { @@ -20,7 +25,11 @@ type InformExpectedDividendsCommand struct {
20 // 共创合约编号 25 // 共创合约编号
21 CreationContractNumber string `json:"creationContractNumber" valid:"Required"` 26 CreationContractNumber string `json:"creationContractNumber" valid:"Required"`
22 // 产品名称 27 // 产品名称
23 - ProductName string `json:"productName" valid:"Required"` 28 + ProductName []string `json:"productName" valid:"Required"`
  29 + //分红预算id
  30 + DividendsEstimateId int64 `json:"dividendsEstimateId" valid:"Required"`
  31 + //预算金额
  32 + DividendsAmount string `json:"dividendsAmount" valid:"Required"`
24 } 33 }
25 34
26 func (informExpectedDividendsCommand *InformExpectedDividendsCommand) Valid(validation *validation.Validation) { 35 func (informExpectedDividendsCommand *InformExpectedDividendsCommand) Valid(validation *validation.Validation) {
@@ -8,11 +8,16 @@ import ( @@ -8,11 +8,16 @@ import (
8 8
9 type InformJoinCreationContractCommand struct { 9 type InformJoinCreationContractCommand struct {
10 // 接收方用户id 10 // 接收方用户id
11 - UserId int64 `json:"userId" valid:"Required"` 11 + UserId int64 `json:"userId"`
  12 + CompanyId int64 `json:"companyId"`
  13 + UserBaseId int64 `json:"userBaseId" valid:"Required"`
  14 + OrgId int64 `json:"orgId"`
12 // 共创项目id 15 // 共创项目id
13 CreationProjectId int64 `json:"creationProjectId" valid:"Required"` 16 CreationProjectId int64 `json:"creationProjectId" valid:"Required"`
14 // 共创项目名称 17 // 共创项目名称
15 CreationProjectName string `json:"creationProjectName" valid:"Required"` 18 CreationProjectName string `json:"creationProjectName" valid:"Required"`
  19 + // 共创项目编号
  20 + CreationProjectNumber string `json:"creationProjectNumber" valid:"Required"`
16 // 共创合约id 21 // 共创合约id
17 CreationContractId int64 `json:"creationContractId" valid:"Required"` 22 CreationContractId int64 `json:"creationContractId" valid:"Required"`
18 // 共创合约名称 23 // 共创合约名称
@@ -8,7 +8,10 @@ import ( @@ -8,7 +8,10 @@ import (
8 8
9 type RefuseJoinCreationProjectCommand struct { 9 type RefuseJoinCreationProjectCommand struct {
10 // 接收方用户id 10 // 接收方用户id
11 - UserId int64 `json:"userId" valid:"Required"` 11 + UserId int64 `json:"userId"`
  12 + CompanyId int64 `json:"companyId"`
  13 + UserBaseId int64 `json:"userBaseId" valid:"Required"`
  14 + OrgId int64 `json:"orgId"`
12 // 共创项目id 15 // 共创项目id
13 CreationProjectId int64 `json:"creationProjectId" valid:"Required"` 16 CreationProjectId int64 `json:"creationProjectId" valid:"Required"`
14 // 共创项目名称 17 // 共创项目名称
1 package service 1 package service
2 2
3 import ( 3 import (
  4 + "bytes"
  5 + "encoding/json"
  6 + "html/template"
  7 + "strings"
  8 + "time"
  9 +
4 "github.com/linmadan/egglib-go/core/application" 10 "github.com/linmadan/egglib-go/core/application"
5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/factory" 11 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/factory"
6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/command" 12 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/command"
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/query" 13 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/query"
  14 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/domain"
8 ) 15 )
9 16
10 // 个人消息通知 17 // 个人消息通知
@@ -26,6 +33,72 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr @@ -26,6 +33,72 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr
26 defer func() { 33 defer func() {
27 transactionContext.RollbackTransaction() 34 transactionContext.RollbackTransaction()
28 }() 35 }()
  36 + var noticeSettingRepository domain.NoticeSettingRepository
  37 + if value, err := factory.CreateNoticeSettingRepository(map[string]interface{}{
  38 + "transactionContext": transactionContext,
  39 + }); err != nil {
  40 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  41 + } else {
  42 + noticeSettingRepository = value
  43 + }
  44 + _, settings, err := noticeSettingRepository.Find(map[string]interface{}{
  45 + "orgId": agreeJoinCreationProjectCommand.OrgId,
  46 + "moduleAction": domain.Action01_01,
  47 + })
  48 + if err != nil {
  49 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  50 + }
  51 + if len(settings) == 0 {
  52 + //未设置消息模板
  53 + return "未设置对应的消息模板", nil
  54 + }
  55 + if settings[0].IsPush == domain.NoticeSettingIsNotPush {
  56 + return "消息是否推送已设为否", nil
  57 + }
  58 + noticeContent := settings[0].Content
  59 + tpl, err := template.New("AgreeJoinCreationProject").Parse(noticeContent)
  60 + if err != nil {
  61 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "消息模板解析失败"+err.Error())
  62 + }
  63 + //数据字段映射
  64 + data := map[string]string{
  65 + domain.Param01_01_01: agreeJoinCreationProjectCommand.CreationProjectNumber,
  66 + domain.Param01_01_02: agreeJoinCreationProjectCommand.CreationProjectName,
  67 + }
  68 + tplResult := bytes.Buffer{}
  69 + err = tpl.Execute(&tplResult, data)
  70 + if err != nil {
  71 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "消息体生成失败"+err.Error())
  72 + }
  73 + extendData := map[string]interface{}{
  74 + "creationProjectId": agreeJoinCreationProjectCommand.CreationProjectId,
  75 + }
  76 + extendStr, _ := json.Marshal(extendData)
  77 + noticePersonal := domain.NoticePersonal{
  78 + CreatedAt: time.Now(),
  79 + UpdatedAt: time.Now(),
  80 + Extend: string(extendStr),
  81 + CompanyId: agreeJoinCreationProjectCommand.CompanyId,
  82 + Content: tplResult.String(),
  83 + IsRead: domain.NoticePersonalIsNotRead,
  84 + Module: domain.Action01_01,
  85 + ModuleAction: domain.Action01_01,
  86 + UserBaseId: agreeJoinCreationProjectCommand.UserBaseId,
  87 + OrgId: agreeJoinCreationProjectCommand.OrgId,
  88 + UserId: agreeJoinCreationProjectCommand.UserId,
  89 + }
  90 + var noticePersonalRepository domain.NoticePersonalRepository
  91 + if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
  92 + "transactionContext": transactionContext,
  93 + }); err != nil {
  94 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  95 + } else {
  96 + noticePersonalRepository = value
  97 + }
  98 + _, err = noticePersonalRepository.Save(&noticePersonal)
  99 + if err != nil {
  100 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  101 + }
29 if err := transactionContext.CommitTransaction(); err != nil { 102 if err := transactionContext.CommitTransaction(); err != nil {
30 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 103 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
31 } 104 }
@@ -47,6 +120,8 @@ func (noticePersonalService *NoticePersonalService) GetNoticePersonalList(getNot @@ -47,6 +120,8 @@ func (noticePersonalService *NoticePersonalService) GetNoticePersonalList(getNot
47 defer func() { 120 defer func() {
48 transactionContext.RollbackTransaction() 121 transactionContext.RollbackTransaction()
49 }() 122 }()
  123 +
  124 + //TODO
50 if err := transactionContext.CommitTransaction(); err != nil { 125 if err := transactionContext.CommitTransaction(); err != nil {
51 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 126 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
52 } 127 }
@@ -68,6 +143,81 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info @@ -68,6 +143,81 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info
68 defer func() { 143 defer func() {
69 transactionContext.RollbackTransaction() 144 transactionContext.RollbackTransaction()
70 }() 145 }()
  146 + var noticeSettingRepository domain.NoticeSettingRepository
  147 + if value, err := factory.CreateNoticeSettingRepository(map[string]interface{}{
  148 + "transactionContext": transactionContext,
  149 + }); err != nil {
  150 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  151 + } else {
  152 + noticeSettingRepository = value
  153 + }
  154 + _, settings, err := noticeSettingRepository.Find(map[string]interface{}{
  155 + "orgId": informExpectedDividendsCommand.OrgId,
  156 + "moduleAction": domain.Action01_04,
  157 + })
  158 + if err != nil {
  159 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  160 + }
  161 + if len(settings) == 0 {
  162 + //未设置消息模板
  163 + return nil, nil
  164 + }
  165 + noticeContent := settings[0].Content
  166 + tpl, err := template.New("AgreeJoinCreationProject").Parse(noticeContent)
  167 + if err != nil {
  168 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "消息模板解析失败"+err.Error())
  169 + }
  170 + // Param01_04_01 = "param01_04_01" //分红预算消息-共创项目编号
  171 + // Param01_04_02 = "param01_04_02" //分红预算消息-共创项目名称
  172 + // Param01_04_03 = "param01_04_03" //分红预算消息-项目合约编号
  173 + // Param01_04_04 = "param01_04_04" //分红预算消息-项目合约名称
  174 + // Param01_04_05 = "param01_04_05" //分红预算消息-订单产品信息
  175 + // Param01_04_06 = "param01_04_06" //分红预算消息-分红金额
  176 + //数据字段映射
  177 + data := map[string]string{
  178 + domain.Param01_04_01: informExpectedDividendsCommand.CreationProjectNumber,
  179 + domain.Param01_04_02: informExpectedDividendsCommand.CreationProjectName,
  180 + domain.Param01_04_03: informExpectedDividendsCommand.CreationContractNumber,
  181 + domain.Param01_04_04: informExpectedDividendsCommand.CreationContractName,
  182 + domain.Param01_04_05: strings.Join(informExpectedDividendsCommand.ProductName, ","),
  183 + domain.Param01_04_06: informExpectedDividendsCommand.DividendsAmount,
  184 + }
  185 + tplResult := bytes.Buffer{}
  186 + err = tpl.Execute(&tplResult, data)
  187 + if err != nil {
  188 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "消息体生成失败"+err.Error())
  189 + }
  190 + extendData := map[string]interface{}{
  191 + "creationProjectId": informExpectedDividendsCommand.CreationProjectId,
  192 + "creationContractId": informExpectedDividendsCommand.CreationContractId,
  193 + "dividendsEstimateId": informExpectedDividendsCommand.DividendsEstimateId,
  194 + }
  195 + extendStr, _ := json.Marshal(extendData)
  196 + noticePersonal := domain.NoticePersonal{
  197 + CreatedAt: time.Now(),
  198 + UpdatedAt: time.Now(),
  199 + Extend: string(extendStr),
  200 + CompanyId: informExpectedDividendsCommand.CompanyId,
  201 + Content: tplResult.String(),
  202 + IsRead: domain.NoticePersonalIsNotRead,
  203 + Module: domain.Action01_01,
  204 + ModuleAction: domain.Action01_01,
  205 + UserBaseId: informExpectedDividendsCommand.UserBaseId,
  206 + OrgId: informExpectedDividendsCommand.OrgId,
  207 + UserId: informExpectedDividendsCommand.UserId,
  208 + }
  209 + var noticePersonalRepository domain.NoticePersonalRepository
  210 + if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
  211 + "transactionContext": transactionContext,
  212 + }); err != nil {
  213 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  214 + } else {
  215 + noticePersonalRepository = value
  216 + }
  217 + _, err = noticePersonalRepository.Save(&noticePersonal)
  218 + if err != nil {
  219 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  220 + }
71 if err := transactionContext.CommitTransaction(); err != nil { 221 if err := transactionContext.CommitTransaction(); err != nil {
72 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 222 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
73 } 223 }
@@ -89,6 +239,76 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i @@ -89,6 +239,76 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i
89 defer func() { 239 defer func() {
90 transactionContext.RollbackTransaction() 240 transactionContext.RollbackTransaction()
91 }() 241 }()
  242 +
  243 + //TODO
  244 + var noticeSettingRepository domain.NoticeSettingRepository
  245 + if value, err := factory.CreateNoticeSettingRepository(map[string]interface{}{
  246 + "transactionContext": transactionContext,
  247 + }); err != nil {
  248 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  249 + } else {
  250 + noticeSettingRepository = value
  251 + }
  252 + _, settings, err := noticeSettingRepository.Find(map[string]interface{}{
  253 + "orgId": informJoinCreationContractCommand.OrgId,
  254 + "moduleAction": domain.Action01_03,
  255 + })
  256 + if err != nil {
  257 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  258 + }
  259 + if len(settings) == 0 {
  260 + //未设置消息模板
  261 + return nil, nil
  262 + }
  263 + noticeContent := settings[0].Content
  264 + tpl, err := template.New("AgreeJoinCreationProject").Parse(noticeContent)
  265 + if err != nil {
  266 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "消息模板解析失败"+err.Error())
  267 + }
  268 + // Param01_03_01 = "param01_03_01" //共创确认-共创项目编号
  269 + // Param01_03_02 = "param01_03_02" //共创确认-共创项目名称
  270 + // Param01_03_03 = "param01_03_03" //共创确认-项目合约编号
  271 + // Param01_03_04 = "param01_03_04" //共创确认-项目合约名称
  272 + //数据字段映射
  273 + data := map[string]string{
  274 + domain.Param01_03_01: informJoinCreationContractCommand.CreationProjectNumber,
  275 + domain.Param01_03_02: informJoinCreationContractCommand.CreationProjectName,
  276 + domain.Param01_03_03: informJoinCreationContractCommand.CreationContractNumber,
  277 + domain.Param01_03_04: informJoinCreationContractCommand.CreationContractName,
  278 + }
  279 + tplResult := bytes.Buffer{}
  280 + err = tpl.Execute(&tplResult, data)
  281 + if err != nil {
  282 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "消息体生成失败"+err.Error())
  283 + }
  284 + extendData := map[string]interface{}{}
  285 + extendStr, _ := json.Marshal(extendData)
  286 + noticePersonal := domain.NoticePersonal{
  287 + CreatedAt: time.Now(),
  288 + UpdatedAt: time.Now(),
  289 + Extend: string(extendStr),
  290 + CompanyId: informJoinCreationContractCommand.CompanyId,
  291 + Content: tplResult.String(),
  292 + IsRead: domain.NoticePersonalIsNotRead,
  293 + Module: domain.Action01_01,
  294 + ModuleAction: domain.Action01_01,
  295 + UserBaseId: informJoinCreationContractCommand.UserBaseId,
  296 + OrgId: informJoinCreationContractCommand.OrgId,
  297 + UserId: informJoinCreationContractCommand.UserId,
  298 + }
  299 + var noticePersonalRepository domain.NoticePersonalRepository
  300 + if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
  301 + "transactionContext": transactionContext,
  302 + }); err != nil {
  303 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  304 + } else {
  305 + noticePersonalRepository = value
  306 + }
  307 + _, err = noticePersonalRepository.Save(&noticePersonal)
  308 + if err != nil {
  309 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  310 + }
  311 +
92 if err := transactionContext.CommitTransaction(); err != nil { 312 if err := transactionContext.CommitTransaction(); err != nil {
93 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 313 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
94 } 314 }
@@ -110,6 +330,9 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re @@ -110,6 +330,9 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re
110 defer func() { 330 defer func() {
111 transactionContext.RollbackTransaction() 331 transactionContext.RollbackTransaction()
112 }() 332 }()
  333 +
  334 + //TODO
  335 +
113 if err := transactionContext.CommitTransaction(); err != nil { 336 if err := transactionContext.CommitTransaction(); err != nil {
114 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 337 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
115 } 338 }
@@ -24,7 +24,7 @@ type NoticePersonal struct { @@ -24,7 +24,7 @@ type NoticePersonal struct {
24 // 内容模板 24 // 内容模板
25 Content string `json:"content"` 25 Content string `json:"content"`
26 // 是否已读【1:未读】【2:已读】 26 // 是否已读【1:未读】【2:已读】
27 - IsRead string `json:"isRead"` 27 + IsRead int `json:"isRead"`
28 // 消息对应的业务模块 28 // 消息对应的业务模块
29 Module string `json:"module"` 29 Module string `json:"module"`
30 // 业务环节 30 // 业务环节
@@ -33,8 +33,6 @@ type NoticePersonal struct { @@ -33,8 +33,6 @@ type NoticePersonal struct {
33 UserBaseId int64 `json:"userBaseId"` 33 UserBaseId int64 `json:"userBaseId"`
34 // 组织id 34 // 组织id
35 OrgId int64 `json:"orgId"` 35 OrgId int64 `json:"orgId"`
36 - // 消息对应的编码  
37 - SysCode string `json:"sysCode"`  
38 // 接收方用户id 36 // 接收方用户id
39 UserId int64 `json:"userId"` 37 UserId int64 `json:"userId"`
40 } 38 }
@@ -73,7 +71,7 @@ func (noticePersonal *NoticePersonal) Update(data map[string]interface{}) error @@ -73,7 +71,7 @@ func (noticePersonal *NoticePersonal) Update(data map[string]interface{}) error
73 noticePersonal.Content = content.(string) 71 noticePersonal.Content = content.(string)
74 } 72 }
75 if isRead, ok := data["isRead"]; ok { 73 if isRead, ok := data["isRead"]; ok {
76 - noticePersonal.IsRead = isRead.(string) 74 + noticePersonal.IsRead = isRead.(int)
77 } 75 }
78 if module, ok := data["module"]; ok { 76 if module, ok := data["module"]; ok {
79 noticePersonal.Module = module.(string) 77 noticePersonal.Module = module.(string)
@@ -87,9 +85,7 @@ func (noticePersonal *NoticePersonal) Update(data map[string]interface{}) error @@ -87,9 +85,7 @@ func (noticePersonal *NoticePersonal) Update(data map[string]interface{}) error
87 if organizationId, ok := data["organizationId"]; ok { 85 if organizationId, ok := data["organizationId"]; ok {
88 noticePersonal.OrgId = organizationId.(int64) 86 noticePersonal.OrgId = organizationId.(int64)
89 } 87 }
90 - if sysCode, ok := data["sysCode"]; ok {  
91 - noticePersonal.SysCode = sysCode.(string)  
92 - } 88 +
93 if userId, ok := data["userId"]; ok { 89 if userId, ok := data["userId"]; ok {
94 noticePersonal.UserId = userId.(int64) 90 noticePersonal.UserId = userId.(int64)
95 } 91 }
@@ -77,8 +77,8 @@ const ( @@ -77,8 +77,8 @@ const (
77 77
78 //业务环节 78 //业务环节
79 const ( 79 const (
80 - Action01_01 = "action01_01" //天联共创-共创申请通过  
81 - Action01_02 = "action01_02" //天联共创-共创申请拒绝 80 + Action01_01 = "action01_01" //天联共创-共创申请审核通过
  81 + Action01_02 = "action01_02" //天联共创-共创申请审核拒绝
82 Action01_03 = "action01_03" //天联共创-共创确认 82 Action01_03 = "action01_03" //天联共创-共创确认
83 Action01_04 = "action01_04" //天联共创-分红预算消息 83 Action01_04 = "action01_04" //天联共创-分红预算消息
84 Action01_05 = "action01_05" //天联共创-账期结算消息 84 Action01_05 = "action01_05" //天联共创-账期结算消息
@@ -17,7 +17,7 @@ type NoticePersonal struct { @@ -17,7 +17,7 @@ type NoticePersonal struct {
17 // 内容模板 17 // 内容模板
18 Content string 18 Content string
19 // 是否已读【1:未读】【2:已读】 19 // 是否已读【1:未读】【2:已读】
20 - IsRead string 20 + IsRead int
21 // 消息对应的业务模块 21 // 消息对应的业务模块
22 Module string 22 Module string
23 // 业务环节 23 // 业务环节
@@ -18,7 +18,6 @@ func TransformToNoticePersonalDomainModelFromPgModels(noticePersonalModel *model @@ -18,7 +18,6 @@ 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 - SysCode: noticePersonalModel.SysCode,  
22 UserId: noticePersonalModel.UserId, 21 UserId: noticePersonalModel.UserId,
23 }, nil 22 }, nil
24 } 23 }
@@ -37,7 +37,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe @@ -37,7 +37,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe
37 "module_action", 37 "module_action",
38 "notice_personal_id", 38 "notice_personal_id",
39 "org_id", 39 "org_id",
40 - "sys_code",  
41 "user_id", 40 "user_id",
42 "user_base_id", 41 "user_base_id",
43 } 42 }
@@ -67,7 +66,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe @@ -67,7 +66,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe
67 &noticePersonal.ModuleAction, 66 &noticePersonal.ModuleAction,
68 &noticePersonal.NoticePersonalId, 67 &noticePersonal.NoticePersonalId,
69 &noticePersonal.OrgId, 68 &noticePersonal.OrgId,
70 - &noticePersonal.SysCode,  
71 &noticePersonal.UserId, 69 &noticePersonal.UserId,
72 &noticePersonal.UserBaseId, 70 &noticePersonal.UserBaseId,
73 ), 71 ),
@@ -83,7 +81,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe @@ -83,7 +81,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe
83 noticePersonal.ModuleAction, 81 noticePersonal.ModuleAction,
84 noticePersonal.NoticePersonalId, 82 noticePersonal.NoticePersonalId,
85 noticePersonal.OrgId, 83 noticePersonal.OrgId,
86 - noticePersonal.SysCode,  
87 noticePersonal.UserId, 84 noticePersonal.UserId,
88 noticePersonal.UserBaseId, 85 noticePersonal.UserBaseId,
89 ); err != nil { 86 ); err != nil {
@@ -103,7 +100,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe @@ -103,7 +100,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe
103 &noticePersonal.ModuleAction, 100 &noticePersonal.ModuleAction,
104 &noticePersonal.NoticePersonalId, 101 &noticePersonal.NoticePersonalId,
105 &noticePersonal.OrgId, 102 &noticePersonal.OrgId,
106 - &noticePersonal.SysCode,  
107 &noticePersonal.UserId, 103 &noticePersonal.UserId,
108 &noticePersonal.UserBaseId, 104 &noticePersonal.UserBaseId,
109 ), 105 ),
@@ -119,7 +115,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe @@ -119,7 +115,6 @@ func (repository *NoticePersonalRepository) Save(noticePersonal *domain.NoticePe
119 noticePersonal.ModuleAction, 115 noticePersonal.ModuleAction,
120 noticePersonal.NoticePersonalId, 116 noticePersonal.NoticePersonalId,
121 noticePersonal.OrgId, 117 noticePersonal.OrgId,
122 - noticePersonal.SysCode,  
123 noticePersonal.UserId, 118 noticePersonal.UserId,
124 noticePersonal.Identify(), 119 noticePersonal.Identify(),
125 ); err != nil { 120 ); err != nil {