From 4697fa9368feb39050aef0ce9c0e2ab4db217410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Fri, 11 Mar 2022 16:34:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8A=82=E7=82=B9=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E3=80=81=E6=A0=87=E7=AD=BE=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xm/core/ctrl/XmIterationLinkController.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmIterationLinkController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmIterationLinkController.java index 3cbe55b5..f0837876 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmIterationLinkController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmIterationLinkController.java @@ -1,10 +1,13 @@ package com.xm.core.ctrl; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import com.mdp.core.utils.ResponseHelper; +import com.mdp.safe.client.entity.User; +import com.mdp.safe.client.utils.LoginUtils; import com.xm.core.entity.XmIterationLink; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -110,6 +113,7 @@ public class XmIterationLinkController { Map m = new HashMap<>(); Tips tips=new Tips("成功新增一条数据"); try{ + if(StringUtils.isEmpty(xmIterationLink.getIterationId())) { return ResponseHelper.failed("iterationId-0","请上送迭代编号"); } @@ -125,6 +129,11 @@ public class XmIterationLinkController { m.put("tips", tips); return m; } + User user= LoginUtils.getCurrentUserInfo(); + xmIterationLink.setCuserid(user.getUserid()); + xmIterationLink.setCusername(user.getUsername()); + xmIterationLink.setCtime(new Date()); + xmIterationLink.setLinkStatus("1"); xmIterationLinkService.insert(xmIterationLink); m.put("data",xmIterationLink); }catch (BizException e) {