解决管理端与业务端服务指令服务类型显示不一致
This commit is contained in:
parent
cd86f76b73
commit
58f02edde6
|
|
@ -159,32 +159,6 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
|
||||
queryWrapper.select("id");
|
||||
//如果有服务指令需要提前查询下对应的服务指令id
|
||||
List<ConfigServiceDirective> directiveIds = null;
|
||||
if (StringUtils.isNotBlank(configServiceDirective.getBodyTags())) {
|
||||
directiveIds = configServiceDirectiveService.queryDirectiveIdByBodyTagIds(configServiceDirective.getBodyTags());
|
||||
if (directiveIds != null && !directiveIds.isEmpty()) {
|
||||
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
|
||||
} else {
|
||||
//体重标签下没有数据
|
||||
queryWrapper.eq("id", "null");
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
|
||||
directiveIds = configServiceDirectiveService.queryDirectiveIdByEmotionTagIds(configServiceDirective.getEmotionTags());
|
||||
if (directiveIds != null && !directiveIds.isEmpty() && StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
|
||||
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
|
||||
} else {
|
||||
//情绪标签下没有数据
|
||||
queryWrapper.eq("id", "null");
|
||||
}
|
||||
}
|
||||
//只查询已授权(status = 0)
|
||||
// if (StringUtils.isNotBlank(configServiceDirective.getStatus())) {
|
||||
// queryWrapper.in("status", configServiceDirective.getStatus().split(","));
|
||||
// } else {
|
||||
// queryWrapper.in("status", new String[]{"0", "2"});
|
||||
// }
|
||||
if (StringUtils.isNotBlank(configServiceDirective.getExcludeIds())) {
|
||||
queryWrapper.notIn("id", configServiceDirective.getExcludeIds().split(","));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@
|
|||
<result property="previewFileMd5" column="preview_file_md5"/>
|
||||
<result property="immediateFileMd5" column="immediate_file_md5"/>
|
||||
<result property="immediateFileFocusMd5" column="immediate_file_focus_md5"/>
|
||||
<result property="instructionName" column="instructionName"/>
|
||||
<result property="categoryName" column="categoryName"/>
|
||||
<result property="typeName" column="typeName"/>
|
||||
|
||||
<collection property="bodyTagList" ofType="com.nu.modules.directivetag.body.entity.DirectiveBodyTag">
|
||||
<id property="id" column="bodyTagId"/>
|
||||
|
|
@ -88,15 +91,13 @@
|
|||
c.preview_file_md5,
|
||||
c.immediate_file_md5,
|
||||
c.immediate_file_focus_md5,
|
||||
bodytag.id as bodyTagId,
|
||||
bodytag.tag_name as bodyTagName,
|
||||
emotag.id as emotionTagId,
|
||||
emotag.tag_name as emotionTagName
|
||||
inst.instruction_name as instructionName,
|
||||
category.category_name as categoryName,
|
||||
stype.type_name as typeName
|
||||
FROM nu_config_service_directive c
|
||||
LEFT JOIN nu_directive_body_tag dbt ON c.id = dbt.directive_id
|
||||
LEFT JOIN nu_config_body_tag bodytag ON dbt.tag_id = bodytag.id
|
||||
LEFT JOIN nu_directive_emotion_tag det ON c.id = det.directive_id
|
||||
LEFT JOIN nu_config_emotion_tag emotag ON det.tag_id = emotag.id
|
||||
LEFT JOIN nu_config_service_instruction_tag inst ON c.instruction_tag_id = inst.id
|
||||
LEFT JOIN nu_config_service_category category ON c.category_id = category.id
|
||||
LEFT JOIN nu_config_service_type stype ON c.type_id = stype.id
|
||||
<where>
|
||||
c.id IN
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -88,20 +88,9 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
|||
return list_.getRecords();
|
||||
}
|
||||
List<ConfigServiceDirective> list = baseMapper.pageList(configServiceDirective, list_.getRecords());
|
||||
//处理服务标签字段
|
||||
if (list != null && !list.isEmpty()) {
|
||||
list.stream().forEach(record -> {
|
||||
List<DirectiveBodyTag> bodyTagList = record.getBodyTagList();
|
||||
record.setBodyTags(bodyTagList.stream().map(DirectiveBodyTag::getId).collect(Collectors.joining(",")));
|
||||
|
||||
List<DirectiveEmotionTag> emotionTagList = record.getEmotionTagList();
|
||||
record.setEmotionTags(emotionTagList.stream().map(DirectiveEmotionTag::getId).collect(Collectors.joining(",")));
|
||||
});
|
||||
}
|
||||
//处理单元格合并所需数据
|
||||
// merge(list);
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue