Showing
5 changed files
with
9 additions
and
13 deletions
@@ -49,7 +49,7 @@ public class ReportController { | @@ -49,7 +49,7 @@ public class ReportController { | ||
49 | }) | 49 | }) |
50 | public ResponseEntity<ResultModel> getReportList(HttpServletRequest request, @CurrentUser User user, | 50 | public ResponseEntity<ResultModel> getReportList(HttpServletRequest request, @CurrentUser User user, |
51 | @RequestParam String sign, @RequestParam long t, @RequestParam int type) { | 51 | @RequestParam String sign, @RequestParam long t, @RequestParam int type) { |
52 | - long member_id=user.getMember_id(); | 52 | + long member_id=user.getMemberId(); |
53 | List<XklAmpReportEntity> xklAmpReportEntity=xklAmpReportRespository.findByMemberId(member_id); | 53 | List<XklAmpReportEntity> xklAmpReportEntity=xklAmpReportRespository.findByMemberId(member_id); |
54 | return new ResponseEntity<>(ResultModel.ok(xklAmpReportEntity), HttpStatus.OK); | 54 | return new ResponseEntity<>(ResultModel.ok(xklAmpReportEntity), HttpStatus.OK); |
55 | } | 55 | } |
@@ -100,17 +100,11 @@ public class UserInfoController { | @@ -100,17 +100,11 @@ public class UserInfoController { | ||
100 | @ApiImplicitParams({ | 100 | @ApiImplicitParams({ |
101 | @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), | 101 | @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), |
102 | }) | 102 | }) |
103 | -<<<<<<< HEAD | ||
104 | public ResponseEntity<ResultModel> getUserInfo(HttpServletRequest request,@CurrentUser User user, | 103 | public ResponseEntity<ResultModel> getUserInfo(HttpServletRequest request,@CurrentUser User user, |
105 | @RequestParam String sign,@RequestParam long t,@RequestParam int type) { | 104 | @RequestParam String sign,@RequestParam long t,@RequestParam int type) { |
106 | - long member_id=user.getMember_id(); | ||
107 | - XklMemberEntity xklMemberEntity=xklMemberRespository.findOne(member_id); | ||
108 | - return new ResponseEntity<>(ResultModel.ok(xklMemberEntity), HttpStatus.OK); | ||
109 | -======= | ||
110 | - public ResponseEntity<ResultModel> getUserNickName(@CurrentUser User user) { | 105 | + |
111 | String dickName=user.getLoginAccount(); | 106 | String dickName=user.getLoginAccount(); |
112 | return new ResponseEntity<>(ResultModel.ok(dickName), HttpStatus.OK); | 107 | return new ResponseEntity<>(ResultModel.ok(dickName), HttpStatus.OK); |
113 | ->>>>>>> zhaoyue-dev | ||
114 | } | 108 | } |
115 | 109 | ||
116 | } | 110 | } |
@@ -38,6 +38,8 @@ public class UpSoftAccountController { | @@ -38,6 +38,8 @@ public class UpSoftAccountController { | ||
38 | @Autowired | 38 | @Autowired |
39 | private ITokenManager tokenManager; | 39 | private ITokenManager tokenManager; |
40 | 40 | ||
41 | + private static final String UPSOFT_TOKEN_PREFIX = "UPSOFT_TOKEN"; | ||
42 | + | ||
41 | @RequestMapping(method = RequestMethod.POST) | 43 | @RequestMapping(method = RequestMethod.POST) |
42 | @ApiOperation(value = "报告上传软件登录") | 44 | @ApiOperation(value = "报告上传软件登录") |
43 | public ResponseEntity<ResultModel> login(@RequestParam String account, @RequestParam String password | 45 | public ResponseEntity<ResultModel> login(@RequestParam String account, @RequestParam String password |
@@ -64,7 +66,7 @@ public class UpSoftAccountController { | @@ -64,7 +66,7 @@ public class UpSoftAccountController { | ||
64 | } | 66 | } |
65 | 67 | ||
66 | //生成一个token,保存用户登录状态 | 68 | //生成一个token,保存用户登录状态 |
67 | - TokenModel model = tokenManager.createToken(admin.getId()); | 69 | + TokenModel model = tokenManager.createToken(UPSOFT_TOKEN_PREFIX + admin.getId()); |
68 | return new ResponseEntity<>(ResultModel.ok(model), HttpStatus.OK); | 70 | return new ResponseEntity<>(ResultModel.ok(model), HttpStatus.OK); |
69 | } | 71 | } |
70 | 72 | ||
@@ -75,7 +77,7 @@ public class UpSoftAccountController { | @@ -75,7 +77,7 @@ public class UpSoftAccountController { | ||
75 | @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), | 77 | @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), |
76 | }) | 78 | }) |
77 | public ResponseEntity<ResultModel> logout(@CurrentAdmin Admin admin) { | 79 | public ResponseEntity<ResultModel> logout(@CurrentAdmin Admin admin) { |
78 | - tokenManager.deleteToken(admin.getId()); | 80 | + tokenManager.deleteToken(UPSOFT_TOKEN_PREFIX + admin.getId()); |
79 | return new ResponseEntity<>(ResultModel.ok(), HttpStatus.OK); | 81 | return new ResponseEntity<>(ResultModel.ok(), HttpStatus.OK); |
80 | } | 82 | } |
81 | 83 |
@@ -30,8 +30,8 @@ import java.util.List; | @@ -30,8 +30,8 @@ import java.util.List; | ||
30 | * 上传报告及删除报告接口。 | 30 | * 上传报告及删除报告接口。 |
31 | */ | 31 | */ |
32 | @RestController | 32 | @RestController |
33 | -@RequestMapping("/report") | ||
34 | -public class ReportController { | 33 | +@RequestMapping("/upsoftreport") |
34 | +public class UpSoftReportController { | ||
35 | 35 | ||
36 | @Autowired | 36 | @Autowired |
37 | private UpSoftVersionRepository upSoftVersionRepository; | 37 | private UpSoftVersionRepository upSoftVersionRepository; |
-
Please register or login to post a comment