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
87016ae9
Commit
87016ae9
authored
Jun 19, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改label添加newcount逻辑
parent
d2b46243
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
15 deletions
+24
-15
BLabelController.java
.../rcisoft/business/blabel/controller/BLabelController.java
+1
-1
BLabelService.java
...va/org/rcisoft/business/blabel/service/BLabelService.java
+1
-1
BLabelServiceImpl.java
...isoft/business/blabel/service/impl/BLabelServiceImpl.java
+11
-5
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+5
-1
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+4
-4
application-test.yml
src/main/resources/application-test.yml
+2
-3
No files found.
src/main/java/org/rcisoft/business/blabel/controller/BLabelController.java
View file @
87016ae9
...
...
@@ -83,7 +83,7 @@ public class BLabelController extends PaginationController<BLabel> {
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLabelService
.
queryBlabels
(
lName
,
curUser
.
getCorpId
()
));
bLabelService
.
queryBlabels
(
lName
,
curUser
));
}
}
src/main/java/org/rcisoft/business/blabel/service/BLabelService.java
View file @
87016ae9
...
...
@@ -11,7 +11,7 @@ public interface BLabelService {
List
<
BLabel
>
queryBlabelsByPagination
(
PageUtil
pageUtil
,
String
lName
,
String
corpId
);
List
<
BLabel
>
queryBlabels
(
String
lName
,
String
corpId
);
List
<
BLabel
>
queryBlabels
(
String
lName
,
CurUser
curUser
);
PersistModel
insertLabel
(
BLabel
bLabel
,
CurUser
curUser
);
...
...
src/main/java/org/rcisoft/business/blabel/service/impl/BLabelServiceImpl.java
View file @
87016ae9
...
...
@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
...
...
@@ -37,19 +38,24 @@ public class BLabelServiceImpl implements BLabelService {
}
@Override
public
List
<
BLabel
>
queryBlabels
(
String
lName
,
String
corpId
)
{
CurUser
curUser
=
UserUtil
.
getCurUser
();
List
<
BLabel
>
labels
=
bLabelRepository
.
queryBlabels
(
lName
,
corpId
);
public
List
<
BLabel
>
queryBlabels
(
String
lName
,
CurUser
curUser
)
{
List
<
BLabel
>
labels
=
bLabelRepository
.
queryBlabels
(
lName
,
curUser
.
getCorpId
());
List
<
BLesson
>
lessons
=
bLessonService
.
queryHomeBLessons
(
curUser
);
log
.
info
(
"-----------addNewLable----------首页所有课程总个数--"
+
lessons
.
size
()+
"--------------------"
);
//筛选 new lesson
List
<
BLesson
>
newLessons
=
new
ArrayList
<>();
for
(
BLesson
b
:
lessons
){
if
(
"1"
.
equals
(
b
.
getIsNew
()))
newLessons
.
add
(
b
);
}
for
(
BLabel
label
:
labels
)
{
int
num
=
0
;
for
(
BLesson
lesson
:
l
essons
)
{
for
(
BLesson
lesson
:
newL
essons
)
{
List
<
QueryLabelResDTO
>
labelResDTOS
=
lesson
.
getLabelList
();
if
(
labelResDTOS
.
size
()
>
0
)
{
for
(
QueryLabelResDTO
dto
:
labelResDTOS
)
{
if
(
dto
.
getBusinessId
()
==
label
.
getBusinessId
(
))
if
(
dto
.
getBusinessId
()
.
equals
(
label
.
getBusinessId
()
))
num
++;
}
}
...
...
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
87016ae9
...
...
@@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.bcourse.service.BCourseService
;
import
org.rcisoft.business.blabel.service.BLabelService
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
...
...
@@ -66,6 +67,9 @@ public class BLessonController extends PaginationController<BLesson> {
@Autowired
SendNoticeService
sendNoticeService
;
@Autowired
BLabelService
bLabelService
;
@Autowired
private
Global
global
;
...
...
@@ -788,7 +792,7 @@ public class BLessonController extends PaginationController<BLesson> {
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bL
essonService
.
queryHomeBLessons
(
curUser
));
bL
abelService
.
queryBlabels
(
""
,
curUser
));
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
87016ae9
...
...
@@ -1802,10 +1802,10 @@ public class BLessonServiceImpl implements BLessonService {
public
List
<
BLesson
>
addNew
(
List
<
BLesson
>
result
)
{
//获取当前登录人信息
CurUser
curUser
=
UserUtil
.
getCurUser
();
//
String userId = curUser.getUserId();
//
String corpId = curUser.getCorpId();
String
userId
=
"1042237478105227265"
;
String
corpId
=
"6"
;
String
userId
=
curUser
.
getUserId
();
String
corpId
=
curUser
.
getCorpId
();
//
String userId = "1042237478105227265";
//
String corpId = "6";
log
.
info
(
"-----------addNew---------当前登录人信息curUser----------"
+
curUser
+
"--------------------"
);
BMessage
bMessage
=
new
BMessage
();
bMessage
.
setName
(
MessageEnum
.
NEWNOTICE
.
getName
());
...
...
src/main/resources/application-test.yml
View file @
87016ae9
...
...
@@ -89,8 +89,7 @@ libreoffice:
ip
:
mt_libre
port
:
8997
mt
:
api
:
http://192.168.5.201/api/
# api: http://221.239.114.20:6789/api/
api
:
192.168.5.54/api/
eureka
:
instance
:
# hostname: localhost
...
...
@@ -100,7 +99,7 @@ eureka:
register-with-eureka
:
true
fetch-registry
:
true
service-url
:
defaultZone
:
http://zx:zgiot@192.168.5.4
8:7001/eureka
defaultZone
:
http://zx:zgiot@192.168.5.4
0:7001/eureka/
ribbon
:
ReadTimeout
:
10000
ConnectTimeout
:
10000
...
...
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