提交 37df45ba 作者: 张开石

1、添加根据会议类型id和用户id获取已开启的纪要模板

父级 0cc18764
......@@ -35,4 +35,16 @@ public interface MeetingRecordTemplateMapper extends BaseMapper<MeetingRecordTem
* @return
*/
List<MeetTypeDto> selectAllTmplWithoutPermission(String userId);
/**
* 获取启用的模板
* @param meetTypeId 会议类型id,允许为空
* @param templateType 模板类型,system-系统通用,custom-用户自定义
* @param userId userId
* @return
*/
MeetingRecordTemplate selectEnabledTemplate(@Param("meetTypeId") Long meetTypeId,
@Param("templateType") String templateType,
@Param("userId") String userId);
}
\ No newline at end of file
......@@ -79,6 +79,14 @@ public interface MeetingRecordTemplateService extends IService<MeetingRecordTemp
List<RecordTemplateDto> getTemplateSelect();
/**
* 根据会议类型和userId获取开启的模板
* 如果当前会议类型中没有开启的模板,则返回系统通用的已开启的模板
* @param meetType 会议类型id
* @param userId userId
*/
MeetingRecordTemplate getEnabledRecordTemplate(Long meetType, String userId);
/**
* 获取模板列表
* @param userId 用户id
* @param parentDeptIdList 部门id列表
......
......@@ -382,6 +382,22 @@ public class MeetingRecordTemplateServiceImpl extends ServiceImpl<MeetingRecordT
}
/**
* 根据会议类型和userId获取开启的模板
* 如果当前会议类型中没有开启的模板,则返回系统通用的已开启的模板
*
* @param meetType 会议类型id
* @param userId userId
*/
@Override
public MeetingRecordTemplate getEnabledRecordTemplate(Long meetType, String userId) {
MeetingRecordTemplate template = baseMapper.selectEnabledTemplate(meetType, RecordTemplateConstant.TEMPLATE_TYPE_CUSTOM, userId);
if (!ObjectUtils.isEmpty(template)) {
return template;
}
return baseMapper.selectEnabledTemplate(null, RecordTemplateConstant.TEMPLATE_TYPE_SYSTEM, userId);
}
/**
* 获取模板列表
* @param userId 用户id
* @param parentDeptIdList 部门id列表
......
......@@ -171,4 +171,21 @@
meet_type.is_del = 0
and (cmt_meeting_record_template.type = 'system' or cmt_meeting_record_template.create_user = #{userId})
</select>
<select id="selectEnabledTemplate" resultType="com.cmeeting.pojo.MeetingRecordTemplate">
select
cmt_meeting_record_template.*
from
cmt_meeting_record_template,
meet_template_enable
<where>
cmt_meeting_record_template.is_del = 0
and cmt_meeting_record_template.type = #{templateType}
<if test="meetTypeId != null"> and cmt_meeting_record_template.meeting_type = #{meetTypeId} </if>
and cmt_meeting_record_template.id = meet_template_enable.rel_id
and meet_template_enable.user_id = #{userId}
</where>
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论