Commit 1f5ea089 by 涂亚平

2022.03.24 疫情备份

1 parent b7848432
......@@ -574,7 +574,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
if (i == 0 && contentStatus) {
//第一个视频默认打开
memberVodVO.setStatus(true);
} else if (memberVodVO.getPercent() == 100) {
} else if (memberVodVO.getPercent().equals("100")) {
//这个视频看完了,已解锁
memberVodVO.setStatus(true);
} else {
......@@ -599,7 +599,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
int playCount = 0;
for (MemberVodVO memberVodVO : memberVodVOS) {
if (100 == memberVodVO.getPercent()) {
if ("100".equals(memberVodVO.getPercent())) {
playCount++;
}
}
......
......@@ -5,11 +5,28 @@ import java.util.Random;
public class TestMain {
public static void main(String[] args) {
String password = "123456";
String saltCode = getRandomCharAndNumr(5);
String encryptString = encrypt("91ebn" + password);
System.out.println(encryptString);
public static void main(String[] args) throws Exception{
// String password = "123456";
// String saltCode = getRandomCharAndNumr(5);
// String encryptString = encrypt("91ebn" + password);
// System.out.println(encryptString);
Thread thread1 = new Thread(() -> {
System.out.println("thread1");
});
Thread thread2 = new Thread(() -> {
System.out.println("thread2");
});
Thread thread3 = new Thread(() -> {
System.out.println("thread3");
});
thread1.start();
thread1.join();
thread2.start();
thread2.join();
thread3.start();
thread3.join();
}
public static String encrypt(String string) {
......
......@@ -9,7 +9,7 @@ public class MemberVodVO {
private Integer vodLength;
private Integer percent;
private String percent;
/**
* 解锁状态
......
......@@ -51,9 +51,8 @@
t3.vod_type,
t3.vod_length,
t3.play_record,
IF
( t3.vod_length - t3.sumPlay > 0, t3.vod_length - t3.sumPlay, 0 ) AS leftLength,
if(round( t3.sumPlay * 100 / t3.vod_length, 0 ) &lt; 100,round( t3.sumPlay * 100 / t3.vod_length, 0 ),100) AS percent
if(t3.vod_length - t3.sumPlay > 0, t3.vod_length - t3.sumPlay, 0 ) AS leftLength,
if(TRUNCATE( t3.sumPlay * 100 / t3.vod_length,2) &lt; 100,TRUNCATE( t3.sumPlay * 100 / t3.vod_length, 2),100) AS percent
FROM
(
SELECT
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!