http://jira.mfd.msk:8088/browse/CLS-550 не доверять пользователю указывать свой userId, проставляется на бэкенде.
This commit is contained in:
parent
4df7131630
commit
4951559891
6 changed files with 4 additions and 35 deletions
|
|
@ -13,16 +13,12 @@ public class NotificationUpdateAction implements IAction<NotificationUpdateReque
|
|||
@ApiModelProperty(value = "Наименование статуса сообщения", example = "ACTV")
|
||||
@JsonProperty
|
||||
public String notificationStatus;
|
||||
@ApiModelProperty(value = "Наименование отправителя", example = "1234")
|
||||
@JsonProperty
|
||||
public Long senderId;
|
||||
|
||||
@Override
|
||||
public NotificationUpdateRequest toRequest() {
|
||||
var req = new NotificationUpdateRequest();
|
||||
req.setId(this.id);
|
||||
req.setNotificationStatus(this.notificationStatus);
|
||||
req.setSenderId(this.senderId);
|
||||
return req;
|
||||
}
|
||||
|
||||
|
|
@ -48,11 +44,4 @@ public class NotificationUpdateAction implements IAction<NotificationUpdateReque
|
|||
this.notificationStatus = notificationStatus;
|
||||
}
|
||||
|
||||
public Long getSenderId() {
|
||||
return senderId;
|
||||
}
|
||||
|
||||
public void setSenderId(Long senderId) {
|
||||
this.senderId = senderId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
{
|
||||
"version": "3.8.0.56",
|
||||
"version": "3.8.0.57",
|
||||
|
||||
"enums": {
|
||||
|
||||
|
|
@ -7007,10 +7007,6 @@
|
|||
{"code": "notificationStatus",
|
||||
"type": 12,"name": "Наименование статуса сообщения","shortname": "Статус","link": "notificationStatus","required": true
|
||||
}
|
||||
,
|
||||
{"code": "senderId",
|
||||
"type": 1,"name": "Наименование отправителя","shortname": "Отправитель","visible": false,"required": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
|
||||
<meta version="3.8.0.56">
|
||||
<meta version="3.8.0.57">
|
||||
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
||||
<!--Здесь словари-->
|
||||
<enums>
|
||||
|
|
@ -1622,7 +1622,6 @@
|
|||
<put name="Изменение статуса сообщения" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.NotificationUpdateAction">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="notification" linkCode="id" required="true"/>
|
||||
<notificationStatus type="12" name="Наименование статуса сообщения" shortname="Статус" link="notificationStatus" required="true"/>
|
||||
<senderId type="1" name="Наименование отправителя" shortname="Отправитель" visible="false" required="true" />
|
||||
</put>
|
||||
</actions>
|
||||
</notification>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
{
|
||||
"version": "3.8.0.56",
|
||||
"version": "3.8.0.57",
|
||||
|
||||
"enums": {
|
||||
|
||||
|
|
@ -7007,10 +7007,6 @@
|
|||
{"code": "notificationStatus",
|
||||
"type": 12,"name": "Наименование статуса сообщения","shortname": "Статус","link": "notificationStatus","required": true
|
||||
}
|
||||
,
|
||||
{"code": "senderId",
|
||||
"type": 1,"name": "Наименование отправителя","shortname": "Отправитель","visible": false,"required": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class NotificationService extends QueueConsumer implements InitializingBe
|
|||
throw new NullPointerException("Notification by id:{" + id + "} is null!");
|
||||
}
|
||||
notification.setNotificationStatus(request.getNotificationStatus());
|
||||
notification.setSenderId(request.getSenderId());
|
||||
notification.setSenderId(notificationUpdateRequestBaseRequest.getUserId());
|
||||
notification.setUpdated(Instant.now());
|
||||
notificationMap.update(notification);
|
||||
sendFeedbackString(notification);
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ public class NotificationUpdateRequest {
|
|||
@JsonProperty
|
||||
public String notificationStatus;
|
||||
|
||||
@JsonProperty
|
||||
public Long senderId;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -27,12 +24,4 @@ public class NotificationUpdateRequest {
|
|||
public void setNotificationStatus(String notificationStatus) {
|
||||
this.notificationStatus = notificationStatus;
|
||||
}
|
||||
|
||||
public Long getSenderId() {
|
||||
return senderId;
|
||||
}
|
||||
|
||||
public void setSenderId(Long senderId) {
|
||||
this.senderId = senderId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue