From 3930d1fb5b17f6531978211f92b1d5387a193447 Mon Sep 17 00:00:00 2001 From: cjy Date: Wed, 22 Oct 2025 15:20:30 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E5=A6=82=E6=9E=9C=E6=98=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=B7=B2=E5=AE=8C=E6=88=90=EF=BC=8C=E5=B0=B1=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E5=AE=8C=E6=88=90=E6=97=B6=E9=97=B4=E9=99=8D=E5=BA=8F?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/controller/task.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/controller/task.go b/internal/controller/task.go index b5bbe6c..e2d8d5c 100644 --- a/internal/controller/task.go +++ b/internal/controller/task.go @@ -130,6 +130,11 @@ func (b *BundleProvider) GetRecentAssignRecords(_ context.Context, req *bundle.R // GetEmployeeAssignedTasks 根据登录人信息查询被指派给该员工的任务 func (b *BundleProvider) GetEmployeeAssignedTasks(_ context.Context, req *bundle.EmployeeTaskQueryRequest) (*bundle.EmployeeTaskQueryResponse, error) { + + // 如果 status 是已完成,就按照完成时间降序返回 + if int(req.Status) == 2 { + req.SortBy = "complete_time" + } // 转换请求参数 daoReq := &dao.EmployeeTaskQueryRequest{ TaskAssigneeNum: req.TaskAssigneeNum,