From e42ddaeb56c79f19e999f2277c32f2bdfecef165 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Thu, 27 Mar 2025 19:48:56 +0800 Subject: [PATCH] salary6 --- server/service/calculator.go | 3 +++ 1 file changed, 3 insertions(+) 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 {