diff --git a/server/service/calculator.go b/server/service/calculator.go index ee140ab..1c709c6 100644 --- a/server/service/calculator.go +++ b/server/service/calculator.go @@ -21,6 +21,9 @@ func (c *Calculator) Test(sess *session.AdminSession, req *api.TestCalculatorReq staffUser, err := dao.NewStaffUserDao().Get(cast.ToInt64(req.StaffId)) session.CheckDBError(err) session.CheckNilError(staffUser, "员工不存在") + if staffUser.CorpId != sess.GetCorpId() { + panic("不要乱来") + } salaryServ := CommonService.NewStaffSalary(staffUser) salary, err := salaryServ.CalcSalary(nil, time.Now().AddDate(0, -1, 0).Format("200601")) if err != nil {