Commit 1f5ea089 by 涂亚平

2022.03.24 疫情备份

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