Search in sources :

Example 1 with BaseException

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;
}
Also used : BaseException(vip.mate.core.common.exception.BaseException) SysUser(vip.mate.system.entity.SysUser)

Aggregations

BaseException (vip.mate.core.common.exception.BaseException)1 SysUser (vip.mate.system.entity.SysUser)1