Commit aa6aaa19 by 林永健

fix(digitalmanagement): 修复模板代码为空时的默认模板处理

- 在StaffRecord服务中添加判断,templateCode为空时使用默认模板代码
- 修正TemplateService中getTemplateBindingStaff方法调用参数,增加templateType过滤参数位置
- 修正根据登录角色获取模板时,系统默认角色返回默认模板代码而非导师模板代码
1 parent b9a4f126
...@@ -245,6 +245,9 @@ public class DigitalManagementStaffRecordService { ...@@ -245,6 +245,9 @@ public class DigitalManagementStaffRecordService {
String uuid = dto.getUuid(); String uuid = dto.getUuid();
Integer loginRole = dto.getLoginRole(); Integer loginRole = dto.getLoginRole();
String templateCode = dto.getTemplateCode(); String templateCode = dto.getTemplateCode();
if (StringUtils.isBlank(templateCode)) {
templateCode = templateService.getDefaultTemplateCode();
}
DigitalManagementStaffRecord staffRecord = getMyRecordDetail(uuid, date, templateCode); DigitalManagementStaffRecord staffRecord = getMyRecordDetail(uuid, date, templateCode);
if (Objects.isNull(staffRecord)) { if (Objects.isNull(staffRecord)) {
return getStaffRecordTemplateInfo(loginRole, uuid, date, templateCode); return getStaffRecordTemplateInfo(loginRole, uuid, date, templateCode);
......
...@@ -493,7 +493,7 @@ public class DigitalManagementTemplateService { ...@@ -493,7 +493,7 @@ public class DigitalManagementTemplateService {
log.info("getTemplateByStaffUuid loginRole: {}, uuid: {}", loginRole, uuid); log.info("getTemplateByStaffUuid loginRole: {}, uuid: {}", loginRole, uuid);
if (loginRole == null) { if (loginRole == null) {
// 系统默认角色的loginRile=null, 也返回导师模板 // 系统默认角色的loginRile=null, 也返回导师模板
return templateMapper.findByCode(getTeachTemplateCode()); return templateMapper.findByCode(getDefaultTemplateCode());
} }
switch (loginRole){ switch (loginRole){
// 区域运营角色,查询圈人 // 区域运营角色,查询圈人
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!