Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
radegast
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jan Hrabal
radegast
Commits
06c69cea
Commit
06c69cea
authored
Jul 10, 2019
by
jhrabal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
radegast
parent
c28b2eda
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
2 deletions
+25
-2
pom.xml
backend/pom.xml
+2
-2
RatingApiController.java
...rc/main/java/com/jh/radegast/api/RatingApiController.java
+13
-0
RatingsStats.java
backend/src/main/java/com/jh/radegast/api/RatingsStats.java
+8
-0
RatingRepository.java
...rc/main/java/com/jh/radegast/rating/RatingRepository.java
+2
-0
index.html
backend/src/main/resources/public/index.html
+0
-0
No files found.
backend/pom.xml
View file @
06c69cea
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<parent>
<parent>
<groupId>
com.jh
</groupId>
<groupId>
com.jh
</groupId>
<artifactId>
boot-react
</artifactId>
<artifactId>
boot-react
</artifactId>
<version>
0.0.
4
</version>
<version>
0.0.
5
</version>
<relativePath>
../boot-react
</relativePath>
<relativePath>
../boot-react
</relativePath>
</parent>
</parent>
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<frontend-maven-plugin-version>
1.0
</frontend-maven-plugin-version>
<frontend-maven-plugin-version>
1.0
</frontend-maven-plugin-version>
<node-version>
v8.1.3
</node-version>
<node-version>
v8.1.3
</node-version>
<npm-version>
5.0.3
</npm-version>
<npm-version>
5.0.3
</npm-version>
<boot-common.version>
0.0.
4
</boot-common.version>
<boot-common.version>
0.0.
5
</boot-common.version>
</properties>
</properties>
<dependencies>
<dependencies>
...
...
backend/src/main/java/com/jh/radegast/api/RatingApiController.java
View file @
06c69cea
package
com
.
jh
.
radegast
.
api
;
package
com
.
jh
.
radegast
.
api
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
com.jh.common.web.list.DefaultSorting
;
import
com.jh.common.web.list.ListHelper
;
import
com.jh.common.web.list.Page
;
import
com.jh.common.web.list.PagingInfo
;
import
com.jh.common.web.list.SortTrend
;
import
com.jh.radegast.model.Rating
;
import
com.jh.radegast.model.Rating
;
import
com.jh.radegast.rating.RatingService
;
import
com.jh.radegast.rating.RatingService
;
...
@@ -21,6 +28,12 @@ public class RatingApiController {
...
@@ -21,6 +28,12 @@ public class RatingApiController {
private
RatingService
service
;
private
RatingService
service
;
//paged endpoint
//paged endpoint
// @RequestMapping(path = "ratings", method = RequestMethod.GET)
// @DefaultSorting(field = "name", trend = SortTrend.ASCENDING)
// public ResponseEntity<List<Rating>> filterCustomers(PagingInfo pagingInfo) {
// Page<Rating> page = service.filter(pagingInfo);
// return ListHelper.pagedResponse(page);
// }
@RequestMapping
(
path
=
"ratings"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
path
=
"ratings"
,
method
=
RequestMethod
.
POST
)
@ResponseStatus
(
HttpStatus
.
CREATED
)
@ResponseStatus
(
HttpStatus
.
CREATED
)
...
...
backend/src/main/java/com/jh/radegast/api/RatingsStats.java
0 → 100644
View file @
06c69cea
package
com
.
jh
.
radegast
.
api
;
public
class
RatingsStats
{
public
RatingsStats
()
{
}
}
backend/src/main/java/com/jh/radegast/rating/RatingRepository.java
View file @
06c69cea
...
@@ -2,6 +2,7 @@ package com.jh.radegast.rating;
...
@@ -2,6 +2,7 @@ package com.jh.radegast.rating;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -21,6 +22,7 @@ public class RatingRepository extends AbstractHibernateRepository {
...
@@ -21,6 +22,7 @@ public class RatingRepository extends AbstractHibernateRepository {
}
}
for
(
Rating
r
:
ratings
)
{
for
(
Rating
r
:
ratings
)
{
r
.
setCreated
(
new
Date
(
Long
.
parseLong
(
r
.
getKey
())));
save
(
r
);
save
(
r
);
}
}
}
}
...
...
backend/src/main/resources/public/index.html
View file @
06c69cea
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment