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
0c22774d
Commit
0c22774d
authored
Oct 12, 2020
by
wuwz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
热门游
parent
cc7225dc
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
489 additions
and
445 deletions
+489
-445
TourTag.java
.../src/main/java/com/xxfc/platform/tour/entity/TourTag.java
+110
-107
TourTagBiz.java
.../src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
+276
-258
TourTagController.java
...n/java/com/xxfc/platform/tour/rest/TourTagController.java
+103
-80
No files found.
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/entity/TourTag.java
View file @
0c22774d
package
com
.
xxfc
.
platform
.
tour
.
entity
;
import
java.io.Serializable
;
import
java.util.List
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 旅游路线标签
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Data
@Table
(
name
=
"tour_tag"
)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
TourTag
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
/**
* 名称
*/
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
/**
* 图片
*/
@Column
(
name
=
"img"
)
@ApiModelProperty
(
value
=
"图片"
)
private
String
img
;
/**
* 描述
*/
@Column
(
name
=
"describe"
)
@ApiModelProperty
(
value
=
"描述"
)
private
String
describe
;
/**
* 链接
*/
@Column
(
name
=
"link"
)
@ApiModelProperty
(
value
=
"链接"
)
private
String
link
;
/**
* 是否热门:0-否;1-是
*/
@Column
(
name
=
"is_hot"
)
@ApiModelProperty
(
value
=
"是否热门:0-否;1-是"
)
private
Integer
isHot
;
/**
* 成单量
*/
@Column
(
name
=
"count"
)
@ApiModelProperty
(
value
=
"成单量"
)
private
Integer
count
;
/**
* 排序
*/
@Column
(
name
=
"rank"
)
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
rank
;
/**
* 创建时间
*/
@Column
(
name
=
"ctr_time"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Long
ctrTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 是否删除:0-正常;1-删除
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除:0-正常;1-删除"
)
private
Integer
isDel
;
}
package
com
.
xxfc
.
platform
.
tour
.
entity
;
import
java.io.Serializable
;
import
java.util.List
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 旅游路线标签
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Data
@Table
(
name
=
"tour_tag"
)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
TourTag
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
/**
* 名称
*/
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
/**
* 图片
*/
@Column
(
name
=
"img"
)
@ApiModelProperty
(
value
=
"图片"
)
private
String
img
;
/**
* 描述
*/
@Column
(
name
=
"describe"
)
@ApiModelProperty
(
value
=
"描述"
)
private
String
describe
;
/**
* 链接
*/
@Column
(
name
=
"link"
)
@ApiModelProperty
(
value
=
"链接"
)
private
String
link
;
/**
* 是否热门:0-否;1-是
*/
@Column
(
name
=
"is_hot"
)
@ApiModelProperty
(
value
=
"是否热门:0-否;1-是"
)
private
Integer
isHot
;
/**
* 成单量
*/
@Column
(
name
=
"count"
)
@ApiModelProperty
(
value
=
"成单量"
)
private
Integer
count
;
/**
* 排序
*/
@Column
(
name
=
"rank"
)
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
rank
;
/**
* 创建时间
*/
@Column
(
name
=
"ctr_time"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Long
ctrTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 是否删除:0-正常;1-删除
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除:0-正常;1-删除"
)
private
Integer
isDel
;
@Transient
private
List
<
TourGood
>
list
;
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
View file @
0c22774d
This diff is collapsed.
Click to expand it.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourTagController.java
View file @
0c22774d
package
com
.
xxfc
.
platform
.
tour
.
rest
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.xxfc.platform.tour.biz.TourTagBiz
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"tourTag"
)
public
class
TourTagController
extends
BaseController
<
TourTagBiz
,
TourTag
>
{
@Autowired
private
TourTagBiz
tagBiz
;
@GetMapping
(
"/app/unauth/getTagList"
)
public
ObjectRestResponse
getTagList
(
pageDTO
dto
){
if
(
dto
==
null
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
Integer
hot
=
dto
.
getHot
();
if
(
hot
==
1
){
List
<
TourTag
>
hotTag
=
tagBiz
.
getHotTag
();
return
ObjectRestResponse
.
succ
(
hotTag
);
}
PageDataVO
<
TourTag
>
all
=
tagBiz
.
findPage
(
BeanUtil
.
beanToMap
(
dto
));
return
ObjectRestResponse
.
succ
(
all
);
}
@Override
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
public
ObjectRestResponse
<
TourTag
>
update
(
@RequestBody
TourTag
tag
){
tagBiz
.
update
(
tag
);
return
new
ObjectRestResponse
<
TourTag
>();
}
@Override
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
public
ObjectRestResponse
<
TourTag
>
remove
(
@PathVariable
int
id
){
tagBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
TourTag
>();
}
@Data
public
class
pageDTO
extends
PageParam
{
@ApiModelProperty
(
"是否热门"
)
Integer
hot
;
}
@GetMapping
(
"/token"
)
public
ObjectRestResponse
apptoken
(
AppUserDTO
appUserDTO
){
return
ObjectRestResponse
.
succ
(
appUserDTO
);
}
package
com
.
xxfc
.
platform
.
tour
.
rest
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.xxfc.platform.tour.biz.TourTagBiz
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"tourTag"
)
public
class
TourTagController
extends
BaseController
<
TourTagBiz
,
TourTag
>
{
@Autowired
private
TourTagBiz
tagBiz
;
@GetMapping
(
"/app/unauth/getTagList"
)
public
ObjectRestResponse
getTagList
(
pageDTO
dto
){
if
(
dto
==
null
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
Integer
hot
=
dto
.
getHot
();
if
(
hot
==
1
){
List
<
TourTag
>
hotTag
=
tagBiz
.
getHotTag
();
return
ObjectRestResponse
.
succ
(
hotTag
);
}
PageDataVO
<
TourTag
>
all
=
tagBiz
.
findPage
(
BeanUtil
.
beanToMap
(
dto
));
return
ObjectRestResponse
.
succ
(
all
);
}
/**
* 标签带两条线路
* @param dto
* @return
*/
@GetMapping
(
"/app/unauth/getTagListAndGoods"
)
public
ObjectRestResponse
getTagListAndGoods
(
pageDTO
dto
){
if
(
dto
==
null
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
Integer
hot
=
dto
.
getHot
();
if
(
hot
==
1
){
List
<
TourTag
>
hotTag
=
tagBiz
.
getHotTagAndGoods
();
return
ObjectRestResponse
.
succ
(
hotTag
);
}
PageDataVO
<
TourTag
>
all
=
tagBiz
.
findPage
(
BeanUtil
.
beanToMap
(
dto
));
return
ObjectRestResponse
.
succ
(
all
);
}
@Override
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
public
ObjectRestResponse
<
TourTag
>
update
(
@RequestBody
TourTag
tag
){
tagBiz
.
update
(
tag
);
return
new
ObjectRestResponse
<
TourTag
>();
}
@Override
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
public
ObjectRestResponse
<
TourTag
>
remove
(
@PathVariable
int
id
){
tagBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
TourTag
>();
}
@Data
public
class
pageDTO
extends
PageParam
{
@ApiModelProperty
(
"是否热门"
)
Integer
hot
;
}
@GetMapping
(
"/token"
)
public
ObjectRestResponse
apptoken
(
AppUserDTO
appUserDTO
){
return
ObjectRestResponse
.
succ
(
appUserDTO
);
}
}
\ No newline at end of file
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