1.update image path

main
Gary 10 months ago
parent aa1fe8082f
commit 9e73d18cd0

@ -18,6 +18,8 @@ public class Constants {
public static final String RESOURCE_PREFIX = "http://cdn.indie.cn/"; public static final String RESOURCE_PREFIX = "http://cdn.indie.cn/";
public static final String MUSIC_RESOURCE_PREFIX = RESOURCE_PREFIX + "music/"; public static final String MUSIC_RESOURCE_PREFIX = RESOURCE_PREFIX + "music/";
public static final String TAG_RESOURCE_PREFIX = RESOURCE_PREFIX + "tag/";
public static final String DEFAULT_USER_AVATAR = "user/avatar/default_20240129_111811.jpg"; public static final String DEFAULT_USER_AVATAR = "user/avatar/default_20240129_111811.jpg";
public static final Integer LENGTH_8 = 8; public static final Integer LENGTH_8 = 8;

@ -109,6 +109,7 @@ public class SearchController {
private SearchCategoryDTO getSearchCategoryDTO(Tag tag) { private SearchCategoryDTO getSearchCategoryDTO(Tag tag) {
SearchCategoryDTO searchCategoryDTO = new SearchCategoryDTO(); SearchCategoryDTO searchCategoryDTO = new SearchCategoryDTO();
BeanUtils.copyProperties(tag, searchCategoryDTO); BeanUtils.copyProperties(tag, searchCategoryDTO);
searchCategoryDTO.setImage(Constants.TAG_RESOURCE_PREFIX+tag.getImage());
return searchCategoryDTO; return searchCategoryDTO;
} }
} }

@ -28,6 +28,7 @@ import util.StringTools;
public class JournalMapper { public class JournalMapper {
// mock data // mock data
private static final List<String> DEFAULT_TAGS=Arrays.asList("暂无标签");
private static final String JOURNAL_TAG_FILE_PATH = "journalTags.txt"; private static final String JOURNAL_TAG_FILE_PATH = "journalTags.txt";
private static final Map<String, List<String>> journalTagMap = new HashMap<>(); private static final Map<String, List<String>> journalTagMap = new HashMap<>();
private static final String[] EDITOR = new String[] { "左岸以西", "落在低处" }; private static final String[] EDITOR = new String[] { "左岸以西", "落在低处" };
@ -93,7 +94,7 @@ public class JournalMapper {
} }
private static List<String> getTags(String journalNo) { private static List<String> getTags(String journalNo) {
return journalTagMap.getOrDefault(journalNo, Collections.emptyList()); return journalTagMap.getOrDefault(journalNo, DEFAULT_TAGS);
} }
private static String getEditDate(Journal journal) { private static String getEditDate(Journal journal) {

@ -1,5 +1,7 @@
package com.luoo.user.dto.response; package com.luoo.user.dto.response;
import java.util.List;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -16,7 +18,7 @@ public class UserRespDTO {
@ApiModelProperty(value = "个性签名,首次注册登录,默认为“无签名”") @ApiModelProperty(value = "个性签名,首次注册登录,默认为“无签名”")
private String signature; private String signature;
@ApiModelProperty(value = "用户标识,如“贡献者”,“音乐人”") @ApiModelProperty(value = "用户标识,如“贡献者”,“音乐人”")
private String badge; private List<String> badge;
@ApiModelProperty(value = "关注数") @ApiModelProperty(value = "关注数")
private int followCount; private int followCount;
@ApiModelProperty(value = "粉丝数") @ApiModelProperty(value = "粉丝数")

Loading…
Cancel
Save