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
721e186b
Commit
721e186b
authored
Jul 15, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng-2.0' into meiteng-2.0
parents
4ffaf6c3
aba4c612
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
5 deletions
+25
-5
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+3
-1
BLabelRepository.java
...ava/org/rcisoft/business/blabel/dao/BLabelRepository.java
+12
-0
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+1
-1
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+2
-2
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+1
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+5
-1
BLessonMapper.xml
...esources/mapper/business/blesson/mapper/BLessonMapper.xml
+1
-0
No files found.
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
721e186b
...
@@ -868,10 +868,12 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -868,10 +868,12 @@ public class BChapterServiceImpl implements BChapterService {
String
[]
lessonIds
=
ids
.
split
(
","
);
String
[]
lessonIds
=
ids
.
split
(
","
);
String
batchUDID
=
"批量下载打包"
+
System
.
currentTimeMillis
();
String
batchUDID
=
"批量下载打包"
+
System
.
currentTimeMillis
();
//遍历每个id
//遍历每个id
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
for
(
String
id
:
lessonIds
)
{
for
(
String
id
:
lessonIds
)
{
List
<
BFile
>
fileList
=
bFileRepository
.
getFileByLessonId
(
id
);
List
<
BFile
>
fileList
=
bFileRepository
.
getFileByLessonId
(
id
);
//batch是zip打包文件夹 bFile.getLessonId()替换形成name
//batch是zip打包文件夹 bFile.getLessonId()替换形成name
String
filePath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()
+
global
.
getCOURSE_LOCATION
()
+
File
.
separator
+
batchUDID
+
File
.
separator
+
bLessonRepository
.
selectByPrimaryKey
(
id
).
getLessonName
();
BLesson
bLesson
=
bLessonRepository
.
selectByPrimaryKey
(
id
);
String
filePath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()
+
global
.
getCOURSE_LOCATION
()
+
File
.
separator
+
batchUDID
+
File
.
separator
+
bLesson
.
getLessonName
()
+
"-"
+
simpleDateFormat
.
format
(
bLesson
.
getCreateDate
());
File
file
=
new
File
(
filePath
);
File
file
=
new
File
(
filePath
);
if
(
fileList
==
null
||
fileList
.
size
()
<
1
)
if
(
fileList
==
null
||
fileList
.
size
()
<
1
)
continue
;
continue
;
...
...
src/main/java/org/rcisoft/business/blabel/dao/BLabelRepository.java
View file @
721e186b
package
org
.
rcisoft
.
business
.
blabel
.
dao
;
package
org
.
rcisoft
.
business
.
blabel
.
dao
;
import
org.apache.ibatis.annotations.*
;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.business.blabel.dto.QueryLabelResDTO
;
import
org.rcisoft.business.blabel.entity.BLabel
;
import
org.rcisoft.business.blabel.entity.BLabel
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -32,4 +33,15 @@ public interface BLabelRepository extends BaseMapper<BLabel> {
...
@@ -32,4 +33,15 @@ public interface BLabelRepository extends BaseMapper<BLabel> {
@Update
(
"UPDATE b_label SET del_flag='1' where business_id = #{businessId}"
)
@Update
(
"UPDATE b_label SET del_flag='1' where business_id = #{businessId}"
)
int
removeLabel
(
@Param
(
"businessId"
)
String
id
);
int
removeLabel
(
@Param
(
"businessId"
)
String
id
);
/**
* 查询课程push标签
* @return
*/
@Select
(
"<script>"
+
" select business_id businessId ,l_name lName "
+
" from b_label where del_flag != 1 and flag = 1 "
+
" and business_id in "
+
"<foreach collection=\"list\" item=\"item\" open=\"(\" separator=\",\" close=\")\" > #{item} </foreach>"
+
"</script>"
)
List
<
QueryLabelResDTO
>
queryPushLabel
(
@Param
(
"list"
)
String
[]
list
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
721e186b
...
@@ -1340,7 +1340,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -1340,7 +1340,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
* @param type
* @param type
* @return
* @return
*/
*/
@Select
(
"select count(0) from b_user_lesson_look where user_id = #{userId} and lesson_id = #{lessonId}
and type = #{type}
"
)
@Select
(
"select count(0) from b_user_lesson_look where user_id = #{userId} and lesson_id = #{lessonId}"
)
int
getCountByUserAndLesson
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"lessonId"
)
String
lessonId
,
@Param
(
"type"
)
String
type
);
int
getCountByUserAndLesson
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"lessonId"
)
String
lessonId
,
@Param
(
"type"
)
String
type
);
/**
/**
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
721e186b
...
@@ -168,6 +168,8 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -168,6 +168,8 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
@Transient
private
String
trainType
;
private
String
trainType
;
@ApiModelProperty
(
value
=
"平台推荐自带标签"
)
private
String
pushLable
;
//-------------------------------------
//-------------------------------------
...
@@ -292,8 +294,6 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -292,8 +294,6 @@ public class BLesson extends IdEntity<BLesson> {
@ApiModelProperty
(
value
=
"数据来源企业"
)
@ApiModelProperty
(
value
=
"数据来源企业"
)
private
String
fromCorp
;
private
String
fromCorp
;
@ApiModelProperty
(
value
=
"平台推荐自带标签"
)
private
String
pushLable
;
public
void
initModel
(){
public
void
initModel
(){
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
721e186b
...
@@ -494,6 +494,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -494,6 +494,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
for
(
BLessonPerson
b
:
result
)
{
for
(
BLessonPerson
b
:
result
)
{
//step 1 查询look表中是否有对应任何课程的点击记录
//step 1 查询look表中是否有对应任何课程的点击记录
int
flag
=
bLessonRepository
.
getCountByUserAndLesson
(
userId
,
b
.
getBusinessId
(),
"0"
);
int
flag
=
bLessonRepository
.
getCountByUserAndLesson
(
userId
,
b
.
getBusinessId
(),
"0"
);
log
.
info
(
"-----------addNew------课程查看状态2--"
+
b
.
getBusinessId
()
+
"--"
+
userId
+
"--"
+
flag
+
"---------------"
);
//step 2 存在则返回,不存在则判断时间 满足条件 setIsNew() flag <= 0 说明此用户未点击过该课程
//step 2 存在则返回,不存在则判断时间 满足条件 setIsNew() flag <= 0 说明此用户未点击过该课程
if
(
flag
<=
0
)
{
if
(
flag
<=
0
)
{
//获取课程的 指派时间
//获取课程的 指派时间
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
721e186b
...
@@ -16,6 +16,7 @@ import org.rcisoft.business.bfile.dao.BPFileRepository;
...
@@ -16,6 +16,7 @@ import org.rcisoft.business.bfile.dao.BPFileRepository;
import
org.rcisoft.business.bfile.dao.BTrainFileRepository
;
import
org.rcisoft.business.bfile.dao.BTrainFileRepository
;
import
org.rcisoft.business.bfile.entity.BFile
;
import
org.rcisoft.business.bfile.entity.BFile
;
import
org.rcisoft.business.bfile.entity.BTrainFile
;
import
org.rcisoft.business.bfile.entity.BTrainFile
;
import
org.rcisoft.business.blabel.dao.BLabelRepository
;
import
org.rcisoft.business.blabel.dto.QueryLabelResDTO
;
import
org.rcisoft.business.blabel.dto.QueryLabelResDTO
;
import
org.rcisoft.business.blesson.dao.*
;
import
org.rcisoft.business.blesson.dao.*
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.dto.*
;
...
@@ -163,6 +164,9 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -163,6 +164,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired
@Autowired
BFileRepository
bFileRepository
;
BFileRepository
bFileRepository
;
@Autowired
BLabelRepository
bLabelRepository
;
@Value
(
"${upload.replaceHttp:false}"
)
@Value
(
"${upload.replaceHttp:false}"
)
private
String
replaceHttp
;
private
String
replaceHttp
;
...
@@ -227,7 +231,6 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -227,7 +231,6 @@ public class BLessonServiceImpl implements BLessonService {
if
(
LessonSycnEnum
.
OPEN
.
getCode
().
equals
(
flag
))
if
(
LessonSycnEnum
.
OPEN
.
getCode
().
equals
(
flag
))
bLessonRepository
.
hotNumberReCount2
(
bLesson
.
getBusinessId
());
bLessonRepository
.
hotNumberReCount2
(
bLesson
.
getBusinessId
());
}
}
return
bLesson
;
return
bLesson
;
}
}
...
@@ -1980,6 +1983,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -1980,6 +1983,7 @@ public class BLessonServiceImpl implements BLessonService {
for
(
BLesson
b
:
result
)
{
for
(
BLesson
b
:
result
)
{
//step 1 查询look表中是否有对应任何课程的点击记录
//step 1 查询look表中是否有对应任何课程的点击记录
int
flag
=
bLessonRepository
.
getCountByUserAndLesson
(
userId
,
b
.
getBusinessId
(),
"0"
);
int
flag
=
bLessonRepository
.
getCountByUserAndLesson
(
userId
,
b
.
getBusinessId
(),
"0"
);
log
.
info
(
"-----------addNew------课程查看状态1--"
+
b
.
getBusinessId
()
+
"--"
+
userId
+
"--"
+
flag
+
"---------------"
);
//step 2 存在则返回,不存在则判断时间 满足条件 setIsNew() flag <= 0 说明此用户未点击过该课程
//step 2 存在则返回,不存在则判断时间 满足条件 setIsNew() flag <= 0 说明此用户未点击过该课程
if
(
flag
<=
0
)
{
if
(
flag
<=
0
)
{
//获取课程的 发布时间
//获取课程的 发布时间
...
...
src/main/resources/mapper/business/blesson/mapper/BLessonMapper.xml
View file @
721e186b
...
@@ -96,6 +96,7 @@
...
@@ -96,6 +96,7 @@
<result
column=
"value_gain"
jdbcType=
"VARCHAR"
property=
"valueGain"
/>
<result
column=
"value_gain"
jdbcType=
"VARCHAR"
property=
"valueGain"
/>
<result
column=
"value_update_date"
jdbcType=
"TIMESTAMP"
property=
"valueUpdateDate"
/>
<result
column=
"value_update_date"
jdbcType=
"TIMESTAMP"
property=
"valueUpdateDate"
/>
<result
column=
"is_trans"
jdbcType=
"VARCHAR"
property=
"isTrans"
/>
<result
column=
"is_trans"
jdbcType=
"VARCHAR"
property=
"isTrans"
/>
<result
column=
"push_lable"
jdbcType=
"VARCHAR"
property=
"pushLable"
/>
<collection
property=
"labelList"
ofType=
"org.rcisoft.business.blabel.dto.QueryLabelResDTO"
<collection
property=
"labelList"
ofType=
"org.rcisoft.business.blabel.dto.QueryLabelResDTO"
...
...
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