记得上下班打卡 | 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
8f091dc8
Commit
8f091dc8
authored
Dec 16, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TFC 接口提交
parent
4af599b9
Changes
48
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
3228 additions
and
55 deletions
+3228
-55
SweetConstant.java
...a/com/liquidnet/service/sweet/constant/SweetConstant.java
+8
-1
ISweetManualArtistsTFCService.java
.../service/sweet/service/ISweetManualArtistsTFCService.java
+29
-0
ISweetManualNotifyTFCService.java
...t/service/sweet/service/ISweetManualNotifyTFCService.java
+27
-0
ISweetManualShopTFCService.java
...net/service/sweet/service/ISweetManualShopTFCService.java
+28
-0
ISweetManualSortTFCService.java
...net/service/sweet/service/ISweetManualSortTFCService.java
+20
-0
ISweetManualTFCService.java
...quidnet/service/sweet/service/ISweetManualTFCService.java
+30
-0
ISweetRichtextTFCService.java
...idnet/service/sweet/service/ISweetRichtextTFCService.java
+22
-0
ISweetUserRelationTFCService.java
...t/service/sweet/service/ISweetUserRelationTFCService.java
+17
-0
SweetManualShopTFCAllVo.java
...m/liquidnet/service/sweet/vo/SweetManualShopTFCAllVo.java
+30
-0
application-dev.yml
liquidnet-bus-config/liquidnet-config/application-dev.yml
+2
-2
SweetManualAppletTFCDto.java
.../liquidnet/service/sweet/dto/SweetManualAppletTFCDto.java
+50
-0
SweetManualArtistList2TFCDto.java
...idnet/service/sweet/dto/SweetManualArtistList2TFCDto.java
+23
-0
SweetManualArtistListTFCDto.java
...uidnet/service/sweet/dto/SweetManualArtistListTFCDto.java
+51
-0
SweetManualArtistStageListTFCDto.java
...t/service/sweet/dto/SweetManualArtistStageListTFCDto.java
+19
-0
SweetManualTFCDto.java
...va/com/liquidnet/service/sweet/dto/SweetManualTFCDto.java
+42
-0
SweetManualArtistsTFC.java
...liquidnet/service/sweet/entity/SweetManualArtistsTFC.java
+91
-0
SweetManualNotifyTFC.java
.../liquidnet/service/sweet/entity/SweetManualNotifyTFC.java
+71
-0
SweetManualShopTFC.java
...om/liquidnet/service/sweet/entity/SweetManualShopTFC.java
+91
-0
SweetManualSortTFC.java
...om/liquidnet/service/sweet/entity/SweetManualSortTFC.java
+56
-0
SweetManualTFC.java
...va/com/liquidnet/service/sweet/entity/SweetManualTFC.java
+66
-0
SweetRichtextTFC.java
.../com/liquidnet/service/sweet/entity/SweetRichtextTFC.java
+81
-0
SweetUserRelationTFC.java
.../liquidnet/service/sweet/entity/SweetUserRelationTFC.java
+64
-0
SweetManualArtistsTFCMapper.xml
...dnet.service.sweet.mapper/SweetManualArtistsTFCMapper.xml
+73
-0
SweetManualNotifyTFCMapper.xml
...idnet.service.sweet.mapper/SweetManualNotifyTFCMapper.xml
+5
-0
SweetManualShopTFCMapper.xml
...quidnet.service.sweet.mapper/SweetManualShopTFCMapper.xml
+5
-0
SweetManualSortTFCMapper.xml
...quidnet.service.sweet.mapper/SweetManualSortTFCMapper.xml
+5
-0
SweetManualTFCMapper.xml
...m.liquidnet.service.sweet.mapper/SweetManualTFCMapper.xml
+187
-0
SweetRichtextTFCMapper.xml
...liquidnet.service.sweet.mapper/SweetRichtextTFCMapper.xml
+5
-0
SweetUserRelationTFCMapper.xml
...idnet.service.sweet.mapper/SweetUserRelationTFCMapper.xml
+5
-0
db_sweetsugar_structure.sql
.../liquidnet-service-sweet/docu/db_sweetsugar_structure.sql
+188
-0
SweetAppletTFCController.java
...et/service/sweet/controller/SweetAppletTFCController.java
+324
-0
SweetManualArtistsTFCController.java
...ice/sweet/controller/SweetManualArtistsTFCController.java
+108
-0
SweetManualNotifyTFCController.java
...vice/sweet/controller/SweetManualNotifyTFCController.java
+92
-0
SweetManualShopTFCController.java
...ervice/sweet/controller/SweetManualShopTFCController.java
+108
-0
SweetManualSortTFCController.java
...ervice/sweet/controller/SweetManualSortTFCController.java
+51
-0
SweetManualTFCController.java
...et/service/sweet/controller/SweetManualTFCController.java
+76
-0
SweetRichtextTFCController.java
.../service/sweet/controller/SweetRichtextTFCController.java
+75
-0
SweetUserRelationController.java
...service/sweet/controller/SweetUserRelationController.java
+0
-20
SweetUserRelationMdskController.java
...ice/sweet/controller/SweetUserRelationMdskController.java
+0
-20
SweetManualArtistsTFCServiceImpl.java
.../sweet/service/impl/SweetManualArtistsTFCServiceImpl.java
+125
-0
SweetManualNotifyTFCServiceImpl.java
...e/sweet/service/impl/SweetManualNotifyTFCServiceImpl.java
+121
-0
SweetManualShopTFCServiceImpl.java
...ice/sweet/service/impl/SweetManualShopTFCServiceImpl.java
+105
-0
SweetManualSortTFCServiceImpl.java
...ice/sweet/service/impl/SweetManualSortTFCServiceImpl.java
+64
-0
SweetManualTFCServiceImpl.java
...service/sweet/service/impl/SweetManualTFCServiceImpl.java
+129
-0
SweetRichtextTFCServiceImpl.java
...rvice/sweet/service/impl/SweetRichtextTFCServiceImpl.java
+91
-0
SweetUserRelationTFCServiceImpl.java
...e/sweet/service/impl/SweetUserRelationTFCServiceImpl.java
+20
-0
ObjectUtil.java
...in/java/com/liquidnet/service/sweet/utils/ObjectUtil.java
+27
-12
RedisTFCDataUtils.java
.../com/liquidnet/service/sweet/utils/RedisTFCDataUtils.java
+321
-0
No files found.
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/constant/SweetConstant.java
View file @
8f091dc8
...
...
@@ -23,9 +23,16 @@ public class SweetConstant {
public
final
static
String
REDIS_KEY_SWEET_MDSK_MANUAL_RICH_TEXT
=
"sweet:mdsk:manual:richText:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MDSK_MANUAL_SORT
=
"sweet:mdsk:manual:sort:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MDSK_ARTISTS_RELATION
=
"sweet:mdsk:artists:relation:uid:"
;
public
final
static
String
REDIS_KEY_SWEET_MDSK_ARTISTS_DETAILS
=
"sweet:mdsk:artists:details:"
;
public
final
static
String
REDIS_KEY_SWEET_MDSK_SHOP
=
"sweet:mdsk:artists:shop:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST
=
"sweet:mdsk:manual:pushList"
;
public
final
static
String
REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST
=
"sweet:mdsk:manual:timeList:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_TFC_MANUAL_NOTIFY_LIST
=
"sweet:mdsk:manual:notify:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_TFC_MANUAL_RICH_TEXT
=
"sweet:mdsk:manual:richText:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_TFC_MANUAL_SORT
=
"sweet:mdsk:manual:sort:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_TFC_ARTISTS_RELATION
=
"sweet:mdsk:artists:relation:uid:"
;
public
final
static
String
REDIS_KEY_SWEET_TFC_SHOP
=
"sweet:mdsk:artists:shop:manual:"
;
// 积分活动
public
static
final
String
REDIS_KEY_SWEET_INTEGRAL_ACTIVITY_LIST
=
"sweet:integralActivity:list"
;
public
static
final
String
REDIS_KEY_SWEET_INTEGRAL_ACTIVITY_INFO
=
"sweet:integralActivity:activityId:"
;
...
...
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetManualArtistsTFCService.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListMDSKDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto
;
import
com.liquidnet.service.sweet.entity.SweetManualArtistsMdsk
;
import
com.liquidnet.service.sweet.entity.SweetManualArtistsTFC
;
/**
* <p>
* 电子宣传手册艺人表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public
interface
ISweetManualArtistsTFCService
extends
IService
<
SweetManualArtistsTFC
>
{
ResponseDto
<
PageInfo
<
SweetManualArtistListTFCDto
>>
getList
(
Integer
page
,
Integer
size
,
String
manualId
);
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
artistId
,
String
stageId
,
String
performanceStart
,
String
performanceEnd
,
String
signatureStart
,
String
signatureEnd
);
ResponseDto
<
SweetManualArtistListTFCDto
>
details
(
String
manualRelationId
);
ResponseDto
<
Boolean
>
change
(
String
manualRelationId
,
String
manualId
,
String
artistId
,
String
stageId
,
String
performanceStart
,
String
performanceEnd
,
String
signatureStart
,
String
signatureEnd
);
ResponseDto
<
Boolean
>
delete
(
String
manualRelationId
,
String
manualId
);
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetManualNotifyTFCService.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualNotifyMdsk
;
import
com.liquidnet.service.sweet.entity.SweetManualNotifyTFC
;
/**
* <p>
* 电子宣传手册通知表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public
interface
ISweetManualNotifyTFCService
extends
IService
<
SweetManualNotifyTFC
>
{
ResponseDto
<
PageInfo
<
SweetManualNotifyTFC
>>
getList
(
Integer
page
,
Integer
size
,
String
title
,
String
manualId
);
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
title
,
String
content
);
ResponseDto
<
SweetManualNotifyTFC
>
details
(
String
manualId
);
ResponseDto
<
Boolean
>
change
(
String
manualId
,
String
manualNotifyId
,
String
title
,
String
content
);
ResponseDto
<
Boolean
>
delete
(
String
manualId
);
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetManualShopTFCService.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualShopMdsk
;
import
com.liquidnet.service.sweet.entity.SweetManualShopTFC
;
import
java.util.List
;
/**
* <p>
* 电子宣传手册商铺表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public
interface
ISweetManualShopTFCService
extends
IService
<
SweetManualShopTFC
>
{
ResponseDto
<
List
<
SweetManualShopTFC
>>
getList
(
String
manualId
,
Integer
type
);
ResponseDto
<
SweetManualShopTFC
>
details
(
String
manualShopId
);
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
title
,
String
picUrl
,
String
describe
,
Integer
type
,
Integer
isRecommend
,
Integer
sort
);
ResponseDto
<
Boolean
>
change
(
String
manualShopId
,
String
manualId
,
String
title
,
String
picUrl
,
String
describe
,
Integer
type
,
Integer
isRecommend
,
Integer
sort
);
ResponseDto
<
Boolean
>
delete
(
String
manualShopId
,
String
manualId
);
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetManualSortTFCService.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualSortMdsk
;
import
com.liquidnet.service.sweet.entity.SweetManualSortTFC
;
/**
* <p>
* 电子宣传手册显示内容表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public
interface
ISweetManualSortTFCService
extends
IService
<
SweetManualSortTFC
>
{
ResponseDto
<
SweetManualSortTFC
>
get
(
String
manualId
);
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
content
);
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetManualTFCService.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualMDSKDto
;
import
com.liquidnet.service.sweet.dto.SweetManualTFCDto
;
import
com.liquidnet.service.sweet.entity.SweetManualMdsk
;
import
com.liquidnet.service.sweet.entity.SweetManualTFC
;
/**
* <p>
* 电子宣传手册表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public
interface
ISweetManualTFCService
extends
IService
<
SweetManualTFC
>
{
ResponseDto
<
PageInfo
<
SweetManualTFCDto
>>
getManualList
(
int
page
,
int
size
,
String
name
);
ResponseDto
<
SweetManualTFCDto
>
details
(
String
manualId
);
//关闭开启
ResponseDto
<
Boolean
>
changeStatus
(
String
manualId
,
String
performancesId
,
Integer
status
);
//发布与否
ResponseDto
<
Boolean
>
changeRelease
(
String
manualId
,
Integer
isRelease
);
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetRichtextTFCService.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetRichtextMdsk
;
import
com.liquidnet.service.sweet.entity.SweetRichtextTFC
;
/**
* <p>
* 电子宣传手册富文本表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public
interface
ISweetRichtextTFCService
extends
IService
<
SweetRichtextTFC
>
{
ResponseDto
<
SweetRichtextTFC
>
get
(
String
manualId
,
Integer
type
);
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
details
,
String
local
,
String
pirUrl
,
Integer
type
);
ResponseDto
<
Boolean
>
change
(
String
manualId
,
String
details
,
String
local
,
String
pirUrl
,
Integer
type
);
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetUserRelationTFCService.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.liquidnet.service.sweet.entity.SweetUserRelationMdsk
;
import
com.liquidnet.service.sweet.entity.SweetUserRelationTFC
;
/**
* <p>
* 用户 收藏/喜欢等状态 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public
interface
ISweetUserRelationTFCService
extends
IService
<
SweetUserRelationTFC
>
{
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/vo/SweetManualShopTFCAllVo.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
vo
;
import
com.liquidnet.service.sweet.entity.SweetManualShopMdsk
;
import
com.liquidnet.service.sweet.entity.SweetManualShopTFC
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
@ApiModel
public
class
SweetManualShopTFCAllVo
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
"推荐"
)
private
List
<
SweetManualShopTFC
>
recommend
;
@ApiModelProperty
(
"吃喝"
)
private
List
<
SweetManualShopTFC
>
eat
;
@ApiModelProperty
(
"玩乐"
)
private
List
<
SweetManualShopTFC
>
play
;
private
static
final
SweetManualShopTFCAllVo
obj
=
new
SweetManualShopTFCAllVo
();
public
static
SweetManualShopTFCAllVo
getNew
()
{
try
{
return
(
SweetManualShopTFCAllVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualShopTFCAllVo
();
}
}
}
liquidnet-bus-config/liquidnet-config/application-dev.yml
View file @
8f091dc8
...
...
@@ -45,8 +45,8 @@ liquidnet:
password
:
3Xa%8p
sweet
:
dbs
:
0,16
database
:
25
5
host
:
15
database
:
1
5
host
:
39.107.71.112
port
:
6379
password
:
3Xa%8p
adam
:
...
...
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/dto/SweetManualAppletTFCDto.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@ApiModel
public
class
SweetManualAppletTFCDto
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
"电子手册id"
)
private
String
manualId
;
@ApiModelProperty
(
"演出id"
)
private
String
performancesId
;
@ApiModelProperty
(
"演出标题"
)
private
String
title
;
@ApiModelProperty
(
"场地id"
)
private
String
fieldId
;
@ApiModelProperty
(
"场地名称"
)
private
String
fieldName
;
@ApiModelProperty
(
"城市名称"
)
private
String
cityName
;
@ApiModelProperty
(
"演出开始时间"
)
private
String
timeStart
;
@ApiModelProperty
(
"演出结束时间"
)
private
String
timeEnd
;
@ApiModelProperty
(
"演出开售时间"
)
private
String
timeSell
;
@ApiModelProperty
(
"是否会员"
)
private
Integer
isMember
;
@ApiModelProperty
(
"提前时间"
)
private
Integer
payCountdownMinute
;
@ApiModelProperty
(
"经度"
)
private
String
longitude
;
@ApiModelProperty
(
"纬度"
)
private
String
latitude
;
private
static
final
SweetManualAppletTFCDto
obj
=
new
SweetManualAppletTFCDto
();
public
static
SweetManualAppletTFCDto
getNew
()
{
try
{
return
(
SweetManualAppletTFCDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualAppletTFCDto
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/dto/SweetManualArtistList2TFCDto.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
SweetManualArtistList2TFCDto
implements
Serializable
,
Cloneable
{
private
List
<
SweetManualArtistListTFCDto
>
data
;
private
List
<
String
>
date
;
private
List
<
SweetManualArtistStageListTFCDto
>
stage
;
private
Integer
total
;
private
static
final
SweetManualArtistList2TFCDto
obj
=
new
SweetManualArtistList2TFCDto
();
public
static
SweetManualArtistList2TFCDto
getNew
()
{
try
{
return
(
SweetManualArtistList2TFCDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualArtistList2TFCDto
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/dto/SweetManualArtistListTFCDto.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@ApiModel
public
class
SweetManualArtistListTFCDto
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
8382714055996962257L
;
@ApiModelProperty
(
"电子手册关联id"
)
private
String
manualRelationId
;
@ApiModelProperty
(
"艺人id"
)
private
String
artistId
;
@ApiModelProperty
(
"艺人名称"
)
private
String
name
;
@ApiModelProperty
(
"拼音"
)
private
String
pinyin
;
@ApiModelProperty
(
"简介"
)
private
String
describes
;
@ApiModelProperty
(
"头像图片"
)
private
String
picUrl
;
@ApiModelProperty
(
"舞台id"
)
private
String
stageId
;
@ApiModelProperty
(
"舞台名称"
)
private
String
title
;
@ApiModelProperty
(
"演出开始"
)
private
String
performanceStart
;
@ApiModelProperty
(
"演出结束"
)
private
String
performanceEnd
;
@ApiModelProperty
(
"签售开始"
)
private
String
signatureStart
;
@ApiModelProperty
(
"签售结束"
)
private
String
signatureEnd
;
@ApiModelProperty
(
"是否观看"
)
private
Integer
isWatch
;
@ApiModelProperty
(
"是否登记"
)
private
Integer
isSign
;
private
static
final
SweetManualArtistListTFCDto
obj
=
new
SweetManualArtistListTFCDto
();
public
static
SweetManualArtistListTFCDto
getNew
()
{
try
{
return
(
SweetManualArtistListTFCDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualArtistListTFCDto
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/dto/SweetManualArtistStageListTFCDto.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
SweetManualArtistStageListTFCDto
implements
Serializable
,
Cloneable
{
private
String
title
;
private
static
final
SweetManualArtistStageListTFCDto
obj
=
new
SweetManualArtistStageListTFCDto
();
public
static
SweetManualArtistStageListTFCDto
getNew
()
{
try
{
return
(
SweetManualArtistStageListTFCDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualArtistStageListTFCDto
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/dto/SweetManualTFCDto.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@ApiModel
public
class
SweetManualTFCDto
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
"电子手册id"
)
private
String
manualId
;
@ApiModelProperty
(
"演出id"
)
private
String
performancesId
;
@ApiModelProperty
(
"演出名称"
)
private
String
title
;
@ApiModelProperty
(
"演出开始时间"
)
private
String
timeStart
;
@ApiModelProperty
(
"演出结束时间"
)
private
String
timeEnd
;
@ApiModelProperty
(
"售卖时间"
)
private
String
timeSell
;
@ApiModelProperty
(
"停售时间"
)
private
String
timeStop
;
@ApiModelProperty
(
"状态"
)
private
Integer
status
;
@ApiModelProperty
(
"手册状态"
)
private
Integer
manualStatus
;
@ApiModelProperty
(
"是否发布"
)
private
Integer
isRelease
;
private
static
final
SweetManualTFCDto
obj
=
new
SweetManualTFCDto
();
public
static
SweetManualTFCDto
getNew
()
{
try
{
return
(
SweetManualTFCDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualTFCDto
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetManualArtistsTFC.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册艺人表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetManualArtistsTFC
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* manual_relation_id
*/
private
String
manualRelationId
;
/**
* 电子宣传手册id
*/
private
String
manualId
;
/**
* 关联id
*/
private
String
stageId
;
/**
* 关联id
*/
private
String
artistsId
;
/**
* 演出开始时间
*/
private
LocalDateTime
performanceStart
;
/**
* 演出结束时间
*/
private
LocalDateTime
performanceEnd
;
/**
* 签收开始时间
*/
private
LocalDateTime
signatureStart
;
/**
* 签收结束时间
*/
private
LocalDateTime
signatureEnd
;
/**
* 0关闭 1开启
*/
private
Integer
status
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
private
static
final
SweetManualArtistsTFC
obj
=
new
SweetManualArtistsTFC
();
public
static
SweetManualArtistsTFC
getNew
()
{
try
{
return
(
SweetManualArtistsTFC
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualArtistsTFC
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetManualNotifyTFC.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册通知表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetManualNotifyTFC
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* manual_notify_id
*/
private
String
manualNotifyId
;
/**
* 电子宣传手册id
*/
private
String
manualId
;
/**
* 标题
*/
private
String
title
;
/**
* 内容
*/
private
String
content
;
/**
* 0关闭 1开启
*/
private
Integer
status
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
private
static
final
SweetManualNotifyTFC
obj
=
new
SweetManualNotifyTFC
();
public
static
SweetManualNotifyTFC
getNew
()
{
try
{
return
(
SweetManualNotifyTFC
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualNotifyTFC
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetManualShopTFC.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册商铺表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetManualShopTFC
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* manual_shop_id
*/
private
String
manualShopId
;
/**
* 电子宣传手册id
*/
private
String
manualId
;
/**
* 商家名称
*/
private
String
title
;
/**
* 商家图片
*/
private
String
picUrl
;
/**
* 商家介绍
*/
private
String
describes
;
/**
* 1吃喝 2玩乐
*/
private
Integer
type
;
/**
* 0不推荐 1推荐
*/
private
Integer
isRecommend
;
/**
* 排序字段 数字越大越靠前
*/
private
Integer
sort
;
/**
* 0关闭 1开启
*/
private
Integer
status
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
private
static
final
SweetManualShopTFC
obj
=
new
SweetManualShopTFC
();
public
static
SweetManualShopTFC
getNew
()
{
try
{
return
(
SweetManualShopTFC
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualShopTFC
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetManualSortTFC.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册显示内容表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetManualSortTFC
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* manual_id
*/
private
String
manualId
;
/**
* 显示哪个,号隔开
*/
private
String
showPosition
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
private
static
final
SweetManualSortTFC
obj
=
new
SweetManualSortTFC
();
public
static
SweetManualSortTFC
getNew
()
{
try
{
return
(
SweetManualSortTFC
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualSortTFC
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetManualTFC.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetManualTFC
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* manual_id
*/
private
String
manualId
;
/**
* 演出id
*/
private
String
performanceId
;
/**
* 0关闭 1开启
*/
private
Integer
status
;
/**
* 0取消 1发布
*/
private
Integer
isRelease
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
private
static
final
SweetManualTFC
obj
=
new
SweetManualTFC
();
public
static
SweetManualTFC
getNew
()
{
try
{
return
(
SweetManualTFC
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualTFC
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetRichtextTFC.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册富文本表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetRichtextTFC
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* order_refund_id
*/
private
String
richtextId
;
/**
* manual_id
*/
private
String
manualId
;
/**
* 富文本详情
*/
private
String
details
;
/**
* 经纬度 5需要
*/
private
String
local
;
/**
* 地图图片地址 2需要
*/
private
String
picUrl
;
/**
* 类型 1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略
*/
private
Integer
type
;
/**
* 0关闭 1开启
*/
private
Integer
status
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
private
static
final
SweetRichtextTFC
obj
=
new
SweetRichtextTFC
();
public
static
SweetRichtextTFC
getNew
()
{
try
{
return
(
SweetRichtextTFC
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetRichtextTFC
();
}
}
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetUserRelationTFC.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 用户 收藏/喜欢等状态
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetUserRelationTFC
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 用户id
*/
private
String
userId
;
/**
* 类型 1喜欢艺人 2签售艺人
*/
private
Integer
type
;
/**
* 目标id
*/
private
String
targetId
;
/**
* 电子手册
*/
private
String
manualId
;
/**
* 1是 0否
*/
private
Integer
status
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetManualArtistsTFCMapper.xml
0 → 100644
View file @
8f091dc8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.sweet.mapper.SweetManualArtistsTFCMapper"
>
<resultMap
id=
"getManualListResult"
type=
"com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto"
>
<result
column=
"manual_relation_id"
property=
"manualRelationId"
/>
<result
column=
"artists_id"
property=
"artistId"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"pinyin"
property=
"pinyin"
/>
<result
column=
"describes"
property=
"describes"
/>
<result
column=
"pic_url"
property=
"picUrl"
/>
<result
column=
"stage_id"
property=
"stageId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"performance_start"
property=
"performanceStart"
/>
<result
column=
"performance_end"
property=
"performanceEnd"
/>
<result
column=
"signature_start"
property=
"signatureStart"
/>
<result
column=
"signature_end"
property=
"signatureEnd"
/>
</resultMap>
<resultMap
id=
"getStageNameListResult"
type=
"com.liquidnet.service.sweet.dto.SweetManualArtistStageListTFCDto"
>
<result
column=
"title"
property=
"title"
/>
</resultMap>
<select
id=
"getManualList"
parameterType=
"java.util.Map"
resultMap=
"getManualListResult"
>
select manual_relation_id,
sa.`artists_id`,
sa.`name`,
sa.pinyin,
sa.describes,
sa.pic_url,
ss.stage_id,
ss.title,
performance_start,
performance_end,
signature_start,
signature_end
from sweet_manual_artists_tfc as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
<where>
sma.status = 1 and manual_id = #{manualId}
</where>
ORDER BY sma.updated_at DESC
</select>
<select
id=
"getManualDetails"
parameterType=
"java.util.Map"
resultMap=
"getManualListResult"
>
select manual_relation_id,
sa.`name`,
sa.`artists_id`,
ss.title,
ss.stage_id,
performance_start,
performance_end,
signature_start,
signature_end
from sweet_manual_artists_tfc as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
where manual_relation_id = #{manualRelationId}
</select>
<select
id=
"getStageNameList"
parameterType=
"java.util.Map"
resultMap=
"getStageNameListResult"
>
select ss.title
from sweet_manual_artists_tfc as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
where sma.status = 1
and manual_id = #{manualId}
group by ss.title;
</select>
</mapper>
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetManualNotifyTFCMapper.xml
0 → 100644
View file @
8f091dc8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.sweet.mapper.SweetManualNotifyMdskMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetManualShopTFCMapper.xml
0 → 100644
View file @
8f091dc8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.sweet.mapper.SweetManualShopMdskMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetManualSortTFCMapper.xml
0 → 100644
View file @
8f091dc8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.sweet.mapper.SweetManualSortMdskMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetManualTFCMapper.xml
0 → 100644
View file @
8f091dc8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.sweet.mapper.SweetManualTFCMapper"
>
<resultMap
id=
"partnerPerformanceListResult"
type=
"com.liquidnet.service.sweet.dto.SweetManualTFCDto"
>
<result
column=
"manual_id"
property=
"manualId"
/>
<result
column=
"performances_id"
property=
"performancesId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"time_start"
property=
"timeStart"
/>
<result
column=
"time_end"
property=
"timeEnd"
/>
<result
column=
"time_sell"
property=
"timeSell"
/>
<result
column=
"time_stop"
property=
"timeStop"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"manualStatus"
property=
"manualStatus"
/>
<result
column=
"is_release"
property=
"isRelease"
/>
</resultMap>
<resultMap
id=
"getManualAppletListResult"
type=
"com.liquidnet.service.sweet.dto.SweetManualAppletTFCDto"
>
<result
column=
"manual_id"
property=
"manualId"
/>
<result
column=
"performances_id"
property=
"performancesId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"field_id"
property=
"fieldId"
/>
<result
column=
"city_name"
property=
"cityName"
/>
<result
column=
"time_start"
property=
"timeStart"
/>
<result
column=
"time_end"
property=
"timeEnd"
/>
</resultMap>
<resultMap
id=
"getManualAppletDtoResult"
type=
"com.liquidnet.service.sweet.dto.SweetManualAppletTFCDto"
>
<result
column=
"manual_id"
property=
"manualId"
/>
<result
column=
"performances_id"
property=
"performancesId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"field_id"
property=
"fieldId"
/>
<result
column=
"time_start"
property=
"timeStart"
/>
<result
column=
"time_end"
property=
"timeEnd"
/>
<result
column=
"time_sell"
property=
"timeSell"
/>
<result
column=
"pay_countdown_minute"
property=
"payCountdownMinute"
/>
<result
column=
"is_member"
property=
"isMember"
/>
</resultMap>
<!-- 电子手册列表 -->
<select
id=
"getManualList"
parameterType=
"java.util.Map"
resultMap=
"partnerPerformanceListResult"
>
SELECT
IFNULL(sm.manual_id,0) as 'manual_id',
p.performances_id ,
p.title ,
p.time_start ,
p.time_end ,
ps.status ,
t.time_sell ,
t.time_stop,
IFNULL(sm.status ,0) as 'manualStatus',
IFNULL(sm.is_release,0) as 'is_release'
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN sweet_manual_tfc AS sm ON p.performances_id = sm.performance_id
LEFT JOIN(
SELECT
ttr.performance_id ,
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
FROM
kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY
ttr.performance_id
) AS t ON p.performances_id = t.performance_id
<where>
<if
test=
"title!='' and title != null"
>
AND (title LIKE concat('%', #{title}, '%') OR title like '%M_DSK%')
</if>
</where>
ORDER BY p.created_at desc
</select>
<!-- 电子手册详情 -->
<select
id=
"getManualDetails"
parameterType=
"java.util.Map"
resultMap=
"partnerPerformanceListResult"
>
SELECT IFNULL(sm.manual_id, 0) as 'manual_id',
p.performances_id,
p.title,
p.time_start,
p.time_end,
ps.status,
t.time_sell,
t.time_stop,
IFNULL(sm.status, 0) as 'manualStatus',
IFNULL(sm.is_release, 0) as 'is_release'
FROM kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN sweet_manual_tfc AS sm ON p.performances_id = sm.performance_id
LEFT JOIN(
SELECT ttr.performance_id,
MIN(
DATE_SUB(
t.time_start,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell',
MAX(t.time_end) AS 'time_stop'
FROM kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY ttr.performance_id
) AS t ON p.performances_id = t.performance_id
where sm.manual_id = #{manualId}
ORDER BY p.created_at desc
</select>
<select
id=
"getManualAppletList"
resultMap=
"getManualAppletListResult"
>
select manual_id, performances_id, title, field_id, city_name, time_start, time_end
from kylin_performances as kp
left join sweet_manual_tfc as sw on sw.performance_id = kp.performances_id
left join kylin_performance_relations as kpr on kpr.performance_id = kp.performances_id
where sw.`status` = 1
and sw.is_release = 1
</select>
<select
id=
"getManualAppletDto"
resultMap=
"getManualAppletDtoResult"
>
SELECT
IFNULL(sm.manual_id , 0) AS 'manual_id' ,
p.performances_id ,
p.title ,
pr.field_id ,
p.time_start ,
p.time_end,
t1.time_sell,
t1.pay_countdown_minute,
t1.is_member
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN sweet_manual_tfc AS sm ON p.performances_id = sm.performance_id
LEFT JOIN(
SELECT
ttr.performance_id ,
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
FROM
kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY
ttr.performance_id
) AS t ON p.performances_id = t.performance_id
LEFT JOIN(
SELECT
ttr.performance_id ,
pay_countdown_minute,
ts.is_member,
sum(ts.total_general) AS 'total_general' ,
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
FROM
kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY
ttr.performance_id
) AS t1 ON p.performances_id = t1.performance_id
where sm.`status` = 1 and sm.is_release = 1
</select>
</mapper>
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetRichtextTFCMapper.xml
0 → 100644
View file @
8f091dc8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.sweet.mapper.SweetRichtextMdskMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetUserRelationTFCMapper.xml
0 → 100644
View file @
8f091dc8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.sweet.mapper.SweetUserRelationMdskMapper"
>
</mapper>
liquidnet-bus-service/liquidnet-service-sweet/docu/db_sweetsugar_structure.sql
View file @
8f091dc8
...
...
@@ -571,3 +571,191 @@ CREATE TABLE `sweet_antigenic_question`
COLLATE
utf8mb4_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'防疫答题表'
;
-- 下面为TFC表 --
-- 电子宣传手册表
drop
TABLE
if
exists
`sweet_manual_tfc`
;
CREATE
TABLE
`sweet_manual_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
'0'
COMMENT
'manual_id'
,
`performance_id`
varchar
(
200
)
NULL
COMMENT
'演出id'
,
`status`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0关闭 1开启'
,
`is_release`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0取消 1发布'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`manual_id_index`
(
`manual_id`
),
KEY
`performance_id_index`
(
`performance_id`
),
KEY
`is_release_index`
(
`is_release`
),
KEY
`status_index`
(
`status`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'电子宣传手册表'
;
-- 电子宣传手册显示内容表
drop
TABLE
if
exists
`sweet_manual_sort_tfc`
;
CREATE
TABLE
`sweet_manual_sort_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
'0'
COMMENT
'manual_id'
,
`show_position`
varchar
(
200
)
NULL
COMMENT
'显示哪个,号隔开'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`manual_id_index`
(
`manual_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'电子宣传手册显示内容表'
;
-- 电子宣传手册富文本表
drop
TABLE
if
exists
`sweet_richtext_tfc`
;
CREATE
TABLE
`sweet_richtext_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`richtext_id`
varchar
(
200
)
NOT
NULL
DEFAULT
'0'
COMMENT
'order_refund_id'
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
'0'
COMMENT
'manual_id'
,
`details`
longtext
NULL
COMMENT
'富文本详情'
,
`local`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'经纬度 5需要'
,
`pic_url`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'地图图片地址 2需要'
,
`type`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'类型 1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略'
,
`status`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0关闭 1开启'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`richtext_id_index`
(
`richtext_id`
),
KEY
`manual_id_index`
(
`manual_id`
),
KEY
`type_index`
(
`type`
),
KEY
`status_index`
(
`status`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'电子宣传手册富文本表'
;
-- 电子宣传手册艺人表
drop
TABLE
if
exists
`sweet_manual_artists_tfc`
;
CREATE
TABLE
`sweet_manual_artists_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`manual_relation_id`
varchar
(
200
)
NOT
NULL
DEFAULT
'0'
COMMENT
'manual_relation_id'
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'电子宣传手册id'
,
`stage_id`
varchar
(
200
)
NULL
COMMENT
'关联id'
,
`artists_id`
varchar
(
200
)
NULL
COMMENT
'关联id'
,
`performance_start`
datetime
NULL
COMMENT
'演出开始时间'
,
`performance_end`
datetime
NULL
COMMENT
'演出结束时间'
,
`signature_start`
datetime
NULL
COMMENT
'签收开始时间'
,
`signature_end`
datetime
NULL
COMMENT
'签收结束时间'
,
`status`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0关闭 1开启'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`manual_relation_id_index`
(
`manual_relation_id`
),
KEY
`manual_id_index`
(
`manual_id`
),
KEY
`stage_id_index`
(
`stage_id`
),
KEY
`artists_id_index`
(
`artists_id`
),
KEY
`status_index`
(
`status`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'电子宣传手册艺人表'
;
-- 电子宣传手册通知表
drop
TABLE
if
exists
`sweet_manual_notify_tfc`
;
CREATE
TABLE
`sweet_manual_notify_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`manual_notify_id`
varchar
(
200
)
NOT
NULL
DEFAULT
'0'
COMMENT
'manual_notify_id'
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'电子宣传手册id'
,
`title`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'标题'
,
`content`
longtext
NULL
COMMENT
'内容'
,
`status`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0关闭 1开启'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`manual_notify_id_index`
(
`manual_notify_id`
),
KEY
`manual_id_index`
(
`manual_id`
),
KEY
`status_index`
(
`status`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'电子宣传手册通知表'
;
-- 电子宣传手册商铺表
drop
TABLE
if
exists
`sweet_manual_shop_tfc`
;
CREATE
TABLE
`sweet_manual_shop_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`manual_shop_id`
varchar
(
200
)
NOT
NULL
DEFAULT
'0'
COMMENT
'manual_shop_id'
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'电子宣传手册id'
,
`title`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'商家名称'
,
`pic_url`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'商家图片'
,
`describes`
longtext
NULL
COMMENT
'商家介绍'
,
`type`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'1吃喝 2玩乐'
,
`is_recommend`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0不推荐 1推荐'
,
`sort`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'排序字段 数字越大越靠前'
,
`status`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0关闭 1开启'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`manual_shop_index`
(
`manual_shop_id`
),
KEY
`manual_id_index`
(
`manual_id`
),
KEY
`status_index`
(
`status`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'电子宣传手册商铺表'
;
-- 正在现场服务号关注事件储存用户信息表
drop
TABLE
if
exists
`sweet_wechat_user_tfc`
;
CREATE
TABLE
`sweet_wechat_user_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`user_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'user_id'
,
`openId`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'openId'
,
`unionId`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'unionId'
,
`nickname`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'昵称'
,
`sexDesc`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'性别'
,
`sex`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'性别 男1'
,
`headImgUrl`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'头像'
,
`language`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'zh_CN'
,
`country`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'国家'
,
`province`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'省'
,
`city`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'市'
,
`subscribeTime`
datetime
NULL
DEFAULT
null
COMMENT
'关注时间'
,
`subscribeScene`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'ADD_SCENE_SEARCH 关注方式'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`sweet_wechat_user_user_id`
(
`user_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
utf8mb4
COLLATE
utf8mb4_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'正在现场服务号关注事件储存用户信息表'
;
-- 用户 收藏/喜欢等状态
drop
TABLE
if
exists
`sweet_user_relation_tfc`
;
CREATE
TABLE
`sweet_user_relation_tfc`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`user_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'用户id'
,
`type`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'类型 1喜欢艺人 2签售艺人'
,
`target_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'目标id'
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'电子手册'
,
`status`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'1是 0否'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`mid`
),
KEY
`sweet_wechat_user_user_id`
(
`user_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
utf8mb4
COLLATE
utf8mb4_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'用户 收藏/喜欢等状态'
;
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetAppletTFCController.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.*
;
import
com.liquidnet.service.sweet.entity.*
;
import
com.liquidnet.service.sweet.utils.ObjectUtil
;
import
com.liquidnet.service.sweet.utils.RedisTFCDataUtils
;
import
com.liquidnet.service.sweet.vo.SweetArtistsRelationVo
;
import
com.liquidnet.service.sweet.vo.SweetManualShopTFCAllVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Api
(
tags
=
"小程序_跳飞船"
)
@RestController
@RequestMapping
(
"/tfc/sweet-applet"
)
public
class
SweetAppletTFCController
{
@Autowired
private
RedisTFCDataUtils
redisDataUtils
;
@GetMapping
(
"timeSelect"
)
@ApiOperation
(
"场次选择"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"name"
,
value
=
"名称"
,
required
=
true
),
})
public
ResponseDto
<
List
<
SweetManualAppletTFCDto
>>
timeSelect
(
@RequestParam
String
name
)
{
List
<
SweetManualAppletTFCDto
>
dto
=
redisDataUtils
.
getPushList
();
List
<
SweetManualAppletTFCDto
>
vo
=
ObjectUtil
.
getSweetManualAppletTFCDtoList
();
for
(
SweetManualAppletTFCDto
item
:
dto
)
{
if
(
item
.
getTitle
().
contains
(
name
))
{
vo
.
add
(
item
);
}
}
return
ResponseDto
.
success
(
vo
);
}
@GetMapping
(
"details"
)
@ApiOperation
(
"详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
})
public
ResponseDto
<
SweetManualAppletTFCDto
>
details
(
@RequestParam
()
String
manualId
)
{
return
ResponseDto
.
success
(
redisDataUtils
.
getAppletPerformance
(
manualId
));
}
@GetMapping
(
"notify"
)
@ApiOperation
(
"通知"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
})
public
ResponseDto
<
List
<
SweetManualNotifyTFC
>>
notify
(
@RequestParam
()
String
manualId
)
{
return
ResponseDto
.
success
(
redisDataUtils
.
getNotifyRedisData
(
manualId
));
}
@GetMapping
(
"tags"
)
@ApiOperation
(
"标签"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
})
public
ResponseDto
<
List
<
String
>>
tag
(
@RequestParam
()
String
manualId
)
{
return
ResponseDto
.
success
(
redisDataUtils
.
getTagRedisData
(
manualId
));
}
@GetMapping
(
"timeList"
)
@ApiOperation
(
"时间表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"dateTime"
,
value
=
"时间 全部不传"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"stage"
,
value
=
"舞台 全部不传"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"isSign"
,
value
=
"是否签名(1是0否)"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"数量"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
})
public
ResponseDto
<
SweetManualArtistList2TFCDto
>
timeList
(
@RequestParam
String
manualId
,
@RequestParam
(
required
=
false
)
String
dateTime
,
@RequestParam
(
required
=
false
)
String
stage
,
@RequestParam
Integer
isSign
,
@RequestParam
(
required
=
false
)
Integer
page
,
@RequestParam
(
required
=
false
)
Integer
size
,
@RequestParam
String
uid
)
{
try
{
List
<
SweetManualArtistListTFCDto
>
allReturnArtist
=
ObjectUtil
.
getSweetManualArtistListTFCDtoList
();
List
<
SweetManualArtistListTFCDto
>
returnArtist
=
ObjectUtil
.
getSweetManualArtistListTFCDtoList
();
SweetManualArtistList2TFCDto
data
=
redisDataUtils
.
getTimeList
(
manualId
);
SweetArtistsRelationVo
relationData
=
redisDataUtils
.
getArtistsRelationRedisVo
(
uid
,
manualId
);
List
<
SweetManualArtistListTFCDto
>
artistData
=
data
.
getData
();
int
startPosition
=
0
;
int
endPosition
=
0
;
if
(
page
!=
null
)
{
startPosition
=
(
page
-
1
)
*
size
;
endPosition
=
(
page
)
*
size
;
}
if
(
page
==
null
&&
dateTime
==
null
)
{
try
{
dateTime
=
data
.
getDate
().
get
(
0
);
}
catch
(
Exception
e
)
{
}
}
for
(
SweetManualArtistListTFCDto
item
:
artistData
)
{
boolean
isSave
=
true
;
if
(
isSign
==
1
)
{
if
(
item
.
getSignatureStart
()
==
null
)
{
//不保留
isSave
=
false
;
}
}
if
(
dateTime
!=
null
)
{
if
(!
item
.
getPerformanceStart
().
contains
(
dateTime
))
{
//不保留
isSave
=
false
;
}
}
if
(
stage
!=
null
)
{
if
(!
item
.
getTitle
().
equalsIgnoreCase
(
stage
))
{
//保留
isSave
=
false
;
}
}
if
(
isSave
)
{
allReturnArtist
.
add
(
item
);
}
}
for
(
int
i
=
0
;
i
<
allReturnArtist
.
size
();
i
++)
{
SweetManualArtistListTFCDto
item
=
allReturnArtist
.
get
(
i
);
if
(
page
!=
null
&&
i
>=
startPosition
&&
i
<
endPosition
)
{
item
.
setIsWatch
(
0
);
item
.
setIsSign
(
0
);
if
(
relationData
.
getWatchList
()
!=
null
)
{
for
(
String
artistsId
:
relationData
.
getWatchList
())
{
if
(
artistsId
.
equalsIgnoreCase
(
item
.
getArtistId
()))
{
item
.
setIsWatch
(
1
);
break
;
}
}
}
if
(
relationData
.
getSignList
()
!=
null
)
{
for
(
String
artistsId
:
relationData
.
getSignList
())
{
if
(
artistsId
.
equalsIgnoreCase
(
item
.
getArtistId
()))
{
item
.
setIsSign
(
1
);
break
;
}
}
}
returnArtist
.
add
(
item
);
}
}
data
.
setData
(
returnArtist
);
data
.
setTotal
(
allReturnArtist
.
size
());
return
ResponseDto
.
success
(
data
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@GetMapping
(
"richText"
)
@ApiOperation
(
"富文本"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"type"
,
value
=
"类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)"
,
required
=
true
),
})
public
ResponseDto
<
SweetRichtextTFC
>
richText
(
@RequestParam
()
String
manualId
,
@RequestParam
()
String
type
)
{
return
ResponseDto
.
success
(
redisDataUtils
.
getRichTextRedisData
(
manualId
,
type
));
}
@PostMapping
(
"artistsWatch"
)
@ApiOperation
(
"艺人-想看"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistsId"
,
value
=
"艺人id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
watch
(
@RequestParam
()
String
uid
,
@RequestParam
()
String
artistsId
,
@RequestParam
()
String
manualId
)
{
if
(
uid
.
equalsIgnoreCase
(
"0"
))
{
return
ResponseDto
.
failure
();
}
redisDataUtils
.
setArtistsRelationRedisVo
(
uid
,
artistsId
,
manualId
,
"watch"
);
return
ResponseDto
.
success
();
}
@PostMapping
(
"artistsSign"
)
@ApiOperation
(
"艺人-签售"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistsId"
,
value
=
"艺人id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
sign
(
@RequestParam
()
String
uid
,
@RequestParam
()
String
artistsId
,
@RequestParam
()
String
manualId
)
{
if
(
uid
.
equalsIgnoreCase
(
"0"
))
{
return
ResponseDto
.
failure
();
}
redisDataUtils
.
setArtistsRelationRedisVo
(
uid
,
artistsId
,
manualId
,
"sign"
);
return
ResponseDto
.
success
();
}
@PostMapping
(
"manualASC"
)
@ApiOperation
(
"该手册艺人收藏数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
})
public
ResponseDto
<
Map
>
manualArtistsSaveCount
(
@RequestParam
()
String
uid
,
@RequestParam
()
String
manualId
)
{
if
(
uid
.
equalsIgnoreCase
(
"0"
))
{
return
ResponseDto
.
failure
();
}
SweetArtistsRelationVo
vo
=
redisDataUtils
.
getArtistsRelationRedisVo
(
uid
,
manualId
);
int
signSize
=
0
;
int
watchSize
=
0
;
if
(
vo
.
getSignList
()
!=
null
)
{
signSize
=
vo
.
getSignList
().
size
();
}
if
(
vo
.
getWatchList
()
!=
null
)
{
watchSize
=
vo
.
getWatchList
().
size
();
}
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"signSize"
,
signSize
);
map
.
put
(
"watchSize"
,
watchSize
);
return
ResponseDto
.
success
(
map
);
}
@GetMapping
(
"artistsDetails"
)
@ApiOperation
(
"艺人-详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistsId"
,
value
=
"艺人id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
)
})
public
ResponseDto
<
SweetManualArtistListTFCDto
>
artistsDetails
(
@RequestParam
String
artistsId
,
@RequestParam
String
manualId
,
@RequestParam
String
uid
)
{
SweetManualArtistList2TFCDto
data
=
redisDataUtils
.
getTimeList
(
manualId
);
List
<
SweetManualArtistListTFCDto
>
dataList
=
data
.
getData
();
SweetArtistsRelationVo
relationData
=
redisDataUtils
.
getArtistsRelationRedisVo
(
uid
,
manualId
);
SweetManualArtistListTFCDto
vo
=
SweetManualArtistListTFCDto
.
getNew
();
for
(
SweetManualArtistListTFCDto
item
:
dataList
)
{
if
(
item
.
getArtistId
().
equalsIgnoreCase
(
artistsId
))
{
item
.
setIsWatch
(
0
);
item
.
setIsSign
(
0
);
if
(
relationData
.
getWatchList
()
!=
null
)
{
for
(
String
artistsIds
:
relationData
.
getWatchList
())
{
if
(
artistsId
.
equalsIgnoreCase
(
artistsIds
))
{
item
.
setIsWatch
(
1
);
break
;
}
}
}
if
(
relationData
.
getSignList
()
!=
null
)
{
for
(
String
artistsIds
:
relationData
.
getSignList
())
{
if
(
artistsId
.
equalsIgnoreCase
(
artistsIds
))
{
item
.
setIsSign
(
1
);
break
;
}
}
}
vo
=
item
;
break
;
}
}
return
ResponseDto
.
success
(
vo
);
}
@GetMapping
(
"manualShop"
)
@ApiOperation
(
"吃喝玩乐"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistsId"
,
value
=
"艺人id"
,
required
=
true
)
})
public
ResponseDto
<
SweetManualShopTFCAllVo
>
manualShop
(
@RequestParam
String
manualId
)
{
List
<
SweetManualShopTFC
>
shopList
=
redisDataUtils
.
getManualShopRedisData
(
manualId
);
List
<
SweetManualShopTFC
>
recommend
=
ObjectUtil
.
getSweetManualShopTFCList
();
List
<
SweetManualShopTFC
>
eat
=
ObjectUtil
.
getSweetManualShopTFCList
();
List
<
SweetManualShopTFC
>
play
=
ObjectUtil
.
getSweetManualShopTFCList
();
SweetManualShopTFCAllVo
vo
=
SweetManualShopTFCAllVo
.
getNew
();
for
(
SweetManualShopTFC
item
:
shopList
)
{
if
(
item
.
getIsRecommend
().
equals
(
1
))
{
recommend
.
add
(
item
);
}
if
(
item
.
getType
().
equals
(
1
))
{
eat
.
add
(
item
);
}
if
(
item
.
getType
().
equals
(
2
))
{
play
.
add
(
item
);
}
}
vo
.
setRecommend
(
recommend
);
vo
.
setEat
(
eat
);
vo
.
setPlay
(
play
);
return
ResponseDto
.
success
(
vo
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetManualArtistsTFCController.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto
;
import
com.liquidnet.service.sweet.service.ISweetManualArtistsTFCService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 电子宣传手册艺人表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api
(
tags
=
"电子手册艺人_TFC"
)
@RestController
@RequestMapping
(
"/tfc/sweet-manual-artists"
)
public
class
SweetManualArtistsTFCController
{
@Autowired
private
ISweetManualArtistsTFCService
sweetManualArtistsTFCService
;
@GetMapping
(
"getList"
)
@ApiOperation
(
"宣传手册艺人列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"数量"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manaulId"
,
value
=
"手册id"
,
required
=
true
),
})
public
ResponseDto
<
PageInfo
<
SweetManualArtistListTFCDto
>>
getList
(
@RequestParam
()
Integer
page
,
@RequestParam
()
Integer
size
,
@RequestParam
()
String
manualId
)
{
return
sweetManualArtistsTFCService
.
getList
(
page
,
size
,
manualId
);
}
@GetMapping
(
"details"
)
@ApiOperation
(
"宣传手册艺人详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualRelationId"
,
value
=
"手册艺人id"
,
required
=
true
),
})
public
ResponseDto
<
SweetManualArtistListTFCDto
>
details
(
@RequestParam
()
String
manualRelationId
)
{
return
sweetManualArtistsTFCService
.
details
(
manualRelationId
);
}
@PostMapping
(
"add"
)
@ApiOperation
(
"宣传手册艺人添加"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistId"
,
value
=
"艺人id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"stageId"
,
value
=
"场地id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"performanceStart"
,
value
=
"演出开始时间"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"performanceEnd"
,
value
=
"演出结束时间"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"signatureStart"
,
value
=
"签售开始时间"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"signatureEnd"
,
value
=
"签售结束时间"
,
required
=
false
),
})
public
ResponseDto
<
Boolean
>
add
(
@RequestParam
()
String
manualId
,
@RequestParam
()
String
artistId
,
@RequestParam
()
String
stageId
,
@RequestParam
(
required
=
false
)
String
performanceStart
,
@RequestParam
(
required
=
false
)
String
performanceEnd
,
@RequestParam
(
required
=
false
)
String
signatureStart
,
@RequestParam
(
required
=
false
)
String
signatureEnd
)
{
return
sweetManualArtistsTFCService
.
add
(
manualId
,
artistId
,
stageId
,
performanceStart
,
performanceEnd
,
signatureStart
,
signatureEnd
);
}
@PostMapping
(
"change"
)
@ApiOperation
(
"宣传手册艺人修改"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualRelationId"
,
value
=
"手册艺人id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistId"
,
value
=
"艺人id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"stageId"
,
value
=
"场地id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"performanceStart"
,
value
=
"演出开始时间"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"performanceEnd"
,
value
=
"演出结束时间"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"signatureStart"
,
value
=
"签售开始时间"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"signatureEnd"
,
value
=
"签售结束时间"
,
required
=
false
),
})
public
ResponseDto
<
Boolean
>
change
(
@RequestParam
()
String
manualRelationId
,
@RequestParam
()
String
manualId
,
@RequestParam
()
String
artistId
,
@RequestParam
()
String
stageId
,
@RequestParam
(
required
=
false
)
String
performanceStart
,
@RequestParam
(
required
=
false
)
String
performanceEnd
,
@RequestParam
(
required
=
false
)
String
signatureStart
,
@RequestParam
(
required
=
false
)
String
signatureEnd
)
{
return
sweetManualArtistsTFCService
.
change
(
manualRelationId
,
manualId
,
artistId
,
stageId
,
performanceStart
,
performanceEnd
,
signatureStart
,
signatureEnd
);
}
@DeleteMapping
(
"delete"
)
@ApiOperation
(
"宣传手册艺人删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualRelationId"
,
value
=
"手册艺人id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
)
})
public
ResponseDto
<
Boolean
>
delete
(
@RequestParam
()
String
manualRelationId
,
@RequestParam
()
String
manualId
)
{
return
sweetManualArtistsTFCService
.
delete
(
manualRelationId
,
manualId
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetManualNotifyTFCController.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualNotifyTFC
;
import
com.liquidnet.service.sweet.service.ISweetManualNotifyTFCService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 电子宣传手册通知表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api
(
tags
=
"电子手册通知_TFC"
)
@RestController
@RequestMapping
(
"/tfc/sweet-manual-notify"
)
public
class
SweetManualNotifyTFCController
{
@Autowired
ISweetManualNotifyTFCService
sweetManualNotifyTFCService
;
@GetMapping
(
"list"
)
@ApiOperation
(
"通知列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"数量"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"name"
,
value
=
"通知标题 不查询从传递null"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
})
public
ResponseDto
<
PageInfo
<
SweetManualNotifyTFC
>>
getList
(
@RequestParam
()
Integer
page
,
@RequestParam
()
Integer
size
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
()
String
manualId
)
{
return
sweetManualNotifyTFCService
.
getList
(
page
,
size
,
name
,
manualId
);
}
@PostMapping
(
"add"
)
@ApiOperation
(
"添加通知"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"content"
,
value
=
"内容"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
add
(
@RequestParam
()
String
manualId
,
@RequestParam
()
String
title
,
@RequestParam
()
String
content
)
{
return
sweetManualNotifyTFCService
.
add
(
manualId
,
title
,
content
);
}
@GetMapping
(
"detail"
)
@ApiOperation
(
"通知详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualNotifyId"
,
value
=
"通知id"
,
required
=
true
),
})
public
ResponseDto
<
SweetManualNotifyTFC
>
detail
(
@RequestParam
()
String
manualNotifyId
)
{
return
sweetManualNotifyTFCService
.
details
(
manualNotifyId
);
}
@PostMapping
(
"change"
)
@ApiOperation
(
"修改通知"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualNotifyId"
,
value
=
"通知id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"content"
,
value
=
"内容"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
change
(
@RequestParam
()
String
manualId
,
@RequestParam
()
String
manualNotifyId
,
@RequestParam
()
String
title
,
@RequestParam
()
String
content
)
{
return
sweetManualNotifyTFCService
.
change
(
manualId
,
manualNotifyId
,
title
,
content
);
}
@DeleteMapping
(
"delete"
)
@ApiOperation
(
"删除通知"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualNotifyId"
,
value
=
"手册通知id"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
delete
(
@RequestParam
()
String
manualNotifyId
)
{
return
sweetManualNotifyTFCService
.
delete
(
manualNotifyId
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetManualShopTFCController.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualShopTFC
;
import
com.liquidnet.service.sweet.service.ISweetManualShopTFCService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* <p>
* 电子宣传手册商铺表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api
(
tags
=
"电子手册吃喝玩乐_TFC"
)
@RestController
@RequestMapping
(
"/tfc/sweet-manual-shop"
)
public
class
SweetManualShopTFCController
{
@Autowired
ISweetManualShopTFCService
sweetManualShopTFCService
;
@GetMapping
(
"list"
)
@ApiOperation
(
"列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 1吃喝 2玩乐"
,
required
=
true
),
})
public
ResponseDto
<
List
<
SweetManualShopTFC
>>
getList
(
@RequestParam
String
manualId
,
@RequestParam
Integer
type
)
{
return
sweetManualShopTFCService
.
getList
(
manualId
,
type
);
}
@GetMapping
(
"details"
)
@ApiOperation
(
"详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualShopId"
,
value
=
"商铺id"
,
required
=
true
),
})
public
ResponseDto
<
SweetManualShopTFC
>
details
(
@RequestParam
String
manualShopId
)
{
return
sweetManualShopTFCService
.
details
(
manualShopId
);
}
@PostMapping
(
"add"
)
@ApiOperation
(
"添加"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册iid"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"picUrl"
,
value
=
"图片地址"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"describes"
,
value
=
"描述"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 1吃喝 2玩乐"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"isRecommend"
,
value
=
"是否推荐"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"sort"
,
value
=
"排序"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
add
(
@RequestParam
String
manualId
,
@RequestParam
String
title
,
@RequestParam
String
picUrl
,
@RequestParam
String
describes
,
@RequestParam
Integer
type
,
@RequestParam
Integer
isRecommend
,
@RequestParam
Integer
sort
)
{
return
sweetManualShopTFCService
.
add
(
manualId
,
title
,
picUrl
,
describes
,
type
,
isRecommend
,
sort
);
}
@PostMapping
(
"change"
)
@ApiOperation
(
"修改"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualShopId"
,
value
=
"商铺id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"picUrl"
,
value
=
"图片地址"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"describes"
,
value
=
"描述"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 1吃喝 2玩乐"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"isRecommend"
,
value
=
"是否推荐"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"sort"
,
value
=
"排序"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
change
(
@RequestParam
String
manualShopId
,
@RequestParam
String
manualId
,
@RequestParam
String
title
,
@RequestParam
String
picUrl
,
@RequestParam
String
describes
,
@RequestParam
Integer
type
,
@RequestParam
Integer
isRecommend
,
@RequestParam
Integer
sort
)
{
return
sweetManualShopTFCService
.
change
(
manualShopId
,
manualId
,
title
,
picUrl
,
describes
,
type
,
isRecommend
,
sort
);
}
@DeleteMapping
(
"delete"
)
@ApiOperation
(
"删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualShopId"
,
value
=
"商铺id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
delete
(
@RequestParam
()
String
manualShopId
,
@RequestParam
String
manualId
)
{
return
sweetManualShopTFCService
.
delete
(
manualShopId
,
manualId
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetManualSortTFCController.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualSortTFC
;
import
com.liquidnet.service.sweet.service.ISweetManualSortTFCService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 电子宣传手册显示内容表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api
(
tags
=
"电子手册显示tag_TFC"
)
@RestController
@RequestMapping
(
"/tfc/sweet-manual-sort"
)
public
class
SweetManualSortTFCController
{
@Autowired
private
ISweetManualSortTFCService
sweetManualSortTFCService
;
@PostMapping
(
"add"
)
@ApiOperation
(
"操作 电子手册tag"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"content"
,
value
=
"内容 例子(POSITION_1,POSITION_2)"
,
required
=
true
)
})
public
ResponseDto
<
Boolean
>
changeStatus
(
@RequestParam
()
String
manualId
,
@RequestParam
()
String
content
)
{
return
sweetManualSortTFCService
.
add
(
manualId
,
content
);
}
@GetMapping
(
"get"
)
@ApiOperation
(
"获取 电子手册tag"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
)
})
public
ResponseDto
<
SweetManualSortTFC
>
changeStatus
(
@RequestParam
()
String
manualId
)
{
return
sweetManualSortTFCService
.
get
(
manualId
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetManualTFCController.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualTFCDto
;
import
com.liquidnet.service.sweet.service.ISweetManualTFCService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 电子宣传手册表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api
(
tags
=
"电子手册_TFC"
)
@RestController
@RequestMapping
(
"/tfc/sweet-manual"
)
public
class
SweetManualTFCController
{
@Autowired
private
ISweetManualTFCService
sweetManualTFCService
;
@GetMapping
(
"list"
)
@ApiOperation
(
"宣传手册列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"数量"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"name"
,
value
=
"姓名"
,
required
=
false
),
})
public
ResponseDto
<
PageInfo
<
SweetManualTFCDto
>>
getList
(
@RequestParam
()
Integer
page
,
@RequestParam
()
Integer
size
,
@RequestParam
(
required
=
false
)
String
name
)
{
return
sweetManualTFCService
.
getManualList
(
page
,
size
,
name
);
}
@GetMapping
(
"details"
)
@ApiOperation
(
"宣传手册详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
),
})
public
ResponseDto
<
SweetManualTFCDto
>
details
(
@RequestParam
(
required
=
false
)
String
manualId
)
{
return
sweetManualTFCService
.
details
(
manualId
);
}
@PostMapping
(
"changeRelease"
)
@ApiOperation
(
"修改是否发布"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"数量"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
changeRelease
(
@RequestParam
()
String
manualId
,
@RequestParam
()
Integer
isRelease
)
{
return
sweetManualTFCService
.
changeRelease
(
manualId
,
isRelease
);
}
@PostMapping
(
"changeStatus"
)
@ApiOperation
(
"修改是否开启"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"performancesId"
,
value
=
"演出id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"status"
,
value
=
"开启状态"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
changeStatus
(
@RequestParam
()
String
manualId
,
@RequestParam
()
String
performancesId
,
@RequestParam
()
Integer
status
)
{
return
sweetManualTFCService
.
changeStatus
(
manualId
,
performancesId
,
status
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetRichtextTFCController.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetRichtextTFC
;
import
com.liquidnet.service.sweet.service.ISweetRichtextTFCService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 电子宣传手册富文本表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api
(
tags
=
"电子手册 富文本_TFC"
)
@RestController
@RequestMapping
(
"/tfc/sweet-richtext"
)
public
class
SweetRichtextTFCController
{
@Autowired
ISweetRichtextTFCService
sweetRichtextTFCService
;
@GetMapping
(
"get"
)
@ApiOperation
(
"富文本详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)"
,
required
=
true
),
})
public
ResponseDto
<
SweetRichtextTFC
>
get
(
@RequestParam
()
String
manualId
,
@RequestParam
()
Integer
type
)
{
return
sweetRichtextTFCService
.
get
(
manualId
,
type
);
}
@PostMapping
(
"add"
)
@ApiOperation
(
"添加富文本"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"manualId"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"details"
,
value
=
"数量"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"local"
,
value
=
"经纬度 经度,维度,"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"picUrl"
,
value
=
"图片地址"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
add
(
@RequestParam
()
String
manualId
,
@RequestParam
(
required
=
false
)
String
details
,
@RequestParam
(
required
=
false
)
String
local
,
@RequestParam
(
required
=
false
)
String
picUrl
,
@RequestParam
()
Integer
type
)
{
return
sweetRichtextTFCService
.
add
(
manualId
,
details
,
local
,
picUrl
,
type
);
}
@PostMapping
(
"change"
)
@ApiOperation
(
"修改富文本"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"manualId"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"details"
,
value
=
"数量"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"local"
,
value
=
"经纬度 经度,维度,"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"picUrl"
,
value
=
"图片地址"
,
required
=
false
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)"
,
required
=
true
),
})
public
ResponseDto
<
Boolean
>
change
(
@RequestParam
()
String
manualId
,
@RequestParam
(
required
=
false
)
String
details
,
@RequestParam
(
required
=
false
)
String
local
,
@RequestParam
(
required
=
false
)
String
picUrl
,
@RequestParam
()
Integer
type
)
{
return
sweetRichtextTFCService
.
change
(
manualId
,
details
,
local
,
picUrl
,
type
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetUserRelationController.java
deleted
100644 → 0
View file @
4af599b9
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 用户 收藏/喜欢等状态 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-06
*/
@RestController
@RequestMapping
(
"/sweet-user-relation"
)
public
class
SweetUserRelationController
{
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetUserRelationMdskController.java
deleted
100644 → 0
View file @
4af599b9
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 用户 收藏/喜欢等状态 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@RestController
@RequestMapping
(
"/mdsk/sweet-user-relation"
)
public
class
SweetUserRelationMdskController
{
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetManualArtistsTFCServiceImpl.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto
;
import
com.liquidnet.service.sweet.entity.SweetManualArtistsTFC
;
import
com.liquidnet.service.sweet.mapper.SweetManualArtistsTFCMapper
;
import
com.liquidnet.service.sweet.service.ISweetManualArtistsTFCService
;
import
com.liquidnet.service.sweet.utils.RedisTFCDataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
/**
* <p>
* 电子宣传手册艺人表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public
class
SweetManualArtistsTFCServiceImpl
extends
ServiceImpl
<
SweetManualArtistsTFCMapper
,
SweetManualArtistsTFC
>
implements
ISweetManualArtistsTFCService
{
@Autowired
private
SweetManualArtistsTFCMapper
sweetManualArtistsTFCMapper
;
@Autowired
private
RedisTFCDataUtils
redisDataUtils
;
@Override
public
ResponseDto
<
PageInfo
<
SweetManualArtistListTFCDto
>>
getList
(
Integer
page
,
Integer
size
,
String
manualId
)
{
PageInfo
<
SweetManualArtistListTFCDto
>
pageInfoTmp
;
try
{
PageHelper
.
startPage
(
page
,
size
);
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"manualId"
,
manualId
);
List
<
SweetManualArtistListTFCDto
>
voList
=
sweetManualArtistsTFCMapper
.
getManualList
(
map
);
pageInfoTmp
=
new
PageInfo
(
voList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
();
}
return
ResponseDto
.
success
(
pageInfoTmp
);
}
@Override
public
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
artistId
,
String
stageId
,
String
performanceStart
,
String
performanceEnd
,
String
signatureStart
,
String
signatureEnd
)
{
try
{
SweetManualArtistsTFC
sweetManualNotify
=
SweetManualArtistsTFC
.
getNew
();
sweetManualNotify
.
setManualRelationId
(
IDGenerator
.
nextSnowId
());
sweetManualNotify
.
setManualId
(
manualId
);
sweetManualNotify
.
setStageId
(
stageId
);
sweetManualNotify
.
setArtistsId
(
artistId
);
sweetManualNotify
.
setPerformanceEnd
(
performanceEnd
!=
null
?
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceEnd
)
:
null
);
sweetManualNotify
.
setPerformanceStart
(
performanceStart
!=
null
?
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceStart
)
:
null
);
sweetManualNotify
.
setSignatureStart
(
signatureStart
!=
null
?
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
signatureStart
)
:
null
);
sweetManualNotify
.
setSignatureEnd
(
signatureEnd
!=
null
?
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
signatureEnd
)
:
null
);
sweetManualNotify
.
setCreatedAt
(
LocalDateTime
.
now
());
sweetManualArtistsTFCMapper
.
insert
(
sweetManualNotify
);
redisDataUtils
.
deleteTimeListRedisData
(
manualId
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
SweetManualArtistListTFCDto
>
details
(
String
manualRelationId
)
{
try
{
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"manualRelationId"
,
manualRelationId
);
SweetManualArtistListTFCDto
dto
=
sweetManualArtistsTFCMapper
.
getManualDetails
(
map
);
return
ResponseDto
.
success
(
dto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
change
(
String
manualRelationId
,
String
manualId
,
String
artistId
,
String
stageId
,
String
performanceStart
,
String
performanceEnd
,
String
signatureStart
,
String
signatureEnd
)
{
try
{
SweetManualArtistsTFC
sweetManualNotify
=
SweetManualArtistsTFC
.
getNew
();
sweetManualNotify
.
setStageId
(
stageId
);
sweetManualNotify
.
setArtistsId
(
artistId
);
sweetManualNotify
.
setPerformanceEnd
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceEnd
));
sweetManualNotify
.
setPerformanceStart
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceStart
));
sweetManualNotify
.
setSignatureStart
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
signatureStart
));
sweetManualNotify
.
setSignatureEnd
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
signatureEnd
));
sweetManualNotify
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualArtistsTFCMapper
.
update
(
sweetManualNotify
,
Wrappers
.
lambdaUpdate
(
SweetManualArtistsTFC
.
class
).
eq
(
SweetManualArtistsTFC:
:
getManualRelationId
,
manualRelationId
));
redisDataUtils
.
deleteTimeListRedisData
(
manualId
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
delete
(
String
manualRelationId
,
String
manualId
)
{
try
{
SweetManualArtistsTFC
sweetManualNotify
=
SweetManualArtistsTFC
.
getNew
();
sweetManualNotify
.
setManualRelationId
(
IDGenerator
.
nextSnowId
());
sweetManualNotify
.
setStatus
(
0
);
sweetManualNotify
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualArtistsTFCMapper
.
update
(
sweetManualNotify
,
Wrappers
.
lambdaUpdate
(
SweetManualArtistsTFC
.
class
).
eq
(
SweetManualArtistsTFC:
:
getManualRelationId
,
manualRelationId
));
redisDataUtils
.
deleteTimeListRedisData
(
manualId
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetManualNotifyTFCServiceImpl.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualNotifyTFC
;
import
com.liquidnet.service.sweet.mapper.SweetManualNotifyTFCMapper
;
import
com.liquidnet.service.sweet.service.ISweetManualNotifyTFCService
;
import
com.liquidnet.service.sweet.utils.RedisTFCDataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* <p>
* 电子宣传手册通知表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public
class
SweetManualNotifyTFCServiceImpl
extends
ServiceImpl
<
SweetManualNotifyTFCMapper
,
SweetManualNotifyTFC
>
implements
ISweetManualNotifyTFCService
{
@Autowired
private
SweetManualNotifyTFCMapper
sweetManualNotifyTFCMapper
;
@Autowired
private
RedisTFCDataUtils
redisDataUtils
;
@Override
public
ResponseDto
<
PageInfo
<
SweetManualNotifyTFC
>>
getList
(
Integer
page
,
Integer
size
,
String
title
,
String
manualId
)
{
PageInfo
<
SweetManualNotifyTFC
>
pageInfo
=
null
;
try
{
PageHelper
.
startPage
(
page
,
size
);
List
<
SweetManualNotifyTFC
>
data
;
if
(
title
!=
null
)
{
data
=
sweetManualNotifyTFCMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualNotifyTFC
.
class
).
like
(
SweetManualNotifyTFC:
:
getTitle
,
title
).
eq
(
SweetManualNotifyTFC:
:
getManualId
,
manualId
).
eq
(
SweetManualNotifyTFC:
:
getStatus
,
1
));
}
else
{
data
=
sweetManualNotifyTFCMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualNotifyTFC
.
class
).
eq
(
SweetManualNotifyTFC:
:
getManualId
,
manualId
).
eq
(
SweetManualNotifyTFC:
:
getStatus
,
1
));
}
pageInfo
=
new
PageInfo
(
data
);
return
ResponseDto
.
success
(
pageInfo
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
success
(
pageInfo
);
}
}
@Override
public
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
title
,
String
content
)
{
try
{
SweetManualNotifyTFC
sweetManualNotify
=
SweetManualNotifyTFC
.
getNew
();
sweetManualNotify
.
setManualNotifyId
(
IDGenerator
.
nextSnowId
());
sweetManualNotify
.
setManualId
(
manualId
);
sweetManualNotify
.
setTitle
(
title
);
sweetManualNotify
.
setContent
(
content
);
sweetManualNotify
.
setCreatedAt
(
LocalDateTime
.
now
());
sweetManualNotifyTFCMapper
.
insert
(
sweetManualNotify
);
List
<
SweetManualNotifyTFC
>
oldData
=
redisDataUtils
.
getNotifyRedisData
(
manualId
);
oldData
.
add
(
sweetManualNotify
);
redisDataUtils
.
setNotifyRedisData
(
manualId
,
oldData
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
SweetManualNotifyTFC
>
details
(
String
manualNotifyId
)
{
try
{
return
ResponseDto
.
success
(
sweetManualNotifyTFCMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManualNotifyTFC
.
class
).
eq
(
SweetManualNotifyTFC:
:
getManualNotifyId
,
manualNotifyId
).
eq
(
SweetManualNotifyTFC:
:
getStatus
,
1
)));
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
change
(
String
manualId
,
String
manualNotifyId
,
String
title
,
String
content
)
{
try
{
SweetManualNotifyTFC
sweetManualNotify
=
SweetManualNotifyTFC
.
getNew
();
sweetManualNotify
.
setTitle
(
title
);
sweetManualNotify
.
setContent
(
content
);
sweetManualNotify
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualNotifyTFCMapper
.
update
(
sweetManualNotify
,
Wrappers
.
lambdaUpdate
(
SweetManualNotifyTFC
.
class
).
eq
(
SweetManualNotifyTFC:
:
getManualNotifyId
,
manualNotifyId
));
List
<
SweetManualNotifyTFC
>
oldData
=
redisDataUtils
.
getNotifyRedisData
(
manualId
);
for
(
SweetManualNotifyTFC
item
:
oldData
)
{
if
(
item
.
getManualNotifyId
().
equalsIgnoreCase
(
manualNotifyId
))
{
item
.
setTitle
(
title
);
item
.
setContent
(
content
);
item
.
setUpdatedAt
(
LocalDateTime
.
now
());
}
}
redisDataUtils
.
setNotifyRedisData
(
manualId
,
oldData
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
delete
(
String
manualNotifyId
)
{
try
{
SweetManualNotifyTFC
sweetManualNotify
=
SweetManualNotifyTFC
.
getNew
();
sweetManualNotify
.
setStatus
(
0
);
sweetManualNotify
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualNotifyTFCMapper
.
update
(
sweetManualNotify
,
Wrappers
.
lambdaUpdate
(
SweetManualNotifyTFC
.
class
).
eq
(
SweetManualNotifyTFC:
:
getManualNotifyId
,
manualNotifyId
));
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetManualShopTFCServiceImpl.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualShopTFC
;
import
com.liquidnet.service.sweet.mapper.SweetManualShopTFCMapper
;
import
com.liquidnet.service.sweet.service.ISweetManualShopTFCService
;
import
com.liquidnet.service.sweet.utils.RedisTFCDataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 电子宣传手册商铺表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public
class
SweetManualShopTFCServiceImpl
extends
ServiceImpl
<
SweetManualShopTFCMapper
,
SweetManualShopTFC
>
implements
ISweetManualShopTFCService
{
@Autowired
private
SweetManualShopTFCMapper
sweetManualShopTFCMapper
;
@Autowired
private
RedisTFCDataUtils
redisDataUtils
;
@Override
public
ResponseDto
<
List
<
SweetManualShopTFC
>>
getList
(
String
manualId
,
Integer
type
)
{
try
{
List
<
SweetManualShopTFC
>
data
=
sweetManualShopTFCMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualShopTFC
.
class
).
eq
(
SweetManualShopTFC:
:
getManualId
,
manualId
).
eq
(
SweetManualShopTFC:
:
getType
,
type
).
eq
(
SweetManualShopTFC:
:
getStatus
,
1
));
return
ResponseDto
.
success
(
data
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
SweetManualShopTFC
>
details
(
String
manualShopId
)
{
try
{
SweetManualShopTFC
data
=
sweetManualShopTFCMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManualShopTFC
.
class
).
eq
(
SweetManualShopTFC:
:
getManualShopId
,
manualShopId
).
eq
(
SweetManualShopTFC:
:
getStatus
,
1
));
return
ResponseDto
.
success
(
data
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
title
,
String
picUrl
,
String
describe
,
Integer
type
,
Integer
isRecommend
,
Integer
sort
)
{
try
{
SweetManualShopTFC
sweetManualShop
=
SweetManualShopTFC
.
getNew
();
sweetManualShop
.
setManualShopId
(
IDGenerator
.
nextSnowId
());
sweetManualShop
.
setManualId
(
manualId
);
sweetManualShop
.
setTitle
(
title
);
sweetManualShop
.
setPicUrl
(
picUrl
);
sweetManualShop
.
setDescribes
(
describe
);
sweetManualShop
.
setType
(
type
);
sweetManualShop
.
setIsRecommend
(
isRecommend
);
sweetManualShop
.
setSort
(
sort
);
sweetManualShop
.
setStatus
(
1
);
sweetManualShopTFCMapper
.
insert
(
sweetManualShop
);
redisDataUtils
.
setManualShopRedisData
(
manualId
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
change
(
String
manualShopId
,
String
manualId
,
String
title
,
String
picUrl
,
String
describe
,
Integer
type
,
Integer
isRecommend
,
Integer
sort
)
{
try
{
SweetManualShopTFC
sweetManualShop
=
SweetManualShopTFC
.
getNew
();
sweetManualShop
.
setTitle
(
title
);
sweetManualShop
.
setPicUrl
(
picUrl
);
sweetManualShop
.
setDescribes
(
describe
);
sweetManualShop
.
setType
(
type
);
sweetManualShop
.
setIsRecommend
(
isRecommend
);
sweetManualShop
.
setSort
(
sort
);
sweetManualShopTFCMapper
.
update
(
sweetManualShop
,
Wrappers
.
lambdaUpdate
(
SweetManualShopTFC
.
class
).
eq
(
SweetManualShopTFC:
:
getManualShopId
,
manualShopId
));
redisDataUtils
.
setManualShopRedisData
(
manualId
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
delete
(
String
manualShopId
,
String
manualId
)
{
try
{
SweetManualShopTFC
sweetManualShop
=
SweetManualShopTFC
.
getNew
();
sweetManualShop
.
setStatus
(
0
);
sweetManualShopTFCMapper
.
update
(
sweetManualShop
,
Wrappers
.
lambdaUpdate
(
SweetManualShopTFC
.
class
).
eq
(
SweetManualShopTFC:
:
getManualShopId
,
manualShopId
));
redisDataUtils
.
setManualShopRedisData
(
manualId
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetManualSortTFCServiceImpl.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetManualSortTFC
;
import
com.liquidnet.service.sweet.mapper.SweetManualSortTFCMapper
;
import
com.liquidnet.service.sweet.service.ISweetManualSortTFCService
;
import
com.liquidnet.service.sweet.utils.RedisTFCDataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册显示内容表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public
class
SweetManualSortTFCServiceImpl
extends
ServiceImpl
<
SweetManualSortTFCMapper
,
SweetManualSortTFC
>
implements
ISweetManualSortTFCService
{
@Autowired
private
SweetManualSortTFCMapper
sweetManualSortTFCMapper
;
@Autowired
private
RedisTFCDataUtils
redisDataUtils
;
@Override
public
ResponseDto
<
SweetManualSortTFC
>
get
(
String
manualId
)
{
try
{
return
ResponseDto
.
success
(
sweetManualSortTFCMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManualSortTFC
.
class
).
eq
(
SweetManualSortTFC:
:
getManualId
,
manualId
)));
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
content
)
{
try
{
int
count
=
sweetManualSortTFCMapper
.
selectCount
(
Wrappers
.
lambdaUpdate
(
SweetManualSortTFC
.
class
).
eq
(
SweetManualSortTFC:
:
getManualId
,
manualId
));
if
(
count
>
0
)
{
SweetManualSortTFC
sweetManualSort
=
SweetManualSortTFC
.
getNew
();
sweetManualSort
.
setManualId
(
manualId
);
sweetManualSort
.
setShowPosition
(
content
);
sweetManualSort
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualSortTFCMapper
.
update
(
sweetManualSort
,
Wrappers
.
lambdaUpdate
(
SweetManualSortTFC
.
class
).
eq
(
SweetManualSortTFC:
:
getManualId
,
manualId
));
}
else
{
SweetManualSortTFC
sweetManualSort
=
SweetManualSortTFC
.
getNew
();
sweetManualSort
.
setManualId
(
manualId
);
sweetManualSort
.
setShowPosition
(
content
);
sweetManualSort
.
setCreatedAt
(
LocalDateTime
.
now
());
sweetManualSortTFCMapper
.
insert
(
sweetManualSort
);
}
redisDataUtils
.
deleteSortRedisData
(
manualId
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
return
ResponseDto
.
success
();
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetManualTFCServiceImpl.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualTFCDto
;
import
com.liquidnet.service.sweet.entity.SweetManualTFC
;
import
com.liquidnet.service.sweet.mapper.SweetManualTFCMapper
;
import
com.liquidnet.service.sweet.service.ISweetManualTFCService
;
import
com.liquidnet.service.sweet.utils.RedisTFCDataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
/**
* <p>
* 电子宣传手册表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public
class
SweetManualTFCServiceImpl
extends
ServiceImpl
<
SweetManualTFCMapper
,
SweetManualTFC
>
implements
ISweetManualTFCService
{
@Autowired
private
SweetManualTFCMapper
sweetManualTFCMapper
;
@Autowired
private
RedisTFCDataUtils
redisDataUtils
;
@Override
public
ResponseDto
<
PageInfo
<
SweetManualTFCDto
>>
getManualList
(
int
page
,
int
size
,
String
name
)
{
PageInfo
<
SweetManualTFCDto
>
pageInfoTmp
;
try
{
PageHelper
.
startPage
(
page
,
size
);
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"title"
,
name
);
List
<
SweetManualTFCDto
>
voList
=
sweetManualTFCMapper
.
getManualList
(
map
);
for
(
int
i
=
0
;
i
<
voList
.
size
();
i
++)
{
SweetManualTFCDto
vo
=
voList
.
get
(
i
);
if
(
vo
.
getStatus
()
>=
6
&&
vo
.
getStatus
()
!=
7
)
{
if
(
DateUtil
.
compareStrDay
(
vo
.
getTimeSell
(),
DateUtil
.
getNowTime
())
>
0
)
{
//未开始
vo
.
setStatus
(
9
);
}
else
if
(
DateUtil
.
compareStrDay
(
vo
.
getTimeStop
(),
DateUtil
.
getNowTime
())
<
0
)
{
//已结束
vo
.
setStatus
(
10
);
}
else
{
vo
.
setStatus
(
6
);
}
}
}
pageInfoTmp
=
new
PageInfo
(
voList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20104
));
}
return
ResponseDto
.
success
(
pageInfoTmp
);
}
@Override
public
ResponseDto
<
SweetManualTFCDto
>
details
(
String
manualId
)
{
SweetManualTFCDto
vo
;
try
{
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"manualId"
,
manualId
);
vo
=
sweetManualTFCMapper
.
getManualDetails
(
map
);
if
(
vo
.
getStatus
()
>=
6
&&
vo
.
getStatus
()
!=
7
)
{
if
(
DateUtil
.
compareStrDay
(
vo
.
getTimeSell
(),
DateUtil
.
getNowTime
())
>
0
)
{
//未开始
vo
.
setStatus
(
9
);
}
else
if
(
DateUtil
.
compareStrDay
(
vo
.
getTimeStop
(),
DateUtil
.
getNowTime
())
<
0
)
{
//已结束
vo
.
setStatus
(
10
);
}
else
{
vo
.
setStatus
(
6
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20104
));
}
return
ResponseDto
.
success
(
vo
);
}
@Override
public
ResponseDto
<
Boolean
>
changeStatus
(
String
manualId
,
String
performancesId
,
Integer
status
)
{
try
{
int
count
=
sweetManualTFCMapper
.
selectCount
(
Wrappers
.
lambdaUpdate
(
SweetManualTFC
.
class
).
eq
(
SweetManualTFC:
:
getManualId
,
manualId
));
SweetManualTFC
sweetManual
=
SweetManualTFC
.
getNew
();
if
(
count
>
0
)
{
//修改
sweetManual
.
setStatus
(
status
);
sweetManual
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualTFCMapper
.
update
(
sweetManual
,
Wrappers
.
lambdaUpdate
(
SweetManualTFC
.
class
).
eq
(
SweetManualTFC:
:
getManualId
,
manualId
));
}
else
{
//创建
sweetManual
.
setManualId
(
IDGenerator
.
nextSnowId
());
sweetManual
.
setPerformanceId
(
performancesId
);
sweetManual
.
setStatus
(
status
);
sweetManual
.
setIsRelease
(
0
);
sweetManual
.
setCreatedAt
(
LocalDateTime
.
now
());
sweetManualTFCMapper
.
insert
(
sweetManual
);
}
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
redisDataUtils
.
deletePushListRedisData
();
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
Boolean
>
changeRelease
(
String
manualId
,
Integer
isRelease
)
{
try
{
SweetManualTFC
sweetManual
=
SweetManualTFC
.
getNew
();
sweetManual
.
setIsRelease
(
isRelease
);
sweetManual
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualTFCMapper
.
update
(
sweetManual
,
Wrappers
.
lambdaUpdate
(
SweetManualTFC
.
class
).
eq
(
SweetManualTFC:
:
getManualId
,
manualId
));
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
redisDataUtils
.
deletePushListRedisData
();
return
ResponseDto
.
success
();
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetRichtextTFCServiceImpl.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetRichtextTFC
;
import
com.liquidnet.service.sweet.mapper.SweetRichtextTFCMapper
;
import
com.liquidnet.service.sweet.service.ISweetRichtextTFCService
;
import
com.liquidnet.service.sweet.utils.RedisTFCDataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
/**
* <p>
* 电子宣传手册富文本表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public
class
SweetRichtextTFCServiceImpl
extends
ServiceImpl
<
SweetRichtextTFCMapper
,
SweetRichtextTFC
>
implements
ISweetRichtextTFCService
{
@Autowired
private
SweetRichtextTFCMapper
sweetRichtextTFCMapper
;
@Autowired
private
RedisTFCDataUtils
redisDataUtils
;
@Override
public
ResponseDto
<
SweetRichtextTFC
>
get
(
String
manualId
,
Integer
type
)
{
try
{
return
ResponseDto
.
success
(
sweetRichtextTFCMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetRichtextTFC
.
class
).
eq
(
SweetRichtextTFC:
:
getManualId
,
manualId
).
eq
(
SweetRichtextTFC:
:
getType
,
type
)));
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
details
,
String
local
,
String
pirUrl
,
Integer
type
)
{
try
{
int
count
=
sweetRichtextTFCMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
SweetRichtextTFC
.
class
).
eq
(
SweetRichtextTFC:
:
getManualId
,
manualId
).
eq
(
SweetRichtextTFC:
:
getType
,
type
));
if
(
count
>
0
){
return
ResponseDto
.
failure
(
"不能重复添加"
);
}
SweetRichtextTFC
sweetRichtext
=
SweetRichtextTFC
.
getNew
();
sweetRichtext
.
setRichtextId
(
IDGenerator
.
nextSnowId
());
sweetRichtext
.
setManualId
(
manualId
);
if
(
type
==
5
)
{
sweetRichtext
.
setLocal
(
local
);
sweetRichtext
.
setDetails
(
details
);
}
else
if
(
type
==
2
)
{
sweetRichtext
.
setPicUrl
(
pirUrl
);
}
else
{
sweetRichtext
.
setDetails
(
details
);
}
sweetRichtext
.
setType
(
type
);
sweetRichtext
.
setCreatedAt
(
LocalDateTime
.
now
());
sweetRichtextTFCMapper
.
insert
(
sweetRichtext
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
Boolean
>
change
(
String
manualId
,
String
details
,
String
local
,
String
pirUrl
,
Integer
type
)
{
try
{
SweetRichtextTFC
sweetRichtext
=
SweetRichtextTFC
.
getNew
();
sweetRichtext
.
setRichtextId
(
IDGenerator
.
nextSnowId
());
sweetRichtext
.
setManualId
(
manualId
);
sweetRichtext
.
setDetails
(
details
);
if
(
type
==
5
)
{
sweetRichtext
.
setLocal
(
local
);
}
else
if
(
type
==
2
)
{
sweetRichtext
.
setPicUrl
(
pirUrl
);
}
sweetRichtext
.
setType
(
type
);
sweetRichtext
.
setCreatedAt
(
LocalDateTime
.
now
());
sweetRichtextTFCMapper
.
update
(
sweetRichtext
,
Wrappers
.
lambdaUpdate
(
SweetRichtextTFC
.
class
).
eq
(
SweetRichtextTFC:
:
getManualId
,
manualId
).
eq
(
SweetRichtextTFC:
:
getType
,
type
));
redisDataUtils
.
setRichTextRedisData
(
manualId
,
type
.
toString
(),
sweetRichtext
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
return
ResponseDto
.
success
();
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetUserRelationTFCServiceImpl.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.service.sweet.entity.SweetUserRelationTFC
;
import
com.liquidnet.service.sweet.mapper.SweetUserRelationTFCMapper
;
import
com.liquidnet.service.sweet.service.ISweetUserRelationTFCService
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 用户 收藏/喜欢等状态 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public
class
SweetUserRelationTFCServiceImpl
extends
ServiceImpl
<
SweetUserRelationTFCMapper
,
SweetUserRelationTFC
>
implements
ISweetUserRelationTFCService
{
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/ObjectUtil.java
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
utils
;
import
com.liquidnet.service.sweet.dto.SweetManualAppletDto
;
import
com.liquidnet.service.sweet.dto.SweetManualAppletMDSKDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListMDSKDto
;
import
com.liquidnet.service.sweet.dto.*
;
import
com.liquidnet.service.sweet.dto.vo.IntegralActivityVo
;
import
com.liquidnet.service.sweet.entity.SweetManualShop
;
import
com.liquidnet.service.sweet.entity.SweetManualShopMdsk
;
import
com.liquidnet.service.sweet.entity.SweetManualShopTFC
;
import
com.liquidnet.service.sweet.vo.SweetCItyVoteStatVo
;
import
java.util.ArrayList
;
...
...
@@ -19,39 +17,56 @@ public class ObjectUtil {
private
static
final
ArrayList
<
SweetManualAppletMDSKDto
>
sweetManualAppletMDSKDtoList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
SweetManualArtistListMDSKDto
>
sweetManualArtistListMDSKDtoList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
SweetManualShopMdsk
>
sweetManualShopMDSKList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
SweetManualAppletTFCDto
>
sweetManualAppletTFCDtoList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
SweetManualArtistListTFCDto
>
sweetManualArtistListTFCDtoList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
SweetManualShopTFC
>
sweetManualShopTFCList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
SweetCItyVoteStatVo
>
sweetCItyVoteStatVoList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
IntegralActivityVo
>
sweetIntegralActivityVoList
=
new
ArrayList
<>();
public
static
ArrayList
<
SweetManualAppletDto
>
getSweetManualAppletDtoList
()
{
return
(
ArrayList
<
SweetManualAppletDto
>)
sweetManualAppletDtoList
.
clone
();
return
(
ArrayList
<
SweetManualAppletDto
>)
sweetManualAppletDtoList
.
clone
();
}
public
static
ArrayList
<
SweetManualArtistListDto
>
getSweetManualArtistListDtoList
()
{
return
(
ArrayList
<
SweetManualArtistListDto
>)
sweetManualArtistListDtoList
.
clone
();
return
(
ArrayList
<
SweetManualArtistListDto
>)
sweetManualArtistListDtoList
.
clone
();
}
public
static
ArrayList
<
SweetManualShop
>
getSweetManualShopList
()
{
return
(
ArrayList
<
SweetManualShop
>)
sweetManualShopList
.
clone
();
return
(
ArrayList
<
SweetManualShop
>)
sweetManualShopList
.
clone
();
}
public
static
ArrayList
<
SweetManualAppletMDSKDto
>
getSweetManualAppletMDSKDtoList
()
{
return
(
ArrayList
<
SweetManualAppletMDSKDto
>)
sweetManualAppletMDSKDtoList
.
clone
();
return
(
ArrayList
<
SweetManualAppletMDSKDto
>)
sweetManualAppletMDSKDtoList
.
clone
();
}
public
static
ArrayList
<
SweetManualAppletTFCDto
>
getSweetManualAppletTFCDtoList
()
{
return
(
ArrayList
<
SweetManualAppletTFCDto
>)
sweetManualAppletTFCDtoList
.
clone
();
}
public
static
ArrayList
<
SweetManualArtistListTFCDto
>
getSweetManualArtistListTFCDtoList
()
{
return
(
ArrayList
<
SweetManualArtistListTFCDto
>)
sweetManualArtistListTFCDtoList
.
clone
();
}
public
static
ArrayList
<
SweetManualShopTFC
>
getSweetManualShopTFCList
()
{
return
(
ArrayList
<
SweetManualShopTFC
>)
sweetManualShopTFCList
.
clone
();
}
public
static
ArrayList
<
SweetManualArtistListMDSKDto
>
getSweetManualArtistListMDSKDtoList
()
{
return
(
ArrayList
<
SweetManualArtistListMDSKDto
>)
sweetManualArtistListMDSKDtoList
.
clone
();
return
(
ArrayList
<
SweetManualArtistListMDSKDto
>)
sweetManualArtistListMDSKDtoList
.
clone
();
}
public
static
ArrayList
<
SweetManualShopMdsk
>
getSweetManualShopMdskList
()
{
return
(
ArrayList
<
SweetManualShopMdsk
>)
sweetManualShopMDSKList
.
clone
();
return
(
ArrayList
<
SweetManualShopMdsk
>)
sweetManualShopMDSKList
.
clone
();
}
public
static
ArrayList
<
SweetCItyVoteStatVo
>
getSweetCItyVoteStatVoList
()
{
return
(
ArrayList
<
SweetCItyVoteStatVo
>)
sweetCItyVoteStatVoList
.
clone
();
return
(
ArrayList
<
SweetCItyVoteStatVo
>)
sweetCItyVoteStatVoList
.
clone
();
}
public
static
ArrayList
<
IntegralActivityVo
>
getSweetIntegralActivityVoList
()
{
return
(
ArrayList
<
IntegralActivityVo
>)
sweetIntegralActivityVoList
.
clone
();
return
(
ArrayList
<
IntegralActivityVo
>)
sweetIntegralActivityVoList
.
clone
();
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/RedisTFCDataUtils.java
0 → 100644
View file @
8f091dc8
package
com
.
liquidnet
.
service
.
sweet
.
utils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.constant.MQConst
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.sweet.constant.SweetConstant
;
import
com.liquidnet.service.sweet.dto.SweetManualAppletTFCDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistList2TFCDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistStageListTFCDto
;
import
com.liquidnet.service.sweet.entity.SweetManualNotifyTFC
;
import
com.liquidnet.service.sweet.entity.SweetManualShopTFC
;
import
com.liquidnet.service.sweet.entity.SweetManualSortTFC
;
import
com.liquidnet.service.sweet.entity.SweetRichtextTFC
;
import
com.liquidnet.service.sweet.mapper.*
;
import
com.liquidnet.service.sweet.vo.SweetArtistsRelationVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDateTime
;
import
java.util.*
;
@Component
public
class
RedisTFCDataUtils
{
@Autowired
private
RedisUtil
redisUtil
;
@Autowired
private
QueueUtils
queueUtils
;
@Autowired
private
SweetManualTFCMapper
sweetManualTFCMapper
;
@Autowired
private
SweetManualArtistsTFCMapper
sweetManualArtistsTFCMapper
;
@Autowired
private
SweetRichtextTFCMapper
sweetRichtextTFCMapper
;
@Autowired
private
SweetManualSortTFCMapper
sweetManualSortTFCMapper
;
@Autowired
private
SweetManualNotifyTFCMapper
sweetManualNotifyTFCMapper
;
@Autowired
private
SweetManualShopTFCMapper
sweetManualShopTFCMapper
;
public
List
<
SweetManualAppletTFCDto
>
setPushList
()
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST
;
List
<
SweetManualAppletTFCDto
>
data
=
sweetManualTFCMapper
.
getManualAppletDto
();
for
(
SweetManualAppletTFCDto
item
:
data
)
{
if
(!
item
.
getIsMember
().
equals
(
1
)){
item
.
setTimeSell
(
DateUtil
.
format
(
DateUtil
.
addMin
(
DateUtil
.
parse
(
item
.
getTimeSell
(),
"yyyy-MM-dd HH:mm:ss"
),-
item
.
getPayCountdownMinute
()),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
}
item
.
setFieldName
((
String
)
redisUtil
.
getDB15RedisHGet
(
KylinRedisConst
.
FIELDS
+
":"
+
item
.
getFieldId
(),
"name"
));
item
.
setCityName
((
String
)
redisUtil
.
getDB15RedisHGet
(
KylinRedisConst
.
FIELDS
+
":"
+
item
.
getFieldId
(),
"city_name"
));
item
.
setLatitude
((
String
)
redisUtil
.
getDB15RedisHGet
(
KylinRedisConst
.
FIELDS
+
":"
+
item
.
getFieldId
(),
"latitude"
));
item
.
setLongitude
((
String
)
redisUtil
.
getDB15RedisHGet
(
KylinRedisConst
.
FIELDS
+
":"
+
item
.
getFieldId
(),
"longitude"
));
}
redisUtil
.
set
(
redisKey
,
data
);
return
data
;
}
//获取电子手册列表 (城市)
public
List
<
SweetManualAppletTFCDto
>
getPushList
()
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST
;
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setPushList
();
}
else
{
return
(
List
<
SweetManualAppletTFCDto
>)
obj
;
}
}
//获取电子手册演出详情
public
SweetManualAppletTFCDto
getAppletPerformance
(
String
manualId
)
{
List
<
SweetManualAppletTFCDto
>
data
=
getPushList
();
SweetManualAppletTFCDto
returnData
=
SweetManualAppletTFCDto
.
getNew
();
for
(
SweetManualAppletTFCDto
item
:
data
)
{
if
(
item
.
getManualId
().
equalsIgnoreCase
(
manualId
))
{
returnData
=
item
;
break
;
}
}
return
returnData
;
}
public
SweetManualArtistList2TFCDto
setTimeList
(
String
manualId
,
String
content
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST
.
concat
(
manualId
);
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"manualId"
,
manualId
);
List
<
SweetManualArtistListTFCDto
>
data
=
sweetManualArtistsTFCMapper
.
getManualList
(
map
);
//获取时间
SweetManualAppletTFCDto
sweetManualAppletDto
=
getAppletPerformance
(
manualId
);
Date
dateEnd
=
DateUtil
.
parse
(
sweetManualAppletDto
.
getTimeEnd
(),
DateUtil
.
DATE_SMALL_STR
);
Date
dateStart
=
DateUtil
.
parse
(
sweetManualAppletDto
.
getTimeStart
(),
DateUtil
.
DATE_SMALL_STR
);
int
intervalDay
=
(
int
)
DateUtil
.
intervalDays
(
dateStart
,
dateEnd
);
ArrayList
<
String
>
list
=
CollectionUtil
.
arrayListString
();
list
.
add
(
DateUtil
.
format
(
dateStart
,
DateUtil
.
Formatter
.
yyyy_MM_dd
));
for
(
int
i
=
0
;
i
<
intervalDay
;
i
++)
{
list
.
add
(
DateUtil
.
format
(
DateUtil
.
addDay
(
dateStart
,
i
+
1
),
DateUtil
.
Formatter
.
yyyy_MM_dd
));
}
//获取舞台
List
<
SweetManualArtistStageListTFCDto
>
stageData
=
sweetManualArtistsTFCMapper
.
getStageNameList
(
map
);
SweetManualArtistList2TFCDto
returnData
=
SweetManualArtistList2TFCDto
.
getNew
();
returnData
.
setDate
(
list
);
returnData
.
setData
(
data
);
returnData
.
setStage
(
stageData
);
redisUtil
.
set
(
redisKey
,
returnData
);
return
returnData
;
}
//获取时间表
public
SweetManualArtistList2TFCDto
getTimeList
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST
.
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setTimeList
(
manualId
,
null
);
}
else
{
return
(
SweetManualArtistList2TFCDto
)
obj
;
}
}
public
SweetRichtextTFC
setRichTextRedisData
(
String
manualId
,
String
type
,
SweetRichtextTFC
content
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_RICH_TEXT
.
concat
(
manualId
).
concat
(
":type:"
+
type
);
SweetRichtextTFC
sweetRichtext
;
if
(
content
!=
null
)
{
sweetRichtext
=
content
;
}
else
{
sweetRichtext
=
sweetRichtextTFCMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetRichtextTFC
.
class
).
eq
(
SweetRichtextTFC:
:
getManualId
,
manualId
).
eq
(
SweetRichtextTFC:
:
getType
,
type
));
}
redisUtil
.
set
(
redisKey
,
sweetRichtext
);
return
sweetRichtext
;
}
//获取富文本详情
public
SweetRichtextTFC
getRichTextRedisData
(
String
manualId
,
String
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_RICH_TEXT
.
concat
(
manualId
).
concat
(
":type:"
+
type
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setRichTextRedisData
(
manualId
,
type
,
null
);
}
else
{
return
(
SweetRichtextTFC
)
obj
;
}
}
public
List
<
String
>
setTagRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_SORT
.
concat
(
manualId
);
SweetManualSortTFC
data
=
sweetManualSortTFCMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManualSortTFC
.
class
).
eq
(
SweetManualSortTFC:
:
getManualId
,
manualId
));
String
[]
arrays
=
data
.
getShowPosition
().
split
(
","
);
List
<
String
>
returnData
=
new
ArrayList
<>();
for
(
String
item
:
arrays
)
{
returnData
.
add
(
item
);
// returnData.add(SweetConstant.ManualPosition.getMessage(item));
}
redisUtil
.
set
(
redisKey
,
returnData
);
return
returnData
;
}
//获取显示的标签
public
List
<
String
>
getTagRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_SORT
.
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setTagRedisData
(
manualId
);
}
else
{
return
(
List
<
String
>)
obj
;
}
}
public
List
<
SweetManualNotifyTFC
>
setNotifyRedisData
(
String
manualId
,
List
<
SweetManualNotifyTFC
>
content
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_NOTIFY_LIST
.
concat
(
manualId
);
List
<
SweetManualNotifyTFC
>
data
;
if
(
content
!=
null
)
{
data
=
content
;
}
else
{
data
=
sweetManualNotifyTFCMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualNotifyTFC
.
class
).
eq
(
SweetManualNotifyTFC:
:
getManualId
,
manualId
).
eq
(
SweetManualNotifyTFC:
:
getStatus
,
1
));
}
redisUtil
.
set
(
redisKey
,
data
);
return
data
;
}
//获取通知
public
List
<
SweetManualNotifyTFC
>
getNotifyRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_NOTIFY_LIST
.
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setNotifyRedisData
(
manualId
,
null
);
}
else
{
return
(
List
<
SweetManualNotifyTFC
>)
obj
;
}
}
public
void
deletePushListRedisData
()
{
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST
);
//列表
}
public
void
deleteTimeListRedisData
(
String
manualId
)
{
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST
.
concat
(
manualId
));
//列表
}
public
void
deleteSortRedisData
(
String
manualId
)
{
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_TFC_MANUAL_SORT
.
concat
(
manualId
));
//列表
}
public
void
setArtistsRelationRedisVo
(
String
uid
,
String
artistsId
,
String
manualId
,
String
type
)
{
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
sqlsDataA
=
CollectionUtil
.
linkedListObjectArr
();
LocalDateTime
now
=
LocalDateTime
.
now
();
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_ARTISTS_RELATION
.
concat
(
uid
).
concat
(
":manualId:"
).
concat
(
manualId
);
SweetArtistsRelationVo
vo
=
getArtistsRelationRedisVo
(
uid
,
manualId
);
vo
.
setUid
(
uid
);
if
(
type
.
equalsIgnoreCase
(
"sign"
))
{
if
(
vo
.
getSignList
()
==
null
)
{
ArrayList
<
String
>
signList
=
CollectionUtil
.
arrayListString
();
signList
.
add
(
artistsId
);
vo
.
setSignList
(
signList
);
sqls
.
add
(
SqlMapping
.
get
(
"sweet_user_relation_TFC.insert"
));
sqlsDataA
.
add
(
new
Object
[]{
uid
,
2
,
artistsId
,
manualId
,
now
});
}
else
{
if
(
vo
.
getSignList
().
contains
(
artistsId
))
{
vo
.
getSignList
().
remove
(
artistsId
);
sqls
.
add
(
SqlMapping
.
get
(
"sweet_user_relation_TFC.delete"
));
sqlsDataA
.
add
(
new
Object
[]{
uid
,
artistsId
,
manualId
,
2
});
}
else
{
vo
.
getSignList
().
add
(
artistsId
);
sqls
.
add
(
SqlMapping
.
get
(
"sweet_user_relation_TFC.insert"
));
sqlsDataA
.
add
(
new
Object
[]{
uid
,
2
,
artistsId
,
manualId
,
now
});
}
}
}
else
if
(
type
.
equalsIgnoreCase
(
"watch"
))
{
if
(
vo
.
getWatchList
()
==
null
)
{
ArrayList
<
String
>
watchList
=
CollectionUtil
.
arrayListString
();
watchList
.
add
(
artistsId
);
vo
.
setWatchList
(
watchList
);
sqls
.
add
(
SqlMapping
.
get
(
"sweet_user_relation_TFC.insert"
));
sqlsDataA
.
add
(
new
Object
[]{
uid
,
1
,
artistsId
,
manualId
,
now
});
}
else
{
if
(
vo
.
getWatchList
().
contains
(
artistsId
))
{
vo
.
getWatchList
().
remove
(
artistsId
);
sqls
.
add
(
SqlMapping
.
get
(
"sweet_user_relation_TFC.delete"
));
sqlsDataA
.
add
(
new
Object
[]{
uid
,
artistsId
,
manualId
,
1
});
}
else
{
vo
.
getWatchList
().
add
(
artistsId
);
sqls
.
add
(
SqlMapping
.
get
(
"sweet_user_relation_TFC.insert"
));
sqlsDataA
.
add
(
new
Object
[]{
uid
,
1
,
artistsId
,
manualId
,
now
});
}
}
}
redisUtil
.
set
(
redisKey
,
vo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
SweetQueue
.
ARTISTS_RELATION
.
getKey
(),
SqlMapping
.
gets
(
sqls
,
sqlsDataA
));
}
//获取 签售
//获取 想看
public
SweetArtistsRelationVo
getArtistsRelationRedisVo
(
String
uid
,
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_ARTISTS_RELATION
.
concat
(
uid
).
concat
(
":manualId:"
).
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
SweetArtistsRelationVo
.
getNew
();
}
else
{
return
(
SweetArtistsRelationVo
)
obj
;
}
}
//获取 商铺
public
List
<
SweetManualShopTFC
>
setManualShopRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_SHOP
.
concat
(
manualId
);
List
<
SweetManualShopTFC
>
list
=
sweetManualShopTFCMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualShopTFC
.
class
).
eq
(
SweetManualShopTFC:
:
getManualId
,
manualId
).
orderBy
(
true
,
false
,
SweetManualShopTFC:
:
getSort
));
redisUtil
.
set
(
redisKey
,
list
);
return
list
;
}
public
List
<
SweetManualShopTFC
>
getManualShopRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_TFC_SHOP
.
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setManualShopRedisData
(
manualId
);
}
else
{
return
(
List
<
SweetManualShopTFC
>)
obj
;
}
}
// // 艺人详情
// public SweetArtists setArtistsDetails(String artistsId) {
// String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_ARTISTS_DETAILS.concat(artistsId);
// SweetArtists sweetArtists = sweetArtistsMapper.selectOne(Wrappers.lambdaQuery(SweetArtists.class).eq(SweetArtists::getArtistsId, artistsId).eq(SweetArtists::getStatus, 1));
// redisUtil.set(redisKey, sweetArtists);
// return sweetArtists;
// }
//
// public SweetArtists getArtistsDetails(String artistsId) {
// String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_ARTISTS_DETAILS.concat(artistsId);
// Object obj = redisUtil.get(redisKey);
// if (obj == null) {
// return setArtistsDetails(artistsId);
// } else {
// return (SweetArtists) obj;
// }
// }
}
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