Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
b5a17c2b
Commit
b5a17c2b
authored
Oct 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEL] delete cache service interface
parent
cbd872cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
29 deletions
+13
-29
CacheController.java
...ain/java/pwc/taxtech/atms/controller/CacheController.java
+7
-7
CacheService.java
.../src/main/java/pwc/taxtech/atms/service/CacheService.java
+0
-12
CacheServiceImpl.java
.../java/pwc/taxtech/atms/service/impl/CacheServiceImpl.java
+6
-10
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CacheController.java
View file @
b5a17c2b
package
pwc
.
taxtech
.
atms
.
controller
;
import
java.util.List
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -9,21 +8,22 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.dto.CacheDto
;
import
pwc.taxtech.atms.service.CacheService
;
import
pwc.taxtech.atms.service.impl.CacheServiceImpl
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/api/v1/cache/"
)
public
class
CacheController
{
@Autowired
private
CacheService
cacheService
;
private
CacheService
Impl
cacheService
;
@ApiOperation
(
value
=
"Get all cache"
)
@RequestMapping
(
value
=
"getallcache"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
CacheDto
>
getAllCache
()
{
public
@ResponseBody
List
<
CacheDto
>
getAllCache
()
{
return
cacheService
.
getAllCache
();
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/CacheService.java
deleted
100644 → 0
View file @
cbd872cb
package
pwc
.
taxtech
.
atms
.
service
;
import
java.util.List
;
import
pwc.taxtech.atms.dto.CacheDto
;
public
interface
CacheService
{
List
<
CacheDto
>
getAllCache
();
CacheDto
getCacheByKey
(
String
cacheKey
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CacheServiceImpl.java
View file @
b5a17c2b
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonUtils
.
copyProperties
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.dao.CacheMapper
;
import
pwc.taxtech.atms.dto.CacheDto
;
import
pwc.taxtech.atms.entity.Cache
;
import
pwc.taxtech.atms.entity.CacheExample
;
import
pwc.taxtech.atms.service.CacheService
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonUtils
.
copyProperties
;
@Service
public
class
CacheServiceImpl
implements
CacheService
{
public
class
CacheServiceImpl
{
@Autowired
private
CacheMapper
cacheMapper
;
@Override
public
List
<
CacheDto
>
getAllCache
()
{
List
<
Cache
>
list
=
cacheMapper
.
selectByExample
(
null
);
return
list
.
stream
().
map
(
this
::
convertToCacheDto
).
collect
(
Collectors
.
toList
());
}
@Override
public
CacheDto
getCacheByKey
(
String
cacheKey
)
{
CacheExample
example
=
new
CacheExample
();
example
.
createCriteria
().
andCacheKeyEqualTo
(
cacheKey
);
...
...
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