fix: 查询null处理
This commit is contained in:
@@ -148,15 +148,15 @@ public class GainfoIdCardFaceCompareService : IGainfoIdCardFaceCompareService
|
|||||||
|
|
||||||
await _dbContext.UpdateAsync(record);
|
await _dbContext.UpdateAsync(record);
|
||||||
|
|
||||||
return await GetRecordAsync(record.Id);
|
return await GetRecordAsync(record.UserCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<IdCardFaceCompareRecordResponse> GetRecordAsync(long id)
|
private async Task<IdCardFaceCompareRecordResponse> GetRecordAsync(string userCode)
|
||||||
{
|
{
|
||||||
return await _dbContext.Queryable<IdCardFaceCompareRecordEntity>()
|
return await _dbContext.Queryable<IdCardFaceCompareRecordEntity>()
|
||||||
.LeftJoin<GainfoEntity>((record, gainfo) => record.UserCode == gainfo.Code)
|
.LeftJoin<GainfoEntity>((record, gainfo) => record.UserCode == gainfo.Code)
|
||||||
.LeftJoin<DepartmentEntity>((record, gainfo, department) => gainfo.DepartmentNo == department.No)
|
.LeftJoin<DepartmentEntity>((record, gainfo, department) => gainfo.DepartmentNo == department.No)
|
||||||
.Where(record => record.Id == id)
|
.Where(record => record.UserCode == userCode)
|
||||||
.Select((record, gainfo, department) => new IdCardFaceCompareRecordResponse
|
.Select((record, gainfo, department) => new IdCardFaceCompareRecordResponse
|
||||||
{
|
{
|
||||||
Id = record.Id,
|
Id = record.Id,
|
||||||
|
|||||||
Reference in New Issue
Block a user