解决管理端与业务端服务指令服务类型显示不一致
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);
|
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
|
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
|
||||||
queryWrapper.select("id");
|
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())) {
|
if (StringUtils.isNotBlank(configServiceDirective.getExcludeIds())) {
|
||||||
queryWrapper.notIn("id", configServiceDirective.getExcludeIds().split(","));
|
queryWrapper.notIn("id", configServiceDirective.getExcludeIds().split(","));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@
|
||||||
<result property="previewFileMd5" column="preview_file_md5"/>
|
<result property="previewFileMd5" column="preview_file_md5"/>
|
||||||
<result property="immediateFileMd5" column="immediate_file_md5"/>
|
<result property="immediateFileMd5" column="immediate_file_md5"/>
|
||||||
<result property="immediateFileFocusMd5" column="immediate_file_focus_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">
|
<collection property="bodyTagList" ofType="com.nu.modules.directivetag.body.entity.DirectiveBodyTag">
|
||||||
<id property="id" column="bodyTagId"/>
|
<id property="id" column="bodyTagId"/>
|
||||||
|
|
@ -88,15 +91,13 @@
|
||||||
c.preview_file_md5,
|
c.preview_file_md5,
|
||||||
c.immediate_file_md5,
|
c.immediate_file_md5,
|
||||||
c.immediate_file_focus_md5,
|
c.immediate_file_focus_md5,
|
||||||
bodytag.id as bodyTagId,
|
inst.instruction_name as instructionName,
|
||||||
bodytag.tag_name as bodyTagName,
|
category.category_name as categoryName,
|
||||||
emotag.id as emotionTagId,
|
stype.type_name as typeName
|
||||||
emotag.tag_name as emotionTagName
|
|
||||||
FROM nu_config_service_directive c
|
FROM nu_config_service_directive c
|
||||||
LEFT JOIN nu_directive_body_tag dbt ON c.id = dbt.directive_id
|
LEFT JOIN nu_config_service_instruction_tag inst ON c.instruction_tag_id = inst.id
|
||||||
LEFT JOIN nu_config_body_tag bodytag ON dbt.tag_id = bodytag.id
|
LEFT JOIN nu_config_service_category category ON c.category_id = category.id
|
||||||
LEFT JOIN nu_directive_emotion_tag det ON c.id = det.directive_id
|
LEFT JOIN nu_config_service_type stype ON c.type_id = stype.id
|
||||||
LEFT JOIN nu_config_emotion_tag emotag ON det.tag_id = emotag.id
|
|
||||||
<where>
|
<where>
|
||||||
c.id IN
|
c.id IN
|
||||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||||
|
|
|
||||||
|
|
@ -88,20 +88,9 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
return list_.getRecords();
|
return list_.getRecords();
|
||||||
}
|
}
|
||||||
List<ConfigServiceDirective> list = baseMapper.pageList(configServiceDirective, 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);
|
// merge(list);
|
||||||
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue