|
@@ -1,9 +1,8 @@
|
|
|
package com.ruoyi.okc.service.impl;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
@@ -11,6 +10,7 @@ import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.uuid.IdUtils;
|
|
|
import com.ruoyi.okc.mapper.OkcVideoProMapper;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.okc.mapper.OkcVideoRecMapper;
|
|
@@ -93,8 +93,8 @@ public class OkcVideoRecServiceImpl implements IOkcVideoRecService
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@Override
|
|
|
- public int updateOkcVideoRec(OkcVideoRec okcVideoRec)
|
|
|
- {
|
|
|
+ public Map<String, String> updateOkcVideoRec(OkcVideoRec okcVideoRec) {
|
|
|
+ Map<String, String> res = new LinkedHashMap<>();
|
|
|
if (StringUtils.isNotEmpty(okcVideoRec.getVideoId())) {
|
|
|
if (ObjectUtils.isEmpty(okcVideoProMapper.selectOkcVideoProById(okcVideoRec.getVideoId()))) {
|
|
|
throw new ServiceException("该项目已经被删除,请重新新建项目");
|
|
@@ -104,7 +104,13 @@ public class OkcVideoRecServiceImpl implements IOkcVideoRecService
|
|
|
okcVideoRec.setUpdateTimeStr(DateUtils.parseDateToStr(YYYYMMDDHHMMSS, new Date()));
|
|
|
okcVideoRec.setUpdateBy(SecurityUtils.getUsername());
|
|
|
okcVideoRec.setUpdateUnit(String.valueOf(SecurityUtils.getDeptId()));
|
|
|
- return okcVideoRecMapper.updateOkcVideoRec(okcVideoRec);
|
|
|
+ okcVideoRecMapper.updateOkcVideoRec(okcVideoRec);
|
|
|
+ List<OkcVideoRec> recList = okcVideoRecMapper.selectOkcVideoRecList(okcVideoRec);
|
|
|
+ if (CollectionUtils.isNotEmpty(recList)) {
|
|
|
+ recList.sort((o1, o2) -> new Double(o2.getEndTime()).compareTo(new Double(o1.getEndTime())));
|
|
|
+ res.put("endTime", recList.get(0).getEndTime());
|
|
|
+ }
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
/**
|