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
240ab0fb
Commit
240ab0fb
authored
Oct 22, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口、添加新接口
parent
8d2fd6b2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
44 additions
and
30 deletions
+44
-30
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+2
-2
ILearnLessonDTO.java
...ava/org/rcisoft/business/blesson/dto/ILearnLessonDTO.java
+1
-1
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+7
-2
MTCotactApiRequestClient.java
...isoft/common/util/outClient/MTCotactApiRequestClient.java
+1
-1
MvcConfig.java
src/main/java/org/rcisoft/config/MvcConfig.java
+7
-14
QuartzConfig.java
src/main/java/org/rcisoft/config/QuartzConfig.java
+11
-0
SysUserServiceImpl.java
...org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
+3
-0
application-mt.yml
src/main/resources/application-mt.yml
+9
-7
application.yml
src/main/resources/application.yml
+2
-2
logback-spring.xml
src/main/resources/logback-spring.xml
+1
-1
No files found.
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
240ab0fb
...
...
@@ -36,8 +36,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
// " and b.corp_id = #{curUser.corpId} "+
// " and su.corp_id = #{curUser.corpId} "+
" <if test=\"releaseState!=null and releaseState != ''\">and release_state = #{param.releaseState} </if>"
+
" <if test=\"lessonType!=null and lessonType != ''\">and lesson_type = #{param.lessonType} </if>"
+
" <if test=\"releaseState!=null and releaseState != ''\">and
b.
release_state = #{param.releaseState} </if>"
+
" <if test=\"lessonType!=null and lessonType != ''\">and
b.
lesson_type = #{param.lessonType} </if>"
+
"order by update_date desc</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryBLessons
(
@Param
(
"param"
)
MyReleaseDTO
param
,
@Param
(
"curUser"
)
CurUser
curUser
);
...
...
src/main/java/org/rcisoft/business/blesson/dto/ILearnLessonDTO.java
View file @
240ab0fb
...
...
@@ -21,7 +21,7 @@ public class ILearnLessonDTO {
@ApiModelProperty
(
value
=
"是否已学完(0:未开始 1:已开始 2: 已学完)"
)
private
String
isFinish
;
@ApiModelProperty
(
value
=
"培训状态(0 待参加 1 缺勤 2
签到
)"
)
@ApiModelProperty
(
value
=
"培训状态(0 待参加 1 缺勤 2
已参加
)"
)
private
String
trainIsSign
;
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
240ab0fb
...
...
@@ -299,7 +299,7 @@ public class BLessonServiceImpl implements BLessonService {
List
<
BMaterial
>
bMaterialList
=
new
ArrayList
<>();
//插入b_train_file表
if
(
!
addLessonDTO
.
getTrainFileList
().
isEmpty
()
){
if
(
addLessonDTO
.
getTrainFileList
()
!=
null
&&
addLessonDTO
.
getTrainFileList
().
size
()>
0
){
List
<
BTrainFile
>
trainFileList
=
addLessonDTO
.
getTrainFileList
();
for
(
BTrainFile
bTrainFile
:
trainFileList
)
{
bTrainFile
.
setLessonId
(
model
.
getBusinessId
());
...
...
@@ -593,6 +593,11 @@ public class BLessonServiceImpl implements BLessonService {
departs
.
addAll
(
Arrays
.
asList
(
deptsBean
.
getPid
().
split
(
","
)));
});
});
departs
.
forEach
(
depart
->{
if
(
StringUtils
.
isEmpty
(
depart
)){
departs
.
remove
(
depart
);
}
});
//----------------------------
model
.
setDeparts
(
departs
);
List
<
String
>
courseIds
;
...
...
@@ -655,7 +660,7 @@ public class BLessonServiceImpl implements BLessonService {
}
List
<
GetAllRspDTO
>
GetAllRspDTOList
=
cotactApiRequestClient
.
getUserByDeptIdSet
(
corpId
,
departIds
);
if
(
!
GetAllRspDTOList
.
isEmpty
()
){
if
(
GetAllRspDTOList
!=
null
&&
GetAllRspDTOList
.
size
()>
0
){
for
(
GetAllRspDTO
getAllRspDTO
:
GetAllRspDTOList
)
{
uids
.
add
(
getAllRspDTO
.
getId
());
}
...
...
src/main/java/org/rcisoft/common/util/outClient/MTCotactApiRequestClient.java
View file @
240ab0fb
...
...
@@ -96,7 +96,7 @@ public class MTCotactApiRequestClient {
}
return
null
;
}
log
.
info
(
"---------------------同步人员开始-----------------------"
);
return
contactFeignClient
.
getUsersByUpdateTime
(
corpId
,
updateTime
,
zxClientType
,
zxAccountId
).
getData
();
}
...
...
src/main/java/org/rcisoft/config/MvcConfig.java
View file @
240ab0fb
...
...
@@ -76,23 +76,16 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
String
message
=
e
.
getMessage
();
if
(
handler
instanceof
HandlerMethod
)
{
HandlerMethod
handlerMethod
=
(
HandlerMethod
)
handler
;
if
(
e
instanceof
SystemException
){
/*license*/
try
{
throw
e
;
}
catch
(
Exception
e1
)
{
log
.
error
(
e
.
getMessage
());
log
.
error
(
e1
.
getMessage
());
}
}
message
=
String
.
format
(
"接口 [%s] 出现异常,方法:%s.%s,异常摘要:%s"
,
request
.
getRequestURI
(),
handlerMethod
.
getBean
().
getClass
().
getName
(),
handlerMethod
.
getMethod
().
getName
(),
e
.
getMessage
());
log
.
error
(
message
);
if
(
e
instanceof
ServiceException
)
{
//业务失败的异常,如“账号或密码错误”
result
.
setCode
(
ResultCode
.
FAIL
).
setMessage
(
e
.
getMessage
());
}
else
{
message
=
String
.
format
(
"接口 [%s] 出现异常,方法:%s.%s,异常摘要:%s"
,
request
.
getRequestURI
(),
handlerMethod
.
getBean
().
getClass
().
getName
(),
handlerMethod
.
getMethod
().
getName
(),
e
.
getMessage
());
result
.
setCode
(
ResultCode
.
ERROR
).
setMessage
(
message
);
}
}
else
{
...
...
src/main/java/org/rcisoft/config/QuartzConfig.java
View file @
240ab0fb
...
...
@@ -4,6 +4,8 @@ import org.rcisoft.core.component.RcJobFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.TaskScheduler
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
;
import
org.springframework.scheduling.quartz.SchedulerFactoryBean
;
/**
...
...
@@ -34,4 +36,13 @@ public class QuartzConfig {
//bean.setTriggers(cronJobTrigger);
return
bean
;
}
@Bean
public
TaskScheduler
scheduledExecutorService
()
{
ThreadPoolTaskScheduler
scheduler
=
new
ThreadPoolTaskScheduler
();
scheduler
.
setPoolSize
(
8
);
scheduler
.
setThreadNamePrefix
(
"scheduled-thread-"
);
return
scheduler
;
}
}
src/main/java/org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
View file @
240ab0fb
package
org
.
rcisoft
.
sys
.
user
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.rcisoft.business.synchronizationtime.entity.SynchronizationTime
;
import
org.rcisoft.business.synchronizationtime.service.SynchronizationTimeService
;
...
...
@@ -34,6 +35,7 @@ import java.util.*;
import
static
java
.
util
.
Arrays
.
asList
;
@Slf4j
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
public
class
SysUserServiceImpl
implements
SysUserService
{
...
...
@@ -285,6 +287,7 @@ public class SysUserServiceImpl implements SysUserService {
}
String
updateTime
=
df
.
format
(
synchronizationTime
.
getSynchronizationTime
());
List
<
GetAllRspDTO
>
userGetRspDTOList
=
mtCotactApiRequestClient
.
accountGetMyInfoList
(
corpId
,
updateTime
);
log
.
info
(
"同步人员......"
+
userGetRspDTOList
.
size
()
+
"记录"
);
// if (null == userGetRspDTOList) {
// throw new ServiceException(ResultServiceEnums.ZX_FAILED);
// }
...
...
src/main/resources/application-mt.yml
View file @
240ab0fb
...
...
@@ -14,6 +14,7 @@ server:
# org.springframework.web: DEBUG
druid
:
# url: jdbc:mysql://192.168.5.201:20001/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url
:
jdbc:mysql://mt_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username
:
root
password
:
91isoft
...
...
@@ -95,14 +96,15 @@ libreoffice:
ip
:
mt_office
port
:
8997
mt
:
api
:
http://221.239.114.20:6789/api/
api
:
http://192.168.5.201/api/
# api: http://221.239.114.20:6789/api/
eureka
:
instance
:
hostname
:
localhost
# hostname: localhost
prefer-ip-address
:
true
ip-address
:
192.168.5.201
client
:
register-with-eureka
:
fals
e
fetch-registry
:
fals
e
register-with-eureka
:
tru
e
fetch-registry
:
tru
e
service-url
:
defaultZone
:
http://zx:zgiot@192.168.5.48:7001/eureka
\ No newline at end of file
defaultZone
:
http://zx:zgiot@192.168.5.48:7001/eureka
src/main/resources/application.yml
View file @
240ab0fb
spring
:
profiles
:
active
:
dev
#
active: dev
# active: prod
#
active: mt
active
:
mt
src/main/resources/logback-spring.xml
View file @
240ab0fb
...
...
@@ -72,7 +72,7 @@
</root>
</springProfile>
<springProfile
name=
"mt"
>
<root
level=
"
info
"
>
<root
level=
"
debug
"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
...
...
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