Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1f5ea089
authored
Mar 24, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022.03.24 疫情备份
1 parent
b7848432
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
11 deletions
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
src/main/java/com/subsidy/util/TestMain.java
src/main/java/com/subsidy/vo/member/MemberVodVO.java
src/main/resources/mapper/CourseContentMapper.xml
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
View file @
1f5ea08
...
@@ -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
++;
}
}
}
}
...
...
src/main/java/com/subsidy/util/TestMain.java
View file @
1f5ea08
...
@@ -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
)
{
...
...
src/main/java/com/subsidy/vo/member/MemberVodVO.java
View file @
1f5ea08
...
@@ -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
;
/**
/**
* 解锁状态
* 解锁状态
...
...
src/main/resources/mapper/CourseContentMapper.xml
View file @
1f5ea08
...
@@ -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)
<
100,TRUNCATE( t3.sumPlay * 100 / t3.vod_length, 2),100) AS percent
if(round( t3.sumPlay * 100 / t3.vod_length, 0 )
<
100,round( t3.sumPlay * 100 / t3.vod_length, 0 ),100) AS percent
FROM
FROM
(
(
SELECT
SELECT
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment