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
db3630d9
Commit
db3630d9
authored
Oct 24, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
5125a6a4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
9 deletions
+48
-9
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+1
-1
BViewrangeRepository.java
...rg/rcisoft/business/blesson/dao/BViewrangeRepository.java
+1
-1
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+3
-0
BViewrange.java
.../java/org/rcisoft/business/blesson/entity/BViewrange.java
+0
-3
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+31
-4
BMaterialRepository.java
...g/rcisoft/business/bmaterial/dao/BMaterialRepository.java
+11
-0
BLessonPersonMapper.xml
...es/mapper/business/blesson/mapper/BLessonPersonMapper.xml
+1
-0
No files found.
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
db3630d9
...
...
@@ -261,7 +261,7 @@ public class BChapterServiceImpl implements BChapterService {
BMaterial
bMaterial
=
new
BMaterial
();
UserUtil
.
setCurrentPersistOperation
(
bMaterial
);
bMaterial
.
setLessonId
(
chapterDTO
.
getLessonId
());
bMaterial
.
setChapterId
(
chapterDTO
.
getBusinessId
());
bMaterial
.
setChapterId
(
model
.
getBusinessId
());
bMaterial
.
setFileName
(
dto
.
getFileName
());
if
(
StringUtils
.
isNotEmpty
(
dto
.
getFileTime
())
&&
dto
.
getFileTime
().
contains
(
"."
))
{
...
...
src/main/java/org/rcisoft/business/blesson/dao/BViewrangeRepository.java
View file @
db3630d9
...
...
@@ -37,7 +37,7 @@ public interface BViewrangeRepository extends BaseMapper<BViewrange> {
" <if test='remarks != null'>remarks=#{remarks},</if> "
,
" <if test='lessonId != null'>lesson_id=#{lessonId},</if> "
,
" <if test='type != null'>type=#{type},</if> "
,
" <if test='corp_id != null'>corp_id=#{corp
_i
d},</if> "
,
" <if test='corp_id != null'>corp_id=#{corp
I
d},</if> "
,
" </set>"
,
"where lesson_id=#{lessonId}"
,
"</script>"
})
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
db3630d9
...
...
@@ -69,6 +69,9 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
trainIsSign
;
@ApiModelProperty
(
value
=
"报名日期"
)
private
String
applyDate
;
@ApiModelProperty
(
value
=
"签到日期"
)
private
String
signDate
;
//-----------------------------
...
...
src/main/java/org/rcisoft/business/blesson/entity/BViewrange.java
View file @
db3630d9
...
...
@@ -21,8 +21,5 @@ public class BViewrange extends IdEntity<BViewrange> {
private
String
type
;
@Transient
private
String
corpId
;
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
db3630d9
...
...
@@ -15,6 +15,7 @@ import org.rcisoft.business.blesson.entity.*;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.business.blesson.dao.BViewrangeRepository
;
import
org.rcisoft.business.bmaterial.dao.BMaterialRepository
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.common.util.feignDto.*
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
...
...
@@ -76,6 +77,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired
private
BTrainFileRepository
bTrainFileRepository
;
@Autowired
private
BMaterialRepository
bMaterialRepository
;
@Autowired
MTCotactApiRequestClient
cotactApiRequestClient
;
...
...
@@ -223,6 +227,8 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
persist
(
AddLessonDTO
addLessonDTO
)
{
BLesson
model
=
new
BLesson
();
//取出文件集合
List
<
BTrainFile
>
trainFileList
=
addLessonDTO
.
getTrainFileList
();
BeanUtils
.
copyProperties
(
addLessonDTO
,
model
);
int
line
=
0
;
...
...
@@ -307,18 +313,23 @@ public class BLessonServiceImpl implements BLessonService {
//删除原有文件
bTrainFileRepository
.
deleteByLessonId
(
model
.
getBusinessId
());
//获取b_material中已有的URL
List
<
String
>
urls
=
bMaterialRepository
.
materialHaveUrl
(
trainFileList
);
//移除已有URL
// urls.forEach(url->{
//
// });
}
//转换json
if
(
StringUtils
.
isNotEmpty
(
addLessonDTO
.
getTrainFileJson
())){
List
<
BTrainFile
>
bTrainFiles
=
JSONObject
.
parseArray
(
addLessonDTO
.
getTrainFileJson
(),
BTrainFile
.
class
);
addLessonDTO
.
setTrainFileList
(
bTrainFiles
);
}
List
<
BMaterial
>
bMaterialList
=
new
ArrayList
<>();
//插入b_train_file表
if
(
addLessonDTO
.
getTrainFileList
()
!=
null
&&
addLessonDTO
.
getTrainFileList
()
.
size
()
>
0
)
{
List
<
BTrainFile
>
trainFileList
=
addLessonDTO
.
getTrainFileList
();
if
(
trainFileList
!=
null
&&
trainFileList
.
size
()
>
0
)
{
for
(
BTrainFile
bTrainFile
:
trainFileList
)
{
bTrainFile
.
setLessonId
(
model
.
getBusinessId
());
UserUtil
.
setCurrentPersistOperation
(
bTrainFile
);
...
...
@@ -335,8 +346,24 @@ public class BLessonServiceImpl implements BLessonService {
bMaterialList
.
add
(
bMaterial
);
}
bTrainFileRepository
.
insertTrainFileList
(
trainFileList
);
//插入资料表
//插入资料表
// BMaterial bMaterial = new BMaterial();
// UserUtil.setCurrentPersistOperation(bMaterial);
// bMaterial.setLessonId(model.getBusinessId());
// bMaterial.setFileName(dto.getFileName());
//
// if (StringUtils.isNotEmpty(dto.getFileTime()) && dto.getFileTime().contains(".")) {
// bMaterial.setFileTime(dto.getFileTime().substring(0, dto.getFileTime().lastIndexOf(".")));
// }
//
// bMaterial.setFileUrl(dto.getVideoUrl());
//
// bMaterial.setType(model.getIsTest());
// bMaterial.setUploadType("1");
// bMaterial.setFileSize(dto.getFileSize());
// bMaterialRepository.insertMaterial(bMaterial);
//
}
return
new
PersistModel
(
line
,
model
);
...
...
src/main/java/org/rcisoft/business/bmaterial/dao/BMaterialRepository.java
View file @
db3630d9
package
org
.
rcisoft
.
business
.
bmaterial
.
dao
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.bfile.entity.BTrainFile
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.apache.ibatis.annotations.ResultMap
;
...
...
@@ -52,5 +54,14 @@ public interface BMaterialRepository extends BaseMapper<BMaterial> {
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BMaterial
>
queryMyBMaterialByPagination
(
CurUser
curUser
);
@Select
(
"<script>select file_url from b_material "
+
" where 1=1 "
+
" and del_flag != 1 and flag = 1 "
+
" and file_url in "
+
"<foreach item='item' index='index' collection='trainFileList' open='(' separator=',' close=')'> #{item.videoUrl} </foreach> "
+
"</script>"
)
List
<
String
>
materialHaveUrl
(
@Param
(
"trainFileList"
)
List
<
BTrainFile
>
trainFileList
);
}
src/main/resources/mapper/business/blesson/mapper/BLessonPersonMapper.xml
View file @
db3630d9
...
...
@@ -40,6 +40,7 @@
<result
column=
"is_apply"
jdbcType=
"VARCHAR"
property=
"isApply"
/>
<result
column=
"train_is_sign"
jdbcType=
"VARCHAR"
property=
"trainIsSign"
/>
<result
column=
"apply_date"
jdbcType=
"VARCHAR"
property=
"applyDate"
/>
<result
column=
"sign_date"
jdbcType=
"VARCHAR"
property=
"signDate"
/>
</resultMap>
...
...
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