‘linchangsheng’ 5 mēneši atpakaļ
vecāks
revīzija
f5548c4ba2

+ 16 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/websit/AdminWebsitApplyCount.java

@@ -0,0 +1,16 @@
+package com.gree.mall.miniapp.bean.websit;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel
+public class AdminWebsitApplyCount {
+
+    @ApiModelProperty("待审批")
+    private Integer dsh;
+
+    @ApiModelProperty("已入驻")
+    private Integer yrz;
+}

+ 8 - 14
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/controller/user/UserController.java

@@ -7,6 +7,7 @@ import com.gree.mall.miniapp.bean.Page;
 import com.gree.mall.miniapp.bean.common.WxJsApiSignBean;
 import com.gree.mall.miniapp.bean.settle.OrderShareBean;
 import com.gree.mall.miniapp.bean.user.*;
+import com.gree.mall.miniapp.bean.websit.AdminWebsitApplyCount;
 import com.gree.mall.miniapp.constant.Constant;
 import com.gree.mall.miniapp.exception.RemoteServiceException;
 import com.gree.mall.miniapp.helper.ResponseHelper;
@@ -247,22 +248,15 @@ public class UserController {
     }
 
 
-/*    @GetMapping("/apply/websit")
+    @GetMapping("/apply/websitCount")
     @ApiOperation("入驻的网点列表")
-    public ResponseHelper<List<AdminWebsitApplyBean>> applyWebsitList(
-            @ApiParam(value = "是否查询所有可入驻网点(不包含入驻网点)",required = false) @RequestParam(required = false) Boolean isAll,
-            @ApiParam(value = "是否为增置服务网点",required = false) @RequestParam(required = false) Boolean isIncre,
-            @ApiParam(value = "(WAIT=入驻待审核 WAIT_WORKER 待师傅购买  POLICY_WAIT 保险待审核  OK=通过 FAIL=驳回EXPIRED 证件快过期  OVERDUE 证件已过期 STOP 暂停 QUIT 已离职)",required = false)
-            @RequestParam(required = false) List<String> examineStatus,
-            @ApiParam(value = "增值服务ID",required = false) @RequestParam(required = false) String increId,
-            @ApiParam(value = "经度",required = false) @RequestParam(required = false) String lng,
-            @ApiParam(value = "纬度",required = false) @RequestParam(required = false) String lat,
-            @ApiParam(value = "单位米,距离",required = false) @RequestParam(required = false) Integer rice,
-            @ApiParam(value = "网点名称",required = false) @RequestParam(required = false) String websitName
+    public ResponseHelper<AdminWebsitApplyCount> applyWebsitList(
+
     ){
-        List<AdminWebsitApplyBean> adminWebsitApplyBeans = userLogic.websitList(rice,websitName,isAll,increId,isIncre,lng,lat,examineStatus);
-        return ResponseHelper.success(adminWebsitApplyBeans);
-    }*/
+        AdminWebsitApplyCount adminWebsitApplyCount = userLogic
+                .websitCount();
+        return ResponseHelper.success(adminWebsitApplyCount);
+    }
 
     @PostMapping("/default/websit")
     @ApiOperation(value = "设置默认网点")

+ 21 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/user/UserLogic.java

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gree.mall.miniapp.bean.common.WechatOpenBean;
 import com.gree.mall.miniapp.bean.settle.OrderShareBean;
 import com.gree.mall.miniapp.bean.user.*;
+import com.gree.mall.miniapp.bean.websit.AdminWebsitApplyCount;
 import com.gree.mall.miniapp.bean.websit.WebsitVO;
 import com.gree.mall.miniapp.commonmapper.CommonMapper;
 import com.gree.mall.miniapp.commonmapper.MyProfitMapper;
@@ -1577,4 +1578,24 @@ public class UserLogic {
         user.setMobile(phone).updateById();
 
     }
+
+    public AdminWebsitApplyCount websitCount() {
+        CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
+
+        Integer yrz = websitUserService.lambdaQuery()
+                .eq(WebsitUser::getUserId, currentCompanyWechat.getUserId())
+                .notIn(WebsitUser::getExamineStatus, "OK")
+                .count();
+
+        Integer dsh = websitUserService.lambdaQuery()
+                .eq(WebsitUser::getUserId, currentCompanyWechat.getUserId())
+                .notIn(WebsitUser::getExamineStatus, "OK")
+                .count();
+
+        AdminWebsitApplyCount adminWebsitApplyCount = new AdminWebsitApplyCount();
+        adminWebsitApplyCount.setYrz(yrz);
+        adminWebsitApplyCount.setDsh(dsh);
+        return adminWebsitApplyCount;
+
+    }
 }

+ 1 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/common/WechatLogic.java

@@ -1250,6 +1250,7 @@ public class WechatLogic {
             log.info("商户扫码支付生成订单响应: {}", payResult);
         } catch (WxPayException e) {
             log.error("商户扫码支付失败: {}", payResult);
+            log.error("商户扫码支付失败: {}", e.toString());
             throw new RemoteServiceException("扫码支付失败,请刷新二维码,再次尝试扫码");
         }
         if (payResult == null || WxPayConstants.ResultCode.FAIL.equals(payResult.getReturnCode())) {