Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
c02afc9b
Commit
c02afc9b
authored
Oct 18, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'meiteng' of
ssh://103.249.252.28:10022/lcy/education
into meiteng
parents
e3fa1993
8c9e7660
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
80 deletions
+90
-80
BChapterRepository.java
...org/rcisoft/business/bchapter/dao/BChapterRepository.java
+76
-75
QueryChapterListResDTO.java
...rcisoft/business/bchapter/dto/QueryChapterListResDTO.java
+3
-0
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+1
-3
BLabel.java
src/main/java/org/rcisoft/business/blabel/entity/BLabel.java
+3
-1
BLabelServiceImpl.java
...isoft/business/blabel/service/impl/BLabelServiceImpl.java
+7
-1
No files found.
src/main/java/org/rcisoft/business/bchapter/dao/BChapterRepository.java
View file @
c02afc9b
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/bchapter/dto/QueryChapterListResDTO.java
View file @
c02afc9b
...
...
@@ -49,6 +49,9 @@ public class QueryChapterListResDTO {
@ApiModelProperty
(
value
=
"进度"
)
private
String
progress
;
@ApiModelProperty
(
value
=
"最近进度"
)
private
int
currentLocation
;
@ApiModelProperty
(
value
=
"id"
)
private
String
businessId
;
...
...
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
c02afc9b
...
...
@@ -111,6 +111,7 @@ public class BChapterServiceImpl implements BChapterService {
List
<
BRStudentChapter
>
brStudentChapterList
=
brStudentChapterRepository
.
queryByStuIdAndChapter
(
childList
.
getBusinessId
(),
curUser
.
getUserId
());
if
(
null
!=
brStudentChapterList
&&
brStudentChapterList
.
size
()
>
0
)
{
childList
.
setProgress
(
brStudentChapterList
.
get
(
0
).
getProgress
()*
100
+
"%"
);
childList
.
setCurrentLocation
(
brStudentChapterList
.
get
(
0
).
getCurrentLocation
());
percent
+=
brStudentChapterList
.
get
(
0
).
getProgress
();
}
i
++;
...
...
@@ -129,9 +130,6 @@ public class BChapterServiceImpl implements BChapterService {
map
.
put
(
"chapterList"
,
queryChapterListResDTOS
);
map
.
put
(
"totalProgress"
,
df
.
format
((
float
)
percent
/
i
)
+
"%"
);
map
.
put
(
"lessonInfo"
,
bLessonRepository
.
selectByPrimaryKey
(
lessonId
));
// 课程信息
BLessonPerson
bLessonPerson
=
bLessonPersonRepository
.
selectByPrimaryKey
(
lessonId
);
if
(
null
!=
bLessonPerson
){
}
map
.
put
(
"currentChapter"
,
bChapterRepository
.
getWithCurrentChapterBylessonId
(
lessonId
));
return
map
;
...
...
src/main/java/org/rcisoft/business/blabel/entity/BLabel.java
View file @
c02afc9b
...
...
@@ -9,6 +9,8 @@ import org.rcisoft.core.entity.IdEntity;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
@Entity
@Table
(
name
=
"b_label"
)
...
...
@@ -18,7 +20,7 @@ import javax.persistence.Transient;
public
class
BLabel
extends
IdEntity
<
BLabel
>
{
/*标签名称*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"
长度最小为1,最大为50
"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"
标签名称过长
"
)
private
String
lName
;
}
src/main/java/org/rcisoft/business/blabel/service/impl/BLabelServiceImpl.java
View file @
c02afc9b
package
org
.
rcisoft
.
business
.
blabel
.
service
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.blabel.dao.BLabelRepository
;
import
org.rcisoft.business.blabel.entity.BLabel
;
import
org.rcisoft.business.blabel.service.BLabelService
;
...
...
@@ -34,7 +35,9 @@ public class BLabelServiceImpl implements BLabelService {
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
insertLabel
(
BLabel
bLabel
)
{
if
(
StringUtils
.
isBlank
(
bLabel
.
getLName
())){
throw
new
ServiceException
(
"标签名称不能为空"
);
}
List
<
BLabel
>
line
=
bLabelRepository
.
checknameByName
(
bLabel
);
if
(
line
.
size
()>
0
){
throw
new
ServiceException
(
ResultServiceEnums
.
NAME_IS_EXISTS
);
...
...
@@ -46,6 +49,9 @@ public class BLabelServiceImpl implements BLabelService {
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
updateLabel
(
BLabel
bLabel
)
{
if
(
StringUtils
.
isBlank
(
bLabel
.
getLName
())){
throw
new
ServiceException
(
"标签名称不能为空"
);
}
List
<
BLabel
>
line
=
bLabelRepository
.
checknameByName
(
bLabel
);
if
(
line
.
size
()>
0
){
throw
new
ServiceException
(
ResultServiceEnums
.
NAME_IS_EXISTS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment