From 9f35dc84a6af0a9019e5ae2c8ac4b2c8e2c99fe9 Mon Sep 17 00:00:00 2001
From: zhibing.pu <393733352@qq.com>
Date: 星期一, 26 八月 2024 17:10:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
index 08209c5..1f5ac8c 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -116,7 +116,20 @@
     private TInviteUserService inviteUserService;
 
 
-
+    /**
+     * 远程调用 积分兑换订单 退款回退积分
+     * @return
+     */
+    @PostMapping(value = "/refundPoints/{param}")
+    public R refundPoints(@PathVariable("param")String param) {
+        String[] split = param.split("-");
+        String userId = split[0];
+        String points = split[1];
+        TAppUser byId = appUserService.getById(userId);
+        byId.setPoints(byId.getPoints()+Integer.parseInt(points));
+        appUserService.updateById(byId);
+        return R.ok();
+    }
 
     @ApiOperation(value = "查询当前用户是否为会员 0否1是", tags = {"小程序--查询当前用户是否为会员"})
     @PostMapping(value = "/getUserInfo")
@@ -423,6 +436,8 @@
                 .in(!types.isEmpty(), TAppUserIntegralChange::getChangeType, types).page(Page.of(pointsQueryDto.getPageCurr(), pointsQueryDto.getPageSize()));
 
         for (TAppUserIntegralChange record : page.getRecords()) {
+            record.setDateTime(record.getCreateTime());
+            record.setUid(record.getId().toString());
             if (record.getChangeType()==2){
                 R<TChargingOrder> tChargingOrderR = chargingOrderClient.orderDetail(Long.valueOf(record.getExtension()));
                 if (tChargingOrderR.getData()!=null) {
@@ -439,6 +454,13 @@
 
         return R.ok(page);
 
+    }
+
+    @ApiOperation(value = "积分详情", tags = {"小程序-个人中心"})
+    @GetMapping(value = "/user/points/detail")
+    public R<TAppUserIntegralChange> pointsDetail(String id) {
+        TAppUserIntegralChange byId = integralChangeService.getById(id);
+        return R.ok(byId);
     }
 
     @ApiOperation(value = "冻结解冻用户", tags = {"后台-用户管理-用户列表"})
@@ -528,7 +550,8 @@
 
     }
 
-    @ApiOperation(value = "优惠卷列表不分页(1可使用2不可用)", tags = {"小程序-个人中心"})
+
+    @ApiOperation(value = "优惠卷详情(1可使用2不可用)", tags = {"小程序-个人中心"})
     @PostMapping(value = "/user/coupon/getById")
     public R<TAppCoupon> couponGetById(@RequestParam("id")Long id) {
         TAppCoupon appCoupon = appCouponService.getById(id);
@@ -592,7 +615,7 @@
     @ApiOperation(value = "更换手机号", tags = {"小程序-用户管理-更换手机号"})
     @PostMapping(value = "/user/updatePhone")
     public AjaxResult<String> updatePhone(@Validated @RequestBody UpdatePhoneDTO dto) {
-        String code = redisService.getCacheObject(dto.getPhone() + Constants.APPLET);
+        String code = redisService.getCacheObject(dto.getPhone() + Constants.UPDATE_PHONE);
         if(StringUtils.isEmpty(code)){
             return AjaxResult.error("验证码已过期,请重新获取验证码!");
         }
@@ -808,6 +831,12 @@
 
         return R.ok();
     }
+    @ApiOperation(value = "添加编辑车辆", tags = {"小程序-个人中心-车辆"})
+    @DeleteMapping(value = "/user/car/delete")
+    public R carDelete(String id) {
+        boolean b = appUserCarService.removeById(id);
+        return R.ok();
+    }
     @ApiOperation(value = "车辆详情", tags = {"小程序-个人中心-车辆"})
     @GetMapping(value = "/user/car/detail")
     public R<TAppUserCar> carDetail(String id) {

--
Gitblit v1.7.1