| | |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | try |
| | | { |
| | | var checkUserSn = _context.SysBaimingdans.Where(x =>x.PostType == SysBaimingdanDTO.PostType && x.BaimingdanName == SysBaimingdanDTO.BaimingdanName && x.RecStatus == "A" && x.Id != SysBaimingdanDTO.Id).FirstOrDefault(); |
| | | if (checkUserSn != null && (string.IsNullOrWhiteSpace(SysBaimingdanDTO.Id) || (!string.IsNullOrWhiteSpace(SysBaimingdanDTO.Id) && checkUserSn.Id != SysBaimingdanDTO.Id))) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "白名单重复"; |
| | | return resultEntity; |
| | | } |
| | | |
| | | var SysBaimingdan = _mapper.Map<SysBaimingdan>(SysBaimingdanDTO); |
| | | if (String.IsNullOrEmpty(SysBaimingdan.Id)) |
| | | { |