@GetMapping("/userInfo")// @RequestHeader(name = "Authorization") String tokenpublicResult<User>userInfo(){// Map<String, Object> map = JwtUtil.parseToken(token);Map<String,Object> map =ThreadLocalUtil.get();String username =(String) map.get("username");User user = userService.findByUserName(username);returnResult.success(user);}UserfindByUserName(String username);@OverridepublicUserfindByUserName(String username){User u=userMapper.findByUserName(username);return u;}@Select("select * from user where username=#{username}")UserfindByUserName(String username);
2.更新用户信息
@PutMapping("/update")publicResultupdate(@RequestBody@ValidatedUser user){userService.update(user);returnResult.success();}voidupdate(User user);@Overridepublicvoidupdate(User user){user.setUpdateTime(LocalDateTime.now());userMapper.update(user);}@Update("update user set nickname=#{nickname},email=#{email},update_time=#{updateTime} where id=#{id}")voidupdate(User user);
3.更新头像
@PatchMapping("/updateAvatar")publicResultupdateAvatar(@RequestParam@URLString url){userService.updateAvatar(url);returnResult.success();}voidupdateAvatar(String url);@OverridepublicvoidupdateAvatar(String url){Map<String,Object> o =ThreadLocalUtil.get();Integer id =(Integer) o.get("id");userMapper.updateAvatar(url,id);}@Update("update user set user_pic=#{url},update_time=now() where id=#{id}")voidupdateAvatar(String url,Integer id);
4.更新密码
@PatchMapping("/updatePwd")publicResultupdatePwd(@RequestBodyMap<String,String> params){String oldPwd = params.get("old_pwd");String newPwd = params.get("new_pwd");String rePwd = params.get("re_pwd");if(!StringUtils.hasLength(oldPwd)||!StringUtils.hasLength(newPwd)||!StringUtils.hasLength(rePwd)){returnResult.error("缺少必要参数");}Map<String,Object> map =ThreadLocalUtil.get();String username =(String) map.get("username");User user = userService.findByUserName(username);if(!user.getPassword().equals(Md5Utils.encrypt3ToMd5(oldPwd))){returnResult.error("原密码填写不正确");}if(!rePwd.equals(newPwd)){returnResult.error("两次填写的密码不一致");}userService.updatePwd(newPwd);returnResult.success();}voidupdatePwd(String newPwd);@OverridepublicvoidupdatePwd(String newPwd){Map<String,Object> map =ThreadLocalUtil.get();Integer id =(Integer) map.get("id");userMapper.updatePwd(Md5Utils.encrypt3ToMd5(newPwd),id);}@Update("update user set password=#{s},update_time=now() where id=#{id}")voidupdatePwd(String s,Integer id);
1、 Lift
显示估计图像下采样(16倍)后的特征点深度,将2D图像提升到3D空间,得到图像特征的视锥(点云)。
根据图像和深度均分得到3D视锥索引
下采样16倍,得到特征图大小为 H x W, 每个特征点深…