From e3a2245265516fef78b4737d6fffc939e7c5e0af Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期四, 03 七月 2025 17:56:07 +0800 Subject: [PATCH] bug修改 --- pt-admin/src/main/java/com/ruoyi/web/controller/errand/AppUserController.java | 58 ++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 34 insertions(+), 24 deletions(-) diff --git a/pt-admin/src/main/java/com/ruoyi/web/controller/errand/AppUserController.java b/pt-admin/src/main/java/com/ruoyi/web/controller/errand/AppUserController.java index 5b82684..1a06885 100644 --- a/pt-admin/src/main/java/com/ruoyi/web/controller/errand/AppUserController.java +++ b/pt-admin/src/main/java/com/ruoyi/web/controller/errand/AppUserController.java @@ -95,9 +95,9 @@ */ @PostMapping("/register") @ApiOperation(value = "注册",tags = "app用户端") - public R<Void> register(@RequestBody @Valid RegisterDTO registerDTO) { - appUserService.register(registerDTO); - return R.ok(); + public R<LoginVO> register(@RequestBody @Valid RegisterDTO registerDTO) { + + return R.ok( appUserService.register(registerDTO)); } /** * 根据小区id(可选择) @@ -128,6 +128,24 @@ return R.ok(); } /** + * 修改姓名 + */ + @PutMapping("/setName") + @ApiOperation(value = "修改姓名",tags = "app用户端-个人信息") + public R<Void> setName(@RequestParam String name) { + appUserService.setName(name); + return R.ok(); + } + /** + * 修改头像 + */ + @PutMapping("/setAvatar") + @ApiOperation(value = "修改头像",tags = "app用户端-个人信息") + public R<Void> setAvatar(@RequestParam String avatar) { + appUserService.setAvatar(avatar); + return R.ok(); + } + /** * 修改生日 */ @PutMapping("/setBirthDay") @@ -142,8 +160,8 @@ */ @DeleteMapping("/delete") @ApiOperation(value = "注销账号",tags = "app用户端-个人信息") - public R<Void> delete() { - appUserService.delete(); + public R<Void> delete(@RequestHeader("Authorization") String token) { + appUserService.delete(token); return R.ok(); } @@ -263,7 +281,7 @@ @GetMapping("/detail") @PreAuthorize("@ss.hasPermi('system:appuser:list')") @ApiOperation(value = "用户管理-用户详情", tags = "系统后台-用户管理") - public R<AppUserSysDetailVO> detail(@RequestParam("id") Integer id) { + public R<AppUserSysDetailVO> detail(@RequestParam("id") String id) { return R.ok(appUserService.detail(id)); } /** @@ -272,7 +290,7 @@ @PutMapping("/froze") @PreAuthorize("@ss.hasPermi('system:appuser:list')") @ApiOperation(value = "用户管理-冻结/解冻", tags = "系统后台-用户管理") - public R froze(@RequestParam("id") Integer id) { + public R froze(@RequestParam("id") String id) { appUserService.froze(id); return R.ok(); } @@ -282,7 +300,7 @@ @GetMapping("/refund") @PreAuthorize("@ss.hasPermi('system:appuser:list')") @ApiOperation(value = "用户管理-会员退费", tags = "系统后台-用户管理") - public R<Void> refund(@RequestParam("id") Integer id) { + public R<Void> refund(@RequestParam("id") String id) { appUserService.refund(id); return R.ok(); } @@ -290,26 +308,18 @@ /** * 订单取消支付回退 - * - * @param refundCallbackResult - * @param response * @return */ @ResponseBody - @GetMapping("/refundPayMoneyCallback") - public void refundPayMoneyCallback(RefundCallbackResult refundCallbackResult, HttpServletResponse response) { - R callback = appUserService.refundPayMoneyCallback(refundCallbackResult); + @PostMapping("/refundPayMoneyCallback") + public String refundPayMoneyCallback(@RequestBody(required = false) String xmlData) { + System.out.println("会员退费:" + xmlData); + R callback = appUserService.refundPayMoneyCallback(xmlData); if (callback.getCode() == 200) { - response.setStatus(200); - PrintWriter out = null; - try { - out = response.getWriter(); - } catch (IOException e) { - throw new RuntimeException(e); - } - out.println("success"); - out.flush(); - out.close(); + return "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>"; + }else { + System.err.println("支付回退错误:"+callback.getMsg()); + return "<xml><return_code><![CDATA[FAIL]]></return_code></xml>"; } } -- Gitblit v1.7.1