记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
d5ddd54e
Commit
d5ddd54e
authored
May 20, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banner参数特殊值0的必填判断 时间空的处理null
演出状态值 sort排序默认放在下面报错处理
parent
1df07d97
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
21 deletions
+40
-21
BannersParam.java
...a/com/liquidnet/service/kylin/dto/param/BannersParam.java
+5
-5
KylinBannersController.java
...dnet/service/kylin/controller/KylinBannersController.java
+1
-1
KylinPerformancesController.java
...service/kylin/controller/KylinPerformancesController.java
+2
-1
KylinBannersAdminController.java
...e/kylin/controller/admin/KylinBannersAdminController.java
+3
-3
KylinPerformancesServiceImpl.java
...vice/kylin/service/impl/KylinPerformancesServiceImpl.java
+1
-3
KylinBannersServiceImpl.java
...ice/kylin/service/impl/admin/KylinBannersServiceImpl.java
+28
-8
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/BannersParam.java
View file @
d5ddd54e
...
@@ -34,14 +34,14 @@ public class BannersParam implements Serializable {
...
@@ -34,14 +34,14 @@ public class BannersParam implements Serializable {
private
String
coverImg
;
private
String
coverImg
;
@ApiModelProperty
(
value
=
"跳转类型 具体类型有接口提供"
,
required
=
true
,
example
=
"6"
)
@ApiModelProperty
(
value
=
"跳转类型 具体类型有接口提供"
,
required
=
true
,
example
=
"6"
)
@Min
(
value
=
1
,
message
=
"请选择跳转类型"
)
@Min
(
value
=
0
,
message
=
"请选择跳转类型"
)
private
Integer
targetType
;
private
Integer
targetType
;
@ApiModelProperty
(
value
=
"跳转目标id或者url 不跳转则为空"
,
example
=
"https://img.zhengzai.tv/partner/2019/05/14/5cda2d0520177.png"
)
@ApiModelProperty
(
value
=
"跳转目标id或者url 不跳转则为空"
,
example
=
"https://img.zhengzai.tv/partner/2019/05/14/5cda2d0520177.png"
)
private
String
targetObj
;
private
String
targetObj
;
@ApiModelProperty
(
value
=
"是否上线展示 0下线 1上线"
,
required
=
true
,
example
=
"1"
,
allowableValues
=
"0,1"
)
@ApiModelProperty
(
value
=
"是否上线展示 0下线 1上线"
,
required
=
true
,
example
=
"1"
,
allowableValues
=
"0,1"
)
@Min
(
value
=
1
,
message
=
"请选择是否上线"
)
@Min
(
value
=
0
,
message
=
"请选择是否上线"
)
private
Integer
isOnline
;
private
Integer
isOnline
;
@ApiModelProperty
(
value
=
"上线开始时间"
,
example
=
"2021-05-01 11:22:33"
)
@ApiModelProperty
(
value
=
"上线开始时间"
,
example
=
"2021-05-01 11:22:33"
)
...
@@ -60,14 +60,14 @@ public class BannersParam implements Serializable {
...
@@ -60,14 +60,14 @@ public class BannersParam implements Serializable {
@ApiModelProperty
(
value
=
"备注"
,
example
=
"这是一个演出推广的banner"
)
@ApiModelProperty
(
value
=
"备注"
,
example
=
"这是一个演出推广的banner"
)
private
String
remarks
;
private
String
remarks
;
@ApiModelProperty
(
value
=
"展示的位置 多选 数组"
,
example
=
"[\"1\", \"
4\", \"
3\", \"5\", \"6\", \"8\"]"
)
@ApiModelProperty
(
value
=
"展示的位置 多选 数组"
,
example
=
"[\"1\", \"3\", \"5\", \"6\", \"8\"]"
)
@NotEmpty
(
message
=
"请选择展示位置"
)
@NotEmpty
(
message
=
"请选择展示位置"
)
private
List
positionList
;
private
List
positionList
;
@ApiModelProperty
(
value
=
"推广省份 多选 数组"
,
example
=
"[\"1
\", \"2\", \"5
\"]"
)
@ApiModelProperty
(
value
=
"推广省份 多选 数组"
,
example
=
"[\"1
10000\", \"120000\", \"210100
\"]"
)
private
List
provincesList
;
private
List
provincesList
;
@ApiModelProperty
(
value
=
"推广省份 多选 数组"
,
example
=
"[\"北京
\", \"天津\", \"上海
\"]"
)
@ApiModelProperty
(
value
=
"推广省份 多选 数组"
,
example
=
"[\"北京
市\", \"天津市\", \"沈阳市
\"]"
)
private
List
provincesNameList
;
private
List
provincesNameList
;
@JsonIgnore
@JsonIgnore
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinBannersController.java
View file @
d5ddd54e
...
@@ -34,7 +34,7 @@ public class KylinBannersController {
...
@@ -34,7 +34,7 @@ public class KylinBannersController {
@GetMapping
(
""
)
@GetMapping
(
""
)
@ApiOperation
(
"banner列表"
)
@ApiOperation
(
"banner列表"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"position"
,
value
=
"展示位置 1首页 3周边
4演出
5积分商城 6YB 8视频"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"position"
,
value
=
"展示位置 1首页 3周边 5积分商城 6YB 8视频"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"provinceName"
,
value
=
"城市名称"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"provinceName"
,
value
=
"城市名称"
),
})
})
public
ResponseDto
<
List
<
BannersVo
>>
blist
(
public
ResponseDto
<
List
<
BannersVo
>>
blist
(
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinPerformancesController.java
View file @
d5ddd54e
...
@@ -38,7 +38,8 @@ public class KylinPerformancesController {
...
@@ -38,7 +38,8 @@ public class KylinPerformancesController {
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"int"
,
name
=
"days"
,
value
=
"时间范围 几天 今天1 三天3。。。"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"int"
,
name
=
"days"
,
value
=
"时间范围 几天 今天1 三天3。。。"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"演出名称"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"演出名称"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"cityName"
,
value
=
"城市名称"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"cityName"
,
value
=
"城市名称"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"int"
,
name
=
"type"
,
value
=
"演出类型 1音乐节 2演唱会 3小型演出 4展览 6舞台剧"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"int"
,
name
=
"type"
,
value
=
"演出类型 101音乐节 102小型演出(livehouse演出) 103巡演 演出类型只有这几个了"
),
// @ApiImplicitParam(type = "query", dataType = "int", name = "type", value = "演出类型 1音乐节 2演唱会 3小型演出 4展览 6舞台剧"),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"isDiscount"
,
value
=
"是否会员优惠 0 1"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"isDiscount"
,
value
=
"是否会员优惠 0 1"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"isAdvance"
,
value
=
"是否优先 0 1"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"isAdvance"
,
value
=
"是否优先 0 1"
),
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/admin/KylinBannersAdminController.java
View file @
d5ddd54e
...
@@ -5,8 +5,8 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -5,8 +5,8 @@ import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.kylin.dao.BannerDetailsListDao
;
import
com.liquidnet.service.kylin.dao.BannerDetailsListDao
;
import
com.liquidnet.service.kylin.dto.param.BannersParam
;
import
com.liquidnet.service.kylin.dto.param.BannersParam
;
import
com.liquidnet.service.kylin.dto.param.BannersSearchParam
;
import
com.liquidnet.service.kylin.dto.param.BannersSearchParam
;
import
com.liquidnet.service.kylin.dto.vo.BannersVo
;
import
com.liquidnet.service.kylin.dto.vo.PagerVo
;
import
com.liquidnet.service.kylin.dto.vo.PagerVo
;
import
com.liquidnet.service.kylin.entity.KylinBanners
;
import
com.liquidnet.service.kylin.service.impl.admin.KylinBannersServiceImpl
;
import
com.liquidnet.service.kylin.service.impl.admin.KylinBannersServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -57,8 +57,8 @@ public class KylinBannersAdminController {
...
@@ -57,8 +57,8 @@ public class KylinBannersAdminController {
@GetMapping
(
"{bannersId}"
)
@GetMapping
(
"{bannersId}"
)
@ApiOperation
(
"banner详情"
)
@ApiOperation
(
"banner详情"
)
public
ResponseDto
<
KylinBanners
>
detail
(
@PathVariable
(
"bannersId"
)
String
bannersId
)
{
public
ResponseDto
<
BannersVo
>
detail
(
@PathVariable
(
"bannersId"
)
String
bannersId
)
{
KylinBanners
result
=
null
;
BannersVo
result
=
null
;
result
=
kylinBannersServiceImpl
.
detail
(
bannersId
);
result
=
kylinBannersServiceImpl
.
detail
(
bannersId
);
if
(
null
!=
result
)
{
if
(
null
!=
result
)
{
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinPerformancesServiceImpl.java
View file @
d5ddd54e
...
@@ -53,7 +53,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -53,7 +53,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
HashMap
<
String
,
Object
>
info
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
info
=
new
HashMap
<>();
// 排序 分页
// 排序 分页
Sort
sortName
=
null
;
// 默认开票越早的在上面
Sort
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"timeStart"
)
;
// 默认开票越早的在上面
if
(
sort
.
equals
(
"DESC"
))
{
if
(
sort
.
equals
(
"DESC"
))
{
if
(!
orderBy
.
isEmpty
())
{
if
(!
orderBy
.
isEmpty
())
{
sortName
=
Sort
.
by
(
Sort
.
Direction
.
DESC
,
orderBy
);
sortName
=
Sort
.
by
(
Sort
.
Direction
.
DESC
,
orderBy
);
...
@@ -62,8 +62,6 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -62,8 +62,6 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
if
(!
orderBy
.
isEmpty
())
{
if
(!
orderBy
.
isEmpty
())
{
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
orderBy
);
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
orderBy
);
}
}
}
else
{
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"timeStart"
);
}
}
Pageable
pageable
=
PageRequest
.
of
(
page
-
1
,
size
,
sortName
);
Pageable
pageable
=
PageRequest
.
of
(
page
-
1
,
size
,
sortName
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/admin/KylinBannersServiceImpl.java
View file @
d5ddd54e
...
@@ -68,6 +68,12 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -68,6 +68,12 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
String
bannersId
=
IDGenerator
.
nextSnowId
().
toString
();
String
bannersId
=
IDGenerator
.
nextSnowId
().
toString
();
LocalDateTime
createdAt
=
LocalDateTime
.
now
();
LocalDateTime
createdAt
=
LocalDateTime
.
now
();
String
createdAtString
=
createdAt
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
));
String
createdAtString
=
createdAt
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
));
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineStartTime
()))
{
bannersParam
.
setOnlineStartTime
(
null
);
}
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineEndTime
()))
{
bannersParam
.
setOnlineEndTime
(
null
);
}
// 入数据库
// 入数据库
bannersMapper
.
insert
(
bannersParam
.
getFields
(
bannersId
,
createdAtString
));
bannersMapper
.
insert
(
bannersParam
.
getFields
(
bannersId
,
createdAtString
));
...
@@ -101,7 +107,7 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -101,7 +107,7 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
bannersVo
.
setTargetObj
(
""
);
bannersVo
.
setTargetObj
(
""
);
}
}
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineStartTime
()))
{
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineStartTime
()))
{
bannersVo
.
setOnline
End
Time
(
""
);
bannersVo
.
setOnline
Start
Time
(
""
);
}
}
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineEndTime
()))
{
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineEndTime
()))
{
bannersVo
.
setOnlineEndTime
(
""
);
bannersVo
.
setOnlineEndTime
(
""
);
...
@@ -132,6 +138,12 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -132,6 +138,12 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
KylinBanners
params
=
bannersParam
.
getFields
(
null
,
null
);
KylinBanners
params
=
bannersParam
.
getFields
(
null
,
null
);
params
.
setUpdatedAt
(
updatedAtString
);
params
.
setUpdatedAt
(
updatedAtString
);
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineStartTime
()))
{
params
.
setOnlineStartTime
(
null
);
}
if
(
StringUtils
.
isNullOrEmpty
(
bannersParam
.
getOnlineEndTime
()))
{
params
.
setOnlineEndTime
(
null
);
}
// 入数据库
// 入数据库
bannersMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinBanners
>().
eq
(
"banners_id"
,
bannersId
));
bannersMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinBanners
>().
eq
(
"banners_id"
,
bannersId
));
...
@@ -181,15 +193,23 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -181,15 +193,23 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
}
}
}
}
public
KylinBanners
detail
(
String
bannersId
)
{
public
BannersVo
detail
(
String
bannersId
)
{
KylinBanners
data
=
bannersMapper
.
selectOne
(
new
UpdateWrapper
<
KylinBanners
>().
eq
(
"banners_id"
,
bannersId
).
eq
(
"is_deleted"
,
1
));
KylinBanners
data
=
bannersMapper
.
selectOne
(
new
UpdateWrapper
<
KylinBanners
>().
eq
(
"banners_id"
,
bannersId
).
eq
(
"is_deleted"
,
1
));
List
<
String
>
positionList
=
kylinBannersRelationsMapper
.
getBannersRelationsField
(
"field_id"
,
bannersId
,
1
);
BannersVo
bannersVo
=
new
BannersVo
();
List
<
String
>
provincesList
=
kylinBannersRelationsMapper
.
getBannersRelationsField
(
"field_id"
,
bannersId
,
2
);
if
(
null
!=
data
)
{
List
<
String
>
positionList
=
kylinBannersRelationsMapper
.
getBannersRelationsField
(
"field_id"
,
bannersId
,
1
);
data
.
setPositionList
(
positionList
);
List
<
String
>
provincesList
=
kylinBannersRelationsMapper
.
getBannersRelationsField
(
"field_id"
,
bannersId
,
2
);
data
.
setProvincesList
(
provincesList
);
data
.
setPositionList
(
positionList
);
data
.
setProvincesList
(
provincesList
);
bannersVo
=
new
BannersVo
();
BeanUtils
.
copyProperties
(
data
,
bannersVo
);
}
else
{
return
null
;
}
return
data
;
return
bannersVo
;
}
}
public
List
<
BannerDetailsListDao
>
bannerList
(
BannersSearchParam
bannersSearchParam
)
{
public
List
<
BannerDetailsListDao
>
bannerList
(
BannersSearchParam
bannersSearchParam
)
{
...
...
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