From a1fc7e3e337393954a95b5f85c1a3f59d61208c4 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 28 十一月 2024 01:31:02 +0800
Subject: [PATCH] 投资基本信息

---
 business/src/main/java/com/ycl/service/impl/ProjectInvestmentInfoServiceImpl.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInvestmentInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInvestmentInfoServiceImpl.java
index 064a4b9..d054f1a 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInvestmentInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInvestmentInfoServiceImpl.java
@@ -1,6 +1,7 @@
 package com.ycl.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ycl.common.utils.SecurityUtils;
 import com.ycl.domain.entity.ProjectInvestmentInfo;
 import com.ycl.mapper.ProjectInvestmentInfoMapper;
 import com.ycl.service.ProjectInvestmentInfoService;
@@ -38,8 +39,12 @@
     @Override
     public Result add(ProjectInvestmentInfoForm form) {
         ProjectInvestmentInfo entity = ProjectInvestmentInfoForm.getEntityByForm(form, null);
+        Long userId = SecurityUtils.getUserId();
+        entity.setCreateBy(userId);
+        entity.setUpdateBy(userId);
+
         baseMapper.insert(entity);
-        return Result.ok("娣诲姞鎴愬姛");
+        return Result.ok("娣诲姞鎴愬姛").data(entity.getId());
     }
 
     /**
@@ -54,6 +59,8 @@
         // 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊
         Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
         BeanUtils.copyProperties(form, entity);
+        Long userId = SecurityUtils.getUserId();
+        entity.setUpdateBy(userId);
         baseMapper.updateById(entity);
         return Result.ok("淇敼鎴愬姛");
     }

--
Gitblit v1.8.0