Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
nieziyan 2023-07-24 09:47:59 +08:00
commit 1d3e2253aa
7 changed files with 28 additions and 7 deletions

View File

@ -1,4 +1,4 @@
package org.jeecg.modules.properties;
package org.jeecg.common.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ -13,7 +13,7 @@ import java.util.Map;
*/
@Data
@Component
@ConfigurationProperties(prefix = "file-system")
@ConfigurationProperties(prefix = "filesystem")
public class SpectrumPathProperties implements Serializable {
/**

View File

@ -1,4 +1,4 @@
package org.jeecg.modules.properties;
package org.jeecg.common.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@ -45,4 +45,10 @@ public class AlarmContactGroupController {
return alarmContactGroupService.deleteById(id);
}
@DeleteMapping("deleteUserById")
@ApiOperation(value = "删除报警人联系人组下单独联系人", notes = "删除报警联系人组下单独联系人")
public Result deleteUserById(String id, String userId){
return alarmContactGroupService.deleteUserById(id, userId);
}
}

View File

@ -17,4 +17,6 @@ public interface IAlarmContactGroupService extends IService<AlarmContactGroup> {
Result deleteById(String id);
Result deleteUserById(String id, String userId);
}

View File

@ -36,7 +36,7 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl<AlarmContactGroupM
Result result = new Result();
//获取用户信息
Map<String ,SysUser> userList = systemClient.findUserMap();
Page<AlarmContactGroup> page = new Page<>();
Page<AlarmContactGroup> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
LambdaQueryWrapper<AlarmContactGroup> queryWrapper = new LambdaQueryWrapper<>();
Page<AlarmContactGroup> alarmContactGroupPage = this.baseMapper.selectPage(page, queryWrapper);
LambdaQueryWrapper<AlarmContactGroupMember> contactGroupMemberQueryWrapper = new LambdaQueryWrapper<>();
@ -101,6 +101,7 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl<AlarmContactGroupM
alarmContactGroup.setId(id.toString());
alarmContactGroup.setCreateTime(LocalDate.now());
alarmContactGroup.setCreateBy(username);
this.baseMapper.insert(alarmContactGroup);
if (CollectionUtils.isNotEmpty(alarmContactGroup.getUserIds())){
List<String> userIds = alarmContactGroup.getUserIds();
for (String userId:userIds) {
@ -167,4 +168,16 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl<AlarmContactGroupM
return result;
}
@Override
public Result deleteUserById(String id, String userId) {
Result result = new Result();
LambdaQueryWrapper<AlarmContactGroupMember> contactGroupMemberQueryWrapper = new LambdaQueryWrapper<>();
contactGroupMemberQueryWrapper.eq(AlarmContactGroupMember::getGroupId, id);
contactGroupMemberQueryWrapper.eq(AlarmContactGroupMember::getUserId, userId);
alarmContactGroupMemberMapper.delete(contactGroupMemberQueryWrapper);
result.setSuccess(true);
result.success("删除成功");
return result;
}
}

View File

@ -9,8 +9,8 @@ import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.email.EmailParsingActuator;
import org.jeecg.modules.emuns.SysMailEnableType;
import org.jeecg.modules.email.EmailProperties;
import org.jeecg.modules.properties.SpectrumPathProperties;
import org.jeecg.modules.properties.TaskProperties;
import org.jeecg.common.properties.SpectrumPathProperties;
import org.jeecg.common.properties.TaskProperties;
import org.jeecg.modules.service.ISysMailService;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;

View File

@ -3,7 +3,7 @@ package org.jeecg.modules.email;
import org.apache.commons.lang3.ArrayUtils;
import org.jeecg.common.email.EmailServiceManager;
import org.jeecg.common.util.FTPUtil;
import org.jeecg.modules.properties.TaskProperties;
import org.jeecg.common.properties.TaskProperties;
import org.jeecg.modules.spectrum.SpectrumParsingActuator;
import org.springframework.scheduling.concurrent.CustomizableThreadFactory;
import javax.mail.Message;