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

The following examples show how to use com.ruoyi.common.constant.UserConstants#POST_CODE_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: SysPostServiceImpl.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 校验岗位编码是否唯一
 * 
 * @param post 岗位信息
 * @return 结果
 */
@Override
public String checkPostCodeUnique(SysPost post)
{
    Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId();
    SysPost info = postMapper.checkPostCodeUnique(post.getPostCode());
    if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue())
    {
        return UserConstants.POST_CODE_NOT_UNIQUE;
    }
    return UserConstants.POST_CODE_UNIQUE;
}
 
Example 2
Source File: SysPostServiceImpl.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 校验岗位编码是否唯一
 * 
 * @param post 岗位信息
 * @return 结果
 */
@Override
public String checkPostCodeUnique(SysPost post)
{
    Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId();
    SysPost info = postMapper.checkPostCodeUnique(post.getPostCode());
    if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue())
    {
        return UserConstants.POST_CODE_NOT_UNIQUE;
    }
    return UserConstants.POST_CODE_UNIQUE;
}
 
Example 3
Source File: SysPostServiceImpl.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 校验岗位编码是否唯一
 *
 * @param post 岗位信息
 * @return 结果
 */
@Override
public String checkPostCodeUnique(SysPost post) {
    SysPost info = postMapper.checkPostCodeUnique(post.getPostCode());
    if (ObjectUtil.isNotNull(info) && !info.getPostId().equals(post.getPostId())) {
        return UserConstants.POST_CODE_NOT_UNIQUE;
    }
    return UserConstants.POST_CODE_UNIQUE;
}