Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
88c9efb5
Commit
88c9efb5
authored
Nov 18, 2019
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口字段非空判断
token开发环境禁用 log配置地址修改 开发环境连接字符串修改
parent
7759c1d7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
7 deletions
+26
-7
bsoft-api/src/main/java/com/bsoft/api/common/aspect/TokenAspect.java
+2
-0
bsoft-api/src/main/java/com/bsoft/api/service/Impl/AsynBlockValuesServiceImpl.java
+2
-2
bsoft-api/src/main/java/com/bsoft/api/service/Impl/BlockValuesServiceImpl.java
+8
-3
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseDocServiceImpl.java
+5
-0
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseServiceImpl.java
+5
-0
bsoft-api/src/main/resources/logback-spring.xml
+2
-1
bsoft-api/src/main/webapp/WEB-INF/web.xml
+2
-1
No files found.
bsoft-api/src/main/java/com/bsoft/api/common/aspect/TokenAspect.java
View file @
88c9efb5
...
@@ -9,6 +9,7 @@ import org.aspectj.lang.annotation.Around;
...
@@ -9,6 +9,7 @@ import org.aspectj.lang.annotation.Around;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
...
@@ -19,6 +20,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -19,6 +20,7 @@ import javax.servlet.http.HttpServletRequest;
@Aspect
@Aspect
@Component
@Component
@Order
(
1
)
@Order
(
1
)
@Profile
({
"test"
,
"prod"
})
public
class
TokenAspect
{
public
class
TokenAspect
{
@Pointcut
(
"@annotation(com.bsoft.api.common.annotations.Token)"
)
@Pointcut
(
"@annotation(com.bsoft.api.common.annotations.Token)"
)
public
void
tokenAspect
(){}
public
void
tokenAspect
(){}
...
...
bsoft-api/src/main/java/com/bsoft/api/service/Impl/AsynBlockValuesServiceImpl.java
View file @
88c9efb5
...
@@ -46,14 +46,14 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService {
...
@@ -46,14 +46,14 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService {
@Override
@Override
public
void
getBlockValuesNew
(
List
<
BlockValue
>
list
,
Long
blockId
,
Map
<
String
,
String
>
whereClause
,
CountDownLatch
latch
)
{
public
void
getBlockValuesNew
(
List
<
BlockValue
>
list
,
Long
blockId
,
Map
<
String
,
String
>
whereClause
,
CountDownLatch
latch
)
{
try
{
try
{
System
.
out
.
println
(
"开始"
+
whereClause
.
get
(
"tableName"
));
System
.
out
.
println
(
"开始"
+
whereClause
.
get
(
"tableName"
));
List
<
Map
<
String
,
Object
>>
dataList
=
blockValuesMapper
.
selectByWhereNew
(
whereClause
);
List
<
Map
<
String
,
Object
>>
dataList
=
blockValuesMapper
.
selectByWhereNew
(
whereClause
);
BlockValue
blockValue
=
new
BlockValue
(
blockId
,
dataList
);
BlockValue
blockValue
=
new
BlockValue
(
blockId
,
dataList
);
synchronized
(
obj
){
synchronized
(
obj
){
list
.
add
(
blockValue
);
list
.
add
(
blockValue
);
}
}
System
.
out
.
println
(
"结束"
+
whereClause
.
get
(
"tableName"
));
System
.
out
.
println
(
"结束"
+
whereClause
.
get
(
"tableName"
));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
...
...
bsoft-api/src/main/java/com/bsoft/api/service/Impl/BlockValuesServiceImpl.java
View file @
88c9efb5
...
@@ -134,9 +134,14 @@ public class BlockValuesServiceImpl implements BlockValuesService {
...
@@ -134,9 +134,14 @@ public class BlockValuesServiceImpl implements BlockValuesService {
//获取表名
//获取表名
Long
blockId
=
data
.
getBlockId
();
Long
blockId
=
data
.
getBlockId
();
String
tableName
=
"VAL_BLOCK_VALUES_"
+
pageCode
+
"_"
+
page
.
getId
()+
"_"
+
blockId
;
String
tableName
=
"VAL_BLOCK_VALUES_"
+
pageCode
+
"_"
+
page
.
getId
()+
"_"
+
blockId
;
dim
.
put
(
"tableName"
,
tableName
);
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>(){
dim
.
put
(
"whereSql"
,
data
.
getWhereClause
());
{
asynBlockValuesServiceImpl
.
getBlockValuesNew
(
list
,
blockId
,
dim
,
latch
);
put
(
"tableName"
,
tableName
);
put
(
"whereSql"
,
data
.
getWhereClause
());
putAll
(
dim
);
}
};
asynBlockValuesServiceImpl
.
getBlockValuesNew
(
list
,
blockId
,
map
,
latch
);
}
}
latch
.
await
();
latch
.
await
();
...
...
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseDocServiceImpl.java
View file @
88c9efb5
...
@@ -3,6 +3,7 @@ package com.bsoft.api.service.Impl;
...
@@ -3,6 +3,7 @@ package com.bsoft.api.service.Impl;
import
com.bsoft.api.mapper.SerDiseaseDocRsMapper
;
import
com.bsoft.api.mapper.SerDiseaseDocRsMapper
;
import
com.bsoft.api.model.SerDiseaseDocRs
;
import
com.bsoft.api.model.SerDiseaseDocRs
;
import
com.bsoft.api.service.SerDiseaseDocService
;
import
com.bsoft.api.service.SerDiseaseDocService
;
import
com.bsoft.common.utils.StringUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.List
;
...
@@ -15,6 +16,10 @@ public class SerDiseaseDocServiceImpl implements SerDiseaseDocService {
...
@@ -15,6 +16,10 @@ public class SerDiseaseDocServiceImpl implements SerDiseaseDocService {
@Override
@Override
public
List
<
SerDiseaseDocRs
>
getDiseaseDoc
(
String
docCode
,
String
mdcCode
,
String
deptCode
,
String
date
)
throws
InterruptedException
{
public
List
<
SerDiseaseDocRs
>
getDiseaseDoc
(
String
docCode
,
String
mdcCode
,
String
deptCode
,
String
date
)
throws
InterruptedException
{
docCode
=
StringUtil
.
isNullOrEmpty
(
docCode
)?
null
:
docCode
;
mdcCode
=
StringUtil
.
isNullOrEmpty
(
mdcCode
)?
null
:
mdcCode
;
deptCode
=
StringUtil
.
isNullOrEmpty
(
deptCode
)?
null
:
deptCode
;
date
=
StringUtil
.
isNullOrEmpty
(
date
)?
null
:
date
;
return
serDiseaseDocRsMapper
.
selectByCode
(
docCode
,
mdcCode
,
deptCode
,
date
);
return
serDiseaseDocRsMapper
.
selectByCode
(
docCode
,
mdcCode
,
deptCode
,
date
);
}
}
}
}
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseServiceImpl.java
View file @
88c9efb5
...
@@ -4,6 +4,7 @@ import com.bsoft.api.mapper.SerDiseaseMapper;
...
@@ -4,6 +4,7 @@ import com.bsoft.api.mapper.SerDiseaseMapper;
import
com.bsoft.api.model.SerDisease
;
import
com.bsoft.api.model.SerDisease
;
import
com.bsoft.api.model.respmodel.DiseaseLevel
;
import
com.bsoft.api.model.respmodel.DiseaseLevel
;
import
com.bsoft.api.service.SerDiseaseService
;
import
com.bsoft.api.service.SerDiseaseService
;
import
com.bsoft.common.utils.StringUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -17,6 +18,8 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
...
@@ -17,6 +18,8 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
@Override
@Override
public
List
<
DiseaseLevel
>
selectListByIdorLevel
(
String
date
,
String
diseaseCode
,
Integer
level
,
String
docCode
,
String
deptCode
){
public
List
<
DiseaseLevel
>
selectListByIdorLevel
(
String
date
,
String
diseaseCode
,
Integer
level
,
String
docCode
,
String
deptCode
){
List
<
DiseaseLevel
>
list
=
new
ArrayList
<>();
List
<
DiseaseLevel
>
list
=
new
ArrayList
<>();
docCode
=
StringUtil
.
isNullOrEmpty
(
docCode
)?
null
:
docCode
;
deptCode
=
StringUtil
.
isNullOrEmpty
(
deptCode
)?
null
:
deptCode
;
if
(
diseaseCode
!=
null
&&
diseaseCode
!=
""
){
if
(
diseaseCode
!=
null
&&
diseaseCode
!=
""
){
list
=
selectByCode
(
date
,
diseaseCode
,
docCode
,
deptCode
);
list
=
selectByCode
(
date
,
diseaseCode
,
docCode
,
deptCode
);
}
else
{
}
else
{
...
@@ -37,6 +40,8 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
...
@@ -37,6 +40,8 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
* @return
* @return
*/
*/
private
List
<
DiseaseLevel
>
selectByCode
(
String
date
,
String
diseaseCode
,
String
docCode
,
String
deptCode
){
private
List
<
DiseaseLevel
>
selectByCode
(
String
date
,
String
diseaseCode
,
String
docCode
,
String
deptCode
){
SerDisease
disease
=
serDiseaseMapper
.
selectByCode
(
diseaseCode
,
date
,
docCode
,
deptCode
);
SerDisease
disease
=
serDiseaseMapper
.
selectByCode
(
diseaseCode
,
date
,
docCode
,
deptCode
);
if
(
disease
==
null
){
if
(
disease
==
null
){
return
null
;
return
null
;
...
...
bsoft-api/src/main/resources/logback-spring.xml
View file @
88c9efb5
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
<property
name=
"log.test.level"
value=
"DEBUG"
/>
<property
name=
"log.test.level"
value=
"DEBUG"
/>
<property
name=
"log.prod.level"
value=
"DEBUG"
/>
<property
name=
"log.prod.level"
value=
"DEBUG"
/>
<property
name=
"log.max.size"
value=
"100MB"
/>
<!-- 日志文件大小 -->
<property
name=
"log.max.size"
value=
"100MB"
/>
<!-- 日志文件大小 -->
<property
name=
"log.base"
value=
"/logs"
/>
<springProperty
scope=
"context"
name=
"log.profile"
source=
"spring.profiles.active"
defaultValue=
"app"
/>
<property
name=
"log.base"
value=
"/logs/${log.profile}"
/>
<springProperty
scope=
"context"
name=
"log.moduleName"
source=
"spring.application.name"
defaultValue=
"app"
/>
<springProperty
scope=
"context"
name=
"log.moduleName"
source=
"spring.application.name"
defaultValue=
"app"
/>
<!--控制台输出 -->
<!--控制台输出 -->
...
...
bsoft-api/src/main/webapp/WEB-INF/web.xml
View file @
88c9efb5
...
@@ -5,6 +5,6 @@
...
@@ -5,6 +5,6 @@
version=
"4.0"
>
version=
"4.0"
>
<context-param>
<context-param>
<param-name>
webAppRootKey
</param-name>
<param-name>
webAppRootKey
</param-name>
<param-value>
webApp.appt
</param-value>
<param-value>
api
</param-value>
</context-param>
</context-param>
</web-app>
</web-app>
\ No newline at end of file
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