提交修改

This commit is contained in:
quyixiao 2025-10-21 21:57:44 +08:00
parent 3e3e6bb16f
commit dacde34752
4 changed files with 25 additions and 6 deletions

View File

@ -64,7 +64,17 @@ public class AdminResourceController {
for (VvResourceEntity vvResourceEntity : vvResourceEntities) { for (VvResourceEntity vvResourceEntity : vvResourceEntities) {
VvResourceListDTO vvResourceDTO = new VvResourceListDTO(); VvResourceListDTO vvResourceDTO = new VvResourceListDTO();
BeanUtils.copyProperties(vvResourceEntity, vvResourceDTO); BeanUtils.copyProperties(vvResourceEntity, vvResourceDTO);
vvResourceDTO.setLocations(vvResourceEntityList);
if(adminResourceRequest.getParentId() ==null){
List<VvResourceEntity> vvResourceEntityListTemp = new ArrayList<>();
getParentResource(vvResourceEntity.getParentId(), vvResourceEntityListTemp);
vvResourceDTO.setLocations(vvResourceEntityListTemp);
}else{
vvResourceDTO.setLocations(vvResourceEntityList);
}
vvResourceDTOS.add(vvResourceDTO); vvResourceDTOS.add(vvResourceDTO);
} }
pageUtils.setRows(vvResourceDTOS); pageUtils.setRows(vvResourceDTOS);
@ -76,11 +86,14 @@ public class AdminResourceController {
* @param parentId * @param parentId
*/ */
public void getParentResource(Long parentId, List<VvResourceEntity> vvResourceEntityList) { public void getParentResource(Long parentId, List<VvResourceEntity> vvResourceEntityList) {
if (parentId <= 0) { if (parentId ==null || parentId <= 0) {
return; return;
} }
VvResourceEntity vvResource = vvResourceDao.selectVvResourceById(parentId); VvResourceEntity vvResource = vvResourceDao.selectVvResourceById(parentId);
if(vvResource == null){
return ;
}
vvResourceEntityList.add(0,vvResource); vvResourceEntityList.add(0,vvResource);
getParentResource(vvResource.getParentId(), vvResourceEntityList); getParentResource(vvResource.getParentId(), vvResourceEntityList);
} }

View File

@ -38,6 +38,8 @@ public class CreateDataQueueSimpleRabbitListener {
@RabbitListener(queues = "#{createDataQueue.name}", containerFactory = "accountAmountQueueSimpleRabbitListenerContainerFactory") @RabbitListener(queues = "#{createDataQueue.name}", containerFactory = "accountAmountQueueSimpleRabbitListenerContainerFactory")
public void consumeMessage(@Payload String message, @Header(AmqpHeaders.DELIVERY_TAG) long delivertTag, Channel channel) { public void consumeMessage(@Payload String message, @Header(AmqpHeaders.DELIVERY_TAG) long delivertTag, Channel channel) {
try { try {
log.info("CreateDataQueueSimpleRabbitListener 请求参数是message :{}", message);
VvCreateDataConfigDTO vvCreateDataConfigDTO = JSONObject.parseObject(message, VvCreateDataConfigDTO.class); VvCreateDataConfigDTO vvCreateDataConfigDTO = JSONObject.parseObject(message, VvCreateDataConfigDTO.class);
VvAllDataEntity vvAllData = vvAllDataDao.selectVvAllDataByRunIdRunDate(vvCreateDataConfigDTO.getId(), vvCreateDataConfigDTO.getRunDate()); VvAllDataEntity vvAllData = vvAllDataDao.selectVvAllDataByRunIdRunDate(vvCreateDataConfigDTO.getId(), vvCreateDataConfigDTO.getRunDate());
if (vvAllData != null) { if (vvAllData != null) {

View File

@ -51,6 +51,9 @@ public class SendDingDingQueueSimpleRabbitListener {
public void consumeMessage(@Payload String message, @Header(AmqpHeaders.DELIVERY_TAG) long delivertTag, Channel channel) { public void consumeMessage(@Payload String message, @Header(AmqpHeaders.DELIVERY_TAG) long delivertTag, Channel channel) {
try { try {
log.info("SendDingDingQueueSimpleRabbitListener请求参数是message :{}", message);
VvChartConfigEntity vvChartConfigEntity = JSONObject.parseObject(message, VvChartConfigEntity.class); VvChartConfigEntity vvChartConfigEntity = JSONObject.parseObject(message, VvChartConfigEntity.class);
String configSql = vvChartConfigEntity.getSqlConfig(); String configSql = vvChartConfigEntity.getSqlConfig();
String paramsConfig = vvChartConfigEntity.getParamsConfig(); String paramsConfig = vvChartConfigEntity.getParamsConfig();
@ -93,17 +96,17 @@ public class SendDingDingQueueSimpleRabbitListener {
file1.delete(); file1.delete();
String url = ossUploadResult.getUrl(); String url = ossUploadResult.getUrl();
log.info("chartPic :{} url:{}",chartPic,url); log.info("SendDingDingQueueSimpleRabbitListener chartPic :{} url:{}",chartPic,url);
GouDeZhaoDDUtils.sendMarkDownOrder(headerName,url); GouDeZhaoDDUtils.sendMarkDownOrder(headerName,url);
} catch (Exception e) { } catch (Exception e) {
log.error("urlStatisticQueue handle", e); log.error("SendDingDingQueueSimpleRabbitListener handle", e);
} finally { } finally {
try { try {
log.info("urlStatisticQueue消息{},消息确认完成", message); log.info("SendDingDingQueueSimpleRabbitListener 消息{},消息确认完成", message);
channel.basicAck(delivertTag, true); channel.basicAck(delivertTag, true);
} catch (IOException e) { } catch (IOException e) {
log.error("urlStatisticQueue消息确认异常", e); log.error("SendDingDingQueueSimpleRabbitListener消息确认异常", e);
} }
} }
} }

View File

@ -52,6 +52,7 @@ public class TestJob {
boolean isRun = CronTriggerUtils.isRun(date, vvCreateDataConfigEntity.getCronExp()); boolean isRun = CronTriggerUtils.isRun(date, vvCreateDataConfigEntity.getCronExp());
log.info("VvCreateDataConfigEntity current dateStr :{} , cronExp:{},isRun:{},date:{}", dateFormat.format(dateStr), vvCreateDataConfigEntity.getCronExp(), isRun,date); log.info("VvCreateDataConfigEntity current dateStr :{} , cronExp:{},isRun:{},date:{}", dateFormat.format(dateStr), vvCreateDataConfigEntity.getCronExp(), isRun,date);
if (isRun) { if (isRun) {
log.info("TestJob ");
VvCreateDataConfigDTO dto = new VvCreateDataConfigDTO(); VvCreateDataConfigDTO dto = new VvCreateDataConfigDTO();
BeanUtils.copyProperties(vvCreateDataConfigEntity, dto); BeanUtils.copyProperties(vvCreateDataConfigEntity, dto);
dto.setRunDate(dateFormat.format(dateStr)); dto.setRunDate(dateFormat.format(dateStr));