...
|
...
|
@@ -69,7 +69,7 @@ func (repository *EmployeeRepository) FindOne(queryOptions map[string]interface{ |
|
|
if companyId, ok := queryOptions["companyId"]; ok {
|
|
|
query = query.Where("employee.company_id = ?", companyId)
|
|
|
}
|
|
|
query = query.Where(`employee.status = ?`, 1)
|
|
|
//query = query.Where(`employee.status = ?`, 1)
|
|
|
if err := query.First(); err != nil {
|
|
|
if err.Error() == "pg: no rows in result set" {
|
|
|
return nil, fmt.Errorf("没有此员工")
|
...
|
...
|
|