Skip to content

Commit 02bc175

Browse files
committed
修改用户更新头像信息后verify接口数据没更新的情况
1 parent ae650d8 commit 02bc175

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

springboot-dubbo-api/springboot-dubbo-api.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<entry key="com.zeroturnaround.jrebel.remoting.DeleteUnindexedFiles" value="false" />
1010
<entry key="com.zeroturnaround.jrebel.remoting.ModuleRemoteServerSelection" value="off" />
1111
<entry key="jrebelEnabled" value="true" />
12+
<entry key="lastExternalPluginCheckTime" value="1631102218172" />
1213
</map>
1314
</option>
1415
</configuration>

springboot-dubbo-web/src/main/java/com/lzq/web/controller/ExampleController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public class ExampleController {
7575
@PostMapping("/createExample")
7676
@ApiOperation("创建一个实例")
7777
public Map<String, Object> CreateFile(Example example, Content exampleContent, String content) {
78+
log.info("开始"+System.currentTimeMillis());
7879
String uuid = UUID.randomUUID().toString().replaceAll("-","");
7980
Boolean bol =false;
8081
//随机生成uuid

springboot-dubbo-web/src/main/java/com/lzq/web/controller/IndexController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public Map<String, Object> doLogin(HttpServletRequest request) {
329329
String git = verify.getClaim("git").asString();
330330
String gitId = null;
331331
if (StringUtils.isNotBlank(git)) {
332-
gitId = stringRedisTemplate.opsForValue().get(gitId);
332+
gitId = stringRedisTemplate.opsForValue().get(git);
333333
}
334334
//判断令牌是否过期
335335
if (StringUtils.isNotBlank(gitId)) {

springboot-dubbo-web/src/main/java/com/lzq/web/controller/UserController.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import org.springframework.web.bind.annotation.*;
1919

2020
import javax.servlet.http.HttpServletRequest;
21+
import javax.servlet.http.HttpSession;
2122
import java.util.Map;
2223

2324
/**
@@ -55,9 +56,17 @@ public class UserController {
5556
*/
5657
@PutMapping("/")
5758
@ApiOperation("更新用户信息")
58-
public Map<String, Object> updateUserInfo(Account account) {
59+
public Map<String, Object> updateUserInfo(HttpSession session, Account account) {
60+
Map<String, Object> map = (Map<String, Object>) session.getAttribute("map");
61+
Account data = (Account) map.get("data");
62+
log.info("进入更新用户信息接口:"+account);
5963
try {
6064
accountService.update(account);
65+
//更新成功则更新verify中的数据
66+
data.setName(account.getName());
67+
data.setUserPicture(account.getUserPicture());
68+
map.put("data",data);
69+
session.setAttribute("map",map);
6170
return ResultMapUtils.ResultMap(true, 0, null);
6271
} catch (Exception e) {
6372
return ResultMapUtils.ResultMap(false, 0, null);

0 commit comments

Comments
 (0)