This commit is contained in:
jiangyong27 2025-03-29 17:54:49 +08:00
parent cb08275dfd
commit fb73e8b084
1 changed files with 7 additions and 4 deletions

View File

@ -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)
}