bug修复

This commit is contained in:
guoshengxiong 2024-05-20 16:04:50 +08:00
parent a19da3d721
commit 8f592a1a76
3 changed files with 15 additions and 12 deletions

View File

@ -214,7 +214,7 @@ public class QueryGenerator {
if (parameterMap != null && parameterMap.containsKey(ORDER_TYPE)) { if (parameterMap != null && parameterMap.containsKey(ORDER_TYPE)) {
order = parameterMap.get(ORDER_TYPE)[0]; order = parameterMap.get(ORDER_TYPE)[0];
} }
log.info("排序规则>>列:" + column + ",排序方式:" + order); //log.info("排序规则>>列:" + column + ",排序方式:" + order);
if (oConvertUtils.isNotEmpty(column) && oConvertUtils.isNotEmpty(order)) { if (oConvertUtils.isNotEmpty(column) && oConvertUtils.isNotEmpty(order)) {
String c = oConvertUtils.camelToUnderline(column); String c = oConvertUtils.camelToUnderline(column);
String aliasField = alias != null ? alias + c : c; String aliasField = alias != null ? alias + c : c;
@ -421,7 +421,7 @@ public class QueryGenerator {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
QueryWrapper<T> queryWrapper = new QueryWrapper<T>(); QueryWrapper<T> queryWrapper = new QueryWrapper<T>();
installMplus(queryWrapper, JSONObject.parseObject(JSONObject.toJSONString(map), clz), initParamMap(map), excludeFields, likeFields, defaultAlias); installMplus(queryWrapper, JSONObject.parseObject(JSONObject.toJSONString(map), clz), initParamMap(map), excludeFields, likeFields, defaultAlias);
log.info("---查询条件构造器初始化完成,耗时:" + (System.currentTimeMillis() - start) + "毫秒----"); //log.info("---查询条件构造器初始化完成,耗时:" + (System.currentTimeMillis() - start) + "毫秒----");
return queryWrapper; return queryWrapper;
} }
@ -609,7 +609,7 @@ public class QueryGenerator {
return; return;
} }
name = oConvertUtils.camelToUnderline(name); name = oConvertUtils.camelToUnderline(name);
log.info("--查询规则-->" + name + " " + rule.getValue() + " " + value); //log.info("--查询规则-->" + name + " " + rule.getValue() + " " + value);
if (org.apache.commons.lang3.StringUtils.isNotBlank(alias)) { if (org.apache.commons.lang3.StringUtils.isNotBlank(alias)) {
name = alias + name; name = alias + name;
} }

View File

@ -7,6 +7,7 @@ import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import javax.annotation.PostConstruct;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
/** /**
@ -30,9 +31,9 @@ public class AsyncConfig {
*/ */
private int queueCapacity = 200; private int queueCapacity = 200;
@Bean @PostConstruct
public InitializingBean initializingBean() { public void init() {
return () -> SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL); SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL);
} }
/** /**

View File

@ -123,12 +123,14 @@ public class XzEmergencyRecordServiceImpl extends ServiceImpl<XzEmergencyRecordM
baseMapper.updateById(xzEmergencyRecord); baseMapper.updateById(xzEmergencyRecord);
xzEmergencyRescueSituationMapper.delete(new LambdaQueryWrapper<XzEmergencyRescueSituation>() xzEmergencyRescueSituationMapper.delete(new LambdaQueryWrapper<XzEmergencyRescueSituation>()
.eq(XzEmergencyRescueSituation::getXzEmergencyRecordId, xzEmergencyRecord.getId())); .eq(XzEmergencyRescueSituation::getXzEmergencyRecordId, xzEmergencyRecord.getId()));
for (XzEmergencyRescueSituation situation : xzEmergencyRecord.getSituations()) { if (xzEmergencyRecord.getSituations() != null) {
situation.setId(null); for (XzEmergencyRescueSituation situation : xzEmergencyRecord.getSituations()) {
situation.setXzEmergencyRecordId(xzEmergencyRecord.getId()); situation.setId(null);
situation.setProjectSn(xzEmergencyRecord.getProjectSn()); situation.setXzEmergencyRecordId(xzEmergencyRecord.getId());
situation.setDisposalPersonId(SecurityUtils.getUser().getUserId()); situation.setProjectSn(xzEmergencyRecord.getProjectSn());
xzEmergencyRescueSituationMapper.insert(situation); situation.setDisposalPersonId(SecurityUtils.getUser().getUserId());
xzEmergencyRescueSituationMapper.insert(situation);
}
} }
} }