This commit is contained in:
huangzj
2023-07-26 14:03:55 +08:00
parent d7e04a407c
commit b26ddb686d
10 changed files with 170 additions and 28 deletions

View File

@@ -25,7 +25,7 @@
#{item}
</foreach>
<if test="temp!=null and temp.searchValue != null and temp.searchValue !=''">
AND a.name = #{temp.searchValue}
AND a.name like concat(concat("%",#{temp.searchValue}),"%")
</if>
<if test="temp!=null and temp.searchEndTime != null and temp.searchEndTime !=''">
AND a.create_time &lt;= #{temp.searchEndTime}"

View File

@@ -51,6 +51,7 @@ public class CsConfigurationServiceImpl extends ServiceImpl<CsConfigurationMappe
@Transactional(rollbackFor = {Exception.class})
public boolean add(CsConfigurationParm csConfigurationParm) {
CsConfigurationPO csConfigurationPO = new CsConfigurationPO();
BeanUtils.copyProperties(csConfigurationParm,csConfigurationPO);
List<String> projectIds = csConfigurationParm.getProjectIds();
@@ -66,6 +67,12 @@ public class CsConfigurationServiceImpl extends ServiceImpl<CsConfigurationMappe
csConfigurationPO.setStatus("1");
boolean save = this.save(csConfigurationPO);
String name = csConfigurationPO.getName();
Integer count = this.lambdaQuery().eq(CsConfigurationPO::getName, name).eq(CsConfigurationPO::getStatus, "1").count();
if(count>1){
throw new BusinessException("存在相同的组态项目名称");
}
return save;
}