记得上下班打卡 | git大法好,push需谨慎

Commit a97e929b authored by wangyifan's avatar wangyifan

未绑定艺人 专题支持上传指定图片

parent c324cca7
...@@ -31,6 +31,7 @@ CREATE TABLE `goblin_artist_topic` ( ...@@ -31,6 +31,7 @@ CREATE TABLE `goblin_artist_topic` (
`store_id` varchar(64) NOT NULL COMMENT '所属店铺ID', `store_id` varchar(64) NOT NULL COMMENT '所属店铺ID',
`topic_name` varchar(100) NOT NULL COMMENT '专题名称', `topic_name` varchar(100) NOT NULL COMMENT '专题名称',
`artist_id` varchar(64) DEFAULT NULL COMMENT '关联艺人ID,可空', `artist_id` varchar(64) DEFAULT NULL COMMENT '关联艺人ID,可空',
`custom_avatar_url` varchar(500) DEFAULT NULL COMMENT '未关联艺人时的自定义头像',
`template_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1双列网格 2单列列表', `template_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1双列网格 2单列列表',
`banner_url` varchar(500) DEFAULT NULL COMMENT '专题banner', `banner_url` varchar(500) DEFAULT NULL COMMENT '专题banner',
`banner_height` int(11) NOT NULL DEFAULT 240 COMMENT 'banner高度px', `banner_height` int(11) NOT NULL DEFAULT 240 COMMENT 'banner高度px',
...@@ -91,4 +92,10 @@ INSERT INTO `sys_menu` VALUES (2230, '上下架', 2221, 5, '#', 'menuItem', 'F', ...@@ -91,4 +92,10 @@ INSERT INTO `sys_menu` VALUES (2230, '上下架', 2221, 5, '#', 'menuItem', 'F',
INSERT INTO `sys_menu` VALUES (2231, '设置排序', 2221, 6, '#', 'menuItem', 'F', '0', '1', 'goblin:artist:topic:sort', '#', 'admin', '2026-08-14 14:30:00', '', NULL, ''); INSERT INTO `sys_menu` VALUES (2231, '设置排序', 2221, 6, '#', 'menuItem', 'F', '0', '1', 'goblin:artist:topic:sort', '#', 'admin', '2026-08-14 14:30:00', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2232, '删除专题', 2221, 7, '#', 'menuItem', 'F', '0', '1', 'goblin:artist:topic:delete', '#', 'admin', '2026-08-14 14:30:00', '', NULL, ''); INSERT INTO `sys_menu` VALUES (2232, '删除专题', 2221, 7, '#', 'menuItem', 'F', '0', '1', 'goblin:artist:topic:delete', '#', 'admin', '2026-08-14 14:30:00', '', NULL, '');
-- TODO 再将“演出管理”下的”艺人管理“菜单移动到新增的“艺人管理”目录下 -- TODO 再将“演出管理”下的”艺人管理“菜单移动到新增的“艺人管理”目录下
\ No newline at end of file
-- ----------------------------
-- 已建库增量:未关联艺人时的自定义头像
-- ----------------------------
-- ALTER TABLE `goblin_artist_topic`
-- ADD COLUMN `custom_avatar_url` varchar(500) DEFAULT NULL COMMENT '未关联艺人时的自定义头像' AFTER `artist_id`;
...@@ -28,6 +28,10 @@ public class GoblinStoreMgtArtistTopicCreateParams implements Serializable { ...@@ -28,6 +28,10 @@ public class GoblinStoreMgtArtistTopicCreateParams implements Serializable {
@ApiModelProperty(value = "关联艺人ID,非必填") @ApiModelProperty(value = "关联艺人ID,非必填")
private String artistId; private String artistId;
@ApiModelProperty(value = "未关联艺人时的自定义头像")
@Size(max = 500, message = "自定义头像地址长度超限")
private String customAvatarUrl;
@ApiModelProperty(value = "模版类型 1双列 2单列") @ApiModelProperty(value = "模版类型 1双列 2单列")
@NotNull(message = "模版类型不能为空") @NotNull(message = "模版类型不能为空")
private Integer templateType; private Integer templateType;
......
...@@ -32,6 +32,10 @@ public class GoblinStoreMgtArtistTopicUpdateParams implements Serializable { ...@@ -32,6 +32,10 @@ public class GoblinStoreMgtArtistTopicUpdateParams implements Serializable {
@ApiModelProperty(value = "关联艺人ID,非必填;传空字符串表示清空") @ApiModelProperty(value = "关联艺人ID,非必填;传空字符串表示清空")
private String artistId; private String artistId;
@ApiModelProperty(value = "未关联艺人时的自定义头像;有艺人时忽略")
@Size(max = 500, message = "自定义头像地址长度超限")
private String customAvatarUrl;
@ApiModelProperty(value = "模版类型 1双列 2单列") @ApiModelProperty(value = "模版类型 1双列 2单列")
@NotNull(message = "模版类型不能为空") @NotNull(message = "模版类型不能为空")
private Integer templateType; private Integer templateType;
......
...@@ -28,9 +28,12 @@ public class GoblinStoreMgtArtistTopicDetailVo implements Serializable { ...@@ -28,9 +28,12 @@ public class GoblinStoreMgtArtistTopicDetailVo implements Serializable {
@ApiModelProperty("关联艺人名称") @ApiModelProperty("关联艺人名称")
private String artistName; private String artistName;
@ApiModelProperty("艺人头像") @ApiModelProperty("展示头像:有艺人取艺人头像,否则取自定义头像")
private String avatarUrl; private String avatarUrl;
@ApiModelProperty("未关联艺人时的自定义头像")
private String customAvatarUrl;
@ApiModelProperty("模版类型") @ApiModelProperty("模版类型")
private Integer templateType; private Integer templateType;
......
...@@ -47,9 +47,12 @@ public class GoblinStoreMgtArtistTopicPageVo implements Serializable { ...@@ -47,9 +47,12 @@ public class GoblinStoreMgtArtistTopicPageVo implements Serializable {
@ApiModelProperty("关联艺人名称") @ApiModelProperty("关联艺人名称")
private String artistName; private String artistName;
@ApiModelProperty("艺人头像") @ApiModelProperty("展示头像:有艺人取艺人头像,否则取自定义头像")
private String avatarUrl; private String avatarUrl;
@ApiModelProperty("未关联艺人时的自定义头像")
private String customAvatarUrl;
@ApiModelProperty("关联商品数量") @ApiModelProperty("关联商品数量")
private Integer goodsCount; private Integer goodsCount;
......
...@@ -17,6 +17,8 @@ public class GoblinArtistTopicVo implements Serializable { ...@@ -17,6 +17,8 @@ public class GoblinArtistTopicVo implements Serializable {
private String storeId; private String storeId;
private String topicName; private String topicName;
private String artistId; private String artistId;
/** 未关联艺人时的自定义头像 */
private String customAvatarUrl;
private Integer templateType; private Integer templateType;
private String bannerUrl; private String bannerUrl;
private Integer bannerHeight; private Integer bannerHeight;
......
...@@ -26,7 +26,7 @@ public class GoblinFrontArtistTopicDetailVo implements Serializable { ...@@ -26,7 +26,7 @@ public class GoblinFrontArtistTopicDetailVo implements Serializable {
private String artistId; private String artistId;
@ApiModelProperty("艺人名称") @ApiModelProperty("艺人名称")
private String artistName; private String artistName;
@ApiModelProperty("艺人头像") @ApiModelProperty("头像:有艺人取艺人头像,否则取自定义头像")
private String avatarUrl; private String avatarUrl;
@ApiModelProperty("模版类型 1双列 2单列") @ApiModelProperty("模版类型 1双列 2单列")
private Integer templateType; private Integer templateType;
......
...@@ -41,7 +41,7 @@ public class GoblinFrontArtistTopicHomeVo implements Serializable { ...@@ -41,7 +41,7 @@ public class GoblinFrontArtistTopicHomeVo implements Serializable {
private String artistId; private String artistId;
@ApiModelProperty("艺人名称") @ApiModelProperty("艺人名称")
private String artistName; private String artistName;
@ApiModelProperty("艺人头像") @ApiModelProperty("头像:有艺人取艺人头像,否则取自定义头像")
private String avatarUrl; private String avatarUrl;
} }
} }
...@@ -44,7 +44,7 @@ public class GoblinFrontArtistTopicListPageVo implements Serializable { ...@@ -44,7 +44,7 @@ public class GoblinFrontArtistTopicListPageVo implements Serializable {
private String artistId; private String artistId;
@ApiModelProperty("艺人名称") @ApiModelProperty("艺人名称")
private String artistName; private String artistName;
@ApiModelProperty("艺人头像") @ApiModelProperty("头像:有艺人取艺人头像,否则取自定义头像")
private String avatarUrl; private String avatarUrl;
} }
} }
...@@ -28,6 +28,9 @@ public class GoblinArtistTopic implements Serializable { ...@@ -28,6 +28,9 @@ public class GoblinArtistTopic implements Serializable {
private String artistId; private String artistId;
/** 未关联艺人时的自定义头像 */
private String customAvatarUrl;
/** 1双列 2单列 */ /** 1双列 2单列 */
private Integer templateType; private Integer templateType;
......
...@@ -112,6 +112,8 @@ public class GoblinFrontArtistTopicServiceImpl { ...@@ -112,6 +112,8 @@ public class GoblinFrontArtistTopicServiceImpl {
vo.setArtistName(artist.getArtistName()); vo.setArtistName(artist.getArtistName());
vo.setAvatarUrl(artist.getAvatarUrl()); vo.setAvatarUrl(artist.getAvatarUrl());
} }
} else {
vo.setAvatarUrl(topic.getCustomAvatarUrl());
} }
vo.setGoods(buildGoods(topic.getGoods(), sortType, sortOrder)); vo.setGoods(buildGoods(topic.getGoods(), sortType, sortOrder));
return ResponseDto.success(vo); return ResponseDto.success(vo);
...@@ -279,6 +281,8 @@ public class GoblinFrontArtistTopicServiceImpl { ...@@ -279,6 +281,8 @@ public class GoblinFrontArtistTopicServiceImpl {
if (artist != null) { if (artist != null) {
item.setArtistName(artist.getArtistName()); item.setArtistName(artist.getArtistName());
item.setAvatarUrl(artist.getAvatarUrl()); item.setAvatarUrl(artist.getAvatarUrl());
} else {
item.setAvatarUrl(t.getCustomAvatarUrl());
} }
return item; return item;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -299,6 +303,8 @@ public class GoblinFrontArtistTopicServiceImpl { ...@@ -299,6 +303,8 @@ public class GoblinFrontArtistTopicServiceImpl {
if (artist != null) { if (artist != null) {
item.setArtistName(artist.getArtistName()); item.setArtistName(artist.getArtistName());
item.setAvatarUrl(artist.getAvatarUrl()); item.setAvatarUrl(artist.getAvatarUrl());
} else {
item.setAvatarUrl(t.getCustomAvatarUrl());
} }
return item; return item;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
......
...@@ -339,10 +339,13 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -339,10 +339,13 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
item.setTopicId(topic.getTopicId()); item.setTopicId(topic.getTopicId());
item.setTopicName(topic.getTopicName()); item.setTopicName(topic.getTopicName());
item.setArtistId(topic.getArtistId()); item.setArtistId(topic.getArtistId());
item.setCustomAvatarUrl(topic.getCustomAvatarUrl());
KylinArtist artist = artistMap.get(topic.getArtistId()); KylinArtist artist = artistMap.get(topic.getArtistId());
if (artist != null) { if (artist != null) {
item.setArtistName(artist.getArtistName()); item.setArtistName(artist.getArtistName());
item.setAvatarUrl(artist.getAvatarUrl()); item.setAvatarUrl(artist.getAvatarUrl());
} else {
item.setAvatarUrl(topic.getCustomAvatarUrl());
} }
item.setGoodsCount(topic.getGoods() != null ? topic.getGoods().size() : 0); item.setGoodsCount(topic.getGoods() != null ? topic.getGoods().size() : 0);
item.setOnSaleStart(topic.getOnSaleStart()); item.setOnSaleStart(topic.getOnSaleStart());
...@@ -370,6 +373,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -370,6 +373,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
vo.setTopicId(topic.getTopicId()); vo.setTopicId(topic.getTopicId());
vo.setTopicName(topic.getTopicName()); vo.setTopicName(topic.getTopicName());
vo.setArtistId(topic.getArtistId()); vo.setArtistId(topic.getArtistId());
vo.setCustomAvatarUrl(topic.getCustomAvatarUrl());
vo.setTemplateType(topic.getTemplateType()); vo.setTemplateType(topic.getTemplateType());
vo.setBannerUrl(topic.getBannerUrl()); vo.setBannerUrl(topic.getBannerUrl());
vo.setBannerHeight(topic.getBannerHeight()); vo.setBannerHeight(topic.getBannerHeight());
...@@ -383,6 +387,8 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -383,6 +387,8 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
vo.setArtistName(artist.getArtistName()); vo.setArtistName(artist.getArtistName());
vo.setAvatarUrl(artist.getAvatarUrl()); vo.setAvatarUrl(artist.getAvatarUrl());
} }
} else {
vo.setAvatarUrl(topic.getCustomAvatarUrl());
} }
if (!CollectionUtils.isEmpty(topic.getGoods())) { if (!CollectionUtils.isEmpty(topic.getGoods())) {
...@@ -450,6 +456,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -450,6 +456,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
topicVo.setStoreId(storeId); topicVo.setStoreId(storeId);
topicVo.setTopicName(params.getTopicName()); topicVo.setTopicName(params.getTopicName());
topicVo.setArtistId(StringUtils.trimToNull(params.getArtistId())); topicVo.setArtistId(StringUtils.trimToNull(params.getArtistId()));
topicVo.setCustomAvatarUrl(resolveCustomAvatarUrl(params.getArtistId(), params.getCustomAvatarUrl()));
topicVo.setTemplateType(params.getTemplateType()); topicVo.setTemplateType(params.getTemplateType());
topicVo.setBannerUrl(params.getBannerUrl()); topicVo.setBannerUrl(params.getBannerUrl());
topicVo.setBannerHeight(params.getBannerHeight() == null ? GoblinArtistConst.DEFAULT_BANNER_HEIGHT : params.getBannerHeight()); topicVo.setBannerHeight(params.getBannerHeight() == null ? GoblinArtistConst.DEFAULT_BANNER_HEIGHT : params.getBannerHeight());
...@@ -526,6 +533,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -526,6 +533,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
Update update = new Update(); Update update = new Update();
update.set("topicName", params.getTopicName()); update.set("topicName", params.getTopicName());
update.set("artistId", StringUtils.trimToNull(params.getArtistId())); update.set("artistId", StringUtils.trimToNull(params.getArtistId()));
update.set("customAvatarUrl", resolveCustomAvatarUrl(params.getArtistId(), params.getCustomAvatarUrl()));
update.set("templateType", params.getTemplateType()); update.set("templateType", params.getTemplateType());
update.set("bannerUrl", params.getBannerUrl()); update.set("bannerUrl", params.getBannerUrl());
update.set("bannerHeight", params.getBannerHeight() == null ? GoblinArtistConst.DEFAULT_BANNER_HEIGHT : params.getBannerHeight()); update.set("bannerHeight", params.getBannerHeight() == null ? GoblinArtistConst.DEFAULT_BANNER_HEIGHT : params.getBannerHeight());
...@@ -665,6 +673,14 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -665,6 +673,14 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
return ResponseDto.success(null); return ResponseDto.success(null);
} }
/** 有艺人时不存自定义头像 */
private String resolveCustomAvatarUrl(String artistId, String customAvatarUrl) {
if (StringUtils.isNotBlank(artistId)) {
return null;
}
return StringUtils.trimToNull(customAvatarUrl);
}
private ResponseDto<Void> checkGoodsBelong(String storeId, Map<String, GoblinGoods> goodsMap, private ResponseDto<Void> checkGoodsBelong(String storeId, Map<String, GoblinGoods> goodsMap,
List<GoblinStoreMgtArtistTopicGoodsItemParams> paramsGoods) { List<GoblinStoreMgtArtistTopicGoodsItemParams> paramsGoods) {
if (CollectionUtils.isEmpty(paramsGoods)) { if (CollectionUtils.isEmpty(paramsGoods)) {
...@@ -788,7 +804,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -788,7 +804,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
LinkedList<Object[]> topicObjs = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> topicObjs = CollectionUtil.linkedListObjectArr();
topicObjs.add(new Object[]{ topicObjs.add(new Object[]{
topicVo.getTopicId(), topicVo.getStoreId(), topicVo.getTopicName(), topicVo.getTopicId(), topicVo.getStoreId(), topicVo.getTopicName(),
topicVo.getArtistId(), topicVo.getTemplateType(), topicVo.getArtistId(), topicVo.getCustomAvatarUrl(), topicVo.getTemplateType(),
topicVo.getBannerUrl(), topicVo.getBannerHeight(), topicVo.getBannerUrl(), topicVo.getBannerHeight(),
topicVo.getOnSaleStart(), topicVo.getOnSaleEnd(), topicVo.getOnSaleStart(), topicVo.getOnSaleEnd(),
topicVo.getStatus(), topicVo.getSort(), topicVo.getRecommendPosition(), topicVo.getStatus(), topicVo.getSort(), topicVo.getRecommendPosition(),
...@@ -824,6 +840,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer ...@@ -824,6 +840,7 @@ public class GoblinStoreMgtArtistServiceImpl implements IGoblinStoreMgtArtistSer
LinkedList<Object[]> topicObjs = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> topicObjs = CollectionUtil.linkedListObjectArr();
topicObjs.add(new Object[]{ topicObjs.add(new Object[]{
params.getTopicName(), StringUtils.trimToNull(params.getArtistId()), params.getTopicName(), StringUtils.trimToNull(params.getArtistId()),
resolveCustomAvatarUrl(params.getArtistId(), params.getCustomAvatarUrl()),
params.getTemplateType(), params.getBannerUrl(), params.getTemplateType(), params.getBannerUrl(),
params.getBannerHeight() == null ? GoblinArtistConst.DEFAULT_BANNER_HEIGHT : params.getBannerHeight(), params.getBannerHeight() == null ? GoblinArtistConst.DEFAULT_BANNER_HEIGHT : params.getBannerHeight(),
params.getOnSaleStart(), params.getOnSaleEnd(), now, topicId params.getOnSaleStart(), params.getOnSaleEnd(), now, topicId
......
...@@ -212,8 +212,8 @@ goblin_artist_auth_apply.revoke=UPDATE goblin_artist_auth_apply SET status=3,upd ...@@ -212,8 +212,8 @@ goblin_artist_auth_apply.revoke=UPDATE goblin_artist_auth_apply SET status=3,upd
goblin_artist_auth_apply.approve=UPDATE goblin_artist_auth_apply SET status=1,reviewer_id=?,reviewer_name=?,review_time=?,review_remark=?,auth_expire_at=?,updated_at=? WHERE apply_id=? goblin_artist_auth_apply.approve=UPDATE goblin_artist_auth_apply SET status=1,reviewer_id=?,reviewer_name=?,review_time=?,review_remark=?,auth_expire_at=?,updated_at=? WHERE apply_id=?
goblin_artist_auth_apply.reject=UPDATE goblin_artist_auth_apply SET status=2,reviewer_id=?,reviewer_name=?,review_time=?,reject_reason=?,updated_at=? WHERE apply_id=? goblin_artist_auth_apply.reject=UPDATE goblin_artist_auth_apply SET status=2,reviewer_id=?,reviewer_name=?,review_time=?,reject_reason=?,updated_at=? WHERE apply_id=?
#---- \u827A\u4EBA\u4E13\u9898 #---- \u827A\u4EBA\u4E13\u9898
goblin_artist_topic.insert=INSERT INTO goblin_artist_topic (topic_id,store_id,topic_name,artist_id,template_type,banner_url,banner_height,on_sale_start,on_sale_end,status,sort,recommend_position,del_flg,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_artist_topic.insert=INSERT INTO goblin_artist_topic (topic_id,store_id,topic_name,artist_id,custom_avatar_url,template_type,banner_url,banner_height,on_sale_start,on_sale_end,status,sort,recommend_position,del_flg,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_artist_topic.update=UPDATE goblin_artist_topic SET topic_name=?,artist_id=?,template_type=?,banner_url=?,banner_height=?,on_sale_start=?,on_sale_end=?,updated_at=? WHERE topic_id=? goblin_artist_topic.update=UPDATE goblin_artist_topic SET topic_name=?,artist_id=?,custom_avatar_url=?,template_type=?,banner_url=?,banner_height=?,on_sale_start=?,on_sale_end=?,updated_at=? WHERE topic_id=?
goblin_artist_topic.delete=UPDATE goblin_artist_topic SET del_flg=1,updated_at=? WHERE topic_id=? goblin_artist_topic.delete=UPDATE goblin_artist_topic SET del_flg=1,updated_at=? WHERE topic_id=?
goblin_artist_topic.status=UPDATE goblin_artist_topic SET status=?,updated_at=? WHERE topic_id=? goblin_artist_topic.status=UPDATE goblin_artist_topic SET status=?,updated_at=? WHERE topic_id=?
#---- \u4E13\u9898\u5546\u54C1 #---- \u4E13\u9898\u5546\u54C1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment