From a39facfe63c317cced39bb162d875aa73ab0810b Mon Sep 17 00:00:00 2001 From: jhc <9316338+wangyitao309@user.noreply.gitee.com> Date: Thu, 18 May 2023 18:12:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/approval_oa.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/service/approval_oa.go b/pkg/service/approval_oa.go index 0c85200..7098c25 100644 --- a/pkg/service/approval_oa.go +++ b/pkg/service/approval_oa.go @@ -29,19 +29,19 @@ func (a *ApprovalProvider) UpdateApprovalOAUUID(_ context.Context, in *approval. model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("leave", approvalOA.Leave) } else if model.GetOaType(in.ApplyType) == "outWork" { approvalOA.OutWork.UUID = in.UUID - model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("outWork", approvalOA.OutWork) + model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("out_work", approvalOA.OutWork) } else if model.GetOaType(in.ApplyType) == "makeUp" { approvalOA.MakeUp.UUID = in.UUID - model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("makeUp", approvalOA.MakeUp) + model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("make_up", approvalOA.MakeUp) } else if model.GetOaType(in.ApplyType) == "turnover" { approvalOA.Turnover.UUID = in.UUID model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("turnover", approvalOA.Turnover) } else if model.GetOaType(in.ApplyType) == "overTime" { approvalOA.OverTime.UUID = in.UUID - model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("overTime", approvalOA.OverTime) + model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("over_time", approvalOA.OverTime) } else if model.GetOaType(in.ApplyType) == "leaveApply" { approvalOA.LeaveApply.UUID = in.UUID - model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("leaveApply", approvalOA.LeaveApply) + model.DB.Model(&model.ApprovalOA{}).Where(&model.ApprovalOA{ApprovalID: in.ApprovalID}).Update("leave_apply", approvalOA.LeaveApply) } return response, nil }