Java Code Examples for com.ruoyi.common.constant.UserConstants#DEPT_NAME_NOT_UNIQUE

The following examples show how to use com.ruoyi.common.constant.UserConstants#DEPT_NAME_NOT_UNIQUE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysDeptServiceImpl.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 校验部门名称是否唯一
 * 
 * @param dept 部门信息
 * @return 结果
 */
@Override
public String checkDeptNameUnique(SysDept dept)
{
    Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();
    SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());
    if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue())
    {
        return UserConstants.DEPT_NAME_NOT_UNIQUE;
    }
    return UserConstants.DEPT_NAME_UNIQUE;
}
 
Example 2
Source File: SysDeptServiceImpl.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 校验部门名称是否唯一
 * 
 * @param dept 部门信息
 * @return 结果
 */
@Override
public String checkDeptNameUnique(SysDept dept)
{
    Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();
    SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());
    if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue())
    {
        return UserConstants.DEPT_NAME_NOT_UNIQUE;
    }
    return UserConstants.DEPT_NAME_UNIQUE;
}
 
Example 3
Source File: SysDeptServiceImpl.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 校验部门名称是否唯一
 *
 * @param dept 部门信息
 * @return 结果
 */
@Override
public String checkDeptNameUnique(SysDept dept) {
    SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());
    if (ObjectUtil.isNotNull(info) && !info.getDeptId().equals(dept.getDeptId())) {
        return UserConstants.DEPT_NAME_NOT_UNIQUE;
    }
    return UserConstants.DEPT_NAME_UNIQUE;
}