From fd658508f4470f0c479b2a36738b0f50481cbbe9 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期六, 16 九月 2023 10:59:09 +0800
Subject: [PATCH] 后台代码

---
 cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java |   35 +++--------------------------------
 1 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
index e6b0397..b176c57 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -474,10 +474,7 @@
 
     @PostMapping("/base/pointMerchars/updateDetailsUserPointMercase")
     public void updateDetailsUserPointMercase(@RequestBody UserPointsMerchandise merchandise){
-        upmseService.update(merchandise,new LambdaQueryWrapper<UserPointsMerchandise>()
-                .eq(UserPointsMerchandise::getUserId,merchandise.getUserId())
-                .eq(UserPointsMerchandise::getId,merchandise.getId()));
-
+        upmseService.updateById(merchandise);
     }
 
     @PostMapping("/base/pointMerchars/queryUserPointMerchaseByCode")
@@ -527,9 +524,7 @@
         if (list.size() > 0 ){
             for (UserPointsMerchandise pointsMerchandise : list) {
                 pointsMerchandise.setState(2);
-                upmseService.update(pointsMerchandise,new LambdaQueryWrapper<UserPointsMerchandise>()
-                        .eq(UserPointsMerchandise::getUserId,pointsMerchandise.getUserId())
-                        .eq(UserPointsMerchandise::getId,pointsMerchandise.getId()));
+                upmseService.updateById(pointsMerchandise);
             }
         }
 
@@ -674,7 +669,7 @@
         if (list.size() > 0 ){
             for (UserPointsMerchandise pointsMerchandise : list) {
                 Map<String, Object> map = new HashMap<>();
-                map.put("id",pointsMerchandise.getId().toString());
+                map.put("id",pointsMerchandise.getId());
                 map.put("userId",pointsMerchandise.getUserId());
                 map.put("status", pointsMerchandise.getStatus());
                 mapList.add(map);
@@ -682,30 +677,6 @@
         }
         System.out.println(mapList);
         return mapList;
-    }
-
-    @ResponseBody
-    @PostMapping("/base/pointMerchars/writeOffGoodsStatus")
-    public boolean writeOffGoodsStatus(@RequestBody Map<String, Object> map){
-        try {
-            String o = (String) map.get("goodsId");
-            Integer managerId = (Integer) map.get("managerId");
-            UserPointsMerchandise byId = upmseService.getOne(new LambdaQueryWrapper<UserPointsMerchandise>()
-                    .eq(UserPointsMerchandise::getId,Long.parseLong(o) ));
-            if (byId.getStatus() == 2){
-                return false;
-            }
-            byId.setStatus(2);
-            byId.setVerificationUserId(managerId);
-            byId.setVerificationTime(new Date());
-            upmseService.update(byId,new LambdaQueryWrapper<UserPointsMerchandise>()
-                    .eq(UserPointsMerchandise::getUserId,byId.getUserId())
-                    .eq(UserPointsMerchandise::getId,byId.getId()));
-            System.out.println(byId);
-            return true;
-        }catch (Exception e){
-            return false;
-        }
     }
 
 }

--
Gitblit v1.7.1