use of vip.mate.core.common.exception.BaseException in project matecloud by matevip.
the class SysUserServiceImpl method status.
@Override
public boolean status(String ids, String status) {
Collection<? extends Serializable> collection = CollectionUtil.stringToCollection(ids);
if (ObjectUtils.isEmpty(collection)) {
throw new BaseException("传入的ID值不能为空!");
}
collection.forEach(id -> {
SysUser sysUser = this.baseMapper.selectById(CollectionUtil.objectToLong(id, 0L));
sysUser.setStatus(status);
this.baseMapper.updateById(sysUser);
});
return true;
}
Aggregations