diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java
index 75276816..2634c02f 100644
--- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java
+++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java
@@ -101,10 +101,6 @@ public class ServicePackageController extends BaseController {
/**
* 修改服务包发布状态
- *
- * @param id
- * @param whetherRelease
- * @return
*/
@ApiOperation("修改服务包发布状态")
@PutMapping("/editReleaseStatus")
diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java
index 7ffea3d8..198b8d3d 100644
--- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java
+++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java
@@ -62,18 +62,11 @@ public interface ScriptInfoMapper {
/**
* 判断通用话术名称是否存在
- *
- * @param scriptInfo
- * @return
*/
int countByScriptInfo(ScriptInfo scriptInfo);
/**
* 检查是否存在除当前记录之外的同名记录
- * @param scriptName
- * @param departmentId
- * @param id
- * @return
*/
- int countByScriptNameExcludingId(@Param("scriptName") String scriptName, @Param("departmentId") Long departmentId, @Param("id") Long id);
+ int countByScriptNameExcludingId(@Param("scriptName") String scriptName, @Param("departmentId") Long departmentId, @Param("id") Long id, @Param("commonScriptName") String commonScriptName);
}
diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java
index 6383f245..63649d57 100644
--- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java
+++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java
@@ -102,5 +102,5 @@ public interface WechatTemplateMapper {
/**
* 检查除当前记录之外是否存在同名的微信模板名称
*/
- int countByWechatTemplateNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("wechatTemplateName") String wechatTemplateName);
+ int countByWechatTemplateNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("wechatTemplateName") String wechatTemplateName, @Param("templateSource") String templateSource);
}
diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java
index 7592c262..b515ff03 100644
--- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java
+++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java
@@ -84,7 +84,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
@Transactional(rollbackFor = Exception.class)
public int updateScriptInfo(ScriptInfo scriptInfo) {
// 检查除当前记录之外是否存在同名的话术名称
- if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getCommonScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId()) > 0) {
+ if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(),scriptInfo.getCommonScriptName()) > 0) {
// 存在同名的通用话术名称,不能进行更新
throw new ServiceException("通用话术名称已存在,请使用其他名称。");
}
diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java
index 1dc321f6..824bb5cd 100644
--- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java
+++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java
@@ -1,11 +1,9 @@
package com.xinelu.manage.service.wechattemplate;
-import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO;
import com.xinelu.manage.dto.wechattemplate.WechatTemplateTaskDTO;
import com.xinelu.manage.vo.wechattemplate.WechatTemplateTaskVO;
-import com.xinelu.manage.vo.wechattemplate.WechatTemplateVO;
import java.util.List;
@@ -65,7 +63,7 @@ public interface IWechatTemplateService {
public int deleteWechatTemplateById(Long id);
/**
- * 根据id查询微信模板Dto
+ * 根据id查询微信模板
*/
WechatTemplateTaskVO selectWechatTemplateDtoById(Long id);
}
diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java
index 7baf5fef..f7b2d3c3 100644
--- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java
+++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java
@@ -2,7 +2,6 @@ package com.xinelu.manage.service.wechattemplate.impl;
import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.exception.ServiceException;
-import com.xinelu.common.utils.PageServiceUtil;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
@@ -148,7 +147,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
@Transactional(rollbackFor = Exception.class)
public int updateWechatTemplate(WechatTemplateTaskDTO wechatTemplateTaskDTO) {
// 检查除当前记录之外是否存在同名的微信模板名称
- if (wechatTemplateMapper.countByWechatTemplateNameExcludingId(wechatTemplateTaskDTO.getId(), wechatTemplateTaskDTO.getDepartmentId(), wechatTemplateTaskDTO.getWechatTemplateName()) > 0) {
+ if (wechatTemplateMapper.countByWechatTemplateNameExcludingId(wechatTemplateTaskDTO.getId(), wechatTemplateTaskDTO.getDepartmentId(), wechatTemplateTaskDTO.getWechatTemplateName(), wechatTemplateTaskDTO.getTemplateSource()) > 0) {
throw new ServiceException("微信模板名称已存在");
}
// 设置修改者和修改时间
diff --git a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml
index 5e82e0bc..23edb95d 100644
--- a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml
+++ b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml
@@ -126,13 +126,15 @@
from script_info
where department_id = #{departmentId}
and common_script_name = #{commonScriptName}
+ and script_name = #{scriptName}
diff --git a/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml
index ca72b4b7..b8d371cd 100644
--- a/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml
+++ b/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml
@@ -181,6 +181,7 @@
from wechat_template wt
where department_id = #{departmentId}
and wechat_template_name = #{wechatTemplateName}
+ and template_source = #{templateSource}