From 0e180ada2589720a56792e757cfae3a706ac9575 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Wed, 7 Aug 2024 08:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E5=8A=A1=E8=AE=A4?= =?UTF-8?q?=E7=9F=A5=E5=BE=97=E5=88=86=E5=92=8C=E6=99=BA=E8=83=BD=E8=AF=84?= =?UTF-8?q?=E5=88=86=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fund_investment/controller/UserController.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/UserController.java b/src/main/java/com/sztzjy/fund_investment/controller/UserController.java index 64656d8..09d9b84 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/UserController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/UserController.java @@ -25,7 +25,6 @@ import com.sztzjy.fund_investment.util.RsaUtil; import com.sztzjy.fund_investment.util.TzApi; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; @@ -187,9 +186,8 @@ public class UserController { flow1.setFlowId(uuid); flowMapper.insert(flow1); map.put("flowId", uuid); - } else { - map.put("flowId", flow.getFlowId()); } + map.put("flowId", flow.getFlowId()); return new ResultEntity(HttpStatus.OK, map); } else { // 2、智云单点登录 JwtUser jwtUser; @@ -211,6 +209,16 @@ public class UserController { map.put("schoolId", loginResult.getSchoolId()); map.put("classId", loginResult.getClassId()); map.put("userId", loginResult.getUserId()); + Flow flow = flowMapper.selectByPrimaryKey(jwtUser.getUserId()); + if (flow == null) { + String uuid = String.valueOf(UUID.randomUUID()); + Flow flow1 = new Flow(); + flow1.setUserid(jwtUser.getUserId()); + flow1.setFlowId(uuid); + flowMapper.insert(flow1); + map.put("flowId", uuid); + } + map.put("flowId", flow.getFlowId()); return new ResultEntity(HttpStatus.OK, map); } }