|
@@ -23,6 +23,7 @@ import top.lvzhiqiang.util.StringUtils;
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import java.io.*;
|
|
import java.io.*;
|
|
|
import java.lang.reflect.Field;
|
|
import java.lang.reflect.Field;
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.time.Instant;
|
|
import java.time.Instant;
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
@@ -59,6 +60,8 @@ public class BgServiceImpl implements BgService {
|
|
|
private VideoSitePoolMapper videoSitePoolMapper;
|
|
private VideoSitePoolMapper videoSitePoolMapper;
|
|
|
@Resource
|
|
@Resource
|
|
|
private DicCodeMapper dicCodeMapper;
|
|
private DicCodeMapper dicCodeMapper;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private VideoInfoOtherMapper videoInfoOtherMapper;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* findDicCode
|
|
* findDicCode
|
|
@@ -227,6 +230,29 @@ public class BgServiceImpl implements BgService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * updateScoreOrComment
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author lvzhiqiang
|
|
|
|
|
+ * 2022/5/4 9:54
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public String insertOrUpdateScoreOrComment(String identificationCode, String score, String comment) {
|
|
|
|
|
+ BigDecimal scoreBD = null;
|
|
|
|
|
+ if (StringUtils.isNotEmpty(score)) {
|
|
|
|
|
+ scoreBD = new BigDecimal(score);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ int num = videoInfoOtherMapper.findByCode(identificationCode);
|
|
|
|
|
+ if (num == 0) {
|
|
|
|
|
+ videoInfoOtherMapper.insertScoreOrComment(identificationCode, scoreBD, comment);
|
|
|
|
|
+ return "insert success";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ videoInfoOtherMapper.updateScoreOrComment(identificationCode, scoreBD, comment);
|
|
|
|
|
+ return "update success";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* 初始化骑兵数据
|
|
* 初始化骑兵数据
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|