fix: 优化推送消息逻辑

This commit is contained in:
tangwei 2026-07-09 11:37:37 +08:00
parent 9bf01de0bb
commit 4f44e7ae26
2 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,7 @@
package com.yfd.platform.system.domain; package com.yfd.platform.system.domain;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -115,4 +116,18 @@ public class QuartzJob implements Serializable {
@Schema(description = "备用3") @Schema(description = "备用3")
private String custom3; private String custom3;
/**
* 业务模块编码PUSH-推送配置SYNC-数据同步REPORT-报表生成
*/
@Schema(description = "业务模块编码")
@TableField("BIZ_MODULE")
private String bizModule;
/**
* 关联业务表的主键ID PUSH_CONFIG.ID
*/
@Schema(description = "关联业务主键ID")
@TableField("BIZ_ID")
private String bizId;
} }

View File

@ -399,8 +399,8 @@ public class PushConfigServiceImpl extends ServiceImpl<PushConfigMapper, PushCon
Date now = new Date(); Date now = new Date();
if (quartzJob == null) { if (quartzJob == null) {
quartzJob = new QuartzJob(); quartzJob = new QuartzJob();
quartzJob.setCustom1(QUARTZ_BIZ_TYPE); quartzJob.setBizModule(QUARTZ_BIZ_TYPE);
quartzJob.setCustom2(config.getId()); quartzJob.setBizId(config.getId());
} }
quartzJob.setJobName("推送配置-" + config.getCategoryName()); quartzJob.setJobName("推送配置-" + config.getCategoryName());
quartzJob.setJobClass("pushConfigQuartzExecutor"); quartzJob.setJobClass("pushConfigQuartzExecutor");
@ -457,8 +457,8 @@ public class PushConfigServiceImpl extends ServiceImpl<PushConfigMapper, PushCon
private QuartzJob getPushQuartzJob(String configId) { private QuartzJob getPushQuartzJob(String configId) {
List<QuartzJob> list = quartzJobService.list(new LambdaQueryWrapper<QuartzJob>() List<QuartzJob> list = quartzJobService.list(new LambdaQueryWrapper<QuartzJob>()
.eq(QuartzJob::getCustom1, QUARTZ_BIZ_TYPE) .eq(QuartzJob::getBizModule, QUARTZ_BIZ_TYPE)
.eq(QuartzJob::getCustom2, configId)); .eq(QuartzJob::getBizId, configId));
return list.isEmpty() ? null : list.getFirst(); return list.isEmpty() ? null : list.getFirst();
} }