From 55e7732de21f1a7cff5ba6e7ac70fd98a6422a15 Mon Sep 17 00:00:00 2001 From: 31353 <31353751672@qq.com> Date: Sun, 17 Dec 2023 10:57:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=A0=E8=80=80=E4=B8=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/encodings.xml | 2 + .idea/workspace.xml | 54 +++++++------------ .../service/impl/HealthServiceImpl.java | 11 ++-- bwie-modules/pom.xml | 1 + 4 files changed, 29 insertions(+), 39 deletions(-) diff --git a/.idea/encodings.xml b/.idea/encodings.xml index 0c13aff..4c550d0 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -7,7 +7,9 @@ + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9791238..c52600d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,20 +5,6 @@ - - - - - - - - - - - - - - - { + "keyToString": { + "RequestMappingsPanelOrder0": "0", + "RequestMappingsPanelOrder1": "1", + "RequestMappingsPanelWidth0": "75", + "RequestMappingsPanelWidth1": "75", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "WebServerToolWindowFactoryState": "false", + "git-widget-placeholder": "master", + "jdk.selected.JAVA_MODULE": "1.8", + "last_opened_file_path": "Z:/JavaHeathl/bwie-modules/bwie-health/src/main/resources", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "vue.rearranger.settings.migration": "true" } -}]]> +} diff --git a/bwie-modules/bwie-health/src/main/java/com/bwie/health/service/impl/HealthServiceImpl.java b/bwie-modules/bwie-health/src/main/java/com/bwie/health/service/impl/HealthServiceImpl.java index c7fa252..69eb2a4 100644 --- a/bwie-modules/bwie-health/src/main/java/com/bwie/health/service/impl/HealthServiceImpl.java +++ b/bwie-modules/bwie-health/src/main/java/com/bwie/health/service/impl/HealthServiceImpl.java @@ -3,6 +3,7 @@ package com.bwie.health.service.impl; import com.alibaba.fastjson.JSONObject; import com.bwie.common.constants.TokenConstants; import com.bwie.common.domain.Health; +import com.bwie.common.domain.User; import com.bwie.common.result.Result; import com.bwie.common.utils.JwtUtils; import com.bwie.health.mapper.HealthMapper; @@ -38,11 +39,11 @@ public class HealthServiceImpl implements HealthService{ /*健康教育信息录入*/ @Override public Result addHealth(Health health) { -// String token1 = request.getHeader("token"); -// String userKey = JwtUtils.getUserKey(token1); -// String token = redisTemplate.opsForValue().get(TokenConstants.LOGIN_TOKEN_KEY+userKey); -// User o = JSONObject.parseObject(token, User.class); -// health.setUserId(o.Id); + String token1 = request.getHeader("token"); + String userKey = JwtUtils.getUserKey(token1); + String token = redisTemplate.opsForValue().get(TokenConstants.LOGIN_TOKEN_KEY+userKey); + User o = JSONObject.parseObject(token, User.class); + health.setUserId(o.getId()); Integer i = healthMapper.addHealth(health); diff --git a/bwie-modules/pom.xml b/bwie-modules/pom.xml index b672a17..d59054f 100644 --- a/bwie-modules/pom.xml +++ b/bwie-modules/pom.xml @@ -13,6 +13,7 @@ pom bwie-user + bwie-health