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