diff --git a/deploy/gdccloud/deploy.sh b/deploy/gdccloud/deploy.sh index 5429a76..26604b7 100644 --- a/deploy/gdccloud/deploy.sh +++ b/deploy/gdccloud/deploy.sh @@ -18,6 +18,6 @@ fi ssh $USERSERVER "cd /tmp && rm -rf $ARTIFACT_NAME*.jar && echo `date` 'killed' >> log_$ARTIFACT_NAME" scp build/libs/$ARTIFACT_NAME-0.1.0-SNAPSHOT.jar $USERSERVER:/tmp/$ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -ssh $USERSERVER -f "cd /tmp/ && /opt/jdk1.8.0_192/bin/java -jar $ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -Xms 512m -Xmx 1024m --server.port=8443 --server.http.port=8080 >> /home/user/logfile_$ARTIFACT_NAME" & +ssh $USERSERVER -f "cd /tmp/ && /opt/jdk1.8.0_192/bin/java -jar $ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -Xms 512m -Xmx 1024m --server.port=8443 --server.http.port=8080 --ng-tracker.base-url=http://193.110.3.124:8080 >> /home/user/logfile_$ARTIFACT_NAME" & sleep 10 echo "is deployed" \ No newline at end of file diff --git a/src/main/java/ru/ulstu/timeline/model/Event.java b/src/main/java/ru/ulstu/timeline/model/Event.java index 404025a..89ff4cd 100644 --- a/src/main/java/ru/ulstu/timeline/model/Event.java +++ b/src/main/java/ru/ulstu/timeline/model/Event.java @@ -6,6 +6,8 @@ import ru.ulstu.user.model.User; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; import javax.persistence.FetchType; import javax.persistence.ManyToMany; import javax.persistence.Temporal; @@ -15,9 +17,26 @@ import java.util.List; @Entity public class Event extends BaseEntity { + public enum EventStatus { + POSSIBLE("Возможное"), NEW("Новое"), IN_PROGRESS("В процессе"), COMPLETED("Завершено"); + + private String name; + + EventStatus(String name) { + this.name = name; + } + + public String getName() { + return name; + } + } + @NotBlank private String title; + @Enumerated(value = EnumType.STRING) + private EventStatus status; + @Column(name = "execute_date") @Temporal(TemporalType.TIMESTAMP) private Date executeDate; @@ -43,6 +62,14 @@ public class Event extends BaseEntity { this.title = title; } + public EventStatus getStatus() { + return status; + } + + public void setStatus(EventStatus status) { + this.status = status; + } + public Date getCreateDate() { return createDate; } diff --git a/src/main/java/ru/ulstu/timeline/model/EventDto.java b/src/main/java/ru/ulstu/timeline/model/EventDto.java index 59cef34..b409ce8 100644 --- a/src/main/java/ru/ulstu/timeline/model/EventDto.java +++ b/src/main/java/ru/ulstu/timeline/model/EventDto.java @@ -12,6 +12,7 @@ import static ru.ulstu.core.util.StreamApiUtils.convert; public class EventDto { private final Integer id; private final String title; + private final Event.EventStatus status; private final Date executeDate; private final Date createDate; private final Date updateDate; @@ -21,6 +22,7 @@ public class EventDto { @JsonCreator public EventDto(@JsonProperty("id") Integer id, @JsonProperty("title") String title, + @JsonProperty("status") Event.EventStatus status, @JsonProperty("executeDate") Date executeDate, @JsonProperty("createDate") Date createDate, @JsonProperty("updateDate") Date updateDate, @@ -28,6 +30,7 @@ public class EventDto { @JsonProperty("recipients") List recipients) { this.id = id; this.title = title; + this.status = status; this.executeDate = executeDate; this.createDate = createDate; this.updateDate = updateDate; @@ -38,6 +41,7 @@ public class EventDto { public EventDto(Event event) { this.id = event.getId(); this.title = event.getTitle(); + this.status = event.getStatus(); this.executeDate = event.getExecuteDate(); this.createDate = event.getCreateDate(); this.updateDate = event.getUpdateDate(); @@ -53,6 +57,8 @@ public class EventDto { return title; } + public Event.EventStatus getStatus() { return status; } + public Date getCreateDate() { return createDate; } diff --git a/src/main/java/ru/ulstu/timeline/service/EventService.java b/src/main/java/ru/ulstu/timeline/service/EventService.java index 0c1cf6c..8d8189d 100644 --- a/src/main/java/ru/ulstu/timeline/service/EventService.java +++ b/src/main/java/ru/ulstu/timeline/service/EventService.java @@ -46,6 +46,7 @@ public class EventService { event.setDescription(eventDto.getDescription()); event.setRecipients(userService.findByIds(convert(eventDto.getRecipients(), UserDto::getId))); event.setTitle(eventDto.getTitle()); + event.setStatus(eventDto.getStatus()); event.setUpdateDate(eventDto.getUpdateDate()); return event; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e696ccd..fb1b116 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -32,7 +32,7 @@ liquibase.drop-first=false liquibase.enabled=true liquibase.change-log=classpath:db/changelog-master.xml # Application Settings -ng-tracker.base-url=https://127.0.0.1:8443 +ng-tracker.base-url=http://127.0.0.1:8080 ng-tracker.undead-user-login=admin ng-tracker.dev-mode=true ng-tracker.use-https=false \ No newline at end of file diff --git a/src/main/resources/db/changelog-20181031_000000-schema.xml b/src/main/resources/db/changelog-20181031_000000-schema.xml new file mode 100644 index 0000000..7a727fc --- /dev/null +++ b/src/main/resources/db/changelog-20181031_000000-schema.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db/changelog-master.xml b/src/main/resources/db/changelog-master.xml index fe8d7d6..b5d2999 100644 --- a/src/main/resources/db/changelog-master.xml +++ b/src/main/resources/db/changelog-master.xml @@ -13,5 +13,6 @@ + \ No newline at end of file diff --git a/src/main/resources/mail_templates/paperCreateNotification.html b/src/main/resources/mail_templates/paperCreateNotification.html index 3e71ce9..8b4ded9 100644 --- a/src/main/resources/mail_templates/paperCreateNotification.html +++ b/src/main/resources/mail_templates/paperCreateNotification.html @@ -6,6 +6,29 @@ + + + + + + + + + + + + +

Уважаемый(ая) Ivan Ivanov