提交 2e389558 作者: 洪东保

定时任务查询模板

父级 be6a4aad
...@@ -19,6 +19,8 @@ public class RecordTemplateDto { ...@@ -19,6 +19,8 @@ public class RecordTemplateDto {
private String typeDetail; private String typeDetail;
// 生成模板的提示词 // 生成模板的提示词
private String prompt; private String prompt;
// 模板文件
private String template;
// 引用(参考)模板id // 引用(参考)模板id
private Long referTemplateId; private Long referTemplateId;
// 创建者工号 // 创建者工号
......
...@@ -222,7 +222,9 @@ public class FileProcessTask { ...@@ -222,7 +222,9 @@ public class FileProcessTask {
log.info("choiceTemplateType->{}", choiceTemplateType); log.info("choiceTemplateType->{}", choiceTemplateType);
// 2. 获取这个会议需要使用的一个模板 // 2. 获取这个会议需要使用的一个模板
MeetingRecordTemplate template = meetingRecordTemplateService.getEnabledRecordTemplate(choiceTemplateType, userIdMapper.getWidByTid(meetingInfo.getHostUid())); MeetingRecordTemplate template = meetingRecordTemplateService.getEnabledRecordTemplate(choiceTemplateType, userIdMapper.getWidByTid(meetingInfo.getHostUid()));
if (template == null) {
throw new RobotBaseException("未找到模板!");
}
List<EmailPush.Attachment> attachments = new ArrayList<>(); List<EmailPush.Attachment> attachments = new ArrayList<>();
String hostUid = meetingInfo.getHostUid(); String hostUid = meetingInfo.getHostUid();
String toUserCode = tidWidRelations.get(meetingInfo.getHostUid()); String toUserCode = tidWidRelations.get(meetingInfo.getHostUid());
......
...@@ -165,8 +165,6 @@ public class MeetTypeServiceImpl extends ServiceImpl<MeetTypeMapper, MeetType> ...@@ -165,8 +165,6 @@ public class MeetTypeServiceImpl extends ServiceImpl<MeetTypeMapper, MeetType>
RobotSecurityUser loginUser = SecurityUtil.getUser(); RobotSecurityUser loginUser = SecurityUtil.getUser();
List<SysUserSyncCategory> categoryList = sysUserSyncService.getCategoryListByUserId(String.format("%08d", loginUser.getUserId())); List<SysUserSyncCategory> categoryList = sysUserSyncService.getCategoryListByUserId(String.format("%08d", loginUser.getUserId()));
List<String> parentDeptIdList = categoryList.stream().map(SysUserSyncCategory::getDeptId).collect(Collectors.toList()); List<String> parentDeptIdList = categoryList.stream().map(SysUserSyncCategory::getDeptId).collect(Collectors.toList());
String role = loginUser.getRole();
return meetingRecordTemplateService.getMeetTypeList(String.format("%08d", loginUser.getUserId()), parentDeptIdList, loginUser.getRole()); return meetingRecordTemplateService.getMeetTypeList(String.format("%08d", loginUser.getUserId()), parentDeptIdList, loginUser.getRole());
} }
......
...@@ -242,6 +242,7 @@ ...@@ -242,6 +242,7 @@
<result property="type" column="type"/> <result property="type" column="type"/>
<result property="typeDetail" column="type_detail"/> <result property="typeDetail" column="type_detail"/>
<result property="prompt" column="prompt"/> <result property="prompt" column="prompt"/>
<result property="template" column="template"/>
<result property="referTemplateId" column="refer_template_id"/> <result property="referTemplateId" column="refer_template_id"/>
<result property="enable" column="enable"/> <result property="enable" column="enable"/>
<result property="createTime" column="template_create_time"/> <result property="createTime" column="template_create_time"/>
...@@ -289,6 +290,7 @@ ...@@ -289,6 +290,7 @@
t2.refer_template_id, t2.refer_template_id,
t2.create_user as template_create_user, t2.create_user as template_create_user,
t2.create_time as template_create_time, t2.create_time as template_create_time,
t2.template as template,
CASE CASE
WHEN t2.type = 'system' THEN WHEN t2.type = 'system' THEN
CASE WHEN t3.id IS NULL AND t1.id != 1 THEN 0 ELSE t2.enable END CASE WHEN t3.id IS NULL AND t1.id != 1 THEN 0 ELSE t2.enable END
...@@ -301,7 +303,7 @@ ...@@ -301,7 +303,7 @@
and ((t2.type = 'system' and t2.enable = 1) or (t2.type = 'custom' and t2.create_user = #{userId})) and ((t2.type = 'system' and t2.enable = 1) or (t2.type = 'custom' and t2.create_user = #{userId}))
left join meet_template_enable t3 on t3.rel_id = t2.id and t3.user_id = #{userId} left join meet_template_enable t3 on t3.rel_id = t2.id and t3.user_id = #{userId}
where t1.is_del = 0 where t1.is_del = 0
order by CASE WHEN t2.type = 'system' THEN 1 WHEN t2.type = 'custom' THEN 2 ELSE 3 END, order by t1.id, CASE WHEN t2.type = 'system' THEN 1 WHEN t2.type = 'custom' THEN 2 ELSE 3 END,
t1.create_time,t2.create_time t1.create_time,t2.create_time
</select> </select>
......
...@@ -25,7 +25,7 @@ public class MeetingApiTest { ...@@ -25,7 +25,7 @@ public class MeetingApiTest {
@Test @Test
public void test2(){ public void test2(){
String userId = "00010786"; String userId = "00010786";
Long templateType = 1L; Long templateType = 96L;
MeetingRecordTemplate enabledRecordTemplate = meetingRecordTemplateService.getEnabledRecordTemplate(templateType, userId); MeetingRecordTemplate enabledRecordTemplate = meetingRecordTemplateService.getEnabledRecordTemplate(templateType, userId);
System.out.println(enabledRecordTemplate.getName()); System.out.println(enabledRecordTemplate.getName());
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论