This commit is contained in:
AKurakin 2023-09-27 13:14:05 +03:00
parent 81456f3d2e
commit 60cff01fe2
6 changed files with 50 additions and 13 deletions

View file

@ -13,12 +13,16 @@ 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;
}
@ -43,4 +47,12 @@ public class NotificationUpdateAction implements IAction<NotificationUpdateReque
public void setNotificationStatus(String notificationStatus) {
this.notificationStatus = notificationStatus;
}
public Long getSenderId() {
return senderId;
}
public void setSenderId(Long senderId) {
this.senderId = senderId;
}
}

View file

@ -1,6 +1,6 @@
{
"version": "3.8.0.55",
"version": "3.8.0.56",
"enums": {
@ -6961,11 +6961,11 @@
}
,
{"code": "updatedAt",
"field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время прочтения записи","shortname": "Прочитано","searchable": true,"sortable": true
"field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true
}
,
{"code": "senderId",
"type": 1,"dbname": "Идентификатор компании-отправителя","name": "Наименование компании-отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company","ignore": true
"type": 1,"dbname": "Идентификатор отправителя","name": "Наименование отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"visible": true,"link": "userCls","linkCode": "identifier"
}
,
{"code": "addresseeId",
@ -6981,7 +6981,7 @@
}
,
{"code": "notificationStatus",
"type": 12,"dbname": "Код статуса сообщения","name": "Наименование статуса сообщения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "notificationStatus","ignore": true
"type": 12,"dbname": "Код статуса сообщения","name": "Наименование статуса сообщения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "notificationStatus"
}
,
{"code": "comment",
@ -6997,6 +6997,8 @@
"name": "Изменение статуса сообщения",
"class": "ru.spcex.clearing.backendapi.controller.request.cud.registry.NotificationUpdateAction",
"fields": [
{"code": "id",
"type": 1,"name": "Идентификатор записи","shortname": "ID","link": "notification","linkCode": "id","required": true
@ -7005,6 +7007,10 @@
{"code": "notificationStatus",
"type": 12,"name": "Наименование статуса сообщения","shortname": "Статус","link": "notificationStatus","required": true
}
,
{"code": "senderId",
"type": 1,"name": "Наименование отправителя","shortname": "Отправитель","visible": false,"required": true
}
]
}
]

View file

@ -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.55">
<meta version="3.8.0.56">
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
<!--Здесь словари-->
<enums>
@ -1610,18 +1610,19 @@
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" visible="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время прочтения записи" shortname="Прочитано" searchable="true" sortable="true"/>
<senderId type="1" dbname="Идентификатор компании-отправителя" name="Наименование компании-отправителя" shortname="Отправитель" searchable="true" sortable="true" link="company" ignore="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<senderId type="1" dbname="Идентификатор отправителя" name="Наименование отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<addresseeId type="1" dbname="Идентификатор компании-получателя" name="Наименование компании-получателя" shortname="Получатель" searchable="true" sortable="true" link="company" ignore="true"/>
<objectType type="12" dbname="Код типа объекта" name="Наименование типа объекта" shortname="Объект" searchable="true" sortable="true" link="objectType" ignore="true"/>
<objectId type="1" name="Идентификатор объекта" shortname="ID объекта" searchable="true" sortable="true" ignore="true"/>
<notificationStatus type="12" dbname="Код статуса сообщения" name="Наименование статуса сообщения" shortname="Статус" searchable="true" sortable="true" visible="true" link="notificationStatus" ignore="true"/>
<notificationStatus type="12" dbname="Код статуса сообщения" name="Наименование статуса сообщения" shortname="Статус" searchable="true" sortable="true" visible="true" link="notificationStatus"/>
<comment type="2" length="255" name="Текст сообщения" shortname="Сообщение" searchable="true" sortable="true" visible="true"/>
<priority type="12" dbname="Код приоритета отображения" name="Наименование приоритета отображения" shortname="Приоритет отображения" searchable="true" sortable="true" link="priority"/>
<actions>
<put name="Изменение статуса сообщения">
<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>

View file

@ -1,6 +1,6 @@
{
"version": "3.8.0.55",
"version": "3.8.0.56",
"enums": {
@ -6961,11 +6961,11 @@
}
,
{"code": "updatedAt",
"field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время прочтения записи","shortname": "Прочитано","searchable": true,"sortable": true
"field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true
}
,
{"code": "senderId",
"type": 1,"dbname": "Идентификатор компании-отправителя","name": "Наименование компании-отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company","ignore": true
"type": 1,"dbname": "Идентификатор отправителя","name": "Наименование отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"visible": true,"link": "userCls","linkCode": "identifier"
}
,
{"code": "addresseeId",
@ -6981,7 +6981,7 @@
}
,
{"code": "notificationStatus",
"type": 12,"dbname": "Код статуса сообщения","name": "Наименование статуса сообщения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "notificationStatus","ignore": true
"type": 12,"dbname": "Код статуса сообщения","name": "Наименование статуса сообщения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "notificationStatus"
}
,
{"code": "comment",
@ -6997,6 +6997,8 @@
"name": "Изменение статуса сообщения",
"class": "ru.spcex.clearing.backendapi.controller.request.cud.registry.NotificationUpdateAction",
"fields": [
{"code": "id",
"type": 1,"name": "Идентификатор записи","shortname": "ID","link": "notification","linkCode": "id","required": true
@ -7005,6 +7007,10 @@
{"code": "notificationStatus",
"type": 12,"name": "Наименование статуса сообщения","shortname": "Статус","link": "notificationStatus","required": true
}
,
{"code": "senderId",
"type": 1,"name": "Наименование отправителя","shortname": "Отправитель","visible": false,"required": true
}
]
}
]

View file

@ -68,6 +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.setUpdated(Instant.now());
notificationMap.update(notification);
sendFeedbackString(notification);

View file

@ -9,6 +9,9 @@ public class NotificationUpdateRequest {
@JsonProperty
public String notificationStatus;
@JsonProperty
public Long senderId;
public Long getId() {
return id;
}
@ -24,4 +27,12 @@ public class NotificationUpdateRequest {
public void setNotificationStatus(String notificationStatus) {
this.notificationStatus = notificationStatus;
}
public Long getSenderId() {
return senderId;
}
public void setSenderId(Long senderId) {
this.senderId = senderId;
}
}