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
d1a98357
Commit
d1a98357
authored
Jun 17, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 智学2.0 新增new显示字段
parent
c830505b
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
269 additions
and
47 deletions
+269
-47
BCourseController.java
...cisoft/business/bcourse/controller/BCourseController.java
+1
-1
QueryCourseResDTO.java
...a/org/rcisoft/business/bcourse/dto/QueryCourseResDTO.java
+3
-0
BCourseService.java
.../org/rcisoft/business/bcourse/service/BCourseService.java
+2
-0
BCourseServiceImpl.java
...oft/business/bcourse/service/impl/BCourseServiceImpl.java
+67
-0
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+20
-0
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+20
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+4
-0
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+4
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+132
-40
PersonValueClientDto.java
...isoft/business/bpersonvalue/dto/PersonValueClientDto.java
+0
-2
MessageEnum.java
src/main/java/org/rcisoft/core/enums/MessageEnum.java
+1
-0
CutPdfUtil.java
src/main/java/org/rcisoft/core/util/CutPdfUtil.java
+10
-4
SysRoleServiceImpl.java
...org/rcisoft/sys/role/service/impl/SysRoleServiceImpl.java
+5
-0
No files found.
src/main/java/org/rcisoft/business/bcourse/controller/BCourseController.java
View file @
d1a98357
...
...
@@ -74,7 +74,7 @@ public class BCourseController extends PaginationController<BCourse> {
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bCourse
Repository
.
queryFirstLevel
(
curUser
.
getCorpId
(),
num
));
bCourse
ServiceImpl
.
queryFirstLevel
(
curUser
.
getCorpId
(),
num
));
}
@ApiOperation
(
value
=
"304 逻辑删除"
,
notes
=
"根据ID删除一条记录"
)
...
...
src/main/java/org/rcisoft/business/bcourse/dto/QueryCourseResDTO.java
View file @
d1a98357
...
...
@@ -29,4 +29,7 @@ public class QueryCourseResDTO {
@ApiModelProperty
(
value
=
"等级"
)
private
String
courseLevel
;
@ApiModelProperty
(
value
=
"new的数量"
)
private
int
newCount
;
}
src/main/java/org/rcisoft/business/bcourse/service/BCourseService.java
View file @
d1a98357
...
...
@@ -30,5 +30,7 @@ public interface BCourseService {
*/
List
<
AllCourseDTO
>
findAllCourse
(
String
corpId
);
List
<
QueryCourseResDTO
>
queryFirstLevel
(
String
corpId
,
int
num
);
}
src/main/java/org/rcisoft/business/bcourse/service/impl/BCourseServiceImpl.java
View file @
d1a98357
...
...
@@ -9,6 +9,8 @@ import org.rcisoft.business.bcourse.dto.AllCourseDTO;
import
org.rcisoft.business.bcourse.dto.QueryCourseResDTO
;
import
org.rcisoft.business.bcourse.entity.BCourse
;
import
org.rcisoft.business.bcourse.service.BCourseService
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.service.impl.BLessonServiceImpl
;
import
org.rcisoft.business.blesson.util.Recursion
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.MessageConstant
;
...
...
@@ -28,6 +30,9 @@ public class BCourseServiceImpl implements BCourseService {
@Autowired
private
BCourseRepository
bCourseRepository
;
@Autowired
private
BLessonServiceImpl
bLessonService
;
@Override
public
List
<
Map
<
String
,
Object
>>
queryBCourse
(
BCourse
model
)
{
...
...
@@ -245,4 +250,66 @@ public class BCourseServiceImpl implements BCourseService {
return
bCourseRepository
.
findAllCourse
(
corpId
);
}
@Override
public
List
<
QueryCourseResDTO
>
queryFirstLevel
(
String
corpId
,
int
num
)
{
List
<
QueryCourseResDTO
>
dtoList
=
bCourseRepository
.
queryFirstLevel
(
corpId
,
num
);
return
dtoList
;
}
/**
* 生产分类中 new 的个数
* @param resDTOS 一级分类带子分类集合
* @return
*/
public
List
<
QueryCourseResDTO
>
addNewFolder
(
List
<
QueryCourseResDTO
>
resDTOS
){
List
<
BLesson
>
lessons
=
bLessonService
.
queryHomeBLessons
();
//查询首页显示的所有 课程(isNew 已赋值)
for
(
QueryCourseResDTO
dto
:
resDTOS
){
int
num
=
0
;
//属于当前分类的课程数
int
secNum
=
0
;
//下层分类中的课程数
for
(
BLesson
b
:
lessons
){
if
(
"1"
.
equals
(
b
.
getIsNew
())){
num
++;
}
else
{
continue
;
}
}
if
(
dto
.
getChildren
()
==
null
)
continue
;
for
(
QueryCourseResDTO
dto1
:
dto
.
getChildren
()){
int
num1
=
0
;
int
secNum1
=
0
;
//下层分类中的课程数
for
(
BLesson
b
:
lessons
){
if
(
b
.
getCourseId
().
equals
(
dto1
.
getKey
())
&&
"1"
.
equals
(
b
.
getIsNew
())){
num1
++;
}
else
{
continue
;
}
}
secNum
+=
num1
;
if
(
dto
.
getChildren
()
==
null
)
continue
;
for
(
QueryCourseResDTO
dto2
:
dto
.
getChildren
()){
int
num2
=
0
;
for
(
BLesson
b
:
lessons
){
if
(
b
.
getCourseId
().
equals
(
dto2
.
getKey
())
&&
"1"
.
equals
(
b
.
getIsNew
())){
num2
++;
}
else
{
continue
;
}
}
secNum1
+=
num2
;
dto2
.
setNewCount
(
num2
);
}
secNum
+=
secNum1
;
}
}
return
resDTOS
;
}
}
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
d1a98357
...
...
@@ -772,5 +772,25 @@ public class BLessonController extends PaginationController<BLesson> {
}
@ApiOperation
(
value
=
"644 点击课程"
,
notes
=
"取消new显示"
)
@PostMapping
(
value
=
"/look"
)
public
Result
look
(
CurUser
curUser
,
String
lessonId
)
{
return
Result
.
builder
(
bLessonService
.
look
(
curUser
,
lessonId
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
lessonId
);
}
@ApiOperation
(
value
=
"645555 点击课程"
,
notes
=
"取消new显示"
)
@PostMapping
(
value
=
"/test"
)
public
Result
test
(
CurUser
curUser
)
{
return
Result
.
builder
(
bLessonService
.
test
(),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
"lessonId"
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
d1a98357
...
...
@@ -1219,5 +1219,25 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
*/
@Select
(
"select business_id from s_user WHERE account_id in (${accountIds}) and corp_id = #{corpId}"
)
List
<
String
>
queryUserIdByAccountId
(
@Param
(
"accountIds"
)
String
accountIds
,
@Param
(
"corpId"
)
String
corpId
);
/**
* 查询用户点击课程的数量
* @param userId
* @param lessonId
* @param type
* @return
*/
@Select
(
"select count(0) from b_user_lesson_look where user_id = #{userId} and lesson_id = #{lessonId} and type = #{type}"
)
int
getCountByUserAndLesson
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"lessonId"
)
String
lessonId
,
@Param
(
"type"
)
String
type
);
/**
* 插入 数据
* @param userId
* @param lessonId
* @param type
* @return
*/
@Insert
(
"insert into b_user_lesson_look VALUES (UUID(),#{userId},#{lessonId},#{type})"
)
int
insertLook
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"lessonId"
)
String
lessonId
,
@Param
(
"type"
)
String
type
);
}
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
d1a98357
...
...
@@ -283,6 +283,10 @@ public class BLesson extends IdEntity<BLesson> {
@ApiModelProperty
(
value
=
"学员id集合"
)
List
<
String
>
personList
;
@Transient
@ApiModelProperty
(
value
=
"是不是new(0/1)"
)
private
String
isNew
;
public
void
initModel
(){
// this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
...
...
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
d1a98357
...
...
@@ -301,4 +301,8 @@ public interface BLessonService{
List
<
ExamDto
>
userManageExamByPagination
(
PageUtil
pageUtil
,
ExamQueryDto
dto
);
PersistModel
look
(
CurUser
curUser
,
String
lessonId
);
PersistModel
test
();
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
d1a98357
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/bpersonvalue/dto/PersonValueClientDto.java
View file @
d1a98357
...
...
@@ -31,6 +31,4 @@ public class PersonValueClientDto {
@ApiModelProperty
(
value
=
"积分排序 0正序 1倒序"
)
public
String
valueSort
;
}
src/main/java/org/rcisoft/core/enums/MessageEnum.java
View file @
d1a98357
...
...
@@ -8,6 +8,7 @@ public enum MessageEnum {
ZPKC
(
"ZPKC"
,
"通知被指派了课程"
),
ZPPX
(
"ZPPX"
,
"通知被指派了培训"
),
ZPKS
(
"ZPKS"
,
"通知被指派了考试"
),
NEWNOTICE
(
"NEWNOTICE"
,
"发布新资源后,显示NEW标识的时间"
),
;
MessageEnum
(
String
name
,
String
remarks
)
{
...
...
src/main/java/org/rcisoft/core/util/CutPdfUtil.java
View file @
d1a98357
...
...
@@ -6,6 +6,7 @@ import com.itextpdf.text.pdf.PdfCopy;
import
com.itextpdf.text.pdf.PdfImportedPage
;
import
com.itextpdf.text.pdf.PdfReader
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.core.result.Ret
;
import
org.springframework.stereotype.Component
;
import
java.io.File
;
...
...
@@ -23,10 +24,15 @@ import java.util.List;
@Slf4j
public
class
CutPdfUtil
{
public
static
void
main
(
String
[]
args
)
{
try
{
List
<
String
>
pdfList
=
toCutPdf
(
"F:\\桌面整理\\文件\\测试资料\\06_API常用类.pdf"
,
"06_API常用类.pdf"
,
20
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
// try {
// List<String> pdfList = toCutPdf("F:\\桌面整理\\文件\\测试资料\\06_API常用类.pdf","06_API常用类.pdf", 20);
// } catch (Exception e) {
// e.printStackTrace();
// }
List
<
Long
>
haveJurisList
=
new
ArrayList
<>();
System
.
out
.
println
(
haveJurisList
);
if
(
haveJurisList
==
null
||
haveJurisList
.
size
()
<
1
){
System
.
out
.
println
(
haveJurisList
);
}
}
...
...
src/main/java/org/rcisoft/sys/role/service/impl/SysRoleServiceImpl.java
View file @
d1a98357
...
...
@@ -353,6 +353,11 @@ public class SysRoleServiceImpl implements SysRoleService {
UserUtil
.
setCurrentPersistOperation
(
bMessage
);
bMessage
.
setRemarks
(
MessageEnum
.
ZPKS
.
getRemarks
());
bMessageList
.
add
(
bMessage
);
//数据属于新消息通知 暂时共用message表
bMessage
=
new
BMessage
(
MessageEnum
.
NEWNOTICE
.
getName
(),
""
,
""
,
curUser
.
getCorpId
(),
7
);
UserUtil
.
setCurrentPersistOperation
(
bMessage
);
bMessage
.
setRemarks
(
MessageEnum
.
NEWNOTICE
.
getRemarks
());
bMessageList
.
add
(
bMessage
);
return
bMessageRepository
.
insertList
(
bMessageList
);
}
...
...
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