Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saasio
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
reyun
saasio
Commits
d07ba824
Commit
d07ba824
authored
6 years ago
by
carrieyzzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appkey param
parent
4afbb013
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
EventController.java
src/main/java/com/reyun/controller/EventController.java
+12
-0
AppRepository.java
src/main/java/com/reyun/repository/AppRepository.java
+3
-0
AuthorizationInterceptor.java
.../reyun/security/interceptor/AuthorizationInterceptor.java
+1
-1
No files found.
src/main/java/com/reyun/controller/EventController.java
View file @
d07ba824
package
com
.
reyun
.
controller
;
import
com.reyun.model.Account
;
import
com.reyun.model.App
;
import
com.reyun.model.Event4Web
;
import
com.reyun.model.VirtualEvent
;
import
com.reyun.repository.AppRepository
;
import
com.reyun.security.annotation.CurrentAccount
;
import
com.reyun.service.EventService
;
import
com.reyun.service.VirtualEventService
;
...
...
@@ -29,6 +31,9 @@ public class EventController {
@Autowired
private
VirtualEventService
virtualService
;
@Autowired
private
AppRepository
appRepository
;
@RequestMapping
(
value
=
"find/param"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findAll
(
@PathVariable
Long
app
,
@RequestParam
String
names
,
@RequestParam
(
required
=
false
)
String
params
)
throws
JSONException
{
...
...
@@ -92,6 +97,13 @@ public class EventController {
}
@ResponseBody
@RequestMapping
(
value
=
"find4tracking"
,
method
=
RequestMethod
.
GET
)
public
ResultModel
findAllEvent4Tracking
(
@PathVariable
Long
app
,
@RequestParam
String
appkey
)
{
App
appObject
=
appRepository
.
findByAppkey
(
appkey
);
return
ResultModel
.
OK
(
eventService
.
listAllEvent
(
appObject
.
getId
()));
}
@ResponseBody
@RequestMapping
(
value
=
"find/callback"
,
method
=
RequestMethod
.
GET
)
public
ResultModel
findAllEventToCallback
(
@PathVariable
Long
app
)
{
return
ResultModel
.
OK
(
eventService
.
listAllEventToCallback
(
app
));
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/repository/AppRepository.java
View file @
d07ba824
...
...
@@ -37,4 +37,7 @@ public interface AppRepository extends JpaRepository<App, Long>
@Query
(
value
=
"select categoryname from category where categoryid=(select app_genre from app where id=?1);"
,
nativeQuery
=
true
)
String
findAppGenreNameByAppID
(
Long
id
);
@Query
(
value
=
"select * from app where appkey = ?1"
,
nativeQuery
=
true
)
App
findByAppkey
(
String
appkeys
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/security/interceptor/AuthorizationInterceptor.java
View file @
d07ba824
...
...
@@ -81,7 +81,7 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
||
request
.
getRequestURL
().
indexOf
(
"external/download"
)
!=
-
1
||
request
.
getRequestURL
().
indexOf
(
"openapi/toutiao"
)
!=
-
1
// || request.getRequestURL().indexOf("event/find") != -1
||
request
.
getRequestURI
().
endsWith
(
"event/find"
)
||
request
.
getRequestURI
().
endsWith
(
"event/find
4tracking
"
)
||
request
.
getRequestURI
().
startsWith
(
"/api/reged"
)
||
request
.
getRequestURI
().
startsWith
(
"/api/demo"
)
||
request
.
getRequestURI
().
startsWith
(
"/api/messagecode"
)
...
...
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