From a0b557cea10d01830cb4e70ebc58410b995c5bd8 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期四, 19 十二月 2024 16:00:37 +0800
Subject: [PATCH] 1

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java |    4 ++++
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserStatistics.java     |   14 ++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserStatistics.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserStatistics.java
index f265ccb..1c3052c 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserStatistics.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserStatistics.java
@@ -1,61 +1,75 @@
 package com.ruoyi.account.vo;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 @Data
+@ApiModel("用户统计")
 public class UserStatistics {
     /**
      * 用户总数
      */
+    @ApiModelProperty(value = "用户总数")
     private Integer totalUser;
 
     /**
      * 拥有门店用户数
      */
+    @ApiModelProperty(value = "拥有门店用户数")
     private Integer shopUser;
 
     /**
      * 消费者用户数
      */
+    @ApiModelProperty(value = "消费者用户数")
     private Integer consumerUser;
 
     /**
      * 普通会员数
      */
+    @ApiModelProperty(value = "普通会员数")
     private Integer commonUser;
 
     /**
      * 黄金会员数
      */
+    @ApiModelProperty(value = "黄金会员数")
     private Integer goldUser;
 
     /**
      * 钻石会员数
      */
+    @ApiModelProperty(value = "钻石会员数")
     private Integer diamondUser;
 
     /**
      * 创业者总数
      */
+    @ApiModelProperty(value = "创业者总数")
     private Integer entrepreneurUser;
 
     /**
      * 准代理数
      */
+    @ApiModelProperty(value = "准代理数")
     private Integer proxyUser;
 
     /**
      * 代理数
      */
+    @ApiModelProperty(value = "代理数")
     private Integer agentUser;
 
     /**
      * 总代数
      */
+    @ApiModelProperty(value = "总代数")
     private Integer totalAgentUser;
 
     /**
      * 合伙人数
      */
+    @ApiModelProperty(value = "合伙人数")
     private Integer partnerUser;
 }
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
index 05e9132..872988e 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -116,6 +116,10 @@
     @PutMapping("/editShop")
     @ApiOperation(value = "门店管理-编辑门店", tags = {"管理后台-门店管理"})
     public R<Void> editShop(@RequestBody Shop shop){
+        String phone = shop.getPhone();
+        if (!shopService.cheUserByPhone(phone)) {
+            return R.fail("该手机号未注册");
+        }
         shopService.updateById(shop);
         return R.ok();
     }

--
Gitblit v1.7.1