提交 5bdf081b 作者: obcy

【通知采集兼容事件专题-专题详情和列表查询数据范围字段】

上级 820d622d
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
t.event_type, t.event_type,
t.sort_order, t.sort_order,
t.yn_collect, t.yn_collect,
t.data_scope,
t.first_open_time, t.first_open_time,
stm.type_id as subjectTypeId, stm.type_id as subjectTypeId,
psm.project_id, psm.project_id,
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
<select id="pageList" resultType="com.zzsn.event.vo.EventManageVO"> <select id="pageList" resultType="com.zzsn.event.vo.EventManageVO">
select t2.type_name,t1.id,t1.event_icon,t1.event_name,m.subjectTypeName,t1.event_label,t1.status, select t2.type_name,t1.id,t1.event_icon,t1.event_name,m.subjectTypeName,t1.event_label,t1.status,
t1.face_public,t1.publish_status,t1.create_time,t1.publish_date,t1.start_time,t1.end_time,t1.create_by t1.face_public,t1.publish_status,t1.create_time,t1.publish_date,t1.start_time,t1.end_time,t1.create_by,t1.data_scope
from event t1 from event t1
inner join event_category t2 on t1.event_type =t2.id inner join event_category t2 on t1.event_type =t2.id
INNER JOIN INNER JOIN
......
...@@ -208,4 +208,8 @@ public interface SubjectService extends IService<Subject> { ...@@ -208,4 +208,8 @@ public interface SubjectService extends IService<Subject> {
Subject subjectUpdateScope(String subjectId, String type, String scop); Subject subjectUpdateScope(String subjectId, String type, String scop);
Event eventUpdateScope(String subjectId, String type, String scop); Event eventUpdateScope(String subjectId, String type, String scop);
/**根据id查询专题或者事件*/
Subject getSubjectOrEventById(String id);
/**根据编码查询专题或者事件*/
Subject getSubjectOrEvent(String subjectCode);
} }
...@@ -133,7 +133,7 @@ public class ConfigurationMessageService { ...@@ -133,7 +133,7 @@ public class ConfigurationMessageService {
} catch (Exception e) { } catch (Exception e) {
log.error("删除专题缓存失败{}",e.getMessage(),e); log.error("删除专题缓存失败{}",e.getMessage(),e);
} }
Subject byId = subjectService.getById(subjectId); Subject byId = subjectService.getSubjectOrEventById(subjectId);
if (byId == null || byId.getStatus() == null || byId.getStatus() != 1) { if (byId == null || byId.getStatus() == null || byId.getStatus() != 1) {
log.info("未查询到专题或专题未启用"); log.info("未查询到专题或专题未启用");
return; return;
...@@ -196,7 +196,7 @@ public class ConfigurationMessageService { ...@@ -196,7 +196,7 @@ public class ConfigurationMessageService {
} catch (Exception e) { } catch (Exception e) {
log.error("删除专题缓存失败{}",e.getMessage(),e); log.error("删除专题缓存失败{}",e.getMessage(),e);
} }
Subject byId = subjectService.getById(subjectId); Subject byId = subjectService.getSubjectOrEventById(subjectId);
if (byId == null || byId.getStatus() == null || byId.getStatus() != 1) { if (byId == null || byId.getStatus() == null || byId.getStatus() != 1) {
log.info("未查询到专题或专题未启用"); log.info("未查询到专题或专题未启用");
return; return;
...@@ -241,7 +241,7 @@ public class ConfigurationMessageService { ...@@ -241,7 +241,7 @@ public class ConfigurationMessageService {
} }
public void subjectEnterpriseSourceSync(String subjectId){ public void subjectEnterpriseSourceSync(String subjectId){
Subject subject = subjectService.getById(subjectId); Subject subject = subjectService.getSubjectOrEventById(subjectId);
if (subject == null || subject.getStatus() == null || subject.getStatus() != 1) { if (subject == null || subject.getStatus() == null || subject.getStatus() != 1) {
log.info("未查询到专题或专题未启用"); log.info("未查询到专题或专题未启用");
return; return;
...@@ -477,7 +477,7 @@ public class ConfigurationMessageService { ...@@ -477,7 +477,7 @@ public class ConfigurationMessageService {
} }
public void subjectPolicySourceSync(String subjectId){ public void subjectPolicySourceSync(String subjectId){
Subject subject = subjectService.getById(subjectId); Subject subject = subjectService.getSubjectOrEventById(subjectId);
if (subject == null || subject.getStatus() == null || subject.getStatus() != 1) { if (subject == null || subject.getStatus() == null || subject.getStatus() != 1) {
log.info("未查询到专题或专题未启用"); log.info("未查询到专题或专题未启用");
return; return;
......
...@@ -10,6 +10,7 @@ import cn.hutool.json.JSONUtil; ...@@ -10,6 +10,7 @@ import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -1499,5 +1500,88 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -1499,5 +1500,88 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
} }
@Override
public Subject getSubjectOrEvent(String subjectCode) {
try {
//根据编码查询出专题设置信息
//查询专题的设置信息
QueryWrapper<Subject> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("subject_code", subjectCode);
Subject subject = super.getOne(queryWrapper);
if (ObjectUtil.isEmpty(subject)){
QueryWrapper<Event> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("event_code", subjectCode);
Event one = eventService.getOne(queryWrapper1);
if (ObjectUtil.isNotEmpty(one)) {
subject = new Subject();
subject.setId(one.getId());
subject.setSubjectCode(one.getEventCode());
subject.setSubjectName(one.getEventName());
subject.setSubjectType(2);
subject.setCreateTime(one.getCreateTime());
subject.setTimeEnable(one.getStartTime());
subject.setTimeDisable(one.getEndTime());
subject.setDataScope(one.getDataScope());
subject.setFirstOpenTime(one.getFirstOpenTime());
}
}
if (ObjectUtil.isEmpty(subject)){
return null;
}
// if (subject.getCreateTime().before(DateTime.of("2023-11-30","yyyy-MM-dd"))){
// log.info("2023-11-30之前创建的专题{}按照之前的处理逻辑处理",subject.getSubjectName());
// return null;
// }
return subject;
} catch (Exception e) {
log.error("查询专题异常{}",e.getMessage(),e);
return null;
}
}
@Override
public Subject getSubjectOrEventById(String id) {
try {
//根据编码查询出专题设置信息
//查询专题的设置信息
Subject subject = super.getById(id);
if (ObjectUtil.isEmpty(subject)){
Event one = eventService.getById(id);
if (ObjectUtil.isNotEmpty(one)) {
subject = new Subject();
subject.setId(one.getId());
subject.setSubjectCode(one.getEventCode());
subject.setSubjectName(one.getEventName());
subject.setSubjectType(2);
subject.setCreateTime(one.getCreateTime());
subject.setTimeEnable(one.getStartTime());
subject.setTimeDisable(one.getEndTime());
subject.setDataScope(one.getDataScope());
subject.setFirstOpenTime(one.getFirstOpenTime());
}
}
if (ObjectUtil.isEmpty(subject)){
return null;
}
// if (subject.getCreateTime().before(DateTime.of("2023-11-30","yyyy-MM-dd"))){
// log.info("2023-11-30之前创建的专题{}按照之前的处理逻辑处理",subject.getSubjectName());
// return null;
// }
return subject;
} catch (Exception e) {
log.error("查询专题异常{}",e.getMessage(),e);
return null;
}
}
} }
...@@ -29,6 +29,7 @@ public class EventManageVO { ...@@ -29,6 +29,7 @@ public class EventManageVO {
private String startTime; private String startTime;
private String endTime; private String endTime;
private Integer status; private Integer status;
private String dataScope;
/**专题题绑定流程信息*/ /**专题题绑定流程信息*/
private List<ClbModelArrange> clbModelArranges; private List<ClbModelArrange> clbModelArranges;
} }
...@@ -76,4 +76,5 @@ public class EventVO { ...@@ -76,4 +76,5 @@ public class EventVO {
List<RegionVO> regionList; List<RegionVO> regionList;
/**关键词*/ /**关键词*/
private KeywordsVO keywordsVO; private KeywordsVO keywordsVO;
private String dataScope;
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论