From adac148db7cefc6848933989d407b1827749a5a6 Mon Sep 17 00:00:00 2001
From: huliguo <2023611923@qq.com>
Date: 星期一, 07 七月 2025 08:49:49 +0800
Subject: [PATCH] bug修改

---
 pt-admin/src/main/java/com/ruoyi/web/controller/errand/AppUserController.java |   63 ++++++++++++++++++-------------
 1 files changed, 37 insertions(+), 26 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..d0efc91 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(可选择)
@@ -105,8 +105,9 @@
      */
     @GetMapping("/getOrderPage")
     @ApiOperation(value = "获取相关信息",tags = "app用户端-下单页面")
-    public R<OrderPageVO> getOrderPage(@RequestParam(value = "communityId",required = false) Integer communityId) {
-        return R.ok(appUserService.getOrderPage(communityId));
+    public R<OrderPageVO> getOrderPage(@RequestParam(value = "communityId",required = false) Integer communityId ,
+                                       @RequestParam(value = "regionExtend",required = false) String regionExtend) {
+        return R.ok(appUserService.getOrderPage(communityId,regionExtend));
     }
 
     /**
@@ -128,6 +129,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 +161,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 +282,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 +291,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 +301,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 +309,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