Browse Source

pc端rest

yubin 3 days ago
parent
commit
04b2fd25c8
33 changed files with 854 additions and 1461 deletions
  1. 10 6
      mall-service/src/main/java/com/txz/mall/controller/BannerController.java
  2. 9 8
      mall-service/src/main/java/com/txz/mall/controller/CategoryController.java
  3. 11 11
      mall-service/src/main/java/com/txz/mall/controller/CombinationController.java
  4. 10 6
      mall-service/src/main/java/com/txz/mall/controller/FlashActivityController.java
  5. 61 47
      mall-service/src/main/java/com/txz/mall/controller/OrderController.java
  6. 7 6
      mall-service/src/main/java/com/txz/mall/controller/OrderInfoController.java
  7. 7 6
      mall-service/src/main/java/com/txz/mall/controller/OrderStatusController.java
  8. 14 10
      mall-service/src/main/java/com/txz/mall/controller/PinkController.java
  9. 7 6
      mall-service/src/main/java/com/txz/mall/controller/ProductAttrController.java
  10. 8 7
      mall-service/src/main/java/com/txz/mall/controller/ProductAttrResultController.java
  11. 7 6
      mall-service/src/main/java/com/txz/mall/controller/ProductAttrValueController.java
  12. 5 6
      mall-service/src/main/java/com/txz/mall/controller/ProductController.java
  13. 7 6
      mall-service/src/main/java/com/txz/mall/controller/ProductRuleController.java
  14. 0 128
      mall-service/src/main/java/com/txz/mall/controller/SystemDictDataController.java
  15. 0 127
      mall-service/src/main/java/com/txz/mall/controller/SystemDictTypeController.java
  16. 0 127
      mall-service/src/main/java/com/txz/mall/controller/SystemFormTempController.java
  17. 0 127
      mall-service/src/main/java/com/txz/mall/controller/SystemGroupController.java
  18. 0 143
      mall-service/src/main/java/com/txz/mall/controller/SystemGroupDataController.java
  19. 102 93
      mall-service/src/main/java/com/txz/mall/controller/UserAddressController.java
  20. 0 43
      mall-service/src/main/java/com/txz/mall/controller/UserSignController.java
  21. 54 54
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppCategoryController.java
  22. 60 60
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppCombinationController.java
  23. 59 59
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppFlashActivityController.java
  24. 31 31
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppOrderController.java
  25. 16 16
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppPinkController.java
  26. 52 52
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductAttrController.java
  27. 55 55
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductAttrResultController.java
  28. 52 52
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductAttrValueController.java
  29. 101 101
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductController.java
  30. 52 52
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductRuleController.java
  31. 1 1
      mall-service/src/main/java/com/txz/mall/controller/appcontroller/MidFavoriteController.java
  32. 7 1
      mall-service/src/main/java/com/txz/mall/core/RedisUtil.java
  33. 49 8
      mall-service/src/main/java/com/txz/mall/core/UserUtil.java

+ 10 - 6
mall-service/src/main/java/com/txz/mall/controller/BannerController.java

@@ -1,11 +1,14 @@
 package com.txz.mall.controller;
 
+import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
+import com.txz.mall.core.UserUtil;
 import com.txz.mall.model.Banner;
 import com.txz.mall.service.BannerService;
+import com.txz.mall.web.param.BannerParam;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -31,6 +34,7 @@ public class BannerController {
     @Resource
     private BannerService bannerService;
 
+
     @PostMapping("/add")
     @ApiOperation(value = "轮播图新增")
     public Result add(@RequestBody Banner banner) {
@@ -48,7 +52,7 @@ public class BannerController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "轮播图删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -66,7 +70,7 @@ public class BannerController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "轮播图更新")
     public Result update(@RequestBody Banner banner) {
         if (banner == null) {
@@ -86,7 +90,7 @@ public class BannerController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "轮播图获取详情")
     public Result<Banner> detail(@RequestParam Long id) {
         if (id == null) {
@@ -104,10 +108,10 @@ public class BannerController {
 
     @PostMapping("/list")
     @ApiOperation(value = "轮播图获取列表")
-    public Result<List<Banner>> list(@RequestBody Banner banner, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<Banner>> list(@RequestBody BannerParam banner) {
+        PageHelper.startPage(banner.getPage(), banner.getSize());
 
-        Condition condition = new Condition(banner.getClass());
+        Condition condition = new Condition(Banner.class);
         Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");

+ 9 - 8
mall-service/src/main/java/com/txz/mall/controller/CategoryController.java

@@ -6,6 +6,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.Category;
 import com.txz.mall.service.CategoryService;
+import com.txz.mall.web.param.CategoryParam;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -53,7 +54,7 @@ public class CategoryController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "类目删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -63,7 +64,7 @@ public class CategoryController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "类目更新")
     public Result update(@RequestBody Category category) {
         if (category == null) {
@@ -83,7 +84,7 @@ public class CategoryController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "类目获取详情")
     public Result<Category> detail(@RequestParam Long id) {
         if (id == null) {
@@ -101,9 +102,9 @@ public class CategoryController {
 
     @PostMapping("/list")
     @ApiOperation(value = "类目获取列表")
-    public Result<List<Category>> list(@RequestBody Category category, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+    public Result<List<Category>> list(@RequestBody CategoryParam category) {
 
-        Condition condition = new Condition(category.getClass());
+        Condition condition = new Condition(Category.class);
         Example.Criteria criteria = condition.createCriteria();
         if (StringUtils.isNotBlank(category.getName())) {
             criteria.andLike("name", "%" + category.getName() + "%");
@@ -112,7 +113,7 @@ public class CategoryController {
         condition.setOrderByClause("sort DESC, create_time DESC");
         PageInfo pageInfo = null;
         try {
-            PageHelper.startPage(page, size);
+            PageHelper.startPage(category.getPage(), category.getSize());
             List<Category> list = categoryService.findByCondition(condition);
             pageInfo = new PageInfo(list);
         } catch (Exception e) {
@@ -144,9 +145,9 @@ public class CategoryController {
     }
 
     @ApiOperation(value = "更改分类状态")
-    @GetMapping(value = "/updateStatus/{id}")
+    @PutMapping(value = "/updateStatus")
     @ApiImplicitParam(name = "id", value = "分类id")
-    public Result getByIds(@Validated @PathVariable(name = "id") Long id) {
+    public Result getByIds(@Validated @RequestParam(name = "id") Long id) {
         if (categoryService.updateStatus(id)) {
             return Result.success("修改成功");
         } else {

+ 11 - 11
mall-service/src/main/java/com/txz/mall/controller/CombinationController.java

@@ -10,6 +10,7 @@ import com.txz.mall.core.ServiceException;
 import com.txz.mall.model.StoreCombination;
 import com.txz.mall.service.StoreCombinationService;
 import com.txz.mall.service.StoreOrderService;
+import com.txz.mall.web.param.addparam.StoreCombinationAddParam;
 import dto.GoPinkDTO;
 import dto.StoreProductDTO;
 import io.swagger.annotations.Api;
@@ -61,7 +62,7 @@ public class CombinationController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "拼团商品表删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -87,7 +88,7 @@ public class CombinationController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "拼团商品表更新")
     public Result update(@RequestBody StoreCombination storeCombination) {
         if (storeCombination == null) {
@@ -107,7 +108,7 @@ public class CombinationController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "拼团商品表获取详情")
     public Result<StoreCombination> detail(@RequestParam Long id) {
         if (id == null) {
@@ -126,8 +127,8 @@ public class CombinationController {
 
     @PostMapping("/app/list")
     @ApiOperation(value = "拼团商品表获取列表")
-    public Result<List<StoreCombination>> list(@RequestBody StoreProductDTO dto, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<StoreCombination>> list(@RequestBody StoreProductDTO dto) {
+        PageHelper.startPage(dto.getPage(), dto.getSize());
 
         Condition condition = new Condition(StoreCombination.class);
         Example.Criteria criteria = condition.createCriteria();
@@ -174,18 +175,18 @@ public class CombinationController {
 
     @PostMapping("/addActivityProduct")
     @ApiOperation(value = "添加活动商品")
-    public Result addActivityProduct(@RequestBody List<StoreCombination> list, @RequestParam("activityId") Long activityId) {
-        if (CollectionUtils.isEmpty(list)) {
+    public Result addActivityProduct(@RequestBody StoreCombinationAddParam storeCombinationAddParam) {
+        if (CollectionUtils.isEmpty(storeCombinationAddParam.getList())) {
             throw new ServiceException("添加商品不能为空");
         }
-        if (activityId == null) {
+        if (storeCombinationAddParam.getActivityId() == null) {
             return Result.fail(ResultCode.ID_IS_NULL);
         }
-        storeCombinationService.addActivityProduct(list, activityId);
+        storeCombinationService.addActivityProduct(storeCombinationAddParam.getList(), storeCombinationAddParam.getActivityId());
         return Result.success();
     }
 
-    @PostMapping("/getActivityProductIds")
+    @GetMapping("/getActivityProductIds")
     @ApiOperation(value = "获取活动商品ids")
     public Result<List<Long>> getActivityProductIds(@RequestParam("activityId") Long activityId) {
         Condition condition = new Condition(StoreCombination.class);
@@ -253,5 +254,4 @@ public class CombinationController {
         return Result.success(pageInfo);
     }
 
-
 }

+ 10 - 6
mall-service/src/main/java/com/txz/mall/controller/FlashActivityController.java

@@ -1,11 +1,13 @@
 package com.txz.mall.controller;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageInfo;
 import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreFlashActivity;
 import com.txz.mall.service.StoreFlashActivityService;
+import com.txz.mall.web.param.StoreFlashActivityParam;
 import dto.StoreFlashActivityDTO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -30,7 +32,6 @@ public class FlashActivityController {
 
     @Resource
     private StoreFlashActivityService storeFlashActivityService;
-
     @PostMapping("/add")
     @ApiOperation(value = "限时活动新增")
     public Result add(@RequestBody StoreFlashActivityDTO dto) {
@@ -51,7 +52,7 @@ public class FlashActivityController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "限时活动删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -70,7 +71,7 @@ public class FlashActivityController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "限时活动更新")
     public Result update(@RequestBody StoreFlashActivityDTO dto) {
         if (dto == null) {
@@ -93,7 +94,7 @@ public class FlashActivityController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "限时活动获取详情")
     public Result<StoreFlashActivity> detail(@RequestParam Long id) {
         if (id == null) {
@@ -111,11 +112,14 @@ public class FlashActivityController {
 
     @PostMapping("/list")
     @ApiOperation(value = "限时活动获取列表")
-    public Result<List<StoreFlashActivity>> list(@RequestBody StoreFlashActivity storeFlashActivity, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+    public Result<List<StoreFlashActivity>> list(@RequestBody StoreFlashActivityParam storeFlashActivityParam) {
+        StoreFlashActivity  storeFlashActivity= BeanUtil.toBean(storeFlashActivityParam, StoreFlashActivity.class);
+
         PageInfo pageInfo = null;
-        List<StoreFlashActivity> arrayList = storeFlashActivityService.activityList(storeFlashActivity, page, size);
+        List<StoreFlashActivity> arrayList = storeFlashActivityService.activityList(storeFlashActivity, storeFlashActivityParam.getPage(), storeFlashActivityParam.getSize());
         pageInfo = new PageInfo(arrayList);
         return Result.success(pageInfo);
     }
 
+
 }

+ 61 - 47
mall-service/src/main/java/com/txz/mall/controller/OrderController.java

@@ -44,14 +44,18 @@ public class OrderController {
     @PostMapping("/add")
     @ApiOperation(value = "创建订单")
     public Result add(@Validated @RequestBody CreateOrderRequest orderRequest) {
+
+
         if (orderRequest == null) {
             return Result.fail(ResultCode.OBJECT_IS_NULL);
         }
+        Long tokenUserId = AuthService.getTokenUserId(null);
+        orderRequest.setUserId(tokenUserId);
         MyRecord record = storeOrderService.createOrder(orderRequest);
         return Result.success(record);
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "订单删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -69,7 +73,7 @@ public class OrderController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "订单更新")
     public Result update(@RequestBody StoreOrder storeOrder) {
         if (storeOrder == null) {
@@ -89,7 +93,7 @@ public class OrderController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "订单获取详情")
     public Result<StoreOrderVO> detail(@RequestParam Long id) {
         if (id == null) {
@@ -101,8 +105,8 @@ public class OrderController {
 
     @PostMapping("/list")
     @ApiOperation(value = "订单获取列表")
-    public Result<List<StoreOrderVO>> list(@RequestBody StoreOrderDTO dto, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<StoreOrderVO>> list(@RequestBody StoreOrderDTO dto) {
+        PageHelper.startPage(dto.getPage(), dto.getSize());
         PageInfo pageInfo = null;
         try {
             List<StoreOrderVO> arrayList = storeOrderService.orderList(dto);
@@ -114,26 +118,26 @@ public class OrderController {
         return Result.success(pageInfo);
     }
 
-    @PostMapping("/app/list")
-    @ApiOperation(value = "订单获取列表")
-    public Result<List<StoreOrderVO>> appList(@RequestBody StoreOrderAppDTO dto, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-
-        Long tokenUserId = AuthService.getTokenUserId(null);
-        dto.setUserId(tokenUserId);
-        PageHelper.startPage(page, size);
-        PageInfo pageInfo = null;
-        try {
-            List<StoreOrderVO> arrayList = storeOrderService.appList(dto);
-            pageInfo = new PageInfo(arrayList);
-        } catch (Exception e) {
-            log.error("查询对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success(pageInfo);
-    }
+//    @PostMapping("/app/list")
+//    @ApiOperation(value = "订单获取列表")
+//    public Result<List<StoreOrderVO>> appList(@RequestBody StoreOrderAppDTO dto) {
+//
+//        Long tokenUserId = AuthService.getTokenUserId(null);
+//        dto.setUserId(tokenUserId);
+//        PageHelper.startPage(dto.getPage(), dto.getSize());
+//        PageInfo pageInfo = null;
+//        try {
+//            List<StoreOrderVO> arrayList = storeOrderService.appList(dto);
+//            pageInfo = new PageInfo(arrayList);
+//        } catch (Exception e) {
+//            log.error("查询对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success(pageInfo);
+//    }
 
     @ApiOperation(value = "获取订单各状态数量")
-    @PostMapping(value = "/status/num")
+    @GetMapping(value = "/status/num")
     public Result<StoreOrderCountItemVO> getOrderStatusNum() {
         return Result.success(storeOrderService.getOrderStatusNum());
     }
@@ -180,30 +184,40 @@ public class OrderController {
         return Result.success();
     }
 
-    @ApiOperation(value = "预下单")
-    @PostMapping(value = "/pre/order")
-    public Result preOrder(@RequestBody @Validated PreOrderRequest request) {
-        return Result.success(storeOrderService.preOrder(request));
-    }
-
-    @ApiOperation(value = "加载预下单")
-    @PostMapping(value = "load/pre")
-    public Result<PreOrderResponse> loadPreOrder(@RequestParam String preOrderNo) {
-        return Result.success(storeOrderService.loadPreOrder(preOrderNo));
-    }
-
-    @ApiOperation(value = "计算订单价格")
-    @PostMapping(value = "/computed/price")
-    public Result<ComputedOrderPriceResponse> computedPrice(@Validated @RequestBody OrderComputedPriceRequest request) {
-        return Result.success(storeOrderService.computedOrderPrice(request));
-    }
-
-    @ApiOperation(value = "去支付")
-    @PostMapping(value = "/goPay")
-    public Result getPayResult(@RequestBody GoPinkDTO dto) {
-        Boolean result = storeOrderService.goPay(dto);
-        return Result.success(result);
-    }
+//    @ApiOperation(value = "预下单")
+//    @PostMapping(value = "/pre/order")
+//    public Result preOrder(@RequestBody @Validated PreOrderRequest request) {
+//        Long tokenUserId = AuthService.getTokenUserId(null);
+//        request.setUserId(tokenUserId);
+//        return Result.success(storeOrderService.preOrder(request));
+//
+//    }
+//    @ApiOperation(value = "加载预下单")
+//    @PostMapping(value = "load/pre")
+//    public Result<PreOrderResponse> loadPreOrder(@RequestParam String preOrderNo) {
+//
+//        Long tokenUserId = AuthService.getTokenUserId(null);
+//        return Result.success(storeOrderService.loadPreOrder(preOrderNo));
+//    }
+
+//    @ApiOperation(value = "计算订单价格")
+//    @PostMapping(value = "/computed/price")
+//    public Result<ComputedOrderPriceResponse> computedPrice(@Validated @RequestBody OrderComputedPriceRequest request) {
+//
+//        Long tokenUserId = AuthService.getTokenUserId(null);
+//        request.setUserId(tokenUserId);
+//        return Result.success(storeOrderService.computedOrderPrice(request));
+//    }
+
+//    @ApiOperation(value = "去支付")
+//    @PostMapping(value = "/goPay")
+//    public Result getPayResult(@RequestBody GoPinkDTO dto) {
+//
+//        Long tokenUserId = AuthService.getTokenUserId(null);
+//        dto.setUserId(tokenUserId);
+//        Boolean result = storeOrderService.goPay(dto);
+//        return Result.success(result);
+//    }
 
     @ApiOperation("导出发货单")
     @PostMapping("/exportDelivery")

+ 7 - 6
mall-service/src/main/java/com/txz/mall/controller/OrderInfoController.java

@@ -6,6 +6,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreOrderInfo;
 import com.txz.mall.service.StoreOrderInfoService;
+import com.txz.mall.web.param.StoreOrderInfoParam;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -48,7 +49,7 @@ public class OrderInfoController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "订单内容删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -66,7 +67,7 @@ public class OrderInfoController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "订单内容更新")
     public Result update(@RequestBody StoreOrderInfo storeOrderInfo) {
         if (storeOrderInfo == null) {
@@ -86,7 +87,7 @@ public class OrderInfoController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "订单内容获取详情")
     public Result<StoreOrderInfo> detail(@RequestParam Long id) {
         if (id == null) {
@@ -104,10 +105,10 @@ public class OrderInfoController {
 
     @PostMapping("/list")
     @ApiOperation(value = "订单内容获取列表")
-    public Result<List<StoreOrderInfo>> list(@RequestBody StoreOrderInfo storeOrderInfo, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<StoreOrderInfo>> list(@RequestBody StoreOrderInfoParam storeOrderInfo) {
+        PageHelper.startPage(storeOrderInfo.getPage(), storeOrderInfo.getSize());
 
-        Condition condition = new Condition(storeOrderInfo.getClass());
+        Condition condition = new Condition(StoreOrderInfo.class);
         Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");

+ 7 - 6
mall-service/src/main/java/com/txz/mall/controller/OrderStatusController.java

@@ -6,6 +6,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreOrderStatus;
 import com.txz.mall.service.StoreOrderStatusService;
+import com.txz.mall.web.param.StoreOrderStatusParam;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -48,7 +49,7 @@ public class OrderStatusController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "订单状态删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -65,7 +66,7 @@ public class OrderStatusController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "订单状态更新")
     public Result update(@RequestBody StoreOrderStatus storeOrderStatus) {
         if (storeOrderStatus == null) {
@@ -84,7 +85,7 @@ public class OrderStatusController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping ("/detail")
     @ApiOperation(value = "订单状态获取详情")
     public Result<StoreOrderStatus> detail(@RequestParam Long id) {
         if (id == null) {
@@ -102,10 +103,10 @@ public class OrderStatusController {
 
     @PostMapping("/list")
     @ApiOperation(value = "订单状态获取列表")
-    public Result<List<StoreOrderStatus>> list(@RequestBody StoreOrderStatus storeOrderStatus, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<StoreOrderStatus>> list(@RequestBody StoreOrderStatusParam storeOrderStatus) {
+        PageHelper.startPage(storeOrderStatus.getPage(), storeOrderStatus.getSize());
 
-        Condition condition = new Condition(storeOrderStatus.getClass());
+        Condition condition = new Condition(StoreOrderStatus.class);
         Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");

+ 14 - 10
mall-service/src/main/java/com/txz/mall/controller/PinkController.java

@@ -1,5 +1,6 @@
 package com.txz.mall.controller;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.txz.mall.business.PinkServiceBusiness;
@@ -7,6 +8,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StorePink;
 import com.txz.mall.service.StorePinkService;
+import com.txz.mall.web.param.StorePinkParam;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -54,7 +56,7 @@ public class PinkController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "拼团删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -72,7 +74,7 @@ public class PinkController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "拼团更新")
     public Result update(@RequestBody StorePink storePink) {
         if (storePink == null) {
@@ -92,7 +94,7 @@ public class PinkController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "拼团获取详情")
     public Result<StorePink> detail(@RequestParam Long id) {
         if (id == null) {
@@ -110,10 +112,10 @@ public class PinkController {
 
     @PostMapping("/list")
     @ApiOperation(value = "拼团获取列表")
-    public Result<List<StorePink>> list(@RequestBody StorePink storePink, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<StorePink>> list(@RequestBody StorePinkParam storePink) {
+        PageHelper.startPage(storePink.getPage(), storePink.getSize());
 
-        Condition condition = new Condition(storePink.getClass());
+        Condition condition = new Condition(StorePink.class);
         Example.Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         criteria.andEqualTo("orderId", storePink.getOrderId());
@@ -135,8 +137,10 @@ public class PinkController {
 
     @ApiOperation(value = "已存在的拼团列表")
     @PostMapping(value = "/ongoing/list")
-    public Result<List<StorePinkOngoingVO>> ongoingList(@RequestBody StorePink storePink, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<StorePinkOngoingVO>> ongoingList(@RequestBody StorePinkParam storePinkParam) {
+        PageHelper.startPage(storePinkParam.getPage(), storePinkParam.getSize());
+
+        StorePink storePink = BeanUtil.toBean(storePinkParam, StorePink.class);
         List<StorePinkOngoingVO> list = storePinkService.ongoingList(storePink);
         PageInfo pageInfo = new PageInfo(list);
         return Result.success(pageInfo);
@@ -146,8 +150,8 @@ public class PinkController {
      * 拼团订单列表
      */
     @ApiOperation(value = "拼团订单列表")
-    @GetMapping(value = "/orderPink/{id}")
-    public Result<List<StorePinkDetailVO>> getPinkList(@PathVariable(value = "id") Integer id) {
+    @GetMapping(value = "/orderPink")
+    public Result<List<StorePinkDetailVO>> getPinkList(@RequestParam("id") Integer id) {
         return Result.success(pinkServiceBusiness.getAdminList(id));
     }
 

+ 7 - 6
mall-service/src/main/java/com/txz/mall/controller/ProductAttrController.java

@@ -6,6 +6,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.ProductAttr;
 import com.txz.mall.service.ProductAttrService;
+import com.txz.mall.web.param.ProductAttrParam;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -47,7 +48,7 @@ public class ProductAttrController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "商品属性删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -65,7 +66,7 @@ public class ProductAttrController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "商品属性更新")
     public Result update(@RequestBody ProductAttr productAttr) {
         if (productAttr == null) {
@@ -85,7 +86,7 @@ public class ProductAttrController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "商品属性获取详情")
     public Result<ProductAttr> detail(@RequestParam Long id) {
         if (id == null) {
@@ -103,10 +104,10 @@ public class ProductAttrController {
 
     @PostMapping("/list")
     @ApiOperation(value = "商品属性获取列表")
-    public Result<List<ProductAttr>> list(@RequestBody ProductAttr productAttr, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<ProductAttr>> list(@RequestBody ProductAttrParam productAttr) {
+        PageHelper.startPage(productAttr.getPage(), productAttr.getSize());
 
-        Condition condition = new Condition(productAttr.getClass());
+        Condition condition = new Condition(ProductAttr.class);
         Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");

+ 8 - 7
mall-service/src/main/java/com/txz/mall/controller/ProductAttrResultController.java

@@ -6,6 +6,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreProductAttrResult;
 import com.txz.mall.service.StoreProductAttrResultService;
+import com.txz.mall.web.param.StoreProductAttrResultParam;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -48,7 +49,7 @@ public class ProductAttrResultController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "商品属性详情删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -67,7 +68,7 @@ public class ProductAttrResultController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "商品属性详情更新")
     public Result update(@RequestBody StoreProductAttrResult storeProductAttrResult) {
         if (storeProductAttrResult == null) {
@@ -88,7 +89,7 @@ public class ProductAttrResultController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "商品属性详情获取详情")
     public Result<StoreProductAttrResult> detail(@RequestParam Long id) {
         if (id == null) {
@@ -107,11 +108,11 @@ public class ProductAttrResultController {
 
     @PostMapping("/list")
     @ApiOperation(value = "商品属性详情获取列表")
-    public Result<List<StoreProductAttrResult>> list(@RequestBody StoreProductAttrResult storeProductAttrResult, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-       
-        PageHelper.startPage(page, size);
+    public Result<List<StoreProductAttrResult>> list(@RequestBody StoreProductAttrResultParam storeProductAttrResult) {
 
-        Condition condition = new Condition(storeProductAttrResult.getClass());
+        PageHelper.startPage(storeProductAttrResult.getPage(), storeProductAttrResult.getSize());
+
+        Condition condition = new Condition(StoreProductAttrResult.class);
         Example.Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");

+ 7 - 6
mall-service/src/main/java/com/txz/mall/controller/ProductAttrValueController.java

@@ -6,6 +6,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.ProductAttrValue;
 import com.txz.mall.service.ProductAttrValueService;
+import com.txz.mall.web.param.ProductAttrValueParam;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -47,7 +48,7 @@ public class ProductAttrValueController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "SKU删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -65,7 +66,7 @@ public class ProductAttrValueController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "SKU更新")
     public Result update(@RequestBody ProductAttrValue productAttrValue) {
         if (productAttrValue == null) {
@@ -85,7 +86,7 @@ public class ProductAttrValueController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "SKU获取详情")
     public Result<ProductAttrValue> detail(@RequestParam Long id) {
         if (id == null) {
@@ -103,10 +104,10 @@ public class ProductAttrValueController {
 
     @PostMapping("/list")
     @ApiOperation(value = "SKU获取列表")
-    public Result<List<ProductAttrValue>> list(@RequestBody ProductAttrValue productAttrValue, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<ProductAttrValue>> list(@RequestBody ProductAttrValueParam productAttrValue) {
+        PageHelper.startPage(productAttrValue.getPage(), productAttrValue.getSize());
 
-        Condition condition = new Condition(productAttrValue.getClass());
+        Condition condition = new Condition(ProductAttrValue.class);
         Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");

+ 5 - 6
mall-service/src/main/java/com/txz/mall/controller/ProductController.java

@@ -41,7 +41,7 @@ public class ProductController {
     @Resource
     private StoreProductService storeProductService;
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "商品删除")
     public Result delete(@RequestParam("ids") List<Long> ids) {
         if (CollectionUtils.isEmpty(ids)) {
@@ -63,7 +63,7 @@ public class ProductController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "商品更新")
     public Result update(@RequestBody @Validated StoreProductAddRequest request) {
         if (request == null) {
@@ -102,9 +102,9 @@ public class ProductController {
 
     @PostMapping("/list")
     @ApiOperation(value = "商品获取列表")
-    public Result<List<StoreProduct>> list(@RequestBody StoreProductDTO dto, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+    public Result<List<StoreProduct>> list(@RequestBody StoreProductDTO dto) {
 
-        PageHelper.startPage(page, size);
+        PageHelper.startPage(dto.getPage(), dto.getSize());
 
         Condition condition = new Condition(StoreProduct.class);
         Criteria criteria = condition.createCriteria();
@@ -154,7 +154,7 @@ public class ProductController {
     }
 
     @ApiOperation(value = "商品详情")
-    @PostMapping(value = "/detail")
+    @GetMapping(value = "/detail")
     public Result<StoreProductInfoVO> info(@RequestParam Long id) {
         return Result.success(storeProductService.getInfo(id));
     }
@@ -197,5 +197,4 @@ public class ProductController {
         storeProductService.save(request);
         return Result.success();
     }
-
 }

+ 7 - 6
mall-service/src/main/java/com/txz/mall/controller/ProductRuleController.java

@@ -6,6 +6,7 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreProductRule;
 import com.txz.mall.service.StoreProductRuleService;
+import com.txz.mall.web.param.StoreProductRuleParam;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -44,7 +45,7 @@ public class ProductRuleController {
         return Result.success();
     }
 
-    @PostMapping("/delete")
+    @DeleteMapping("/delete")
     @ApiOperation(value = "商品规则删除")
     public Result delete(@RequestParam Long id) {
         if (id == null) {
@@ -63,7 +64,7 @@ public class ProductRuleController {
         return Result.success();
     }
 
-    @PostMapping("/update")
+    @PutMapping("/update")
     @ApiOperation(value = "商品规则更新")
     public Result update(@RequestBody StoreProductRule storeProductRule) {
         if (storeProductRule == null) {
@@ -84,7 +85,7 @@ public class ProductRuleController {
         return Result.success();
     }
 
-    @PostMapping("/detail")
+    @GetMapping("/detail")
     @ApiOperation(value = "商品规则获取详情")
     public Result<StoreProductRule> detail(@RequestParam Long id) {
         if (id == null) {
@@ -103,11 +104,11 @@ public class ProductRuleController {
 
     @PostMapping("/list")
     @ApiOperation(value = "商品规则获取列表")
-    public Result<List<StoreProductRule>> list(@RequestBody StoreProductRule storeProductRule, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+    public Result<List<StoreProductRule>> list(@RequestBody StoreProductRuleParam storeProductRule) {
 
-        PageHelper.startPage(page, size);
+        PageHelper.startPage(storeProductRule.getPage(), storeProductRule.getSize());
 
-        Condition condition = new Condition(storeProductRule.getClass());
+        Condition condition = new Condition(StoreProductRule.class);
         Example.Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");

+ 0 - 128
mall-service/src/main/java/com/txz/mall/controller/SystemDictDataController.java

@@ -1,128 +0,0 @@
-//package com.txz.mall.controller;
-//
-//import com.github.pagehelper.PageHelper;
-//import com.github.pagehelper.PageInfo;
-//import com.txz.mall.core.Result;
-//import com.txz.mall.core.ResultCode;
-//import com.txz.mall.model.SystemDictData;
-//import com.txz.mall.service.SystemDictDataService;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.web.bind.annotation.*;
-//import tk.mybatis.mapper.entity.Condition;
-//import tk.mybatis.mapper.entity.Example.Criteria;
-//
-//import javax.annotation.Resource;
-//import java.util.Date;
-//import java.util.List;
-//
-///**
-// * Created by CodeGenerator on 2025/07/14.
-// */
-//@Api(tags = "[后台]字典数据管理")
-//@RestController
-//@RequestMapping("/system/dict/data")
-//public class SystemDictDataController {
-//
-//    private static Logger log = LoggerFactory.getLogger(SystemDictDataController.class);
-//
-//    @Resource
-//    private SystemDictDataService systemDictDataService;
-//
-//    @PostMapping("/add")
-//    @ApiOperation(value = "字典数据新增")
-//    public Result add(@RequestBody SystemDictData systemDictData) {
-//        if (systemDictData == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//
-//        try {
-//            systemDictData.setCreateTime(new Date());
-////            systemDictData.setCreateUserId(userId);
-//            systemDictDataService.save(systemDictData);
-//        } catch (Exception e) {
-//            log.error("新增对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/delete")
-//    @ApiOperation(value = "字典数据删除")
-//    public Result delete(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            SystemDictData systemDictData = new SystemDictData();
-//            systemDictData.setDictCode(id);
-//            systemDictData.setIsDelete(1);
-//            systemDictDataService.update(systemDictData);
-//        } catch (Exception e) {
-//            log.error("删除对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/update")
-//    @ApiOperation(value = "字典数据更新")
-//    public Result update(@RequestBody SystemDictData systemDictData) {
-//        if (systemDictData == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//        if (systemDictData.getDictCode() == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            systemDictData.setUpdateTime(new Date());
-////            systemDictData.setUpdateUserId(userId);
-//            systemDictDataService.update(systemDictData);
-//        } catch (Exception e) {
-//            log.error("更新对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/detail")
-//    @ApiOperation(value = "字典数据获取详情")
-//    public Result<SystemDictData> detail(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        SystemDictData systemDictData = null;
-//        try {
-//            systemDictData = systemDictDataService.findById(id);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(systemDictData);
-//    }
-//
-//    @PostMapping("/list")
-//    @ApiOperation(value = "字典数据获取列表")
-//    public Result<List<SystemDictData>> list(@RequestBody SystemDictData systemDictData,@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-//
-//        PageHelper.startPage(page, size);
-//
-//        Condition condition = new Condition(systemDictData.getClass());
-//        Criteria criteria = condition.createCriteria();
-//        criteria.andEqualTo("dictType", systemDictData.getDictType());
-//        PageInfo pageInfo = null;
-//        try {
-//            List<SystemDictData> list = systemDictDataService.findByCondition(condition);
-//            pageInfo = new PageInfo(list);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(pageInfo);
-//    }
-//}

+ 0 - 127
mall-service/src/main/java/com/txz/mall/controller/SystemDictTypeController.java

@@ -1,127 +0,0 @@
-//package com.txz.mall.controller;
-//
-//import com.github.pagehelper.PageHelper;
-//import com.github.pagehelper.PageInfo;
-//import com.txz.mall.core.Result;
-//import com.txz.mall.core.ResultCode;
-//import com.txz.mall.model.SystemDictType;
-//import com.txz.mall.service.SystemDictTypeService;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.web.bind.annotation.*;
-//import tk.mybatis.mapper.entity.Condition;
-//
-//import javax.annotation.Resource;
-//import java.util.Date;
-//import java.util.List;
-//
-///**
-// * Created by CodeGenerator on 2025/07/14.
-// */
-//@Api(tags = "[后台]字典类型管理")
-//@RestController
-//@RequestMapping("/system/dict/type")
-//public class SystemDictTypeController {
-//
-//    private static Logger log = LoggerFactory.getLogger(SystemDictTypeController.class);
-//
-//    @Resource
-//    private SystemDictTypeService systemDictTypeService;
-//
-//    @PostMapping("/add")
-//    @ApiOperation(value = "字典类型新增")
-//    public Result add(@RequestBody SystemDictType systemDictType) {
-//        if (systemDictType == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//
-//        try {
-//            systemDictType.setCreateTime(new Date());
-////            systemDictType.setCreateUserId(userId);
-//            systemDictTypeService.save(systemDictType);
-//        } catch (Exception e) {
-//            log.error("新增对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/delete")
-//    @ApiOperation(value = "字典类型删除")
-//    public Result delete(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            SystemDictType systemDictType = new SystemDictType();
-//            systemDictType.setDictId(id);
-//            systemDictType.setIsDelete(1);
-//            systemDictTypeService.update(systemDictType);
-//        } catch (Exception e) {
-//            log.error("删除对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/update")
-//    @ApiOperation(value = "字典类型更新")
-//    public Result update(@RequestBody SystemDictType systemDictType) {
-//        if (systemDictType == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//        if (systemDictType.getDictId() == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            systemDictType.setUpdateTime(new Date());
-////            systemDictType.setUpdateUserId(userId);
-//            systemDictTypeService.update(systemDictType);
-//        } catch (Exception e) {
-//            log.error("更新对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/detail")
-//    @ApiOperation(value = "字典类型获取详情")
-//    public Result<SystemDictType> detail(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        SystemDictType systemDictType = null;
-//        try {
-//            systemDictType = systemDictTypeService.findById(id);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(systemDictType);
-//    }
-//
-//    @PostMapping("/list")
-//    @ApiOperation(value = "字典类型获取列表")
-//    public Result<List<SystemDictType>> list(@RequestBody SystemDictType systemDictType,@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-//
-//        PageHelper.startPage(page, size);
-//
-//        Condition condition = new Condition(systemDictType.getClass());
-////        Criteria criteria = condition.createCriteria();
-////        criteria.andEqualTo("name", city.getName());
-//        PageInfo pageInfo = null;
-//        try {
-//            List<SystemDictType> list = systemDictTypeService.findByCondition(condition);
-//            pageInfo = new PageInfo(list);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(pageInfo);
-//    }
-//}

+ 0 - 127
mall-service/src/main/java/com/txz/mall/controller/SystemFormTempController.java

@@ -1,127 +0,0 @@
-//package com.txz.mall.controller;
-//
-//import com.github.pagehelper.PageHelper;
-//import com.github.pagehelper.PageInfo;
-//import com.txz.mall.core.Result;
-//import com.txz.mall.core.ResultCode;
-//import com.txz.mall.model.SystemFormTemp;
-//import com.txz.mall.service.SystemFormTempService;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.web.bind.annotation.*;
-//import tk.mybatis.mapper.entity.Condition;
-//
-//import javax.annotation.Resource;
-//import java.util.Date;
-//import java.util.List;
-//
-///**
-// * Created by CodeGenerator on 2025/07/11.
-// */
-//@Api(tags = "[后台]表单管理")
-//@RestController
-//@RequestMapping("/system/form/temp")
-//public class SystemFormTempController {
-//
-//	private static Logger log = LoggerFactory.getLogger(SystemFormTempController.class);
-//
-//    @Resource
-//    private SystemFormTempService systemFormTempService;
-//
-//    @PostMapping("/add")
-//    @ApiOperation(value = "表单新增")
-//    public Result add(@RequestBody SystemFormTemp systemFormTemp) {
-//		if (systemFormTemp == null) {
-//			return Result.fail(ResultCode.OBJECT_IS_NULL);
-//		}
-//
-//        try {
-//			systemFormTemp.setCreateTime(new Date());
-////			systemFormTemp.setCreateUserId(userId);
-//			systemFormTempService.save(systemFormTemp);
-//		} catch (Exception e) {
-//			log.error("新增对象操作异常e:{}", e);
-//			return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//		}
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/delete")
-//    @ApiOperation(value = "表单删除")
-//    public Result delete(@RequestParam Long id) {
-//		if (id == null) {
-//			return Result.fail(ResultCode.ID_IS_NULL);
-//		}
-//
-//        try {
-//            SystemFormTemp systemFormTemp = new SystemFormTemp();
-//			systemFormTemp.setId(id);
-//			systemFormTemp.setIsDelete(1);
-//			systemFormTempService.update(systemFormTemp);
-//		} catch (Exception e) {
-//			log.error("删除对象操作异常e:{}", e);
-//			return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//		}
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/update")
-//    @ApiOperation(value = "表单更新")
-//    public Result update(@RequestBody SystemFormTemp systemFormTemp) {
-//		if (systemFormTemp == null) {
-//			return Result.fail(ResultCode.OBJECT_IS_NULL);
-//		}
-//		if (systemFormTemp.getId() == null) {
-//			return Result.fail(ResultCode.ID_IS_NULL);
-//		}
-//
-//        try {
-//			systemFormTemp.setUpdateTime(new Date());
-////			systemFormTemp.setUpdateUserId(userId);
-//			systemFormTempService.update(systemFormTemp);
-//		} catch (Exception e) {
-//			log.error("更新对象操作异常e:{}", e);
-//			return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//		}
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/detail")
-//    @ApiOperation(value = "表单获取详情")
-//    public Result<SystemFormTemp> detail(@RequestParam Long id) {
-//		if (id == null) {
-//			return Result.fail(ResultCode.ID_IS_NULL);
-//		}
-//
-//        SystemFormTemp systemFormTemp = null;
-//		try {
-//			systemFormTemp = systemFormTempService.findById(id);
-//		} catch (Exception e) {
-//			log.error("查询对象操作异常e:{}", e);
-//			return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//		}
-//        return Result.success(systemFormTemp);
-//    }
-//
-//    @PostMapping("/list")
-//    @ApiOperation(value = "表单获取列表")
-//    public Result<List<SystemFormTemp>> list(@RequestBody SystemFormTemp systemFormTemp,@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-//
-//        PageHelper.startPage(page, size);
-//
-//        Condition condition = new Condition(systemFormTemp.getClass());
-////        Criteria criteria = condition.createCriteria();
-////        criteria.andEqualTo("name", city.getName());
-//		PageInfo pageInfo = null;
-//		try {
-//			List<SystemFormTemp> list = systemFormTempService.findByCondition(condition);
-//			pageInfo = new PageInfo(list);
-//		} catch (Exception e) {
-//			log.error("查询对象操作异常e:{}", e);
-//			return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//		}
-//        return Result.success(pageInfo);
-//    }
-//}

+ 0 - 127
mall-service/src/main/java/com/txz/mall/controller/SystemGroupController.java

@@ -1,127 +0,0 @@
-//package com.txz.mall.controller;
-//
-//import com.github.pagehelper.PageHelper;
-//import com.github.pagehelper.PageInfo;
-//import com.txz.mall.core.Result;
-//import com.txz.mall.core.ResultCode;
-//import com.txz.mall.model.SystemGroup;
-//import com.txz.mall.service.SystemGroupService;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.web.bind.annotation.*;
-//import tk.mybatis.mapper.entity.Condition;
-//
-//import javax.annotation.Resource;
-//import java.util.Date;
-//import java.util.List;
-//
-///**
-// * Created by CodeGenerator on 2025/07/11.
-// */
-//@Api(tags = "[后台]配置表管理")
-//@RestController
-//@RequestMapping("/system/group")
-//public class SystemGroupController {
-//
-//    private static Logger log = LoggerFactory.getLogger(SystemGroupController.class);
-//
-//    @Resource
-//    private SystemGroupService systemGroupService;
-//
-//    @PostMapping("/add")
-//    @ApiOperation(value = "配置表新增")
-//    public Result add(@RequestBody SystemGroup systemGroup) {
-//        if (systemGroup == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//
-//        try {
-//            systemGroup.setCreateTime(new Date());
-////            systemGroup.setCreateUserId(userId);
-//            systemGroupService.save(systemGroup);
-//        } catch (Exception e) {
-//            log.error("新增对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/delete")
-//    @ApiOperation(value = "配置表删除")
-//    public Result delete(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            SystemGroup systemGroup = new SystemGroup();
-//            systemGroup.setId(id);
-//            systemGroup.setIsDelete(1);
-//            systemGroupService.update(systemGroup);
-//        } catch (Exception e) {
-//            log.error("删除对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/update")
-//    @ApiOperation(value = "配置表更新")
-//    public Result update(@RequestBody SystemGroup systemGroup) {
-//        if (systemGroup == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//        if (systemGroup.getId() == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            systemGroup.setUpdateTime(new Date());
-////            systemGroup.setUpdateUserId(userId);
-//            systemGroupService.update(systemGroup);
-//        } catch (Exception e) {
-//            log.error("更新对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/detail")
-//    @ApiOperation(value = "配置表获取详情")
-//    public Result<SystemGroup> detail(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        SystemGroup systemGroup = null;
-//        try {
-//            systemGroup = systemGroupService.findById(id);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(systemGroup);
-//    }
-//
-//    @PostMapping("/list")
-//    @ApiOperation(value = "配置表获取列表")
-//    public Result<List<SystemGroup>> list(@RequestBody SystemGroup systemGroup,@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-//
-//        PageHelper.startPage(page, size);
-//
-//        Condition condition = new Condition(systemGroup.getClass());
-////        Criteria criteria = condition.createCriteria();
-////        criteria.andEqualTo("name", city.getName());
-//        PageInfo pageInfo = null;
-//        try {
-//            List<SystemGroup> list = systemGroupService.findByCondition(condition);
-//            pageInfo = new PageInfo(list);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(pageInfo);
-//    }
-//}

+ 0 - 143
mall-service/src/main/java/com/txz/mall/controller/SystemGroupDataController.java

@@ -1,143 +0,0 @@
-//package com.txz.mall.controller;
-//
-//import com.github.pagehelper.PageHelper;
-//import com.github.pagehelper.PageInfo;
-//import com.txz.mall.core.Result;
-//import com.txz.mall.core.ResultCode;
-//import com.txz.mall.model.SystemGroupData;
-//import com.txz.mall.service.SystemGroupDataService;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.web.bind.annotation.*;
-//import tk.mybatis.mapper.entity.Condition;
-//
-//import javax.annotation.Resource;
-//import java.util.Date;
-//import java.util.List;
-//
-///**
-// * Created by CodeGenerator on 2025/07/11.
-// */
-//@Api(tags = "[后台]配置详情表管理")
-//@RestController
-//@RequestMapping("/system/group/data")
-//public class SystemGroupDataController {
-//
-//    private static Logger log = LoggerFactory.getLogger(SystemGroupDataController.class);
-//
-//    @Resource
-//    private SystemGroupDataService systemGroupDataService;
-//
-//    @PostMapping("/add")
-//    @ApiOperation(value = "配置详情表新增")
-//    public Result add(@RequestBody SystemGroupData systemGroupData) {
-//        if (systemGroupData == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//
-//        try {
-//            systemGroupData.setCreateTime(new Date());
-////            systemGroupData.setCreateUserId(userId);
-//            systemGroupDataService.save(systemGroupData);
-//        } catch (Exception e) {
-//            log.error("新增对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/delete")
-//    @ApiOperation(value = "配置详情表删除")
-//    public Result delete(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            SystemGroupData systemGroupData = new SystemGroupData();
-//            systemGroupData.setId(id);
-//            systemGroupData.setIsDelete(1);
-//            systemGroupDataService.update(systemGroupData);
-//        } catch (Exception e) {
-//            log.error("删除对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/update")
-//    @ApiOperation(value = "配置详情表更新")
-//    public Result update(@RequestBody SystemGroupData systemGroupData) {
-//        if (systemGroupData == null) {
-//            return Result.fail(ResultCode.OBJECT_IS_NULL);
-//        }
-//        if (systemGroupData.getId() == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        try {
-//            systemGroupData.setUpdateTime(new Date());
-////            systemGroupData.setUpdateUserId(userId);
-//            systemGroupDataService.update(systemGroupData);
-//        } catch (Exception e) {
-//            log.error("更新对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success();
-//    }
-//
-//    @PostMapping("/detail")
-//    @ApiOperation(value = "配置详情表获取详情")
-//    public Result<SystemGroupData> detail(@RequestParam Long id) {
-//        if (id == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//
-//        SystemGroupData systemGroupData = null;
-//        try {
-//            systemGroupData = systemGroupDataService.findById(id);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(systemGroupData);
-//    }
-//
-//    @PostMapping("/list")
-//    @ApiOperation(value = "配置详情表获取列表")
-//    public Result<List<SystemGroupData>> list(@RequestBody SystemGroupData systemGroupData,@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-//
-//        PageHelper.startPage(page, size);
-//
-//        Condition condition = new Condition(systemGroupData.getClass());
-////        Criteria criteria = condition.createCriteria();
-////        criteria.andEqualTo("name", city.getName());
-//        PageInfo pageInfo = null;
-//        try {
-//            List<SystemGroupData> list = systemGroupDataService.findByCondition(condition);
-//            pageInfo = new PageInfo(list);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(pageInfo);
-//    }
-//
-//    @PostMapping("/configDetail")
-//    @ApiOperation(value = "根据groupId获取配置详情")
-//    public Result<List<SystemGroupData>> configDetail(@RequestParam Long groupId, Integer status) {
-//        if (groupId == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//        List<SystemGroupData> systemGroupData = null;
-//        try {
-//            systemGroupData = systemGroupDataService.configDetail(groupId, status);
-//        } catch (Exception e) {
-//            log.error("查询对象操作异常e:{}", e);
-//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-//        }
-//        return Result.success(systemGroupData);
-//    }
-//}

+ 102 - 93
mall-service/src/main/java/com/txz/mall/controller/UserAddressController.java

@@ -2,11 +2,13 @@ package com.txz.mall.controller;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.txz.mall.core.AuthService;
 import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.UserAddress;
 import com.txz.mall.service.StoreOrderService;
 import com.txz.mall.service.UserAddressService;
+import com.txz.mall.web.param.UserAddressParam;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -22,7 +24,7 @@ import java.util.List;
 /**
  * Created by CodeGenerator on 2025/07/15.
  */
-@Api(tags = "[APP]收获地址管理")
+@Api(tags = "后台收获地址管理")
 @RestController
 @RequestMapping("/user/address")
 public class UserAddressController {
@@ -35,68 +37,72 @@ public class UserAddressController {
     @Resource
     private StoreOrderService storeOrderService;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "收获地址新增")
-    public Result<Long> add(@RequestBody UserAddress userAddress) {
-        if (userAddress == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        try {
-            userAddress.setCreateTime(new Date());
-            userAddress.setCreateUserId(userAddress.getUid());
-            userAddressService.save(userAddress);
-            if (userAddress.getIsDefault() == 1) {
-                checkOnlyAddress(userAddress, userAddress.getId());
-            }
-        } catch (Exception e) {
-            log.error("新增对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success(userAddress.getId());
-    }
-
-    @PostMapping("/delete")
-    @ApiOperation(value = "收获地址删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            UserAddress userAddress = new UserAddress();
-            userAddress.setId(id);
-            userAddress.setIsDelete(1);
-            userAddressService.update(userAddress);
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
-
-    @PostMapping("/update")
-    @ApiOperation(value = "收获地址更新")
-    public Result update(@RequestBody UserAddress userAddress) {
-        if (userAddress == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (userAddress.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            userAddress.setUpdateTime(new Date());
-//    		userAddress.setUpdateUserId(userId);
-            userAddressService.update(userAddress);
-            if (userAddress.getIsDefault() == 1) {
-                checkOnlyAddress(userAddress, userAddress.getId());
-            }
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
-
-    @PostMapping("/detail")
+//    @PostMapping("/add")
+//    @ApiOperation(value = "收获地址新增")
+//    public Result<Long> add(@RequestBody UserAddress userAddress) {
+//        Long tokenUserId = AuthService.getTokenUserId(null);
+//        userAddress.setUid(tokenUserId);
+//        if (userAddress == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        try {
+//            userAddress.setCreateTime(new Date());
+//            userAddress.setCreateUserId(userAddress.getUid());
+//            userAddressService.save(userAddress);
+//            if (userAddress.getIsDefault() == 1) {
+//                checkOnlyAddress(userAddress, userAddress.getId());
+//            }
+//        } catch (Exception e) {
+//            log.error("新增对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success(userAddress.getId());
+//    }
+
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "收获地址删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            UserAddress userAddress = new UserAddress();
+//            userAddress.setId(id);
+//            userAddress.setIsDelete(1);
+//            userAddressService.update(userAddress);
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
+
+//    @PutMapping("/update")
+//    @ApiOperation(value = "收获地址更新")
+//    public Result update(@RequestBody UserAddress userAddress) {
+//        Long tokenUserId = AuthService.getTokenUserId(null);
+//        userAddress.setUid(tokenUserId);
+//        if (userAddress == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (userAddress.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            userAddress.setUpdateTime(new Date());
+////    		userAddress.setUpdateUserId(userId);
+//            userAddressService.update(userAddress);
+//            if (userAddress.getIsDefault() == 1) {
+//                checkOnlyAddress(userAddress, userAddress.getId());
+//            }
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
+
+    @GetMapping("/detail")
     @ApiOperation(value = "收获地址获取详情")
     public Result<UserAddress> detail(@RequestParam Long id) {
         if (id == null) {
@@ -114,10 +120,13 @@ public class UserAddressController {
 
     @PostMapping("/list")
     @ApiOperation(value = "收获地址获取列表")
-    public Result<List<UserAddress>> list(@RequestBody UserAddress userAddress, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
+    public Result<List<UserAddress>> list(@RequestBody UserAddressParam userAddress) {
 
-        Condition condition = new Condition(userAddress.getClass());
+      //  Long tokenUserId = AuthService.getTokenUserId(null);
+      //  userAddress.setUid(tokenUserId);
+        PageHelper.startPage(userAddress.getPage(), userAddress.getSize());
+
+        Condition condition = new Condition(UserAddress.class);
         Example.Criteria criteria = condition.createCriteria();
         criteria.andEqualTo("isDelete", 0);
         condition.setOrderByClause("create_time DESC");
@@ -135,33 +144,33 @@ public class UserAddressController {
         return Result.success(pageInfo);
     }
 
-    @PostMapping("/default")
-    @ApiOperation(value = "设置默认地址")
-    public Result defaultAddress(@RequestParam("id") Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        try {
-            UserAddress userAddress = new UserAddress();
-            userAddress.setUpdateTime(new Date());
-//    		userAddress.setUpdateUserId(userId);
-            userAddress.setId(id);
-            userAddress.setIsDefault(1);
-            userAddressService.update(userAddress);
-
-            UserAddress address = userAddressService.findById(id);
-            if (address == null) {
-                return Result.fail(ResultCode.OBJECT_IS_NULL);
-            }
-            checkOnlyAddress(address, id);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
-
-    @PostMapping("/getDefault")
+//    @PutMapping("/default")
+//    @ApiOperation(value = "设置默认地址")
+//    public Result defaultAddress(@RequestParam("id") Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        try {
+//            UserAddress userAddress = new UserAddress();
+//            userAddress.setUpdateTime(new Date());
+////    		userAddress.setUpdateUserId(userId);
+//            userAddress.setId(id);
+//            userAddress.setIsDefault(1);
+//            userAddressService.update(userAddress);
+//
+//            UserAddress address = userAddressService.findById(id);
+//            if (address == null) {
+//                return Result.fail(ResultCode.OBJECT_IS_NULL);
+//            }
+//            checkOnlyAddress(address, id);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
+
+    @GetMapping("/getDefault")
     @ApiOperation(value = "获取默认地址")
     public Result<UserAddress> getDefault(@RequestParam("uid") Long uid) {
         if (uid == null) {

+ 0 - 43
mall-service/src/main/java/com/txz/mall/controller/UserSignController.java

@@ -1,43 +0,0 @@
-package com.txz.mall.controller;
-
-import com.txz.mall.core.Result;
-import com.txz.mall.service.UserSignService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import vo.UserSignDetailVO;
-
-import javax.annotation.Resource;
-
-/**
- * Created by CodeGenerator on 2025/07/11.
- */
-@Api(tags = "[APP]签到管理")
-@RestController
-@RequestMapping("/user/sign")
-public class UserSignController {
-
-    private static Logger log = LoggerFactory.getLogger(UserSignController.class);
-
-    @Resource
-    private UserSignService userSignService;
-
-    @ApiOperation(value = "签到")
-    @PostMapping(value = "/clockIn")
-    public Result clockIn(@RequestParam Long uid) {
-        userSignService.clockIn(uid);
-        return Result.success();
-    }
-
-    @ApiOperation(value = "今日记录详情")
-    @PostMapping(value = "/todayDetail")
-    public Result<UserSignDetailVO> todayDetail(@RequestParam Long uid) {
-        return Result.success(userSignService.todayDetail(uid));
-    }
-
-}

+ 54 - 54
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppCategoryController.java

@@ -37,52 +37,52 @@ public class AppCategoryController {
     @Resource
     private CategoryService categoryService;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "类目新增")
-    public Result add(@RequestBody Category category) {
-        if (category == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        try {
-            category.setCreateTime(new Date());
-//            category.setCreateUserId(userId);
-            categoryService.save(category);
-        } catch (Exception e) {
-            log.error("新增对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PostMapping("/add")
+//    @ApiOperation(value = "类目新增")
+//    public Result add(@RequestBody Category category) {
+//        if (category == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        try {
+//            category.setCreateTime(new Date());
+////            category.setCreateUserId(userId);
+//            categoryService.save(category);
+//        } catch (Exception e) {
+//            log.error("新增对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "类目删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        categoryService.delete(id);
-        return Result.success();
-    }
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "类目删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        categoryService.delete(id);
+//        return Result.success();
+//    }
 
-    @PutMapping("/update")
-    @ApiOperation(value = "类目更新")
-    public Result update(@RequestBody Category category) {
-        if (category == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (category.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            category.setUpdateTime(new Date());
-//            category.setUpdateUserId(userId);
-            categoryService.update(category);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PutMapping("/update")
+//    @ApiOperation(value = "类目更新")
+//    public Result update(@RequestBody Category category) {
+//        if (category == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (category.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            category.setUpdateTime(new Date());
+////            category.setUpdateUserId(userId);
+//            categoryService.update(category);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @GetMapping("/detail")
     @ApiOperation(value = "类目获取详情")
@@ -144,14 +144,14 @@ public class AppCategoryController {
         return Result.success(categoryService.findByIds(ids));
     }
 
-    @ApiOperation(value = "更改分类状态")
-    @PutMapping(value = "/updateStatus")
-    @ApiImplicitParam(name = "id", value = "分类id")
-    public Result getByIds(@Validated @RequestParam(name = "id") Long id) {
-        if (categoryService.updateStatus(id)) {
-            return Result.success("修改成功");
-        } else {
-            return Result.fail("修改失败");
-        }
-    }
+//    @ApiOperation(value = "更改分类状态")
+//    @PutMapping(value = "/updateStatus")
+//    @ApiImplicitParam(name = "id", value = "分类id")
+//    public Result getByIds(@Validated @RequestParam(name = "id") Long id) {
+//        if (categoryService.updateStatus(id)) {
+//            return Result.success("修改成功");
+//        } else {
+//            return Result.fail("修改失败");
+//        }
+//    }
 }

+ 60 - 60
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppCombinationController.java

@@ -45,68 +45,68 @@ public class AppCombinationController {
     @Resource
     private OrderServiceBusiness orderServiceBusiness;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "拼团商品表新增")
-    public Result add(@RequestBody StoreCombination storeCombination) {
-        if (storeCombination == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        try {
-            storeCombination.setCreateTime(new Date());
-//            storeCombination.setCreateUserId(userId);
-            storeCombinationService.save(storeCombination);
-        } catch (Exception e) {
-            log.error("新增对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PostMapping("/add")
+//    @ApiOperation(value = "拼团商品表新增")
+//    public Result add(@RequestBody StoreCombination storeCombination) {
+//        if (storeCombination == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        try {
+//            storeCombination.setCreateTime(new Date());
+////            storeCombination.setCreateUserId(userId);
+//            storeCombinationService.save(storeCombination);
+//        } catch (Exception e) {
+//            log.error("新增对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "拼团商品表删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        StoreCombination combination = storeCombinationService.findById(id);
-        if (combination == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        Date date = new Date();
-        if (combination.getIsShow().equals(1) && combination.getStartTime().before(date) && combination.getStopTime().after(date)) {
-            throw new ServiceException("活动开启中,商品不支持删除");
-        }
-        try {
-            StoreCombination storeCombination = new StoreCombination();
-            storeCombination.setId(id);
-            storeCombination.setIsDelete(1);
-            storeCombinationService.update(storeCombination);
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "拼团商品表删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        StoreCombination combination = storeCombinationService.findById(id);
+//        if (combination == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        Date date = new Date();
+//        if (combination.getIsShow().equals(1) && combination.getStartTime().before(date) && combination.getStopTime().after(date)) {
+//            throw new ServiceException("活动开启中,商品不支持删除");
+//        }
+//        try {
+//            StoreCombination storeCombination = new StoreCombination();
+//            storeCombination.setId(id);
+//            storeCombination.setIsDelete(1);
+//            storeCombinationService.update(storeCombination);
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @PutMapping("/update")
-    @ApiOperation(value = "拼团商品表更新")
-    public Result update(@RequestBody StoreCombination storeCombination) {
-        if (storeCombination == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (storeCombination.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            storeCombination.setUpdateTime(new Date());
-//            storeCombination.setUpdateUserId(userId);
-            storeCombinationService.update(storeCombination);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PutMapping("/update")
+//    @ApiOperation(value = "拼团商品表更新")
+//    public Result update(@RequestBody StoreCombination storeCombination) {
+//        if (storeCombination == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (storeCombination.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            storeCombination.setUpdateTime(new Date());
+////            storeCombination.setUpdateUserId(userId);
+//            storeCombinationService.update(storeCombination);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @GetMapping("/detail")
     @ApiOperation(value = "拼团商品表获取详情")

+ 59 - 59
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppFlashActivityController.java

@@ -33,67 +33,67 @@ public class AppFlashActivityController {
     @Resource
     private StoreFlashActivityService storeFlashActivityService;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "限时活动新增")
-    public Result add(@RequestBody StoreFlashActivityDTO dto) {
-        if (dto == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        try {
-            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
-            BeanUtils.copyProperties(dto, storeFlashActivity);
-            storeFlashActivity.setContent(JSONObject.toJSONString(dto.getContent()));
-            storeFlashActivity.setCreateTime(new Date());
-//            storeFlashActivity.setCreateUserId(userId);
-            storeFlashActivityService.save(storeFlashActivity);
-        } catch (Exception e) {
-            log.error("新增对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PostMapping("/add")
+//    @ApiOperation(value = "限时活动新增")
+//    public Result add(@RequestBody StoreFlashActivityDTO dto) {
+//        if (dto == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        try {
+//            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
+//            BeanUtils.copyProperties(dto, storeFlashActivity);
+//            storeFlashActivity.setContent(JSONObject.toJSONString(dto.getContent()));
+//            storeFlashActivity.setCreateTime(new Date());
+////            storeFlashActivity.setCreateUserId(userId);
+//            storeFlashActivityService.save(storeFlashActivity);
+//        } catch (Exception e) {
+//            log.error("新增对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "限时活动删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "限时活动删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//
+//        try {
+//            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
+//            storeFlashActivity.setId(id);
+//            storeFlashActivity.setIsDelete(1);
+//            storeFlashActivityService.update(storeFlashActivity);
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-        try {
-            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
-            storeFlashActivity.setId(id);
-            storeFlashActivity.setIsDelete(1);
-            storeFlashActivityService.update(storeFlashActivity);
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
-
-    @PutMapping("/update")
-    @ApiOperation(value = "限时活动更新")
-    public Result update(@RequestBody StoreFlashActivityDTO dto) {
-        if (dto == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (dto.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
-            BeanUtils.copyProperties(dto, storeFlashActivity);
-            storeFlashActivity.setContent(JSONObject.toJSONString(dto.getContent()));
-            storeFlashActivity.setUpdateTime(new Date());
-//            storeFlashActivity.setUpdateUserId(userId);
-            storeFlashActivityService.update(storeFlashActivity);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PutMapping("/update")
+//    @ApiOperation(value = "限时活动更新")
+//    public Result update(@RequestBody StoreFlashActivityDTO dto) {
+//        if (dto == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (dto.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
+//            BeanUtils.copyProperties(dto, storeFlashActivity);
+//            storeFlashActivity.setContent(JSONObject.toJSONString(dto.getContent()));
+//            storeFlashActivity.setUpdateTime(new Date());
+////            storeFlashActivity.setUpdateUserId(userId);
+//            storeFlashActivityService.update(storeFlashActivity);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @GetMapping("/detail")
     @ApiOperation(value = "限时活动获取详情")

+ 31 - 31
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppOrderController.java

@@ -142,19 +142,19 @@ public class AppOrderController {
         return Result.success(storeOrderService.getOrderStatusNum());
     }
 
-    @ApiOperation("导出订单")
-    @PostMapping("/export")
-    public Result exportFile(@RequestBody StoreOrderDTO dto, HttpServletResponse response) {
-        storeOrderService.exportFile(dto, response);
-        return Result.success();
-    }
-
-    @ApiOperation("退款")
-    @PostMapping("/refund")
-    public Result refund(@RequestParam("id") Long id) {
-        storeOrderService.refund(id);
-        return Result.success();
-    }
+//    @ApiOperation("导出订单")
+//    @PostMapping("/export")
+//    public Result exportFile(@RequestBody StoreOrderDTO dto, HttpServletResponse response) {
+//        storeOrderService.exportFile(dto, response);
+//        return Result.success();
+//    }
+//
+//    @ApiOperation("退款")
+//    @PostMapping("/refund")
+//    public Result refund(@RequestParam("id") Long id) {
+//        storeOrderService.refund(id);
+//        return Result.success();
+//    }
 
     @ApiOperation("关闭订单")
     @PostMapping("/close")
@@ -177,12 +177,12 @@ public class AppOrderController {
         return Result.success();
     }
 
-    @ApiOperation("批量发货")
-    @PostMapping("/batchDelivery")
-    public Result batchDelivery(@RequestBody List<StoreOrderDeliveryDTO> list) {
-        storeOrderService.batchDelivery(list);
-        return Result.success();
-    }
+//    @ApiOperation("批量发货")
+//    @PostMapping("/batchDelivery")
+//    public Result batchDelivery(@RequestBody List<StoreOrderDeliveryDTO> list) {
+//        storeOrderService.batchDelivery(list);
+//        return Result.success();
+//    }
 
     @ApiOperation(value = "预下单")
     @PostMapping(value = "/pre/order")
@@ -219,17 +219,17 @@ public class AppOrderController {
         return Result.success(result);
     }
 
-    @ApiOperation("导出发货单")
-    @PostMapping("/exportDelivery")
-    public Result exportDelivery(HttpServletResponse response) {
-        storeOrderService.exportDelivery(response);
-        return Result.success();
-    }
+//    @ApiOperation("导出发货单")
+//    @PostMapping("/exportDelivery")
+//    public Result exportDelivery(HttpServletResponse response) {
+//        storeOrderService.exportDelivery(response);
+//        return Result.success();
+//    }
 
-    @ApiOperation("导入发货单")
-    @PostMapping("/importDelivery")
-    public Result importDelivery(@JSONField(serialize = false) @RequestParam("file") MultipartFile file) {
-        storeOrderService.importDelivery(file);
-        return Result.success();
-    }
+//    @ApiOperation("导入发货单")
+//    @PostMapping("/importDelivery")
+//    public Result importDelivery(@JSONField(serialize = false) @RequestParam("file") MultipartFile file) {
+//        storeOrderService.importDelivery(file);
+//        return Result.success();
+//    }
 }

+ 16 - 16
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppPinkController.java

@@ -168,20 +168,20 @@ public class AppPinkController {
     /**
      * 拼团失败
      */
-    @ApiOperation(value = "拼团失败")
-    @PostMapping(value = "/pinkFail")
-    public Result pinkFail() {
-        pinkServiceBusiness.pinkFail();
-        return Result.success();
-    }
-
-    /**
-     * 天选
-     */
-    @ApiOperation(value = "天选")
-    @PostMapping(value = "/theSelection")
-    public Result theSelection(@RequestParam("id") String orderId) {
-        storePinkService.theSelection(orderId);
-        return Result.success();
-    }
+//    @ApiOperation(value = "拼团失败")
+//    @PostMapping(value = "/pinkFail")
+//    public Result pinkFail() {
+//        pinkServiceBusiness.pinkFail();
+//        return Result.success();
+//    }
+//
+//    /**
+//     * 天选
+//     */
+//    @ApiOperation(value = "天选")
+//    @PostMapping(value = "/theSelection")
+//    public Result theSelection(@RequestParam("id") String orderId) {
+//        storePinkService.theSelection(orderId);
+//        return Result.success();
+//    }
 }

+ 52 - 52
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductAttrController.java

@@ -32,60 +32,60 @@ public class AppProductAttrController {
     @Resource
     private ProductAttrService productAttrService;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "商品属性新增")
-    public Result add(@RequestBody ProductAttr productAttr) {
-        if (productAttr == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        try {
-            productAttr.setCreateTime(new Date());
-//            productAttr.setCreateUserId(userId);
-            productAttrService.save(productAttr);
-        } catch (Exception e) {
-            log.error("新增对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PostMapping("/add")
+//    @ApiOperation(value = "商品属性新增")
+//    public Result add(@RequestBody ProductAttr productAttr) {
+//        if (productAttr == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        try {
+//            productAttr.setCreateTime(new Date());
+////            productAttr.setCreateUserId(userId);
+//            productAttrService.save(productAttr);
+//        } catch (Exception e) {
+//            log.error("新增对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "商品属性删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            ProductAttr productAttr = new ProductAttr();
-            productAttr.setId(id);
-            productAttr.setIsDelete(1);
-            productAttrService.update(productAttr);
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "商品属性删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            ProductAttr productAttr = new ProductAttr();
+//            productAttr.setId(id);
+//            productAttr.setIsDelete(1);
+//            productAttrService.update(productAttr);
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @PutMapping("/update")
-    @ApiOperation(value = "商品属性更新")
-    public Result update(@RequestBody ProductAttr productAttr) {
-        if (productAttr == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (productAttr.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            productAttr.setUpdateTime(new Date());
-//            productAttr.setUpdateUserId(userId);
-            productAttrService.update(productAttr);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PutMapping("/update")
+//    @ApiOperation(value = "商品属性更新")
+//    public Result update(@RequestBody ProductAttr productAttr) {
+//        if (productAttr == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (productAttr.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            productAttr.setUpdateTime(new Date());
+////            productAttr.setUpdateUserId(userId);
+//            productAttrService.update(productAttr);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @GetMapping("/detail")
     @ApiOperation(value = "商品属性获取详情")

+ 55 - 55
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductAttrResultController.java

@@ -32,63 +32,63 @@ public class AppProductAttrResultController {
     @Resource
     private StoreProductAttrResultService storeProductAttrResultService;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "商品属性详情新增")
-    public Result add(@RequestBody StoreProductAttrResult storeProductAttrResult) {
-        if (storeProductAttrResult == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
+//    @PostMapping("/add")
+//    @ApiOperation(value = "商品属性详情新增")
+//    public Result add(@RequestBody StoreProductAttrResult storeProductAttrResult) {
+//        if (storeProductAttrResult == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//
+//        try {
+//            storeProductAttrResult.setCreateTime(new Date());
+////            storeProductAttrResult.setCreateUserId(userId);
+//            storeProductAttrResultService.save(storeProductAttrResult);
+//        } catch (Exception e) {
+//            log.error("新增对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-        try {
-            storeProductAttrResult.setCreateTime(new Date());
-//            storeProductAttrResult.setCreateUserId(userId);
-            storeProductAttrResultService.save(storeProductAttrResult);
-        } catch (Exception e) {
-            log.error("新增对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "商品属性详情删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//
+//        try {
+//            StoreProductAttrResult storeProductAttrResult = new StoreProductAttrResult();
+//            storeProductAttrResult.setId(id);
+//            storeProductAttrResult.setIsDelete(1);
+//            storeProductAttrResultService.update(storeProductAttrResult);
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "商品属性详情删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-
-        try {
-            StoreProductAttrResult storeProductAttrResult = new StoreProductAttrResult();
-            storeProductAttrResult.setId(id);
-            storeProductAttrResult.setIsDelete(1);
-            storeProductAttrResultService.update(storeProductAttrResult);
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
-
-    @PutMapping("/update")
-    @ApiOperation(value = "商品属性详情更新")
-    public Result update(@RequestBody StoreProductAttrResult storeProductAttrResult) {
-        if (storeProductAttrResult == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (storeProductAttrResult.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-
-        try {
-            storeProductAttrResult.setUpdateTime(new Date());
-//            storeProductAttrResult.setUpdateUserId(userId);
-            storeProductAttrResultService.update(storeProductAttrResult);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PutMapping("/update")
+//    @ApiOperation(value = "商品属性详情更新")
+//    public Result update(@RequestBody StoreProductAttrResult storeProductAttrResult) {
+//        if (storeProductAttrResult == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (storeProductAttrResult.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//
+//        try {
+//            storeProductAttrResult.setUpdateTime(new Date());
+////            storeProductAttrResult.setUpdateUserId(userId);
+//            storeProductAttrResultService.update(storeProductAttrResult);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @GetMapping("/detail")
     @ApiOperation(value = "商品属性详情获取详情")

+ 52 - 52
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductAttrValueController.java

@@ -32,60 +32,60 @@ public class AppProductAttrValueController {
     @Resource
     private ProductAttrValueService productAttrValueService;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "SKU新增")
-    public Result add(@RequestBody ProductAttrValue productAttrValue) {
-        if (productAttrValue == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        try {
-            productAttrValue.setCreateTime(new Date());
-//            productAttrValue.setCreateUserId(userId);
-            productAttrValueService.save(productAttrValue);
-        } catch (Exception e) {
-            log.error("新增对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PostMapping("/add")
+//    @ApiOperation(value = "SKU新增")
+//    public Result add(@RequestBody ProductAttrValue productAttrValue) {
+//        if (productAttrValue == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        try {
+//            productAttrValue.setCreateTime(new Date());
+////            productAttrValue.setCreateUserId(userId);
+//            productAttrValueService.save(productAttrValue);
+//        } catch (Exception e) {
+//            log.error("新增对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "SKU删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            ProductAttrValue productAttrValue = new ProductAttrValue();
-            productAttrValue.setId(id);
-            productAttrValue.setIsDelete(1);
-            productAttrValueService.update(productAttrValue);
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "SKU删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            ProductAttrValue productAttrValue = new ProductAttrValue();
+//            productAttrValue.setId(id);
+//            productAttrValue.setIsDelete(1);
+//            productAttrValueService.update(productAttrValue);
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
-    @PutMapping("/update")
-    @ApiOperation(value = "SKU更新")
-    public Result update(@RequestBody ProductAttrValue productAttrValue) {
-        if (productAttrValue == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (productAttrValue.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            productAttrValue.setUpdateTime(new Date());
-//            productAttrValue.setUpdateUserId(userId);
-            productAttrValueService.update(productAttrValue);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PutMapping("/update")
+//    @ApiOperation(value = "SKU更新")
+//    public Result update(@RequestBody ProductAttrValue productAttrValue) {
+//        if (productAttrValue == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (productAttrValue.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            productAttrValue.setUpdateTime(new Date());
+////            productAttrValue.setUpdateUserId(userId);
+//            productAttrValueService.update(productAttrValue);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @GetMapping("/detail")
     @ApiOperation(value = "SKU获取详情")

+ 101 - 101
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductController.java

@@ -41,64 +41,64 @@ public class AppProductController {
     @Resource
     private StoreProductService storeProductService;
 
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "商品删除")
-    public Result delete(@RequestParam("ids") List<Long> ids) {
-        if (CollectionUtils.isEmpty(ids)) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        try {
-            ids.forEach(id -> {
-                StoreProduct storeProduct = new StoreProduct();
-                storeProduct.setId(id);
-//                storeProduct.setIsRecycle(1);
-                storeProduct.setIsDelete(1);
-                storeProduct.setUpdateTime(new Date());
-                storeProductService.update(storeProduct);
-            });
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
-
-    @PutMapping("/update")
-    @ApiOperation(value = "商品更新")
-    public Result update(@RequestBody @Validated StoreProductAddRequest request) {
-        if (request == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (request.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-        storeProductService.update(request);
-        return Result.success();
-    }
-
-    @PostMapping("/updateShowStatus")
-    @ApiOperation(value = "商品上下架")
-    public Result updateShowStatus(@RequestParam Long id, @RequestParam Integer ShowStatus) {
-        if (ShowStatus == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-
-        try {
-            StoreProduct storeProduct = new StoreProduct();
-            storeProduct.setUpdateTime(new Date());
-//            storeProduct.setUpdateUserId(userId);
-            storeProduct.setId(id);
-            storeProduct.setIsShow(ShowStatus);
-            storeProductService.update(storeProduct);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "商品删除")
+//    public Result delete(@RequestParam("ids") List<Long> ids) {
+//        if (CollectionUtils.isEmpty(ids)) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        try {
+//            ids.forEach(id -> {
+//                StoreProduct storeProduct = new StoreProduct();
+//                storeProduct.setId(id);
+////                storeProduct.setIsRecycle(1);
+//                storeProduct.setIsDelete(1);
+//                storeProduct.setUpdateTime(new Date());
+//                storeProductService.update(storeProduct);
+//            });
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
+
+//    @PutMapping("/update")
+//    @ApiOperation(value = "商品更新")
+//    public Result update(@RequestBody @Validated StoreProductAddRequest request) {
+//        if (request == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (request.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        storeProductService.update(request);
+//        return Result.success();
+//    }
+
+//    @PostMapping("/updateShowStatus")
+//    @ApiOperation(value = "商品上下架")
+//    public Result updateShowStatus(@RequestParam Long id, @RequestParam Integer ShowStatus) {
+//        if (ShowStatus == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//
+//        try {
+//            StoreProduct storeProduct = new StoreProduct();
+//            storeProduct.setUpdateTime(new Date());
+////            storeProduct.setUpdateUserId(userId);
+//            storeProduct.setId(id);
+//            storeProduct.setIsShow(ShowStatus);
+//            storeProductService.update(storeProduct);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @PostMapping("/list")
     @ApiOperation(value = "商品获取列表")
@@ -139,19 +139,19 @@ public class AppProductController {
         return Result.success(pageInfo);
     }
 
-    @ApiOperation("商品导入")
-    @PostMapping("/import")
-    public Result importFile(@JSONField(serialize = false) @RequestParam("file") MultipartFile file) {
-        storeProductService.importFile(file);
-        return Result.success();
-    }
+//    @ApiOperation("商品导入")
+//    @PostMapping("/import")
+//    public Result importFile(@JSONField(serialize = false) @RequestParam("file") MultipartFile file) {
+//        storeProductService.importFile(file);
+//        return Result.success();
+//    }
 
-    @ApiOperation("商品导入模版")
-    @PostMapping("/export")
-    public Result exportFile(HttpServletResponse response) {
-        storeProductService.exportFile(response);
-        return Result.success();
-    }
+//    @ApiOperation("商品导入模版")
+//    @PostMapping("/export")
+//    public Result exportFile(HttpServletResponse response) {
+//        storeProductService.exportFile(response);
+//        return Result.success();
+//    }
 
     @ApiOperation(value = "商品详情")
     @GetMapping(value = "/detail")
@@ -159,31 +159,31 @@ public class AppProductController {
         return Result.success(storeProductService.getInfo(id));
     }
 
-    @PostMapping("/batchShowStatus")
-    @ApiOperation(value = "批量商品上下架")
-    public Result batchShowStatus(@RequestParam("ids") List<Long> ids, @RequestParam("showStatus") Integer showStatus) {
-        if (showStatus == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (CollectionUtils.isEmpty(ids)) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-
-        try {
-            ids.forEach(id -> {
-                StoreProduct storeProduct = new StoreProduct();
-                storeProduct.setUpdateTime(new Date());
-//                storeProduct.setUpdateUserId(userId);
-                storeProduct.setId(id);
-                storeProduct.setIsShow(showStatus);
-                storeProductService.update(storeProduct);
-            });
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PostMapping("/batchShowStatus")
+//    @ApiOperation(value = "批量商品上下架")
+//    public Result batchShowStatus(@RequestParam("ids") List<Long> ids, @RequestParam("showStatus") Integer showStatus) {
+//        if (showStatus == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (CollectionUtils.isEmpty(ids)) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//
+//        try {
+//            ids.forEach(id -> {
+//                StoreProduct storeProduct = new StoreProduct();
+//                storeProduct.setUpdateTime(new Date());
+////                storeProduct.setUpdateUserId(userId);
+//                storeProduct.setId(id);
+//                storeProduct.setIsShow(showStatus);
+//                storeProductService.update(storeProduct);
+//            });
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @ApiOperation(value = "获取商品各状态数量")
     @GetMapping(value = "/status/num")
@@ -191,11 +191,11 @@ public class AppProductController {
         return Result.success(storeProductService.getOrderStatusNum());
     }
 
-    @ApiOperation(value = "新增商品")
-    @PostMapping(value = "/add")
-    public Result<String> save(@RequestBody @Validated StoreProductAddRequest request) {
-        storeProductService.save(request);
-        return Result.success();
-    }
+//    @ApiOperation(value = "新增商品")
+//    @PostMapping(value = "/add")
+//    public Result<String> save(@RequestBody @Validated StoreProductAddRequest request) {
+//        storeProductService.save(request);
+//        return Result.success();
+//    }
 
 }

+ 52 - 52
mall-service/src/main/java/com/txz/mall/controller/appcontroller/AppProductRuleController.java

@@ -32,58 +32,58 @@ public class AppProductRuleController {
     @Resource
     private StoreProductRuleService storeProductRuleService;
 
-    @PostMapping("/add")
-    @ApiOperation(value = "商品规则新增")
-    public Result add(@RequestBody StoreProductRule storeProductRule) {
-        if (storeProductRule == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-
-        storeProductRule.setCreateTime(new Date());
-//            storeProductRule.setCreateUserId(userId);
-        storeProductRuleService.saveRule(storeProductRule);
-        return Result.success();
-    }
-
-    @DeleteMapping("/delete")
-    @ApiOperation(value = "商品规则删除")
-    public Result delete(@RequestParam Long id) {
-        if (id == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-
-        try {
-            StoreProductRule storeProductRule = new StoreProductRule();
-            storeProductRule.setId(id);
-            storeProductRule.setIsDelete(1);
-            storeProductRuleService.update(storeProductRule);
-        } catch (Exception e) {
-            log.error("删除对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
-
-    @PutMapping("/update")
-    @ApiOperation(value = "商品规则更新")
-    public Result update(@RequestBody StoreProductRule storeProductRule) {
-        if (storeProductRule == null) {
-            return Result.fail(ResultCode.OBJECT_IS_NULL);
-        }
-        if (storeProductRule.getId() == null) {
-            return Result.fail(ResultCode.ID_IS_NULL);
-        }
-
-        try {
-            storeProductRule.setUpdateTime(new Date());
-//            storeProductRule.setUpdateUserId(userId);
-            storeProductRuleService.update(storeProductRule);
-        } catch (Exception e) {
-            log.error("更新对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
-        return Result.success();
-    }
+//    @PostMapping("/add")
+//    @ApiOperation(value = "商品规则新增")
+//    public Result add(@RequestBody StoreProductRule storeProductRule) {
+//        if (storeProductRule == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//
+//        storeProductRule.setCreateTime(new Date());
+////            storeProductRule.setCreateUserId(userId);
+//        storeProductRuleService.saveRule(storeProductRule);
+//        return Result.success();
+//    }
+
+//    @DeleteMapping("/delete")
+//    @ApiOperation(value = "商品规则删除")
+//    public Result delete(@RequestParam Long id) {
+//        if (id == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//
+//        try {
+//            StoreProductRule storeProductRule = new StoreProductRule();
+//            storeProductRule.setId(id);
+//            storeProductRule.setIsDelete(1);
+//            storeProductRuleService.update(storeProductRule);
+//        } catch (Exception e) {
+//            log.error("删除对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
+
+//    @PutMapping("/update")
+//    @ApiOperation(value = "商品规则更新")
+//    public Result update(@RequestBody StoreProductRule storeProductRule) {
+//        if (storeProductRule == null) {
+//            return Result.fail(ResultCode.OBJECT_IS_NULL);
+//        }
+//        if (storeProductRule.getId() == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//
+//        try {
+//            storeProductRule.setUpdateTime(new Date());
+////            storeProductRule.setUpdateUserId(userId);
+//            storeProductRuleService.update(storeProductRule);
+//        } catch (Exception e) {
+//            log.error("更新对象操作异常e:{}", e);
+//            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+//        }
+//        return Result.success();
+//    }
 
     @GetMapping("/detail")
     @ApiOperation(value = "商品规则获取详情")

+ 1 - 1
mall-service/src/main/java/com/txz/mall/controller/appcontroller/MidFavoriteController.java

@@ -49,7 +49,7 @@ import java.util.stream.Collectors;
 /**
 * Created by CodeGenerator on 2025/08/13.
 */
-@Api(tags = "[后台]midFavorite管理")
+@Api(tags = "[app]midFavorite管理")
 @RestController
 @RequestMapping("/app/mid/favorite")
 public class MidFavoriteController {

+ 7 - 1
mall-service/src/main/java/com/txz/mall/core/RedisUtil.java

@@ -2,10 +2,12 @@ package com.txz.mall.core;
 
 import org.springframework.data.redis.core.ListOperations;
 import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.ScanOptions;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -25,7 +27,11 @@ public class RedisUtil {
  
 	@Resource
 	private RedisTemplate<String, Object> redisTemplate;
-	
+
+
+
+
+
 	//=============================common============================
 	/**
 	 * 指定缓存失效时间

+ 49 - 8
mall-service/src/main/java/com/txz/mall/core/UserUtil.java

@@ -2,14 +2,20 @@ package com.txz.mall.core;
 
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.api.R;
 import com.txz.mall.core.cache.CacheKey;
 import com.txz.mall.core.cache.CacheType;
+import com.txz.mall.util.EasyToUseUtil;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
+import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.util.Set;
 
 /**
  * @Date: 2019/10/10 10:12
@@ -19,13 +25,41 @@ import javax.servlet.http.HttpServletRequest;
 public class UserUtil {
 
     @Resource
-    private RedisUtil redisUtil;
+    private  RedisUtil redisUtil;
 
 //    @Resource
 //    private UserService userService;
 
 
-    public JSONObject getTokenUser(HttpServletRequest request) {
+    private static UserUtil instance;
+
+    // 3. 私有化构造器,防止被实例化
+    private UserUtil() {}
+
+    // 4. 初始化时将实例赋值给静态变量,使静态方法能访问注入的资源
+    @PostConstruct
+    public void init() {
+        instance = this;
+    }
+
+
+    /**
+     * {"id":1,"name":"admin",
+     * "loginAccount":"admin",
+     * "password":"51D0DBF9A1A4A103AC3270B5C67E5E0A",
+     * "salt":"q3VNUI1341h",
+     * "phoneNo":"17682302017",
+     * "email":"1",
+     * "status":"0",
+     * "createTime":1504681409000,
+     * "updateTime":1583286557000,
+     * "createUserId":"1",
+     * "updateUserId":"admin",
+     * "token":"f3813140-f2a4-457b-8382-e3e049bfe705"}
+     * @param request
+     * @return
+     */
+    public static JSONObject getTokenUser(HttpServletRequest request) {
         if (request == null){
             ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
             if (null != sra) {
@@ -34,13 +68,20 @@ public class UserUtil {
                 return null;
             }
         }
+//        instance.redisUtil.set("888","777");
+//
+//
+//
+//        Object o = instance.redisUtil.get("888");
+
         String token = request.getHeader("accessToken");
-        CacheKey key = CacheKey.generateKey(CacheType.UserConfig, token);
-        Object user = redisUtil.get(key.toString());
-        if (user != null) {
-            return (JSONObject) JSONObject.toJSON(user);
-            //return JSONUtil.toBean(user.toString(), User.class);
+
+        String key ="backstage_UserConfig_"+token;
+      //  CacheKey key = CacheKey.generateKey(CacheType.UserConfig, token);
+        Object user = instance.redisUtil.get(key);
+        if (ObjectUtils.isEmpty(user)) {
+            throw new ServiceException("用户未登陆");
         }
-        return null;
+        return (JSONObject) JSONObject.toJSON(user);
     }
 }