diff --git a/server/service/staff_salary.go b/server/service/staff_salary.go index 9872c62..3d9cc9f 100644 --- a/server/service/staff_salary.go +++ b/server/service/staff_salary.go @@ -48,10 +48,7 @@ func (s *StaffSalary) List(sess *session.AdminSession, req *api.ListSalaryReq) ( for pos, m := range salarys { staffSalary := new(api.Salary) staffSalary.From(m) - summary.Add(staffSalary) - if pos < start || pos >= end { - continue - } + staffUser, err := dao.NewStaffUserDao().Get(m.UserId) session.CheckDBError(err) if staffUser != nil { @@ -60,6 +57,12 @@ func (s *StaffSalary) List(sess *session.AdminSession, req *api.ListSalaryReq) ( staffSalary.TargetSalary = userSalary.Target staffSalary.BaseSalary = userSalary.Base } + + summary.Add(staffSalary) + if pos < start || pos >= end { + continue + } + items = append(items, staffSalary) }