|
|
@ -30,6 +30,7 @@ import javax.persistence.criteria.Predicate;
|
|
|
|
import javax.persistence.criteria.Root;
|
|
|
|
import javax.persistence.criteria.Root;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -57,9 +58,9 @@ public class CMSJournalService {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private RedisTemplate redisTemplate;
|
|
|
|
private RedisTemplate redisTemplate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 分页 + 条件检索
|
|
|
|
* 分页 + 条件检索
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param param
|
|
|
|
* @param param
|
|
|
|
* @param page
|
|
|
|
* @param page
|
|
|
|
* @param size
|
|
|
|
* @param size
|
|
|
@ -83,7 +84,7 @@ public class CMSJournalService {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
List<String> journalIdsByTags = null;
|
|
|
|
List<String> journalIdsByTags = null;
|
|
|
|
Specification<Journal> journalSpecification = buildSearchSpecification(param, journalIdsByTags);
|
|
|
|
Specification<Journal> journalSpecification = buildSearchSpecification(param, journalIdsByTags);
|
|
|
|
journalPage = journalDao.findAll(journalSpecification,pageRequest);
|
|
|
|
journalPage = journalDao.findAll(journalSpecification, pageRequest);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
long totalElements = journalPage.getTotalElements();
|
|
|
|
long totalElements = journalPage.getTotalElements();
|
|
|
|
List<Journal> content = journalPage.getContent();
|
|
|
|
List<Journal> content = journalPage.getContent();
|
|
|
@ -120,13 +121,14 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 检索条件
|
|
|
|
* 检索条件
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param param
|
|
|
|
* @param param
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private Specification<Journal> buildSearchSpecification(JournalQueryModel param, List<String> ids) {
|
|
|
|
private Specification<Journal> buildSearchSpecification(JournalQueryModel param, List<String> ids) {
|
|
|
|
return (Root<Journal> root, CriteriaQuery<?> query, CriteriaBuilder builder) -> {
|
|
|
|
return (Root<Journal> root, CriteriaQuery<?> query, CriteriaBuilder builder) -> {
|
|
|
|
List<Predicate> predicateList = new ArrayList<Predicate>();
|
|
|
|
List<Predicate> predicateList = new ArrayList<Predicate>();
|
|
|
|
if("1".equals(param.getTab())) {
|
|
|
|
if ("1".equals(param.getTab())) {
|
|
|
|
predicateList.add(builder.equal(root.get("isPublish"), "1"));
|
|
|
|
predicateList.add(builder.equal(root.get("isPublish"), "1"));
|
|
|
|
} else if ("2".equals(param.getTab())) {
|
|
|
|
} else if ("2".equals(param.getTab())) {
|
|
|
|
predicateList.add(builder.equal(root.get("state"), "0"));
|
|
|
|
predicateList.add(builder.equal(root.get("state"), "0"));
|
|
|
@ -135,7 +137,7 @@ public class CMSJournalService {
|
|
|
|
Predicate isPublish = builder.equal(root.get("isPublish"), "0");
|
|
|
|
Predicate isPublish = builder.equal(root.get("isPublish"), "0");
|
|
|
|
predicateList.add(builder.and(state, isPublish));
|
|
|
|
predicateList.add(builder.and(state, isPublish));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtils.isNotBlank(param.getUserId())) {
|
|
|
|
if (StringUtils.isNotBlank(param.getUserId())) {
|
|
|
|
predicateList.add(builder.equal(root.get("userId"), param.getUserId()));
|
|
|
|
predicateList.add(builder.equal(root.get("userId"), param.getUserId()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (StringUtils.isNotBlank(param.getStart()) && StringUtils.isNotBlank(param.getEnd())) {
|
|
|
|
if (StringUtils.isNotBlank(param.getStart()) && StringUtils.isNotBlank(param.getEnd())) {
|
|
|
@ -146,7 +148,7 @@ public class CMSJournalService {
|
|
|
|
if (!CollectionUtils.isEmpty(ids)) {
|
|
|
|
if (!CollectionUtils.isEmpty(ids)) {
|
|
|
|
predicateList.add(root.get("journalNo").in(ids));
|
|
|
|
predicateList.add(root.get("journalNo").in(ids));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtils.isNotBlank(param.getKeyword())) {
|
|
|
|
if (StringUtils.isNotBlank(param.getKeyword())) {
|
|
|
|
String likeExpression = "%" + param.getKeyword() + "%";
|
|
|
|
String likeExpression = "%" + param.getKeyword() + "%";
|
|
|
|
Predicate journalNo = builder.like(root.get("journalNo"), likeExpression);
|
|
|
|
Predicate journalNo = builder.like(root.get("journalNo"), likeExpression);
|
|
|
|
Predicate title = builder.like(root.get("title"), likeExpression);
|
|
|
|
Predicate title = builder.like(root.get("title"), likeExpression);
|
|
|
@ -159,6 +161,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 期刊的音乐数量
|
|
|
|
* 期刊的音乐数量
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param journalNos
|
|
|
|
* @param journalNos
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -167,8 +170,7 @@ public class CMSJournalService {
|
|
|
|
if (!CollectionUtils.isEmpty(journalNos)) {
|
|
|
|
if (!CollectionUtils.isEmpty(journalNos)) {
|
|
|
|
List<Map<String, Long>> journalSongCountList = journalSongDao.findSongCountByJournalNos(journalNos);
|
|
|
|
List<Map<String, Long>> journalSongCountList = journalSongDao.findSongCountByJournalNos(journalNos);
|
|
|
|
songCountMap = journalSongCountList.stream()
|
|
|
|
songCountMap = journalSongCountList.stream()
|
|
|
|
.collect(Collectors.toMap(
|
|
|
|
.collect(Collectors.toMap(map -> String.valueOf(map.get("journalNo")),
|
|
|
|
map -> String.valueOf(map.get("journalNo")),
|
|
|
|
|
|
|
|
map -> Long.valueOf(String.valueOf(map.get("songCount")))));
|
|
|
|
map -> Long.valueOf(String.valueOf(map.get("songCount")))));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return songCountMap;
|
|
|
|
return songCountMap;
|
|
|
@ -176,6 +178,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 期刊的标签信息
|
|
|
|
* 期刊的标签信息
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param ids
|
|
|
|
* @param ids
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -204,6 +207,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 新增期刊
|
|
|
|
* 新增期刊
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param param
|
|
|
|
* @param param
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -229,6 +233,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 移动对象
|
|
|
|
* 移动对象
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param param
|
|
|
|
* @param param
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -246,6 +251,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 构建对象
|
|
|
|
* 构建对象
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @param param
|
|
|
|
* @param param
|
|
|
|
* @param token
|
|
|
|
* @param token
|
|
|
@ -270,6 +276,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 保存期刊的标签、音乐信息
|
|
|
|
* 保存期刊的标签、音乐信息
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param journalId
|
|
|
|
* @param journalId
|
|
|
|
* @param param
|
|
|
|
* @param param
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -317,11 +324,16 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询期刊详情
|
|
|
|
* 查询期刊详情
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public Result<JournalVO> findOne(String id) {
|
|
|
|
public Result<JournalVO> findOne(String id) {
|
|
|
|
Journal journal = journalDao.findById(id).get();
|
|
|
|
Optional<Journal> optional=journalDao.findById(id);
|
|
|
|
|
|
|
|
if(!optional.isPresent()) {
|
|
|
|
|
|
|
|
return Result.failed("无法找到期刊: "+id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Journal journal = optional.get();
|
|
|
|
JournalVO response = new JournalVO();
|
|
|
|
JournalVO response = new JournalVO();
|
|
|
|
response.setId(journal.getId());
|
|
|
|
response.setId(journal.getId());
|
|
|
|
response.setJournalNo(journal.getJournalNo());
|
|
|
|
response.setJournalNo(journal.getJournalNo());
|
|
|
@ -338,6 +350,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 期刊的音乐信息
|
|
|
|
* 期刊的音乐信息
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param journalNo
|
|
|
|
* @param journalNo
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -352,10 +365,10 @@ public class CMSJournalService {
|
|
|
|
songVO.setArtist(item.getArtist());
|
|
|
|
songVO.setArtist(item.getArtist());
|
|
|
|
songVO.setAlbum(item.getAlbum());
|
|
|
|
songVO.setAlbum(item.getAlbum());
|
|
|
|
if (StringUtils.isNotBlank(item.getUrl())) {
|
|
|
|
if (StringUtils.isNotBlank(item.getUrl())) {
|
|
|
|
songVO.setUrl(Constants.MUSIC_RESOURCE_PREFIX + item.getUrl());
|
|
|
|
songVO.setUrl(Constants.RESOURCE_PREFIX + item.getUrl());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (StringUtils.isNotBlank(item.getImage())) {
|
|
|
|
if (StringUtils.isNotBlank(item.getImage())) {
|
|
|
|
songVO.setImage(Constants.MUSIC_RESOURCE_PREFIX + item.getImage());
|
|
|
|
songVO.setImage(Constants.RESOURCE_PREFIX + item.getImage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
list.add(songVO);
|
|
|
|
list.add(songVO);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -365,6 +378,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 更新期刊
|
|
|
|
* 更新期刊
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @param token
|
|
|
|
* @param token
|
|
|
|
* @param param
|
|
|
|
* @param param
|
|
|
@ -372,35 +386,95 @@ public class CMSJournalService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public Result update(String id, String token, JournalAddModel param) {
|
|
|
|
public Result update(String id, String token, JournalAddModel param) {
|
|
|
|
Optional<Journal> optional = journalDao.findById(id);
|
|
|
|
Optional<Journal> optional = journalDao.findById(id);
|
|
|
|
if(!optional.isPresent()) {
|
|
|
|
if (!optional.isPresent()) {
|
|
|
|
return Result.failed("找不到期刊: "+id);
|
|
|
|
return Result.failed("找不到期刊: " + id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Journal journal=optional.get();
|
|
|
|
Journal journal = optional.get();
|
|
|
|
updateJournal(journal, param, token);
|
|
|
|
updateJournal(journal, param, token);
|
|
|
|
journalDao.save(journal);
|
|
|
|
journalDao.save(journal);
|
|
|
|
redisTemplate.opsForValue().set("journal_"+id,journal);
|
|
|
|
redisTemplate.opsForValue().set("journal_" + id, journal);
|
|
|
|
if (!CollectionUtils.isEmpty(param.getTag())) {
|
|
|
|
|
|
|
|
journalTagDao.deleteByJournalId(id);
|
|
|
|
batchUpdateJournalRelatesInfo(id, journal.getJournalNo(), param);
|
|
|
|
|
|
|
|
return Result.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!CollectionUtils.isEmpty(param.getSongs())) {
|
|
|
|
|
|
|
|
journalSongDao.deleteByJournalNo(id);
|
|
|
|
private void batchUpdateJournalRelatesInfo(String journalId, String journalNo, JournalAddModel param) {
|
|
|
|
|
|
|
|
// 标签信息
|
|
|
|
|
|
|
|
List<String> updateTags = param.getTag();
|
|
|
|
|
|
|
|
List<String> currentTags = journalTagDao.findTagsByJournalId(journalId);
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(updateTags) && !isCollectionEqual(currentTags, updateTags)) {
|
|
|
|
|
|
|
|
// 清理当前journalTag
|
|
|
|
|
|
|
|
journalTagDao.deleteByJournalId(journalId);
|
|
|
|
|
|
|
|
List<JournalTag> updatedJournalTags = updateTags.stream().map(t -> createJournalTag(t, journalId))
|
|
|
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
journalTagDao.saveAll(updatedJournalTags);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
batchSaveJournalRelatesInfo(id, param);
|
|
|
|
|
|
|
|
return Result.success();
|
|
|
|
// 歌曲信息
|
|
|
|
|
|
|
|
List<String> updateSongs = param.getSongs();
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(updateSongs)) {
|
|
|
|
|
|
|
|
// 清理当前journalSong
|
|
|
|
|
|
|
|
journalSongDao.deleteByJournalNo(journalId);
|
|
|
|
|
|
|
|
List<SongInfo> songList = songDao.orderByField(updateSongs);
|
|
|
|
|
|
|
|
List<JournalSong> updatedJournalSong = new ArrayList<>();
|
|
|
|
|
|
|
|
for (int i = 1; i < songList.size(); i++) {
|
|
|
|
|
|
|
|
SongInfo song = songList.get(i);
|
|
|
|
|
|
|
|
JournalSong journalSong = new JournalSong();
|
|
|
|
|
|
|
|
journalSong.setId(String.valueOf(idWorker.nextId()));
|
|
|
|
|
|
|
|
journalSong.setName(song.getName());
|
|
|
|
|
|
|
|
journalSong.setAlbum(song.getAlbum());
|
|
|
|
|
|
|
|
journalSong.setArtist(song.getArtist());
|
|
|
|
|
|
|
|
journalSong.setUrl(Constants.SONG_KEY_PREFIX+song.getUrl());
|
|
|
|
|
|
|
|
journalSong.setImage(Constants.SONG_KEY_PREFIX+song.getImage());
|
|
|
|
|
|
|
|
journalSong.setLyricUrl(Constants.SONG_KEY_PREFIX+song.getLyricUrl());
|
|
|
|
|
|
|
|
journalSong.setSongId(song.getId());
|
|
|
|
|
|
|
|
journalSong.setJournalNo(journalNo);
|
|
|
|
|
|
|
|
journalSong.setSongNo(i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updatedJournalSong.add(journalSong);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
journalSongDao.saveAll(updatedJournalSong);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JournalTag createJournalTag(String tagId, String journalId) {
|
|
|
|
|
|
|
|
JournalTag journalTag = new JournalTag();
|
|
|
|
|
|
|
|
journalTag.setId(String.valueOf(idWorker.nextId()));
|
|
|
|
|
|
|
|
journalTag.setJournalId(journalId);
|
|
|
|
|
|
|
|
journalTag.setTagId(tagId);
|
|
|
|
|
|
|
|
return journalTag;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isCollectionEqual(List<String> current, List<String> update) {
|
|
|
|
|
|
|
|
if ((null == current && null == update) || (current.isEmpty() && update.isEmpty())) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (current.size() != update.size()) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Collections.sort(current);
|
|
|
|
|
|
|
|
Collections.sort(update);
|
|
|
|
|
|
|
|
for (int i = 0; i < current.size(); i++) {
|
|
|
|
|
|
|
|
if (!current.get(i).equals(update.get(i))) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void updateJournal(Journal journal, JournalAddModel param, String token) {
|
|
|
|
private void updateJournal(Journal journal, JournalAddModel param, String token) {
|
|
|
|
String title=param.getTitle();
|
|
|
|
String title = param.getTitle();
|
|
|
|
if(!StringTools.isEmpty(title)) {
|
|
|
|
if (!StringTools.isEmpty(title)) {
|
|
|
|
journal.setTitle(title);
|
|
|
|
journal.setTitle(title);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String content=param.getContent();
|
|
|
|
String content = param.getContent();
|
|
|
|
if(!StringTools.isEmpty(content)) {
|
|
|
|
if (!StringTools.isEmpty(content)) {
|
|
|
|
journal.setContent(content);
|
|
|
|
journal.setContent(content);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String userId=param.getUserId();
|
|
|
|
String userId = param.getUserId();
|
|
|
|
if(!StringTools.isEmpty(userId)) {
|
|
|
|
if (!StringTools.isEmpty(userId)) {
|
|
|
|
UserInfo userInfo = userClient.queryUserInfoById(userId);
|
|
|
|
UserInfo userInfo = userClient.queryUserInfoById(userId);
|
|
|
|
if (!Objects.isNull(userInfo)) {
|
|
|
|
if (!Objects.isNull(userInfo)) {
|
|
|
|
journal.setUserId(userInfo.getId());
|
|
|
|
journal.setUserId(userInfo.getId());
|
|
|
@ -409,18 +483,19 @@ public class CMSJournalService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String tempImage=param.getImage();
|
|
|
|
String tempImage = param.getImage();
|
|
|
|
if(!StringTools.isEmpty(tempImage)&&tempImage.contains(Constants.TEMP_KEY_PREFIX)) {
|
|
|
|
if (!StringTools.isEmpty(tempImage) && tempImage.contains(Constants.TEMP_KEY_PREFIX)) {
|
|
|
|
String srcKey=param.getImage().substring(param.getImage().indexOf(Constants.TEMP_KEY_PREFIX));
|
|
|
|
String srcKey = param.getImage().substring(param.getImage().indexOf(Constants.TEMP_KEY_PREFIX));
|
|
|
|
String image = copyJournalImage(srcKey, journal.getJournalNo());
|
|
|
|
String image = copyJournalImage(srcKey, journal.getJournalNo());
|
|
|
|
if (null!=image) {
|
|
|
|
if (null != image) {
|
|
|
|
journal.setImage(image);
|
|
|
|
journal.setImage(image);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String copyJournalImage(String srcKey, String journalNo) {
|
|
|
|
private String copyJournalImage(String srcKey, String journalNo) {
|
|
|
|
String destKeySuffix = String.format("%05d/%s", Integer.parseInt(journalNo), srcKey.replace(Constants.TEMP_KEY_PREFIX, ""));
|
|
|
|
String destKeySuffix = String.format("%05d/%s", Integer.parseInt(journalNo),
|
|
|
|
|
|
|
|
srcKey.replace(Constants.TEMP_KEY_PREFIX, ""));
|
|
|
|
String destKey = Constants.MUSIC_KEY_PREFIX + destKeySuffix;
|
|
|
|
String destKey = Constants.MUSIC_KEY_PREFIX + destKeySuffix;
|
|
|
|
int copy = s3Service.copy(Constants.BUCKET, srcKey, destKey);
|
|
|
|
int copy = s3Service.copy(Constants.BUCKET, srcKey, destKey);
|
|
|
|
if (copy > 0) {
|
|
|
|
if (copy > 0) {
|
|
|
@ -428,8 +503,10 @@ public class CMSJournalService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 删除期刊的标签、音乐信息
|
|
|
|
* 删除期刊的标签、音乐信息
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param journalId
|
|
|
|
* @param journalId
|
|
|
|
* @param journalNo
|
|
|
|
* @param journalNo
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -440,6 +517,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 发布期刊
|
|
|
|
* 发布期刊
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @param queryModel
|
|
|
|
* @param queryModel
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
@ -449,7 +527,7 @@ public class CMSJournalService {
|
|
|
|
String pubTimeStr = queryModel.getPubTime();
|
|
|
|
String pubTimeStr = queryModel.getPubTime();
|
|
|
|
LocalDateTime pubTime = LocalDateTime.now();
|
|
|
|
LocalDateTime pubTime = LocalDateTime.now();
|
|
|
|
if ("1".equals(scheduled)) {
|
|
|
|
if ("1".equals(scheduled)) {
|
|
|
|
if (StringUtils.isNotBlank(pubTimeStr)){
|
|
|
|
if (StringUtils.isNotBlank(pubTimeStr)) {
|
|
|
|
pubTime = LocalDateTime.parse(pubTimeStr, Constants.formatter);
|
|
|
|
pubTime = LocalDateTime.parse(pubTimeStr, Constants.formatter);
|
|
|
|
journalDao.updateScheduledPubById(id, pubTime);
|
|
|
|
journalDao.updateScheduledPubById(id, pubTime);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -461,6 +539,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 更新期刊启停状态
|
|
|
|
* 更新期刊启停状态
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @param state
|
|
|
|
* @param state
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
@ -472,6 +551,7 @@ public class CMSJournalService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 删除期刊
|
|
|
|
* 删除期刊
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|