|
@@ -10,7 +10,6 @@ import com.management.platform.entity.TimeCalculation;
|
|
|
import com.management.platform.entity.TimeCalculationShow;
|
|
|
import com.management.platform.entity.vo.ScreenshotVO;
|
|
|
import com.management.platform.mapper.*;
|
|
|
-import com.management.platform.mapper.PicContentKeywordsMapper;
|
|
|
import com.management.platform.service.ScreenshotService;
|
|
|
import com.management.platform.util.*;
|
|
|
import org.apache.log4j.Logger;
|
|
@@ -128,7 +127,8 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
|
|
|
.setStartTime(currentTime)
|
|
|
.setEndTime(currentTime)
|
|
|
//第一次的持续时间默认为最少单位1秒
|
|
|
- .setDuration(1);
|
|
|
+ .setDuration(1)
|
|
|
+ .setPicUrl(screenshot.getPicUrl());
|
|
|
timeCalculationMapper.insert(timeCalculation);
|
|
|
if (isConsecutive) {
|
|
|
//然后如果只是类型不同但是能连上的话
|
|
@@ -255,7 +255,7 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
|
|
|
@Override
|
|
|
public HttpRespMsg saveAndProcessImage(ScreenshotVO screenshotvo) {
|
|
|
Map<String, Object> fileMap = UploadFileToFileNameUtil.uploadFile(screenshotvo.getFile(), path);
|
|
|
- String filePath = (String)fileMap.get("sqlFilePath");
|
|
|
+ String filePath = (String) fileMap.get("sqlFilePath");
|
|
|
Screenshot screenshot = new Screenshot();
|
|
|
BeanUtils.copyProperties(screenshotvo, screenshot);
|
|
|
screenshot.setPicUrl(filePath);
|
|
@@ -291,7 +291,7 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
|
|
|
// //由于存入数据库的对象被序列化成了json字符串,所以从redis里拿方便
|
|
|
// members = redisUtil.members(Constant.COMMON_SOFTWARE_KEYWORDS);
|
|
|
// }
|
|
|
- File picFile = new File((String)fileMap.get("newFile"));
|
|
|
+ File picFile = new File((String) fileMap.get("newFile"));
|
|
|
if (isNovel(textContents)) {
|
|
|
screenshot.setPicType(6);
|
|
|
} else if (isDocument(textContents)) {
|
|
@@ -309,7 +309,7 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
|
|
|
File f = new File(prePath);
|
|
|
if (f.exists()) {
|
|
|
ImageCompare comp = new ImageCompare();
|
|
|
- if (comp.isMoviePlay((String)fileMap.get("newFile"), prePath)) {
|
|
|
+ if (comp.isMoviePlay((String) fileMap.get("newFile"), prePath)) {
|
|
|
screenshot.setPicType(7);
|
|
|
//前面那条也更新
|
|
|
if (preShot.getPicType() != null && preShot.getPicType() != 7) {
|
|
@@ -323,7 +323,7 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
|
|
|
if (screenshot.getPicType() == null) {
|
|
|
//默认设置为查资料
|
|
|
try {
|
|
|
- String browserName = isBrowser(new File((String)fileMap.get("newFile")));
|
|
|
+ String browserName = isBrowser(new File((String) fileMap.get("newFile")));
|
|
|
System.out.println(
|
|
|
"找到浏览器==" + browserName
|
|
|
);
|
|
@@ -344,8 +344,8 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
|
|
|
@Override
|
|
|
public HttpRespMsg updateRedisPicContentKeywords() {
|
|
|
List<PicContentKeywords> picContentKeywords = picContentKeywordsMapper.selectList(null);
|
|
|
- for (PicContentKeywords keyWord : picContentKeywords) {
|
|
|
- redisUtil.sSetJsonString("keyWords",keyWord);
|
|
|
+ for (PicContentKeywords keyWord : picContentKeywords) {
|
|
|
+ redisUtil.sSetJsonString("keyWords", keyWord);
|
|
|
}
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
msg.data = redisUtil.members("keyWords");
|