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

The following examples show how to use com.ruoyi.common.constant.UserConstants#CONFIG_KEY_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: SysConfigServiceImpl.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 校验参数键名是否唯一
 * 
 * @param config 参数配置信息
 * @return 结果
 */
@Override
public String checkConfigKeyUnique(SysConfig config)
{
    Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId();
    SysConfig info = configMapper.checkConfigKeyUnique(config.getConfigKey());
    if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue())
    {
        return UserConstants.CONFIG_KEY_NOT_UNIQUE;
    }
    return UserConstants.CONFIG_KEY_UNIQUE;
}
 
Example 2
Source File: SysConfigServiceImpl.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 校验参数键名是否唯一
 * 
 * @param config 参数配置信息
 * @return 结果
 */
@Override
public String checkConfigKeyUnique(SysConfig config)
{
    Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId();
    SysConfig info = configMapper.checkConfigKeyUnique(config.getConfigKey());
    if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue())
    {
        return UserConstants.CONFIG_KEY_NOT_UNIQUE;
    }
    return UserConstants.CONFIG_KEY_UNIQUE;
}
 
Example 3
Source File: SysConfigServiceImpl.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 校验参数键名是否唯一
 *
 * @param config 参数配置信息
 * @return 结果
 */
@Override
public String checkConfigKeyUnique(SysConfig config) {
    SysConfig info = configMapper.checkConfigKeyUnique(config.getConfigKey());
    if (ObjectUtil.isNotNull(info) && !info.getConfigId().equals(config.getConfigId())) {
        return UserConstants.CONFIG_KEY_NOT_UNIQUE;
    }
    return UserConstants.CONFIG_KEY_UNIQUE;
}