修改注释格式

This commit is contained in:
youxilong 2024-03-19 10:55:10 +08:00
parent b7833f1fda
commit 8e8e40bc1e
8 changed files with 10 additions and 20 deletions

View File

@ -101,10 +101,6 @@ public class ServicePackageController extends BaseController {
/** /**
* 修改服务包发布状态 * 修改服务包发布状态
*
* @param id
* @param whetherRelease
* @return
*/ */
@ApiOperation("修改服务包发布状态") @ApiOperation("修改服务包发布状态")
@PutMapping("/editReleaseStatus") @PutMapping("/editReleaseStatus")

View File

@ -62,18 +62,11 @@ public interface ScriptInfoMapper {
/** /**
* 判断通用话术名称是否存在 * 判断通用话术名称是否存在
*
* @param scriptInfo
* @return
*/ */
int countByScriptInfo(ScriptInfo scriptInfo); 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);
} }

View File

@ -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);
} }

View File

@ -84,7 +84,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int updateScriptInfo(ScriptInfo scriptInfo) { 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("通用话术名称已存在,请使用其他名称。"); throw new ServiceException("通用话术名称已存在,请使用其他名称。");
} }

View File

@ -1,11 +1,9 @@
package com.xinelu.manage.service.wechattemplate; package com.xinelu.manage.service.wechattemplate;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.manage.domain.wechattemplate.WechatTemplate; import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO; import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO;
import com.xinelu.manage.dto.wechattemplate.WechatTemplateTaskDTO; import com.xinelu.manage.dto.wechattemplate.WechatTemplateTaskDTO;
import com.xinelu.manage.vo.wechattemplate.WechatTemplateTaskVO; import com.xinelu.manage.vo.wechattemplate.WechatTemplateTaskVO;
import com.xinelu.manage.vo.wechattemplate.WechatTemplateVO;
import java.util.List; import java.util.List;
@ -65,7 +63,7 @@ public interface IWechatTemplateService {
public int deleteWechatTemplateById(Long id); public int deleteWechatTemplateById(Long id);
/** /**
* 根据id查询微信模板Dto * 根据id查询微信模板
*/ */
WechatTemplateTaskVO selectWechatTemplateDtoById(Long id); WechatTemplateTaskVO selectWechatTemplateDtoById(Long id);
} }

View File

@ -2,7 +2,6 @@ package com.xinelu.manage.service.wechattemplate.impl;
import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.PageServiceUtil;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.wechattemplate.WechatTemplate; import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
@ -148,7 +147,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int updateWechatTemplate(WechatTemplateTaskDTO wechatTemplateTaskDTO) { 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("微信模板名称已存在"); throw new ServiceException("微信模板名称已存在");
} }
// 设置修改者和修改时间 // 设置修改者和修改时间

View File

@ -126,13 +126,15 @@
from script_info from script_info
where department_id = #{departmentId} where department_id = #{departmentId}
and common_script_name = #{commonScriptName} and common_script_name = #{commonScriptName}
and script_name = #{scriptName}
</select> </select>
<select id="countByScriptNameExcludingId" resultType="java.lang.Integer"> <select id="countByScriptNameExcludingId" resultType="java.lang.Integer">
SELECT COUNT(1) SELECT COUNT(1)
FROM script_info FROM script_info
WHERE common_script_name = #{scriptName} WHERE common_script_name = #{commonScriptName}
and department_id = #{departmentId} and department_id = #{departmentId}
and script_name = #{scriptName}
and id != #{id} and id != #{id}
</select> </select>

View File

@ -181,6 +181,7 @@
from wechat_template wt from wechat_template wt
where department_id = #{departmentId} where department_id = #{departmentId}
and wechat_template_name = #{wechatTemplateName} and wechat_template_name = #{wechatTemplateName}
and template_source = #{templateSource}
</select> </select>
<select id="countByWechatTemplateNameExcludingId" resultType="java.lang.Integer"> <select id="countByWechatTemplateNameExcludingId" resultType="java.lang.Integer">
@ -188,6 +189,7 @@
from wechat_template from wechat_template
where department_id = #{departmentId} where department_id = #{departmentId}
and wechat_template_name = #{wechatTemplateName} and wechat_template_name = #{wechatTemplateName}
and template_source = #{templateSource}
and id != #{id} and id != #{id}
</select> </select>