From db048fa114cbad7708c17c1d75639d9e06271011 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 24 十一月 2022 17:18:27 +0800
Subject: [PATCH] #feat 调试问题修改

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java |  121 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 106 insertions(+), 15 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java
index 6580a2b..6127ca3 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java
@@ -4,11 +4,13 @@
 import com.panzhihua.applets.weixin.CheckService;
 import com.panzhihua.common.controller.BaseController;
 import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
+import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO;
 import com.panzhihua.common.model.dtos.shop.*;
 import com.panzhihua.common.model.vos.LoginUserInfoVO;
 import com.panzhihua.common.model.vos.R;
 import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO;
 import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
+import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO;
 import com.panzhihua.common.model.vos.shop.*;
 import com.panzhihua.common.service.community.CommunityService;
 import com.panzhihua.common.validated.AddGroup;
@@ -66,11 +68,13 @@
     public R shopGoodsDetail(@RequestParam("goodsId") Long goodsId) {
         return communityService.shopFlowerGoodsDetail(goodsId);
     }
+
     @ApiOperation(value = "删除商品")
     @DeleteMapping("/goods/delete")
     public R deleteShopGoods(@RequestParam("goodsId") Long goodsId) {
         return communityService.deleteFlowerShopGoods(goodsId);
     }
+
     @ApiOperation(value = "商品上下架")
     @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "商品Id"),
             @ApiImplicitParam(name = "status", value = "1.上架  2.下架 ")})
@@ -78,12 +82,14 @@
     public R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
         return communityService.changeFlowerStatus(id, status);
     }
+
     @ApiOperation(value = "编辑商品")
     @PostMapping("/goods/edit/{id}")
     public R editShopGoods(@PathVariable("id") Long id,
                            @RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
         return communityService.editFlowerShopGoods(id, addShopGoodsVO);
     }
+
     @ApiOperation(value = "新增商品")
     @PostMapping("/goods/save")
     public R saveShopGoods(@RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
@@ -124,7 +130,7 @@
     }
 
     @ApiOperation(value = "删除用户收货地址列表")
-    @PostMapping("shopDelUserAddress")
+    @DeleteMapping("shopDelUserAddress")
     @ApiImplicitParam(name = "addressId", value = "收货地址id", required = true)
     public R shopDelUserAddress(@RequestParam("addressId") Long addressId) {
         return communityService.shopFlowerDelUserAddress(addressId);
@@ -154,7 +160,7 @@
         return communityService.orderCreateFlower(orderCreateDTO);
     }
 
-    @ApiOperation(value = "分页查询订单列表", response = ComShopOrderPageVO.class)
+    @ApiOperation(value = "分页查询订单列表", response = ComShopFlowerOrderPageVO.class)
     @PostMapping("pageOrderList")
     public R pageOrderList(@RequestBody PageComFlowerOrderListDTO comOrderListDTO) {
         LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
@@ -165,8 +171,8 @@
         return communityService.pageOrderListFlower(comOrderListDTO);
     }
 
-    @ApiOperation(value = "查询订单详情", response = ComShopOrderPageVO.class)
-    @PostMapping("orderDetail")
+    @ApiOperation(value = "查询订单详情", response = ComShopFlowerOrderPageVO.class)
+    @GetMapping("orderDetail")
     @ApiImplicitParam(name = "orderId", value = "订单id", required = true)
     public R orderDetail(@RequestParam("orderId") Long orderId) {
         return communityService.orderDetailFlower(orderId);
@@ -183,10 +189,10 @@
     }
 
     @ApiOperation(value = "删除订单")
-    @PostMapping("orderDelete")
+    @DeleteMapping("orderDelete")
     @ApiImplicitParam(name = "orderId", value = "订单id", required = true)
     public R orderDelete(@RequestParam("orderId") Long orderId) {
-        return communityService.orderDelete(orderId);
+        return communityService.orderDeleteFlower(orderId);
     }
 
     @ApiOperation(value = "订单确认收货")
@@ -236,11 +242,12 @@
     public R saveEvaluate(@RequestBody ComShopFlowerEvaluateDTO comShopFlowerEvaluateDTO) {
         String evaluateContent = comShopFlowerEvaluateDTO.getEvaluateContent();
         if (StrUtil.isNotBlank(evaluateContent)) {
-            String result = checkService.checkMessageBy(evaluateContent,this.getLoginUserInfo().getOpenid(),this.getAppId());
+            String result = checkService.checkMessageBy(evaluateContent, this.getLoginUserInfo().getOpenid(), this.getAppId());
             if (StrUtil.isNotBlank(result)) {
                 return R.fail(501, "填写内容存在 " + result + " 违规信息");
             }
         }
+        comShopFlowerEvaluateDTO.setUserId(this.getUserId());
         return communityService.saveEvaluate(comShopFlowerEvaluateDTO);
     }
 
@@ -365,60 +372,144 @@
 
     /**
      * 查询我的店铺各类统计数据
+     *
      * @param storeId
      * @return
      */
     @ApiOperation(value = "查询我的店铺各类统计数据")
     @GetMapping("/selectCountByStoreId")
-    public R selectCountByStoreId(Long storeId){
-        return communityService.selectCountByStoreId(storeId);
+    public R selectCountByUserId(Long storeId) {
+        return communityService.selectCountByUserId(storeId);
     }
 
 
     /**
      * 创建退款订单
+     *
      * @param comShopFlowerRefundOrderDTO
      * @return
      */
     @PostMapping("createRefundOrder")
     @ApiOperation(value = "创建退款订单")
-    public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){
+    public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) {
+        comShopFlowerRefundOrderDTO.setUserId(this.getUserId());
         return communityService.createRefundOrder(comShopFlowerRefundOrderDTO);
     }
 
     /**
      * 用户 分页查询退款订单
+     *
      * @param pageComOrderRefundDTO
      * @return
      */
     @PostMapping("pageRefundOrder")
-    @ApiOperation(value = "退款订单分页查询 用户",response = ComShopFlowerRefundOrderVO.class)
-    public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){
-        pageComOrderRefundDTO.setUserId(this.getUserId());
+    @ApiOperation(value = "退款订单分页查询 用户", response = ComShopFlowerRefundOrderVO.class)
+    public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO) {
+        if (null == pageComOrderRefundDTO.getStoreId()){
+            pageComOrderRefundDTO.setUserId(this.getUserId());
+        }
         return communityService.pageRefundOrder(pageComOrderRefundDTO);
     }
 
     /**
      * 修改退款订单
+     *
      * @param comShopFlowerRefundOrderDTO
      * @return
      */
     @PostMapping("updateRefundOrder")
     @ApiOperation(value = "修改退款订单")
-    public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){
+    public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) {
         return communityService.updateRefundOrder(comShopFlowerRefundOrderDTO);
     }
 
 
     /**
      * 商家后台-退款申请统计
+     *
      * @param storeId
      * @return
      */
     @GetMapping("selectCountGroupStatus")
     @ApiOperation(value = "商家后台-退款申请统计")
-    public R selectCountGroupStatus(Long storeId){
+    public R selectCountGroupStatus(Long storeId) {
         return communityService.selectCountGroupStatus(storeId);
     }
 
+    @ApiOperation(value = "商品分类")
+    @GetMapping("/goodsCategory/getAllGoodsCategories")
+    public R getAllGoodsCategories() {
+        return communityService.getAllGoodsCategories();
+    }
+
+    @ApiOperation(value = "分页查询便民服务分类", response = ConvenientServiceCategoryVO.class)
+    @PostMapping("/service-category/page")
+    public R pageServiceCategory(@RequestBody PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO) {
+        pageConvenientServiceCategoryDTO.setAreaCode(this.getAreaCode());
+        return communityService.pageServiceCategory(pageConvenientServiceCategoryDTO);
+    }
+
+    /**
+     * 新增商品浏览量
+     *
+     * @param goodsId
+     * @return
+     */
+    @GetMapping("incrGoodsView")
+    @ApiOperation(value = "新增商品浏览量")
+    public R incrGoodsView(@RequestParam("goodsId") Long goodsId) {
+        return communityService.incrGoodsView(goodsId);
+    }
+
+    @ApiOperation(value = "增加商家咨询量")
+    @GetMapping("/merchant/incr-consult")
+    public R incrMerchantConsult(@RequestParam("merchantId") Long merchantId) {
+        return communityService.consultMerchant(merchantId);
+    }
+
+    @ApiOperation(value = "增加商家浏览量")
+    @GetMapping("/merchant/incr-view")
+    public R incrMerchantView(@RequestParam("merchantId") Long merchantId) {
+        return communityService.incrMerchantView(merchantId);
+    }
+
+    @ApiOperation(value = "出入账分页", response = ComShopFlowerOrderPayVO.class)
+    @PostMapping("pageOrderPay")
+    public R pageOrderPay(@RequestBody PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO) {
+        return communityService.pageOrderPay(pageComShopFlowerOrderPayDTO);
+    }
+
+    /**
+     * 获取商家的营业额和可结算金额
+     * @param storeId
+     * @return
+     */
+    @ApiOperation(value = "获取商家的营业额和可结算金额")
+    @GetMapping("getQuota")
+    public R getQuota(@RequestParam("storeId") Long storeId){
+        return communityService.getQuota(storeId);
+    }
+
+    /**
+     * 取消退款
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "取消退款")
+    @GetMapping("refundOrderCancel")
+    public R refundOrderCancel(@RequestParam("id") Long id){
+        return communityService.refundOrderCancel(id);
+    }
+
+    /**
+     * 退款订单详情
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "退款订单详情",response = ComShopFlowerRefundOrderVO.class)
+    @GetMapping("refundOrderDetail")
+    public R refundOrderDetail(Long id){
+        return communityService.refundOrderDetail(id);
+    }
+
 }

--
Gitblit v1.7.1