记得上下班打卡 | 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
2c0b39a8
Commit
2c0b39a8
authored
Jun 08, 2026
by
stonepy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
宣传手册添加餐饮攻略和相册上传链接,失物招领问卷星id, 地图
parent
eb4e048b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
324 additions
and
0 deletions
+324
-0
SweetConstant.java
...a/com/liquidnet/service/sweet/constant/SweetConstant.java
+1
-0
SweetManualExtConfigParam.java
...uidnet/service/sweet/param/SweetManualExtConfigParam.java
+27
-0
ISweetManualExtConfigService.java
...t/service/sweet/service/ISweetManualExtConfigService.java
+15
-0
SweetManualExtConfigDto.java
.../liquidnet/service/sweet/dto/SweetManualExtConfigDto.java
+27
-0
SweetManual.java
.../java/com/liquidnet/service/sweet/entity/SweetManual.java
+20
-0
db_20250608_manual_ext_config.sql
...dnet-service-sweet/docu/db_20250608_manual_ext_config.sql
+7
-0
SweetAppletController.java
...idnet/service/sweet/controller/SweetAppletController.java
+10
-0
SweetManualExtConfigController.java
...vice/sweet/controller/SweetManualExtConfigController.java
+43
-0
SweetManualExtConfigServiceImpl.java
...e/sweet/service/impl/SweetManualExtConfigServiceImpl.java
+140
-0
RedisDataUtils.java
...ava/com/liquidnet/service/sweet/utils/RedisDataUtils.java
+34
-0
No files found.
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/constant/SweetConstant.java
View file @
2c0b39a8
...
...
@@ -9,6 +9,7 @@ public class SweetConstant {
public
final
static
String
REDIS_KEY_SWEET_MANUAL_NOTIFY_LIST
=
"sweet:manual:notify:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_RICH_TEXT
=
"sweet:manual:richText:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_SORT
=
"sweet:manual:sort:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_EXT_CONFIG
=
"sweet:manual:extConfig:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_ARTISTS_RELATION
=
"sweet:artists:relation:uid:"
;
public
final
static
String
REDIS_KEY_SWEET_ARTISTS_DETAILS
=
"sweet:artists:details:"
;
public
final
static
String
REDIS_KEY_SWEET_SHOP
=
"sweet:artists:shop:manual:"
;
...
...
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/param/SweetManualExtConfigParam.java
0 → 100644
View file @
2c0b39a8
package
com
.
liquidnet
.
service
.
sweet
.
param
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@ApiModel
(
"草莓音乐节手册扩展配置参数"
)
public
class
SweetManualExtConfigParam
implements
Serializable
{
@ApiModelProperty
(
value
=
"电子手册id"
,
required
=
true
)
private
String
manualId
;
@ApiModelProperty
(
"餐饮攻略链接"
)
private
String
foodGuideUrl
;
@ApiModelProperty
(
"相册链接"
)
private
String
albumUrl
;
@ApiModelProperty
(
"失物招领问卷星ID"
)
private
String
lostFoundWjxId
;
@ApiModelProperty
(
"地图GeoJSON文件地址"
)
private
String
mapGeojsonUrl
;
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetManualExtConfigService.java
0 → 100644
View file @
2c0b39a8
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualExtConfigDto
;
import
com.liquidnet.service.sweet.param.SweetManualExtConfigParam
;
import
org.springframework.web.multipart.MultipartFile
;
public
interface
ISweetManualExtConfigService
{
ResponseDto
<
SweetManualExtConfigDto
>
get
(
String
manualId
);
ResponseDto
<
Boolean
>
save
(
SweetManualExtConfigParam
param
);
ResponseDto
<
String
>
uploadGeojson
(
MultipartFile
file
);
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/dto/SweetManualExtConfigDto.java
0 → 100644
View file @
2c0b39a8
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
SweetManualExtConfigDto
implements
Serializable
{
@ApiModelProperty
(
"电子手册id"
)
private
String
manualId
;
@ApiModelProperty
(
"餐饮攻略链接"
)
private
String
foodGuideUrl
;
@ApiModelProperty
(
"相册链接"
)
private
String
albumUrl
;
@ApiModelProperty
(
"失物招领问卷星ID"
)
private
String
lostFoundWjxId
;
@ApiModelProperty
(
"地图GeoJSON文件地址"
)
private
String
mapGeojsonUrl
;
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetManual.java
View file @
2c0b39a8
...
...
@@ -50,6 +50,26 @@ public class SweetManual implements Serializable,Cloneable {
*/
private
Integer
isReleaseManual
;
/**
* 餐饮攻略链接
*/
private
String
foodGuideUrl
;
/**
* 相册链接
*/
private
String
albumUrl
;
/**
* 失物招领问卷星ID
*/
private
String
lostFoundWjxId
;
/**
* 地图GeoJSON文件地址
*/
private
String
mapGeojsonUrl
;
/**
* 创建时间
*/
...
...
liquidnet-bus-service/liquidnet-service-sweet/docu/db_20250608_manual_ext_config.sql
0 → 100644
View file @
2c0b39a8
use
ln_scene
;
ALTER
TABLE
`sweet_manual`
ADD
COLUMN
`food_guide_url`
varchar
(
500
)
NOT
NULL
DEFAULT
''
COMMENT
'餐饮攻略链接'
AFTER
`is_release_manual`
,
ADD
COLUMN
`album_url`
varchar
(
500
)
NOT
NULL
DEFAULT
''
COMMENT
'相册链接'
AFTER
`food_guide_url`
,
ADD
COLUMN
`lost_found_wjx_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'失物招领问卷星ID'
AFTER
`album_url`
,
ADD
COLUMN
`map_geojson_url`
varchar
(
500
)
NOT
NULL
DEFAULT
''
COMMENT
'地图GeoJSON文件地址'
AFTER
`lost_found_wjx_id`
;
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetAppletController.java
View file @
2c0b39a8
...
...
@@ -5,6 +5,7 @@ import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.sweet.dto.SweetManualAppletDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListDto
;
import
com.liquidnet.service.sweet.dto.SweetManualExtConfigDto
;
import
com.liquidnet.service.sweet.dto.SweetPerformArtistTimeListDto
;
import
com.liquidnet.service.sweet.entity.SweetManualNotify
;
import
com.liquidnet.service.sweet.entity.SweetManualShop
;
...
...
@@ -228,6 +229,15 @@ public class SweetAppletController {
return
ResponseDto
.
success
(
redisDataUtils
.
getRichTextRedisData
(
manualId
,
type
));
}
@GetMapping
(
"manualExt"
)
@ApiOperation
(
"草莓音乐节手册扩展配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
})
public
ResponseDto
<
SweetManualExtConfigDto
>
manualExt
(
@RequestParam
String
manualId
)
{
return
ResponseDto
.
success
(
redisDataUtils
.
getManualExtConfigRedisData
(
manualId
));
}
@PostMapping
(
"artistsWatch"
)
@ApiOperation
(
"艺人-想看"
)
@ApiImplicitParams
({
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetManualExtConfigController.java
0 → 100644
View file @
2c0b39a8
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.SweetManualExtConfigDto
;
import
com.liquidnet.service.sweet.param.SweetManualExtConfigParam
;
import
com.liquidnet.service.sweet.service.ISweetManualExtConfigService
;
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
org.springframework.web.multipart.MultipartFile
;
@Api
(
tags
=
"草莓音乐节手册扩展配置"
)
@RestController
@RequestMapping
(
"/sweet-manual-ext"
)
public
class
SweetManualExtConfigController
{
@Autowired
private
ISweetManualExtConfigService
sweetManualExtConfigService
;
@GetMapping
(
"get"
)
@ApiOperation
(
"获取手册扩展配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"电子手册id"
,
required
=
true
),
})
public
ResponseDto
<
SweetManualExtConfigDto
>
get
(
@RequestParam
String
manualId
)
{
return
sweetManualExtConfigService
.
get
(
manualId
);
}
@PostMapping
(
"save"
)
@ApiOperation
(
"保存手册扩展配置"
)
public
ResponseDto
<
Boolean
>
save
(
@RequestBody
SweetManualExtConfigParam
param
)
{
return
sweetManualExtConfigService
.
save
(
param
);
}
@PostMapping
(
"uploadGeojson"
)
@ApiOperation
(
"上传地图GeoJSON文件"
)
public
ResponseDto
<
String
>
uploadGeojson
(
@RequestPart
(
"file"
)
MultipartFile
file
)
{
return
sweetManualExtConfigService
.
uploadGeojson
(
file
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetManualExtConfigServiceImpl.java
0 → 100644
View file @
2c0b39a8
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.dto.vo.basicServices.UploadVo
;
import
com.liquidnet.service.sweet.dto.SweetManualExtConfigDto
;
import
com.liquidnet.service.sweet.entity.SweetManual
;
import
com.liquidnet.service.sweet.mapper.SweetManualMapper
;
import
com.liquidnet.service.sweet.param.SweetManualExtConfigParam
;
import
com.liquidnet.service.sweet.service.ISweetManualExtConfigService
;
import
com.liquidnet.service.sweet.utils.RedisDataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.ByteArrayResource
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.time.LocalDateTime
;
@Service
public
class
SweetManualExtConfigServiceImpl
implements
ISweetManualExtConfigService
{
private
static
final
String
GEOJSON_IMG_PREFIX
=
"https://img.zhengzai.tv/"
;
@Value
(
"${liquidnet.service.platform.url}"
)
private
String
platformUrl
;
@Autowired
private
SweetManualMapper
sweetManualMapper
;
@Autowired
private
RedisDataUtils
redisDataUtils
;
@Override
public
ResponseDto
<
SweetManualExtConfigDto
>
get
(
String
manualId
)
{
SweetManual
manual
=
sweetManualMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManual
.
class
).
eq
(
SweetManual:
:
getManualId
,
manualId
));
if
(
manual
==
null
)
{
return
ResponseDto
.
failure
(
"手册不存在"
);
}
return
ResponseDto
.
success
(
toDto
(
manual
));
}
@Override
public
ResponseDto
<
Boolean
>
save
(
SweetManualExtConfigParam
param
)
{
if
(
StringUtil
.
isBlank
(
param
.
getManualId
()))
{
return
ResponseDto
.
failure
(
"手册id不能为空"
);
}
SweetManual
exist
=
sweetManualMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManual
.
class
).
eq
(
SweetManual:
:
getManualId
,
param
.
getManualId
()));
if
(
exist
==
null
)
{
return
ResponseDto
.
failure
(
"手册不存在"
);
}
SweetManual
update
=
SweetManual
.
getNew
();
update
.
setFoodGuideUrl
(
nullToEmpty
(
param
.
getFoodGuideUrl
()));
update
.
setAlbumUrl
(
nullToEmpty
(
param
.
getAlbumUrl
()));
update
.
setLostFoundWjxId
(
nullToEmpty
(
param
.
getLostFoundWjxId
()));
update
.
setMapGeojsonUrl
(
nullToEmpty
(
param
.
getMapGeojsonUrl
()));
update
.
setUpdatedAt
(
LocalDateTime
.
now
());
sweetManualMapper
.
update
(
update
,
Wrappers
.
lambdaUpdate
(
SweetManual
.
class
)
.
eq
(
SweetManual:
:
getManualId
,
param
.
getManualId
()));
redisDataUtils
.
setManualExtConfigRedisData
(
param
.
getManualId
(),
toDto
(
exist
,
param
));
return
ResponseDto
.
success
(
true
);
}
@Override
public
ResponseDto
<
String
>
uploadGeojson
(
MultipartFile
file
)
{
if
(
file
==
null
||
file
.
isEmpty
())
{
return
ResponseDto
.
failure
(
"文件不能为空"
);
}
String
filename
=
file
.
getOriginalFilename
();
if
(
StringUtil
.
isBlank
(
filename
)
||
(!
filename
.
toLowerCase
().
endsWith
(
".geojson"
)
&&
!
filename
.
toLowerCase
().
endsWith
(
".json"
)))
{
return
ResponseDto
.
failure
(
"仅支持上传.geojson或.json文件"
);
}
try
{
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
ByteArrayResource
fileResource
=
new
ByteArrayResource
(
file
.
getBytes
())
{
@Override
public
String
getFilename
()
{
return
filename
;
}
};
MultiValueMap
<
String
,
Object
>
body
=
new
LinkedMultiValueMap
<>();
body
.
add
(
"file"
,
fileResource
);
body
.
add
(
"pathName"
,
"sweet/manual/geojson"
);
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
requestEntity
=
new
HttpEntity
<>(
body
,
headers
);
ResponseEntity
<
String
>
response
=
restTemplate
.
postForEntity
(
platformUrl
.
concat
(
"/platform/basicServices/alOss/upload"
),
requestEntity
,
String
.
class
);
ResponseDto
<
UploadVo
>
dto
=
JsonUtils
.
fromJson
(
response
.
getBody
(),
new
TypeReference
<
ResponseDto
<
UploadVo
>>()
{
});
if
(
dto
==
null
||
dto
.
getData
()
==
null
||
StringUtil
.
isBlank
(
dto
.
getData
().
getOssPath
()))
{
return
ResponseDto
.
failure
(
"文件上传失败"
);
}
return
ResponseDto
.
success
(
GEOJSON_IMG_PREFIX
.
concat
(
dto
.
getData
().
getOssPath
()));
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
(
"文件上传失败"
);
}
}
private
SweetManualExtConfigDto
toDto
(
SweetManual
manual
)
{
SweetManualExtConfigDto
dto
=
new
SweetManualExtConfigDto
();
dto
.
setManualId
(
manual
.
getManualId
());
dto
.
setFoodGuideUrl
(
manual
.
getFoodGuideUrl
());
dto
.
setAlbumUrl
(
manual
.
getAlbumUrl
());
dto
.
setLostFoundWjxId
(
manual
.
getLostFoundWjxId
());
dto
.
setMapGeojsonUrl
(
manual
.
getMapGeojsonUrl
());
return
dto
;
}
private
SweetManualExtConfigDto
toDto
(
SweetManual
exist
,
SweetManualExtConfigParam
param
)
{
SweetManualExtConfigDto
dto
=
new
SweetManualExtConfigDto
();
dto
.
setManualId
(
param
.
getManualId
());
dto
.
setFoodGuideUrl
(
nullToEmpty
(
param
.
getFoodGuideUrl
()));
dto
.
setAlbumUrl
(
nullToEmpty
(
param
.
getAlbumUrl
()));
dto
.
setLostFoundWjxId
(
nullToEmpty
(
param
.
getLostFoundWjxId
()));
dto
.
setMapGeojsonUrl
(
nullToEmpty
(
param
.
getMapGeojsonUrl
()));
return
dto
;
}
private
String
nullToEmpty
(
String
value
)
{
return
value
==
null
?
""
:
value
;
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/RedisDataUtils.java
View file @
2c0b39a8
...
...
@@ -179,6 +179,40 @@ public class RedisDataUtils {
}
}
public
SweetManualExtConfigDto
setManualExtConfigRedisData
(
String
manualId
,
SweetManualExtConfigDto
content
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_EXT_CONFIG
.
concat
(
manualId
);
SweetManualExtConfigDto
configDto
;
if
(
content
!=
null
)
{
configDto
=
content
;
}
else
{
SweetManual
manual
=
sweetManualMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManual
.
class
).
eq
(
SweetManual:
:
getManualId
,
manualId
));
configDto
=
new
SweetManualExtConfigDto
();
if
(
manual
!=
null
)
{
configDto
.
setManualId
(
manual
.
getManualId
());
configDto
.
setFoodGuideUrl
(
manual
.
getFoodGuideUrl
());
configDto
.
setAlbumUrl
(
manual
.
getAlbumUrl
());
configDto
.
setLostFoundWjxId
(
manual
.
getLostFoundWjxId
());
configDto
.
setMapGeojsonUrl
(
manual
.
getMapGeojsonUrl
());
}
}
redisUtil
.
set
(
redisKey
,
configDto
);
return
configDto
;
}
public
SweetManualExtConfigDto
getManualExtConfigRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_EXT_CONFIG
.
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setManualExtConfigRedisData
(
manualId
,
null
);
}
return
(
SweetManualExtConfigDto
)
obj
;
}
public
void
deleteManualExtConfigRedisData
(
String
manualId
)
{
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_EXT_CONFIG
.
concat
(
manualId
));
}
public
List
<
String
>
setTagRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_SORT
.
concat
(
manualId
);
SweetManualSort
data
=
sweetManualSortMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManualSort
.
class
).
eq
(
SweetManualSort:
:
getManualId
,
manualId
));
...
...
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