Commit 88c9efb5 by Suvalue

接口字段非空判断

token开发环境禁用
log配置地址修改
开发环境连接字符串修改
parent 7759c1d7
......@@ -9,6 +9,7 @@ import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.springframework.context.annotation.Profile;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
......@@ -19,6 +20,7 @@ import javax.servlet.http.HttpServletRequest;
@Aspect
@Component
@Order(1)
@Profile({"test","prod"})
public class TokenAspect {
@Pointcut("@annotation(com.bsoft.api.common.annotations.Token)")
public void tokenAspect(){}
......
......@@ -46,14 +46,14 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService {
@Override
public void getBlockValuesNew(List<BlockValue> list, Long blockId, Map<String,String> whereClause, CountDownLatch latch) {
try{
System.out.println("开始"+whereClause.get("tableName"));
System.out.println("开始"+ whereClause.get("tableName"));
List<Map<String,Object>> dataList = blockValuesMapper.selectByWhereNew(whereClause);
BlockValue blockValue = new BlockValue(blockId, dataList);
synchronized (obj){
list.add(blockValue);
}
System.out.println("结束"+whereClause.get("tableName"));
System.out.println("结束"+ whereClause.get("tableName"));
}catch (Exception e){
log.error(e.getMessage(), e);
}finally {
......
......@@ -134,9 +134,14 @@ public class BlockValuesServiceImpl implements BlockValuesService {
//获取表名
Long blockId = data.getBlockId();
String tableName = "VAL_BLOCK_VALUES_" +pageCode+"_"+page.getId()+"_"+ blockId;
dim.put("tableName",tableName);
dim.put("whereSql", data.getWhereClause());
asynBlockValuesServiceImpl.getBlockValuesNew(list, blockId,dim, latch);
Map<String,String> map = new HashMap<String,String>(){
{
put("tableName",tableName);
put("whereSql", data.getWhereClause());
putAll(dim);
}
};
asynBlockValuesServiceImpl.getBlockValuesNew(list, blockId,map, latch);
}
latch.await();
......
......@@ -3,6 +3,7 @@ package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.SerDiseaseDocRsMapper;
import com.bsoft.api.model.SerDiseaseDocRs;
import com.bsoft.api.service.SerDiseaseDocService;
import com.bsoft.common.utils.StringUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
......@@ -15,6 +16,10 @@ public class SerDiseaseDocServiceImpl implements SerDiseaseDocService {
@Override
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);
}
}
......@@ -4,6 +4,7 @@ import com.bsoft.api.mapper.SerDiseaseMapper;
import com.bsoft.api.model.SerDisease;
import com.bsoft.api.model.respmodel.DiseaseLevel;
import com.bsoft.api.service.SerDiseaseService;
import com.bsoft.common.utils.StringUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
......@@ -17,6 +18,8 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
@Override
public List<DiseaseLevel> selectListByIdorLevel(String date, String diseaseCode,Integer level,String docCode,String deptCode){
List<DiseaseLevel> list = new ArrayList<>();
docCode= StringUtil.isNullOrEmpty(docCode)?null:docCode;
deptCode= StringUtil.isNullOrEmpty(deptCode)?null:deptCode;
if(diseaseCode!=null&&diseaseCode!=""){
list = selectByCode(date,diseaseCode,docCode,deptCode);
}else{
......@@ -37,6 +40,8 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
* @return
*/
private List<DiseaseLevel> selectByCode(String date, String diseaseCode,String docCode,String deptCode){
SerDisease disease = serDiseaseMapper.selectByCode(diseaseCode,date,docCode,deptCode);
if(disease==null){
return null;
......
......@@ -7,7 +7,8 @@
<property name="log.test.level" value="DEBUG" />
<property name="log.prod.level" value="DEBUG" />
<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"/>
<!--控制台输出 -->
......
......@@ -5,6 +5,6 @@
version="4.0">
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>webApp.appt</param-value>
<param-value>api</param-value>
</context-param>
</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