提交
This commit is contained in:
@@ -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 <= #{temp.searchEndTime}"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user