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

The following examples show how to use com.ruoyi.common.constant.UserConstants#DICT_TYPE_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: SysDictTypeServiceImpl.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 校验字典类型称是否唯一
 * 
 * @param dict 字典类型
 * @return 结果
 */
@Override
public String checkDictTypeUnique(SysDictType dict)
{
    Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
    SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
    if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue())
    {
        return UserConstants.DICT_TYPE_NOT_UNIQUE;
    }
    return UserConstants.DICT_TYPE_UNIQUE;
}
 
Example 2
Source File: SysDictTypeServiceImpl.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 校验字典类型称是否唯一
 * 
 * @param dict 字典类型
 * @return 结果
 */
@Override
public String checkDictTypeUnique(SysDictType dict)
{
    Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
    SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
    if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue())
    {
        return UserConstants.DICT_TYPE_NOT_UNIQUE;
    }
    return UserConstants.DICT_TYPE_UNIQUE;
}
 
Example 3
Source File: SysDictTypeServiceImpl.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 校验字典类型称是否唯一
 *
 * @param dict 字典类型
 * @return 结果
 */
@Override
public String checkDictTypeUnique(SysDictType dict) {
    SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
    if (ObjectUtil.isNotNull(dictType) && !dictType.getDictId().equals(dict.getDictId())) {
        return UserConstants.DICT_TYPE_NOT_UNIQUE;
    }
    return UserConstants.DICT_TYPE_UNIQUE;
}