Commit 88c9efb5 by Suvalue

接口字段非空判断

token开发环境禁用
log配置地址修改
开发环境连接字符串修改
parent 7759c1d7
...@@ -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(){}
......
...@@ -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 {
......
...@@ -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();
......
...@@ -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);
} }
} }
...@@ -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;
......
...@@ -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"/>
<!--控制台输出 --> <!--控制台输出 -->
......
...@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment