修复job无法获取登录用户问题

This commit is contained in:
2026-06-11 20:20:12 +08:00
parent a982333112
commit faa9549299
@@ -180,8 +180,12 @@ public class SysParamServiceImpl implements SysParamService, BaseParams {
throw new BizWarning("数据不存在"); throw new BizWarning("数据不存在");
} }
entity.setId(oldEntity.getId()); entity.setId(oldEntity.getId());
try {
LoginUserDto loginUser = AuthUtils.get(); LoginUserDto loginUser = AuthUtils.get();
entity.setUpdateBy(loginUser.getId()); entity.setUpdateBy(loginUser.getId());
} catch (Exception e) {
log.debug("job更新");
}
boolean updated = sysParamBaseService.updateById(entity); boolean updated = sysParamBaseService.updateById(entity);
if (!updated) { if (!updated) {
throw new BizWarning("修改失败"); throw new BizWarning("修改失败");