修改注释格式
This commit is contained in:
parent
b7833f1fda
commit
8e8e40bc1e
@ -101,10 +101,6 @@ public class ServicePackageController extends BaseController {
|
||||
|
||||
/**
|
||||
* 修改服务包发布状态
|
||||
*
|
||||
* @param id
|
||||
* @param whetherRelease
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("修改服务包发布状态")
|
||||
@PutMapping("/editReleaseStatus")
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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("通用话术名称已存在,请使用其他名称。");
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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("微信模板名称已存在");
|
||||
}
|
||||
// 设置修改者和修改时间
|
||||
|
||||
@ -126,13 +126,15 @@
|
||||
from script_info
|
||||
where department_id = #{departmentId}
|
||||
and common_script_name = #{commonScriptName}
|
||||
and script_name = #{scriptName}
|
||||
</select>
|
||||
|
||||
<select id="countByScriptNameExcludingId" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1)
|
||||
FROM script_info
|
||||
WHERE common_script_name = #{scriptName}
|
||||
WHERE common_script_name = #{commonScriptName}
|
||||
and department_id = #{departmentId}
|
||||
and script_name = #{scriptName}
|
||||
and id != #{id}
|
||||
</select>
|
||||
|
||||
|
||||
@ -181,6 +181,7 @@
|
||||
from wechat_template wt
|
||||
where department_id = #{departmentId}
|
||||
and wechat_template_name = #{wechatTemplateName}
|
||||
and template_source = #{templateSource}
|
||||
</select>
|
||||
|
||||
<select id="countByWechatTemplateNameExcludingId" resultType="java.lang.Integer">
|
||||
@ -188,6 +189,7 @@
|
||||
from wechat_template
|
||||
where department_id = #{departmentId}
|
||||
and wechat_template_name = #{wechatTemplateName}
|
||||
and template_source = #{templateSource}
|
||||
and id != #{id}
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user