Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
e9a61fa8
Commit
e9a61fa8
authored
Jun 08, 2019
by
youjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改线路标签.banner和出游人信息表
parent
0361322c
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
192 additions
and
167 deletions
+192
-167
RedisKey.java
...rc/main/java/com/xxfc/platform/tour/comstnt/RedisKey.java
+20
-0
TourApplication.java
...src/main/java/com/xxfc/platform/tour/TourApplication.java
+2
-0
TourBannerBiz.java
...c/main/java/com/xxfc/platform/tour/biz/TourBannerBiz.java
+29
-0
TourTagBannerBiz.java
...ain/java/com/xxfc/platform/tour/biz/TourTagBannerBiz.java
+12
-0
TourTagBiz.java
.../src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
+52
-0
TourUserBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourUserBiz.java
+14
-0
TourTagMapper.java
...ain/java/com/xxfc/platform/tour/mapper/TourTagMapper.java
+1
-0
TourBannerController.java
...ava/com/xxfc/platform/tour/rest/TourBannerController.java
+29
-6
TourTagBannerController.java
.../com/xxfc/platform/tour/rest/TourTagBannerController.java
+2
-5
TourTagController.java
...n/java/com/xxfc/platform/tour/rest/TourTagController.java
+29
-10
TourUserController.java
.../java/com/xxfc/platform/tour/rest/TourUserController.java
+2
-3
TourBannerService.java
...ava/com/xxfc/platform/tour/service/TourBannerService.java
+0
-38
TourTagBannerService.java
.../com/xxfc/platform/tour/service/TourTagBannerService.java
+0
-23
TourTagService.java
...n/java/com/xxfc/platform/tour/service/TourTagService.java
+0
-56
TourUserService.java
.../java/com/xxfc/platform/tour/service/TourUserService.java
+0
-26
No files found.
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/comstnt/RedisKey.java
0 → 100644
View file @
e9a61fa8
package
com
.
xxfc
.
platform
.
tour
.
comstnt
;
public
class
RedisKey
{
/**
*旅游标签的前缀
*/
public
static
final
String
CONSTANT_CODE_PREFIX
=
"cache:Tag:"
;
/**
*旅游标签的key
*/
public
static
final
String
CONSTANT_CODE_PREFIX_HOTTAG
=
CONSTANT_CODE_PREFIX
+
"hotTag"
;
/**
*首页banner的key
*/
public
static
final
String
CONSTANT_CODE_PREFIX_BANNER
=
"cache:banner:"
;
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/TourApplication.java
View file @
e9a61fa8
...
@@ -6,6 +6,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
...
@@ -6,6 +6,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
...
@@ -16,6 +17,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
...
@@ -16,6 +17,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableAceAuthClient
@EnableAceAuthClient
@EnableFeignClients
({
"com.github.wxiaoqi.security.auth.client.feign"
,
"com.github.wxiaoqi.security.admin.feign"
,
"com.xxfc.platform.tour.feign"
})
@EnableFeignClients
({
"com.github.wxiaoqi.security.auth.client.feign"
,
"com.github.wxiaoqi.security.admin.feign"
,
"com.xxfc.platform.tour.feign"
})
@EnableAceCache
@EnableAceCache
@EnableCaching
@tk
.
mybatis
.
spring
.
annotation
.
MapperScan
(
basePackages
=
"com.xxfc.platform.tour.mapper"
)
@tk
.
mybatis
.
spring
.
annotation
.
MapperScan
(
basePackages
=
"com.xxfc.platform.tour.mapper"
)
public
class
TourApplication
{
public
class
TourApplication
{
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourBannerBiz.java
View file @
e9a61fa8
package
com
.
xxfc
.
platform
.
tour
.
biz
;
package
com
.
xxfc
.
platform
.
tour
.
biz
;
import
com.ace.cache.annotation.Cache
;
import
com.ace.cache.annotation.CacheClear
;
import
com.xxfc.platform.tour.comstnt.RedisKey
;
import
com.xxfc.platform.tour.mapper.TourBannerMapper
;
import
com.xxfc.platform.tour.mapper.TourBannerMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.util.List
;
/**
/**
* 首页banner图
* 首页banner图
*
*
...
@@ -15,5 +22,27 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -15,5 +22,27 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
@Service
@Service
public
class
TourBannerBiz
extends
BaseBiz
<
TourBannerMapper
,
TourBanner
>
{
public
class
TourBannerBiz
extends
BaseBiz
<
TourBannerMapper
,
TourBanner
>
{
@Autowired
private
RedisTemplate
redisTemplate
;
@Cache
(
key
=
RedisKey
.
CONSTANT_CODE_PREFIX_BANNER
)
public
List
<
TourBanner
>
findBannerList
()
{
TourBanner
banner
=
new
TourBanner
();
banner
.
setIsDel
(
0
);
return
mapper
.
findBannerListByisDelOrderByRank
(
banner
);
}
@CacheClear
(
key
=
RedisKey
.
CONSTANT_CODE_PREFIX_BANNER
)
public
void
update
(
TourBanner
banner
)
{
this
.
updateSelectiveById
(
banner
);
}
@CacheClear
(
key
=
RedisKey
.
CONSTANT_CODE_PREFIX_BANNER
)
public
void
remove
(
int
id
)
{
this
.
deleteById
(
id
);
}
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourTagBannerBiz.java
View file @
e9a61fa8
package
com
.
xxfc
.
platform
.
tour
.
biz
;
package
com
.
xxfc
.
platform
.
tour
.
biz
;
import
com.xxfc.platform.tour.mapper.TourTagBannerMapper
;
import
com.xxfc.platform.tour.mapper.TourTagBannerMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.tour.entity.TourTagBanner
;
import
com.xxfc.platform.tour.entity.TourTagBanner
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.util.List
;
/**
/**
* 标签轮播图
* 标签轮播图
*
*
...
@@ -15,4 +18,13 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -15,4 +18,13 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
*/
*/
@Service
@Service
public
class
TourTagBannerBiz
extends
BaseBiz
<
TourTagBannerMapper
,
TourTagBanner
>
{
public
class
TourTagBannerBiz
extends
BaseBiz
<
TourTagBannerMapper
,
TourTagBanner
>
{
public
List
<
TourTagBanner
>
findById
(
long
tid
)
{
TourTagBanner
tourTagBanner
=
new
TourTagBanner
();
tourTagBanner
.
setId
(
tid
);
tourTagBanner
.
setIsDel
(
0
);
return
mapper
.
select
(
tourTagBanner
);
}
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
View file @
e9a61fa8
package
com
.
xxfc
.
platform
.
tour
.
biz
;
package
com
.
xxfc
.
platform
.
tour
.
biz
;
import
com.ace.cache.annotation.Cache
;
import
com.ace.cache.annotation.CacheClear
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.comstnt.RedisKey
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.xxfc.platform.tour.mapper.TourTagMapper
;
import
com.xxfc.platform.tour.mapper.TourTagMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 旅游路线标签
* 旅游路线标签
*
*
...
@@ -15,4 +27,44 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -15,4 +27,44 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
*/
*/
@Service
@Service
public
class
TourTagBiz
extends
BaseBiz
<
TourTagMapper
,
TourTag
>
{
public
class
TourTagBiz
extends
BaseBiz
<
TourTagMapper
,
TourTag
>
{
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
TourTagBiz
tagBiz
;
@Cache
(
key
=
RedisKey
.
CONSTANT_CODE_PREFIX_HOTTAG
)
public
List
<
TourTag
>
getHotTag
()
{
TourTag
tag
=
new
TourTag
();
tag
.
setIsDel
(
0
);
tag
.
setIsHot
(
1
);
return
mapper
.
findHotListTag
(
tag
);
}
public
PageDataVO
<
TourTag
>
findAll
(
Map
map
)
{
TourTag
tag
=
new
TourTag
();
tag
.
setIsDel
(
0
);
return
PageDataVO
.
pageInfo
((
Integer
)
map
.
get
(
"page"
),(
Integer
)
map
.
get
(
"limit"
),()
->
mapper
.
findAllByIsDel
(
tag
));
}
@CacheClear
(
key
=
RedisKey
.
CONSTANT_CODE_PREFIX_HOTTAG
)
public
void
update
(
TourTag
banner
)
{
this
.
updateSelectiveById
(
banner
);
}
@CacheClear
(
key
=
RedisKey
.
CONSTANT_CODE_PREFIX_HOTTAG
)
public
void
remove
(
int
id
)
{
this
.
deleteById
(
id
);
}
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourUserBiz.java
View file @
e9a61fa8
package
com
.
xxfc
.
platform
.
tour
.
biz
;
package
com
.
xxfc
.
platform
.
tour
.
biz
;
import
com.xxfc.platform.tour.mapper.TourUserMapper
;
import
com.xxfc.platform.tour.mapper.TourUserMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.util.List
;
/**
/**
* 出游人信息表
* 出游人信息表
*
*
...
@@ -15,4 +18,15 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -15,4 +18,15 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
*/
*/
@Service
@Service
public
class
TourUserBiz
extends
BaseBiz
<
TourUserMapper
,
TourUser
>
{
public
class
TourUserBiz
extends
BaseBiz
<
TourUserMapper
,
TourUser
>
{
public
List
<
TourUser
>
getTourUser
(
Integer
id
,
Integer
isChild
)
{
TourUser
user
=
new
TourUser
();
user
.
setUserid
(
id
);
user
.
setIsdel
(
0
);
user
.
setIsChild
(
isChild
);
return
mapper
.
findListByTourUser
(
user
);
}
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourTagMapper.java
View file @
e9a61fa8
...
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository;
...
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 旅游路线标签
* 旅游路线标签
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourBannerController.java
View file @
e9a61fa8
package
com
.
xxfc
.
platform
.
tour
.
rest
;
package
com
.
xxfc
.
platform
.
tour
.
rest
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.tour.biz.TourBannerBiz
;
import
com.xxfc.platform.tour.biz.TourBannerBiz
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.xxfc.platform.tour.service.TourBannerService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
...
@@ -20,7 +19,7 @@ import java.util.List;
...
@@ -20,7 +19,7 @@ import java.util.List;
public
class
TourBannerController
extends
BaseController
<
TourBannerBiz
,
TourBanner
>
{
public
class
TourBannerController
extends
BaseController
<
TourBannerBiz
,
TourBanner
>
{
@Autowired
@Autowired
private
TourBanner
Service
bannerService
;
private
TourBanner
Biz
bannerBiz
;
/**
/**
...
@@ -30,10 +29,34 @@ public class TourBannerController extends BaseController<TourBannerBiz,TourBanne
...
@@ -30,10 +29,34 @@ public class TourBannerController extends BaseController<TourBannerBiz,TourBanne
@GetMapping
(
"/app/unauth/findBannerlist"
)
@GetMapping
(
"/app/unauth/findBannerlist"
)
public
ListRestResponse
findBannerlist
(){
public
ListRestResponse
findBannerlist
(){
List
<
TourBanner
>
bannerList
=
banner
Service
.
findBannerList
();
List
<
TourBanner
>
bannerList
=
banner
Biz
.
findBannerList
();
return
new
ListRestResponse
().
result
(
bannerList
).
count
(
bannerList
.
size
());
return
new
ListRestResponse
().
result
(
bannerList
).
count
(
bannerList
.
size
());
}
}
@Override
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
public
ObjectRestResponse
<
TourBanner
>
update
(
@RequestBody
TourBanner
banner
){
bannerBiz
.
update
(
banner
);
return
new
ObjectRestResponse
<
TourBanner
>();
}
@Override
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
public
ObjectRestResponse
<
TourBanner
>
remove
(
@PathVariable
int
id
){
bannerBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
TourBanner
>();
}
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourTagBannerController.java
View file @
e9a61fa8
...
@@ -4,9 +4,6 @@ import com.github.wxiaoqi.security.common.msg.ListRestResponse;
...
@@ -4,9 +4,6 @@ import com.github.wxiaoqi.security.common.msg.ListRestResponse;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.tour.biz.TourTagBannerBiz
;
import
com.xxfc.platform.tour.biz.TourTagBannerBiz
;
import
com.xxfc.platform.tour.entity.TourTagBanner
;
import
com.xxfc.platform.tour.entity.TourTagBanner
;
import
com.xxfc.platform.tour.service.TourTagBannerService
;
import
com.xxfc.platform.tour.service.TourTagService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -19,12 +16,12 @@ public class TourTagBannerController extends BaseController<TourTagBannerBiz,Tou
...
@@ -19,12 +16,12 @@ public class TourTagBannerController extends BaseController<TourTagBannerBiz,Tou
@Autowired
@Autowired
private
TourTagBanner
Service
tagBannerService
;
private
TourTagBanner
Biz
tagBannerBiz
;
@GetMapping
(
"/app/unauth/findById/{tid}"
)
@GetMapping
(
"/app/unauth/findById/{tid}"
)
public
ListRestResponse
findById
(
@PathVariable
long
tid
){
public
ListRestResponse
findById
(
@PathVariable
long
tid
){
List
<
TourTagBanner
>
tourTagBanners
=
tagBanner
Service
.
findById
(
tid
);
List
<
TourTagBanner
>
tourTagBanners
=
tagBanner
Biz
.
findById
(
tid
);
return
new
ListRestResponse
().
result
(
tourTagBanners
).
count
(
tourTagBanners
.
size
());
return
new
ListRestResponse
().
result
(
tourTagBanners
).
count
(
tourTagBanners
.
size
());
}
}
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourTagController.java
View file @
e9a61fa8
...
@@ -3,12 +3,11 @@ package com.xxfc.platform.tour.rest;
...
@@ -3,12 +3,11 @@ package com.xxfc.platform.tour.rest;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.
xxfc.platform.tour.biz.TourGoodTagBiz
;
import
com.
github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.biz.TourTagBiz
;
import
com.xxfc.platform.tour.biz.TourTagBiz
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
com.xxfc.platform.tour.entity.TourTagBanner
;
import
io.swagger.annotations.ApiOperation
;
import
com.xxfc.platform.tour.service.TourTagBannerService
;
import
com.xxfc.platform.tour.service.TourTagService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -20,28 +19,48 @@ import java.util.Map;
...
@@ -20,28 +19,48 @@ import java.util.Map;
public
class
TourTagController
extends
BaseController
<
TourTagBiz
,
TourTag
>
{
public
class
TourTagController
extends
BaseController
<
TourTagBiz
,
TourTag
>
{
@Autowired
@Autowired
private
TourTag
Service
tagService
;
private
TourTag
Biz
tagBiz
;
@GetMapping
(
"/app/unauth/getTagList"
)
@GetMapping
(
"/app/unauth/getTagList"
)
public
ListRestResponse
getTagList
(
@RequestBody
Map
map
){
public
ListRestResponse
getTagList
(
@RequestBody
Map
<
Object
,
Integer
>
map
){
if
(
map
==
null
||
map
.
keySet
().
size
()==
0
)
{
if
(
map
==
null
||
map
.
keySet
().
size
()==
0
)
{
new
ListRestResponse
<>().
result
(
"错误"
);
new
ListRestResponse
<>().
result
(
"错误"
);
}
}
int
hot
=
(
int
)
map
.
get
(
"hot"
);
Integer
hot
=
map
.
get
(
"hot"
);
if
(
hot
==
1
){
if
(
hot
==
1
){
List
<
TourTag
>
hotTag
=
tag
Service
.
getHotTag
();
List
<
TourTag
>
hotTag
=
tag
Biz
.
getHotTag
();
return
new
ListRestResponse
().
result
(
hotTag
).
count
(
hotTag
.
size
());
return
new
ListRestResponse
().
result
(
hotTag
).
count
(
hotTag
.
size
());
}
}
PageDataVO
<
TourTag
>
all
=
tagBiz
.
findAll
(
map
);
return
new
ListRestResponse
().
result
(
all
).
count
(
all
.
getData
().
size
());
}
@Override
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
public
ObjectRestResponse
<
TourTag
>
update
(
@RequestBody
TourTag
tag
){
tagBiz
.
update
(
tag
);
return
new
ObjectRestResponse
<
TourTag
>();
}
List
<
TourTag
>
Tags
=
tagService
.
findAll
(
map
);
return
new
ListRestResponse
().
result
(
Tags
).
count
(
Tags
.
size
());
@Override
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
public
ObjectRestResponse
<
TourTag
>
remove
(
@PathVariable
int
id
){
tagBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
TourTag
>();
}
}
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourUserController.java
View file @
e9a61fa8
...
@@ -6,7 +6,6 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
...
@@ -6,7 +6,6 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
import
com.xxfc.platform.tour.biz.TourUserBiz
;
import
com.xxfc.platform.tour.biz.TourUserBiz
;
import
com.xxfc.platform.tour.common.TourBaseController
;
import
com.xxfc.platform.tour.common.TourBaseController
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.service.TourUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -20,14 +19,14 @@ import java.util.List;
...
@@ -20,14 +19,14 @@ import java.util.List;
public
class
TourUserController
extends
TourBaseController
<
TourUserBiz
>
{
public
class
TourUserController
extends
TourBaseController
<
TourUserBiz
>
{
@Autowired
@Autowired
private
TourUser
Service
userService
;
private
TourUser
Biz
userBiz
;
@GetMapping
(
"/app/unauth/getTourUser/{isChild}"
)
@GetMapping
(
"/app/unauth/getTourUser/{isChild}"
)
public
ListRestResponse
getTourUser
(
@PathVariable
int
isChild
){
public
ListRestResponse
getTourUser
(
@PathVariable
int
isChild
){
// AppUserDTO userInfo = getUserInfo();
// AppUserDTO userInfo = getUserInfo();
// Integer id = userInfo.getId();
// Integer id = userInfo.getId();
Integer
id
=
14
;
Integer
id
=
14
;
List
<
TourUser
>
tourUsers
=
user
Service
.
getTourUser
(
id
,
isChild
);
List
<
TourUser
>
tourUsers
=
user
Biz
.
getTourUser
(
id
,
isChild
);
return
new
ListRestResponse
().
result
(
tourUsers
).
count
(
tourUsers
.
size
());
return
new
ListRestResponse
().
result
(
tourUsers
).
count
(
tourUsers
.
size
());
}
}
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/service/TourBannerService.java
deleted
100644 → 0
View file @
0361322c
package
com
.
xxfc
.
platform
.
tour
.
service
;
import
com.github.wxiaoqi.security.common.service.impl.BaseServiceImpl
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.xxfc.platform.tour.mapper.TourBannerMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author Administrator
*/
@Service
public
class
TourBannerService
extends
BaseServiceImpl
<
TourBannerMapper
,
TourBanner
>
{
@Autowired
private
TourBannerMapper
bannerMapper
;
@Autowired
private
RedisTemplate
redisTemplate
;
public
List
<
TourBanner
>
findBannerList
()
{
TourBanner
banner
=
new
TourBanner
();
banner
.
setIsDel
(
0
);
List
<
TourBanner
>
bannerList
=
(
List
<
TourBanner
>)
redisTemplate
.
opsForValue
().
get
(
"homeBanner"
);
if
(
bannerList
==
null
||
bannerList
.
size
()==
0
)
{
bannerList
=
bannerMapper
.
findBannerListByisDelOrderByRank
(
banner
);
redisTemplate
.
opsForValue
().
set
(
"homeBanner"
,
bannerList
);
}
return
bannerList
;
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/service/TourTagBannerService.java
deleted
100644 → 0
View file @
0361322c
package
com
.
xxfc
.
platform
.
tour
.
service
;
import
com.xxfc.platform.tour.biz.TourTagBannerBiz
;
import
com.xxfc.platform.tour.entity.TourTagBanner
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
TourTagBannerService
{
@Autowired
private
TourTagBannerBiz
tagBannerBiz
;
public
List
<
TourTagBanner
>
findById
(
long
tid
)
{
TourTagBanner
tourTagBanner
=
new
TourTagBanner
();
tourTagBanner
.
setId
(
tid
);
tourTagBanner
.
setIsDel
(
0
);
return
tagBannerBiz
.
selectList
(
tourTagBanner
);
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/service/TourTagService.java
deleted
100644 → 0
View file @
0361322c
package
com
.
xxfc
.
platform
.
tour
.
service
;
import
com.github.pagehelper.PageInfo
;
import
com.xxfc.platform.tour.biz.TourTagBiz
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
com.xxfc.platform.tour.mapper.TourTagMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
java.awt.print.Pageable
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
TourTagService
{
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
TourTagMapper
tagMapper
;
@Autowired
private
TourTagBiz
tagBiz
;
public
List
<
TourTag
>
getHotTag
()
{
List
<
TourTag
>
hotTagList
=
(
List
<
TourTag
>)
redisTemplate
.
opsForValue
().
get
(
"hotTag"
);
if
(
hotTagList
==
null
||
hotTagList
.
size
()==
0
)
{
System
.
out
.
println
(
"mysql"
);
TourTag
tag
=
new
TourTag
();
tag
.
setIsDel
(
0
);
tag
.
setIsHot
(
1
);
List
<
TourTag
>
tagList
=
tagMapper
.
findHotListTag
(
tag
);
redisTemplate
.
opsForValue
().
set
(
"hotTag"
,
tagList
);
}
return
hotTagList
;
}
public
List
<
TourTag
>
findAll
(
Map
map
)
{
TourTag
tagBanner
=
new
TourTag
();
tagBanner
.
setIsDel
(
0
);
return
tagMapper
.
findAllByIsDel
(
tagBanner
);
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/service/TourUserService.java
deleted
100644 → 0
View file @
0361322c
package
com
.
xxfc
.
platform
.
tour
.
service
;
import
com.github.wxiaoqi.security.admin.biz.UserBiz
;
import
com.xxfc.platform.tour.biz.TourUserBiz
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.mapper.TourUserMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
TourUserService
{
@Autowired
private
TourUserMapper
userMapper
;
public
List
<
TourUser
>
getTourUser
(
Integer
id
,
Integer
isChild
)
{
TourUser
user
=
new
TourUser
();
user
.
setUserid
(
id
);
user
.
setIsdel
(
0
);
user
.
setIsChild
(
isChild
);
return
userMapper
.
findListByTourUser
(
user
);
}
}
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