Explorar o código

Merge remote-tracking branch 'origin/developer' into developer

# Conflicts:
#	pom.xml
#	src/main/java/com/caimei/controller/wechat/WxAuthApi.java
zhijiezhao %!s(int64=2) %!d(string=hai) anos
pai
achega
0f95ae98a3
Modificáronse 100 ficheiros con 5540 adicións e 492 borrados
  1. 11 4
      pom.xml
  2. 27 0
      src/main/java/com/caimei/annotation/Idempotent.java
  3. 103 0
      src/main/java/com/caimei/annotation/IdempotentAspect.java
  4. 19 0
      src/main/java/com/caimei/annotation/IdempotentException.java
  5. 26 0
      src/main/java/com/caimei/annotation/IdempotentExceptionHandler.java
  6. 30 0
      src/main/java/com/caimei/annotation/Statistics.java
  7. 106 0
      src/main/java/com/caimei/annotation/StatisticsAspect.java
  8. 6 2
      src/main/java/com/caimei/config/ApiConfig.java
  9. 8 2
      src/main/java/com/caimei/config/ApiInterceptor.java
  10. 61 5
      src/main/java/com/caimei/config/GlobalTokenAspect.java
  11. 69 0
      src/main/java/com/caimei/config/RedisCacheConfig.java
  12. 1 1
      src/main/java/com/caimei/config/WxApiInterceptor.java
  13. 7 1
      src/main/java/com/caimei/controller/admin/auth/AddressApi.java
  14. 54 19
      src/main/java/com/caimei/controller/admin/auth/AuthApi.java
  15. 37 14
      src/main/java/com/caimei/controller/admin/auth/AuthClubApi.java
  16. 38 18
      src/main/java/com/caimei/controller/admin/auth/AuthProductApi.java
  17. 89 0
      src/main/java/com/caimei/controller/admin/auth/AuthTemplateApi.java
  18. 6 8
      src/main/java/com/caimei/controller/admin/auth/DefaultApi.java
  19. 1 1
      src/main/java/com/caimei/controller/admin/auth/DoctorApi.java
  20. 3 3
      src/main/java/com/caimei/controller/admin/auth/DownloadApi.java
  21. 63 0
      src/main/java/com/caimei/controller/admin/auth/LogisticsApi.java
  22. 20 4
      src/main/java/com/caimei/controller/admin/auth/ShopApi.java
  23. 1 1
      src/main/java/com/caimei/controller/admin/auth/UploadApi.java
  24. 1 6
      src/main/java/com/caimei/controller/admin/auth/UserApi.java
  25. 1 1
      src/main/java/com/caimei/controller/admin/data/ArticleApi.java
  26. 1 1
      src/main/java/com/caimei/controller/admin/data/FileApi.java
  27. 1 1
      src/main/java/com/caimei/controller/admin/data/ImageApi.java
  28. 3 2
      src/main/java/com/caimei/controller/admin/data/VideoApi.java
  29. 1 3
      src/main/java/com/caimei/controller/admin/pay/PayApi.java
  30. 1 1
      src/main/java/com/caimei/controller/admin/sys/SysMenuApi.java
  31. 1 1
      src/main/java/com/caimei/controller/admin/sys/SysRoleApi.java
  32. 1 3
      src/main/java/com/caimei/controller/admin/sys/SysUserApi.java
  33. 1 2
      src/main/java/com/caimei/controller/admin/vip/VipApi.java
  34. 21 8
      src/main/java/com/caimei/controller/wechat/LoginApi.java
  35. 88 0
      src/main/java/com/caimei/controller/wechat/RegisterApi.java
  36. 63 0
      src/main/java/com/caimei/controller/wechat/WxAddressApi.java
  37. 159 15
      src/main/java/com/caimei/controller/wechat/WxAuthApi.java
  38. 99 0
      src/main/java/com/caimei/controller/wechat/WxUploadApi.java
  39. 99 0
      src/main/java/com/caimei/controller/wechat/WxUserApi.java
  40. 0 1
      src/main/java/com/caimei/mapper/cmMapper/AddressMapper.java
  41. 34 2
      src/main/java/com/caimei/mapper/cmMapper/AuthMapper.java
  42. 17 8
      src/main/java/com/caimei/mapper/cmMapper/AuthProductMapper.java
  43. 34 0
      src/main/java/com/caimei/mapper/cmMapper/AuthTemplateMapper.java
  44. 14 3
      src/main/java/com/caimei/mapper/cmMapper/ClubMapper.java
  45. 3 0
      src/main/java/com/caimei/mapper/cmMapper/FileMapper.java
  46. 31 0
      src/main/java/com/caimei/mapper/cmMapper/LogisticsMapper.java
  47. 1 1
      src/main/java/com/caimei/mapper/cmMapper/ShopMapper.java
  48. 2 0
      src/main/java/com/caimei/mapper/cmMapper/SystemMapper.java
  49. 53 20
      src/main/java/com/caimei/model/dto/ProductSaveDto.java
  50. 5 0
      src/main/java/com/caimei/model/dto/ShopInfoDto.java
  51. 1 0
      src/main/java/com/caimei/model/en/QrCodeSize.java
  52. 62 0
      src/main/java/com/caimei/model/po/CertificateLogisticsPo.java
  53. 15 0
      src/main/java/com/caimei/model/po/ClubUserPo.java
  54. 90 0
      src/main/java/com/caimei/model/po/CmBrandAuthPo.java
  55. 38 1
      src/main/java/com/caimei/model/po/ProductPo.java
  56. 31 0
      src/main/java/com/caimei/model/po/ProductTypePo.java
  57. 2 0
      src/main/java/com/caimei/model/po/TownPo.java
  58. 5 0
      src/main/java/com/caimei/model/po/VideoPo.java
  59. 126 13
      src/main/java/com/caimei/model/vo/AuthFormVo.java
  60. 121 0
      src/main/java/com/caimei/model/vo/AuthProductVo.java
  61. 25 0
      src/main/java/com/caimei/model/vo/AuthVo.java
  62. 69 0
      src/main/java/com/caimei/model/vo/CertificateLogisticsVo.java
  63. 3 0
      src/main/java/com/caimei/model/vo/ClubUserVo.java
  64. 33 0
      src/main/java/com/caimei/model/vo/LogisticsCompanyVo.java
  65. 64 13
      src/main/java/com/caimei/model/vo/ProductFormVo.java
  66. 13 0
      src/main/java/com/caimei/model/vo/ProductListVo.java
  67. 80 0
      src/main/java/com/caimei/model/vo/RossAddressVo.java
  68. 21 0
      src/main/java/com/caimei/model/vo/RouterVo.java
  69. 5 0
      src/main/java/com/caimei/model/vo/ShopInfoVo.java
  70. 15 0
      src/main/java/com/caimei/model/vo/StatementFileVo.java
  71. 73 0
      src/main/java/com/caimei/model/vo/TemplateVo.java
  72. 3 0
      src/main/java/com/caimei/model/vo/VideoListVo.java
  73. 9 0
      src/main/java/com/caimei/model/vo/WxClubUserVo.java
  74. 3 0
      src/main/java/com/caimei/model/vo/WxProductListVo.java
  75. 3 0
      src/main/java/com/caimei/model/vo/WxVideoListVo.java
  76. 2 2
      src/main/java/com/caimei/service/auth/AddressService.java
  77. 15 3
      src/main/java/com/caimei/service/auth/AuthClubService.java
  78. 16 5
      src/main/java/com/caimei/service/auth/AuthProductService.java
  79. 28 19
      src/main/java/com/caimei/service/auth/AuthService.java
  80. 53 0
      src/main/java/com/caimei/service/auth/AuthTemplateService.java
  81. 31 0
      src/main/java/com/caimei/service/auth/LogisticsService.java
  82. 8 1
      src/main/java/com/caimei/service/auth/ShopService.java
  83. 1975 0
      src/main/java/com/caimei/service/auth/impl/AddressServiceImpl.java
  84. 11 2
      src/main/java/com/caimei/service/auth/impl/ArticleServiceImpl.java
  85. 48 9
      src/main/java/com/caimei/service/auth/impl/AuthClubServiceImpl.java
  86. 245 105
      src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java
  87. 232 114
      src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java
  88. 94 0
      src/main/java/com/caimei/service/auth/impl/AuthTemplateServiceImpl.java
  89. 31 4
      src/main/java/com/caimei/service/auth/impl/DownloadServiceImpl.java
  90. 93 0
      src/main/java/com/caimei/service/auth/impl/LogisticsServiceImpl.java
  91. 35 6
      src/main/java/com/caimei/service/auth/impl/ShopServiceImpl.java
  92. 1 1
      src/main/java/com/caimei/service/data/VideoService.java
  93. 11 2
      src/main/java/com/caimei/service/data/impl/FileServiceImpl.java
  94. 11 2
      src/main/java/com/caimei/service/data/impl/ImageServiceImpl.java
  95. 16 3
      src/main/java/com/caimei/service/data/impl/VideoServiceImpl.java
  96. 32 3
      src/main/java/com/caimei/service/sys/impl/SysRoleServiceImpl.java
  97. 11 2
      src/main/java/com/caimei/service/wechat/LoginService.java
  98. 23 0
      src/main/java/com/caimei/service/wechat/RegisterService.java
  99. 35 0
      src/main/java/com/caimei/service/wechat/WxUserService.java
  100. 52 20
      src/main/java/com/caimei/service/wechat/impl/LoginServiceImpl.java

+ 11 - 4
pom.xml

@@ -145,21 +145,21 @@
             <version>1.26.1-RELEASE</version>
         </dependency>
         <!--引入商品模块-->
-        <dependency>
+        <!--<dependency>
             <groupId>com.caimei.module</groupId>
             <artifactId>product</artifactId>
             <version>0.0.1-SNAPSHOT</version>
-        </dependency>
+        </dependency>-->
         <dependency>
             <groupId>org.bouncycastle</groupId>
             <artifactId>bcprov-jdk16</artifactId>
             <version>1.46</version>
         </dependency>
-        <dependency>
+        <!--<dependency>
             <groupId>com.caimei.module</groupId>
             <artifactId>pay</artifactId>
             <version>0.0.1-SNAPSHOT</version>
-        </dependency>
+        </dependency>-->
         <!-- 对 HTML 富文本文档进行解析和操作 -->
         <dependency>
             <groupId>org.jsoup</groupId>
@@ -325,6 +325,13 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-mongodb</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>com.twelvemonkeys.imageio</groupId>
+            <artifactId>imageio-jpeg</artifactId>
+            <version>3.4.1</version>
+        </dependency>
+
     </dependencies>
 
     <profiles>

+ 27 - 0
src/main/java/com/caimei/annotation/Idempotent.java

@@ -0,0 +1,27 @@
+package com.caimei.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 自定义幂等注解
+ *
+ * @author : Charles
+ * @date : 2021/2/26
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Idempotent {
+    /**
+     * 前缀属性,作为redis缓存Key的一部分。
+     */
+    String prefix() default "idempotent_";
+    /**
+     * 需要的参数名数组
+     */
+    String[] keys();
+    /**
+     * 幂等过期时间(秒),即:在此时间段内,对API进行幂等处理。
+     */
+    int expire() default 3;
+}

+ 103 - 0
src/main/java/com/caimei/annotation/IdempotentAspect.java

@@ -0,0 +1,103 @@
+package com.caimei.annotation;
+
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.expression.EvaluationContext;
+import org.springframework.expression.Expression;
+import org.springframework.expression.ExpressionParser;
+import org.springframework.expression.spel.standard.SpelExpressionParser;
+import org.springframework.expression.spel.support.StandardEvaluationContext;
+import org.springframework.stereotype.Component;
+import redis.clients.jedis.commands.JedisCommands;
+import redis.clients.jedis.params.SetParams;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+
+/**
+ * 幂等切面
+ *
+ * @author : Charles
+ * @date : 2021/2/26
+ */
+@Slf4j
+@Aspect
+@Component
+@ConditionalOnClass(RedisTemplate.class)
+public class IdempotentAspect {
+
+    private static final String LOCK_SUCCESS = "OK";
+
+    @Resource
+    private RedisTemplate<String,String> redisTemplate;
+
+    /**
+     * 切入点,根据自定义Idempotent实际路径进行调整
+     */
+    @Pointcut("@annotation(com.caimei.annotation.Idempotent)")
+    public void executeIdempotent() {
+    }
+
+    @Around("executeIdempotent()")
+    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
+        // 获取参数对象列表
+        Object[] args = joinPoint.getArgs();
+      	//获取方法
+        Method method = ((MethodSignature) joinPoint.getSignature()).getMethod();
+        // 得到方法名
+        String methodName = method.getName();
+        // 获取参数名称数组
+        String[] parameters = new LocalVariableTableParameterNameDiscoverer().getParameterNames(method);
+
+      	//获取幂等注解
+        Idempotent idempotent = method.getAnnotation(Idempotent.class);
+
+        // 初始化springEL表达式解析器实例
+        ExpressionParser parser = new SpelExpressionParser();
+        // 初始化解析内容上下文
+        EvaluationContext context = new StandardEvaluationContext();
+        // 把参数名和参数值放入解析内容上下文里
+        for (int i = 0; i < parameters.length; i++) {
+            if (args[i] != null) {
+                // 添加解析对象目标
+                context.setVariable(parameters[i], args[i].hashCode());
+            }
+        }
+        // 解析定义key对应的值,拼接成key
+        StringBuilder idempotentKey = new StringBuilder(idempotent.prefix() + ":" + methodName);
+        for (String s : idempotent.keys()) {
+            // 解析对象
+            Expression expression = parser.parseExpression(s);
+            // 根据参数生成唯一标识,拼接到key上
+            idempotentKey.append(":").append(expression.getValue(context));
+        }
+        // 通过 setnx 确保只有一个接口能够正常访问
+        String result = redisTemplate.execute(
+            (RedisCallback<String>) connection -> (
+                (JedisCommands) connection.getNativeConnection()
+            ).set(
+                idempotentKey.toString(),
+                idempotentKey.toString(),
+                new SetParams().nx().ex(idempotent.expire())
+            )
+        );
+
+        if (LOCK_SUCCESS.equals(result)) {
+            return joinPoint.proceed();
+        } else {
+            log.error("API幂等处理, key=" + idempotentKey);
+            throw new IdempotentException("手速太快了,稍后重试!");
+        }
+    }
+}
+

+ 19 - 0
src/main/java/com/caimei/annotation/IdempotentException.java

@@ -0,0 +1,19 @@
+package com.caimei.annotation;
+
+/**
+ * 处理幂等相关异常
+ *
+ * @author : Charles
+ * @date : 2021/2/26
+ */
+public class IdempotentException extends RuntimeException {
+
+    public IdempotentException(String message) {
+        super(message);
+    }
+
+    @Override
+    public String getMessage() {
+        return super.getMessage();
+    }
+}

+ 26 - 0
src/main/java/com/caimei/annotation/IdempotentExceptionHandler.java

@@ -0,0 +1,26 @@
+package com.caimei.annotation;
+
+
+import com.caimei.model.ResponseJson;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ * ApI幂等异常处理
+ *
+ * @author : Charles
+ * @date : 2021/3/29
+ */
+@Slf4j
+@ControllerAdvice
+public class IdempotentExceptionHandler {
+    @ExceptionHandler(IdempotentException.class)
+    @ResponseBody
+    public ResponseJson convertExceptionMsg(Exception e) {
+        //自定义逻辑,可返回其他值
+        log.error("ApI幂等错误拦截,错误信息:", e);
+        return ResponseJson.error("幂等异常处理:" + e.getMessage());
+    }
+}

+ 30 - 0
src/main/java/com/caimei/annotation/Statistics.java

@@ -0,0 +1,30 @@
+package com.caimei.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 自定义统计注解
+ *
+ * @author : Charles
+ * @date : 2021/12/29
+ */
+// @Target 指定注解作用的地方:方法,变量,类
+@Target(ElementType.METHOD)
+// @Retention 生命周期
+@Retention(RetentionPolicy.RUNTIME)
+// @Documented 是否能随着被定义的java文件生成到JavaDoc文档当中 (非必填)
+@Documented
+public @interface Statistics {
+    /**
+     * 前缀属性,作为redis缓存Key的一部分。
+     */
+    String prefix() default "statistics_";
+    /**
+     * 需要的参数名
+     */
+    String field();
+    /**
+     * 过期时间(秒),默认两天 60*60*24*2 = 172800
+     */
+    int expire() default 172800;
+}

+ 106 - 0
src/main/java/com/caimei/annotation/StatisticsAspect.java

@@ -0,0 +1,106 @@
+package com.caimei.annotation;
+
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+import redis.clients.jedis.commands.JedisCommands;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+
+/**
+ * 统计切面
+ *
+ * @author : Charles
+ * @date : 2021/12/29
+ */
+@Slf4j
+@Aspect
+@Component
+@ConditionalOnClass(RedisTemplate.class)
+public class StatisticsAspect {
+    @Resource
+    private RedisTemplate<String,String> redisTemplate;
+
+    /**
+     * 切入点,根据自定义Statistics实际路径进行调整
+     */
+    @Pointcut("@annotation(com.caimei.annotation.Statistics)")
+    public void executeStatistics() {}
+
+    @Around("executeStatistics()")
+    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
+        // 获取方法
+        Method method = ((MethodSignature) joinPoint.getSignature()).getMethod();
+        // 获取参数名数组
+        String[] parameters = new LocalVariableTableParameterNameDiscoverer().getParameterNames(method);
+        // 获取参数值列表
+        Object[] args = joinPoint.getArgs();
+        // 获取自定义注解
+        Statistics statistics = method.getAnnotation(Statistics.class);
+        String prefix = statistics.prefix();
+        String field = statistics.field();
+        int expire = statistics.expire();
+        String fieldKey = null;
+        boolean contains = null != parameters && Arrays.asList(parameters).contains(field);
+        if (contains) {
+            for (int i = 0; i < parameters.length; i++) {
+                if (parameters[i] != null && parameters[i].equals(field)) {
+                    fieldKey = args[i].toString();
+                }
+            }
+        }
+        if (null != fieldKey) {
+            // 当前日期串
+            String dateStr = new SimpleDateFormat("yyyyMMdd").format(new Date());
+            // 拼接redisKey
+            String redisKey = prefix + ":" + field + ":" + dateStr;
+            // 获取Redis已有的统计值 + 1
+            int count = getHash(redisKey, fieldKey) + 1;
+            // 设置统计数量 + 1, 过期时间默认两天,(后面定时任务每天凌晨把前一天统计量存入数据库(按天存))
+            setHash(redisKey, fieldKey, count, expire);
+        }
+        return joinPoint.proceed();
+    }
+
+    /**
+     * 获取Redis中hash对应的统计值
+     */
+    public Integer getHash(String key, String fieldKey) {
+        String result = redisTemplate.execute(
+                (RedisCallback<String>) connection -> (
+                        (JedisCommands) connection.getNativeConnection()
+                ).hget(key, fieldKey)
+        );
+        return result == null ? 0 : Integer.parseInt(result);
+    }
+
+    /**
+     * 添加/更新Redis中hash的值
+     */
+    public void setHash(String key, String fieldKey, int count, int expire) {
+        String value = Integer.toString(count);
+        redisTemplate.execute(
+                (RedisCallback<Object>) connection -> (
+                        (JedisCommands) connection.getNativeConnection()
+                ).hset(key, fieldKey, value)
+        );
+        // 设置超时时间 (秒)
+        redisTemplate.execute(
+                (RedisCallback<Object>) connection -> (
+                        (JedisCommands) connection.getNativeConnection()
+                ).expire(key, expire)
+        );
+    }
+}

+ 6 - 2
src/main/java/com/caimei/config/ApiConfig.java

@@ -31,10 +31,14 @@ public class ApiConfig implements WebMvcConfigurer {
 //                .addPathPatterns("/upload/**")
                 .addPathPatterns("/user/update/password")
                 .addPathPatterns("/data/**")
+                .addPathPatterns("/sys/**")
+                .addPathPatterns("/vip/**")
                 .excludePathPatterns("/auth/export/excel");
         registry.addInterceptor(wxApiInterceptor)
                 .addPathPatterns("/wx/data/**")
-                .addPathPatterns("/wx/user/token/check")
-                .excludePathPatterns("/wx/data/feedback/submit");
+                .addPathPatterns("/wx/auth/product/form/data")
+                .addPathPatterns("/wx/auth/form/data")
+                .addPathPatterns("/wx/auth/product/save")
+                .addPathPatterns("/wx/user/token/check");
     }
 }

+ 8 - 2
src/main/java/com/caimei/config/ApiInterceptor.java

@@ -1,12 +1,15 @@
 package com.caimei.config;
 
 import com.caimei.components.RedisService;
+import com.caimei.mapper.cmMapper.ClubMapper;
+import com.caimei.model.vo.WxClubUserVo;
 import com.caimei.utils.JwtUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 import org.springframework.web.servlet.HandlerInterceptor;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -26,6 +29,9 @@ public class ApiInterceptor implements HandlerInterceptor {
         this.redisService = redisService;
     }
 
+    @Resource
+    private ClubMapper clubMapper;
+
     @Value("${caimei.zplmapi}")
     private String zplmapi;
 
@@ -35,8 +41,8 @@ public class ApiInterceptor implements HandlerInterceptor {
         String cacheToken = null != token ? String.valueOf(redisService.get(token)) : null;
         if (null == cacheToken || !JwtUtil.isVerify(cacheToken)) {
             // Token失效
-            response.sendRedirect(zplmapi + "/unauthorized");
-            return false;
+            /*response.sendRedirect(zplmapi + "/unauthorized");
+            return false;*/
         }
         return true;
     }

+ 61 - 5
src/main/java/com/caimei/config/GlobalTokenAspect.java

@@ -1,6 +1,9 @@
 package com.caimei.config;
 
 import com.caimei.components.RedisService;
+import com.caimei.mapper.cmMapper.ClubMapper;
+import com.caimei.mapper.cmMapper.LoginMapper;
+import com.caimei.model.vo.WxClubUserVo;
 import com.caimei.utils.JwtUtil;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
@@ -12,6 +15,7 @@ import org.springframework.stereotype.Component;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
 /**
@@ -34,11 +38,25 @@ public class GlobalTokenAspect {
         this.redisService = redisService;
     }
 
+
+    @Resource
+    private LoginMapper loginMapper;
+
+    @Resource
+    private ClubMapper clubMapper;
+
     /**
-     * 定义一个切入点 我这里是从controller切入
+     * 定义一个切入点后台controller切入
      */
-    @Pointcut("execution(public * com.caimei.controller..*.*(..))")
-    public void pointCut() {
+    @Pointcut("execution(public * com.caimei.controller.admin..*.*(..))")
+    public void adminPointCut() {
+    }
+    
+    /**
+     * 定义一个切入点, 从前端controller切入
+     */
+    @Pointcut("execution(public * com.caimei.controller.wechat..*.*(..))")
+    public void wxPointCut() {
     }
 
     /**
@@ -48,8 +66,8 @@ public class GlobalTokenAspect {
      * @param joinPoint
      * @throws Throwable
      */
-    @Before("pointCut()")
-    public void before(JoinPoint joinPoint) throws Throwable {
+    @Before("adminPointCut()")
+    public void adminBefore(JoinPoint joinPoint) throws Throwable {
         ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
         HttpServletRequest request = attributes.getRequest();
         String token = request.getHeader("X-Token");
@@ -65,6 +83,44 @@ public class GlobalTokenAspect {
         }
     }
 
+    /**
+     * 前置通知
+     * 在进入方法前执行 可以对参数进行限制或者拦截
+     * 通常在这边做日志存储存到数据库中
+     * @param joinPoint
+     * @throws Throwable
+     */
+    @Before("wxPointCut()")
+    public void userBefore(JoinPoint joinPoint) throws Throwable {
+        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = attributes.getRequest();
+        String token = request.getHeader("X-Token");
+        String cacheToken = null!=token ? String.valueOf(redisService.get(token)) : null;
+        // Redis过期后会得到"null"值,所以需判断字符串"null"
+        if (cacheToken != null && cacheToken.length() != 0 && !"null".equals(cacheToken)) {
+            // 验证机构用户是否可以登录
+            WxClubUserVo clubUser = null;
+            if (cacheToken.contains(",")) {
+                // 订阅号登录用户
+                String[] cacheArr = cacheToken.split(",");
+                String mobile = cacheArr[0];
+                Integer authUserId = Integer.parseInt(cacheArr[1]);
+                clubUser = clubMapper.getWxClubUser(mobile, null, authUserId, null, null);
+            } else if (cacheToken.contains("|")){
+                // 服务号登录用户
+                String[] cacheArr = cacheToken.split("\\|");
+                String openId = cacheArr[0];
+                String appId = cacheArr[1];
+                clubUser = loginMapper.getClubUserByOpenId(openId, appId);
+            }
+            if (null != clubUser) {
+                // token 续签
+                redisService.set(token, cacheToken, 60L * 60 * 24);
+            }
+
+        }
+    }
+
     /**
      * JWT Token续签:
      * 业务逻辑:登录成功后,用户在未过期时间内继续操作,续签token。

+ 69 - 0
src/main/java/com/caimei/config/RedisCacheConfig.java

@@ -0,0 +1,69 @@
+package com.caimei.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.cache.RedisCacheWriter;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+
+import java.io.Serializable;
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/4/28
+ */
+@Configuration
+@EnableCaching
+public class RedisCacheConfig implements Serializable {
+/**
+     * 最新版,设置redis缓存过期时间
+     */
+
+    @Bean
+    public RedisCacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) {
+        return new RedisCacheManager(
+           RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory),
+           // 默认策略,未配置的 key 会使用这个,3小时失效
+           this.getRedisCacheConfigurationWithTtl( 3 * 60 * 60),
+           // 指定 key 策略
+           this.getRedisCacheConfigurationMap()
+        );
+    }
+
+    private Map<String, RedisCacheConfiguration> getRedisCacheConfigurationMap() {
+        Map<String, RedisCacheConfiguration> redisCacheConfigurationMap = new HashMap<>();
+        //自定义设置缓存时间,6小时
+//        redisCacheConfigurationMap.put("getCommodityClassify", this.getRedisCacheConfigurationWithTtl(6 * 60 * 60));
+        return redisCacheConfigurationMap;
+    }
+
+
+    private RedisCacheConfiguration getRedisCacheConfigurationWithTtl(Integer seconds) {
+        Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
+        ObjectMapper om = new ObjectMapper();
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+        jackson2JsonRedisSerializer.setObjectMapper(om);
+        RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig();
+        redisCacheConfiguration = redisCacheConfiguration.serializeValuesWith(
+                RedisSerializationContext
+                        .SerializationPair
+                        .fromSerializer(jackson2JsonRedisSerializer)
+        ).entryTtl(Duration.ofSeconds(seconds));
+
+        return redisCacheConfiguration;
+    }
+
+}

+ 1 - 1
src/main/java/com/caimei/config/WxApiInterceptor.java

@@ -49,7 +49,7 @@ public class WxApiInterceptor implements HandlerInterceptor {
             String[] cacheArr = cacheValue.split(",");
             String mobile = cacheArr[0];
             Integer authUserId = Integer.parseInt(cacheArr[1]);
-            clubUser = clubMapper.getWxClubUser(mobile, null, authUserId, null);
+            clubUser = clubMapper.getWxClubUser(mobile, null, authUserId, null, null);
         } else if (null != cacheValue && cacheValue.contains("|")){
             // 服务号登录用户
             String[] cacheArr = cacheValue.split("\\|");

+ 7 - 1
src/main/java/com/caimei/controller/auth/AddressApi.java → src/main/java/com/caimei/controller/admin/auth/AddressApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
 
 import com.caimei.model.ResponseJson;
@@ -57,4 +57,10 @@ public class AddressApi {
     public ResponseJson<List<AddressSelectVo>> getAllSelectAddress() {
         return addressService.getAllSelectAddress();
     }
+
+    @ApiOperation("Ross机构数据导入")
+    @GetMapping("/address/test")
+    public ResponseJson addressTest() throws Exception {
+        return addressService.addressTest();
+    }
 }

+ 54 - 19
src/main/java/com/caimei/controller/auth/AuthApi.java → src/main/java/com/caimei/controller/admin/auth/AuthApi.java

@@ -1,11 +1,10 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.CmBrandAuthPo;
 import com.caimei.model.vo.AuthFormVo;
 import com.caimei.model.vo.AuthVo;
-import com.caimei.model.vo.ProductTypeListVo;
 import com.caimei.service.auth.AuthService;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
@@ -20,6 +19,9 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -43,20 +45,25 @@ public class AuthApi {
      */
     @ApiOperation("授权列表")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1授权列表,2授权审核列表"),
+            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1授权列表,2授权审核列表,3供应商审核列表,4授权牌物流列表"),
             @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id"),
             @ApiImplicitParam(name = "authParty", required = false, value = "授权机构"),
+            @ApiImplicitParam(name = "mobile", required = false, value = "机构用户手机号"),
             @ApiImplicitParam(name = "status", required = false, value = "上线状态:0已下线,1已上线,2待上线"),
             @ApiImplicitParam(name = "auditStatus", required = false, value = "审核状态:0审核未通过,1审核通过,2待审核"),
             @ApiImplicitParam(name = "lowerAuditStatus", required = false, value = "商品信息审核状态:0未完成审核,1已完成审核"),
+            @ApiImplicitParam(name = "shopAuditStatus", required = false, value = "供应商审核状态:0未审核,1已审核"),
+            @ApiImplicitParam(name = "sendStatus", required = false, value = "寄送状态:0未寄送,1已寄送"),
             @ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
     })
     @GetMapping("/list")
-    public ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty, Integer status, Integer auditStatus, Integer lowerAuditStatus,
+    public ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty, String mobile,
+                                                      Integer status, Integer auditStatus, Integer lowerAuditStatus,
+                                                      Integer shopAuditStatus, Integer sendStatus,
                                                       @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                       @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
-        return authService.getAuthList(listType, authUserId, authParty, status, auditStatus, lowerAuditStatus, pageNum, pageSize);
+        return authService.getAuthList(listType, authUserId, authParty, mobile, status, auditStatus, lowerAuditStatus, shopAuditStatus, sendStatus, pageNum, pageSize);
     }
 
     @ApiOperation("机构下拉框列表")
@@ -107,9 +114,13 @@ public class AuthApi {
      */
     @ApiOperation("添加/编辑授权")
     @ApiImplicitParam(name = "params", value = "authId:授权id;authUserId:供应商用户id;authParty:授权机构;provinceId;cityId;" +
-            "townId;address;lngAndLat;mobile;logo;customFlag:是否需要自定义属性:0否,1是;remarks:店铺备注;createBy:创建人id", required = true)
+            "townId;address;lngAndLat;mobile;userMobile:对应机构用户手机号;" +
+            "firstClubType:一级分类为医美=1,生美=2,项目公司=3,个人=4,其他=5;" +
+            "secondClubType:医美的二级分类为诊所=1、门诊=2、医院=3,其他=4。生美二级分类,美容院=5,养生馆=6,其他=7;" +
+            "medicalLicenseImage:医疗许可证图;empNum:员工人数;"+
+            "logo;customFlag:是否需要自定义属性:0否,1是;remarks:店铺备注;createBy:创建人id;source:1供应商保存,2机构保存", required = true)
     @PostMapping("/save")
-    public ResponseJson saveAuth(@RequestBody String params) {
+    public ResponseJson saveAuth(@RequestBody String params) throws ParseException {
         JSONObject paramsMap = JSONObject.parseObject(params);
         Integer authId = paramsMap.getInteger("authId");
         Integer authUserId = paramsMap.getInteger("authUserId");
@@ -119,12 +130,32 @@ public class AuthApi {
         String address = paramsMap.getString("address");
         String lngAndLat = paramsMap.getString("lngAndLat");
         String mobile = paramsMap.getString("mobile");
+        String userMobile = paramsMap.getString("userMobile");
+        Integer firstClubType = paramsMap.getInteger("firstClubType");
+        Integer secondClubType = paramsMap.getInteger("secondClubType");
+        String medicalLicenseImage = paramsMap.getString("medicalLicenseImage");
+        Integer empNum = paramsMap.getInteger("empNum");
         String logo = paramsMap.getString("logo");
+        String authCode = paramsMap.getString("authCode");
+        String authDateStr = paramsMap.getString("authDate");
+        SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
+        Date authDate = null;
+        if (StringUtils.isNotEmpty(authDateStr)) {
+            authDate = format.parse(authDateStr);
+        }
+        Integer authImageType = paramsMap.getInteger("authImageType");
+        String authImageLogo = paramsMap.getString("authImageLogo");
+        String authImage = paramsMap.getString("authImage");
         Integer customFlag = paramsMap.getInteger("customFlag");
         String remarks = paramsMap.getString("remarks");
         List<String> bannerList = (List<String>) paramsMap.get("bannerList");
         String authParty = paramsMap.getString("authParty");
         Integer createBy = paramsMap.getInteger("createBy");
+        Integer source = paramsMap.getInteger("source");
+        if (null == source) {
+            // 默认供应商保存
+            source = 1;
+        }
         /*
             组装授权数据
          */
@@ -145,9 +176,20 @@ public class AuthApi {
         auth.setLng(new BigDecimal(split[0]));
         auth.setLat(new BigDecimal(split[1]));
         auth.setMobile(mobile);
+        auth.setUserMobile(userMobile);
+        auth.setFirstClubType(firstClubType);
+        auth.setSecondClubType(secondClubType);
+        auth.setMedicalLicenseImage(medicalLicenseImage);
+        auth.setEmpNum(empNum);
         auth.setLogo(logo);
+        auth.setAuthCode(authCode);
+        auth.setAuthDate(authDate);
+        auth.setAuthImageLogo(authImageLogo);
+        auth.setAuthImage(authImage);
+        auth.setAuthImageType(authImageType);
         auth.setCreateBy(createBy);
-        return authService.saveAuth(auth, bannerList, false);
+        auth.setCreateSource(1);
+        return authService.saveAuth(auth, bannerList, false, source);
     }
 
 
@@ -155,7 +197,8 @@ public class AuthApi {
      * 审核品牌授权
      */
     @ApiOperation("审核品牌授权")
-    @ApiImplicitParam(name = "params", value = "authId:授权id;auditStatus:审核状态:0审核未通过,1审核通过,2待审核;invalidReason:审核不通过原因;auditBy:审核人用户id", required = true)
+    @ApiImplicitParam(name = "params", value = "authId:授权id;auditStatus:审核状态:0审核未通过,1审核通过,2待审核;" +
+            "invalidReason:审核不通过原因;auditBy:审核人用户id;source:来源:1管理员审核,2供应商审核", required = true)
     @PostMapping("/audit")
     public ResponseJson auditAuth(@RequestBody String params) {
         JSONObject paramsMap = JSONObject.parseObject(params);
@@ -163,10 +206,10 @@ public class AuthApi {
         Integer auditStatus = paramsMap.getInteger("auditStatus");
         String invalidReason = paramsMap.getString("invalidReason");
         Integer auditBy = paramsMap.getInteger("auditBy");
-        return authService.auditAuth(authId, auditStatus, invalidReason, auditBy);
+        Integer source = paramsMap.getInteger("source");
+        return authService.auditAuth(authId, auditStatus, invalidReason, auditBy, source);
     }
 
-
     @ApiOperation("excel导入")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id"),
@@ -188,14 +231,6 @@ public class AuthApi {
     }
 
 
-    @ApiOperation("ldm导入")
-    @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id")
-    @PostMapping("/ldm/import")
-    public ResponseJson importLdmData(Integer authUserId) {
-        return authService.importLdmData(authUserId);
-    }
-
-
     @ApiOperation("excel导出")
     @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id")
     @GetMapping("/export/excel")

+ 37 - 14
src/main/java/com/caimei/controller/auth/AuthClubApi.java → src/main/java/com/caimei/controller/admin/auth/AuthClubApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;
@@ -15,6 +15,8 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Map;
+
 /**
  * 供应商API
  *
@@ -49,38 +51,34 @@ public class AuthClubApi {
     @ApiOperation("机构用户列表")
     @GetMapping("/user/list")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "authId", required = true, value = "机构id"),
+            @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id"),
             @ApiImplicitParam(name = "mobile", required = false, value = "手机号"),
             @ApiImplicitParam(name = "name", required = false, value = "姓名"),
-            @ApiImplicitParam(name = "status", required = false, value = "状态:0未绑定,1已绑定,2已过期"),
+            @ApiImplicitParam(name = "status", required = false, value = "状态:0停用,1启用"),
             @ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
     })
-    public ResponseJson<PageInfo<ClubUserVo>> getClubUserList(Integer authId, String mobile, String name, Integer status,
+    public ResponseJson<PageInfo<ClubUserVo>> getClubUserList(Integer authUserId, String mobile, String name, Integer status,
                                                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                               @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
-        return authClubService.getClubUserList(authId, mobile, name, status, pageNum, pageSize);
+        return authClubService.getClubUserList(authUserId, mobile, name, status, pageNum, pageSize);
     }
 
     @ApiOperation("添加/编辑机构用户")
     @PostMapping("/user/save")
-    @ApiImplicitParam(name = "params", value = "clubUserId:机构用户id;authId:授权机构id;name:姓名;mobile:手机号", required = true)
+    @ApiImplicitParam(name = "params", value = "clubUserId:机构用户id;authUserId:供应商用户id;mobile:手机号", required = true)
     public ResponseJson saveClubUser(@RequestBody String params) {
         JSONObject paramsMap = JSONObject.parseObject(params);
         Integer clubUserId = paramsMap.getInteger("clubUserId");
-        Integer authId = paramsMap.getInteger("authId");
-        String name = paramsMap.getString("name");
+        Integer authUserId = paramsMap.getInteger("authUserId");
         String mobile = paramsMap.getString("mobile");
-        if (null == authId) {
-            return ResponseJson.error("参数异常,请输入授权机构id");
-        }
-        if (StringUtils.isEmpty(name)) {
-            return ResponseJson.error("参数异常,请输入姓名");
+        if (null == authUserId) {
+            return ResponseJson.error("参数异常,请输入供应商用户id");
         }
         if (StringUtils.isEmpty(mobile)) {
             return ResponseJson.error("参数异常,请输入手机号");
         }
-        return authClubService.saveClubUser(clubUserId, authId, name, mobile);
+        return authClubService.saveClubUser(clubUserId, authUserId, mobile);
     }
 
     @ApiOperation("删除机构用户")
@@ -94,4 +92,29 @@ public class AuthClubApi {
         }
         return authClubService.deleteClubUser(clubUserId);
     }
+
+    @ApiOperation("更新用户状态")
+    @PostMapping("/user/status/update")
+    @ApiImplicitParam(name = "params", value = "clubUserId:机构用户id;status:状态:0停用,1启用", required = true)
+    public ResponseJson updateStatus(@RequestBody String params) {
+        JSONObject paramsMap = JSONObject.parseObject(params);
+        Integer clubUserId = paramsMap.getInteger("clubUserId");
+        Integer status = paramsMap.getInteger("status");
+        if (null == clubUserId) {
+            return ResponseJson.error("参数异常,机构用户id不能为空");
+        }
+        if (null == status) {
+            return ResponseJson.error("参数异常,状态不能为空");
+        }
+        return authClubService.updateStatus(clubUserId, status);
+    }
+
+
+    @ApiOperation("重置密码")
+    @ApiImplicitParam(name = "params", value = "clubUserId:机构用户id", required = true)
+    @PostMapping("/user/reset/password")
+    public ResponseJson resetShopPassword(@RequestBody Map<String,Integer> params) {
+        Integer clubUserId = params.get("clubUserId");
+        return authClubService.resetClubUserPassword(clubUserId);
+    }
 }

+ 38 - 18
src/main/java/com/caimei/controller/auth/AuthProductApi.java → src/main/java/com/caimei/controller/admin/auth/AuthProductApi.java

@@ -1,8 +1,12 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.caimei.annotation.Idempotent;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.dto.ProductSaveDto;
+import com.caimei.model.po.ProductParamPo;
+import com.caimei.model.po.ProductTypePo;
 import com.caimei.model.vo.ProductFormVo;
 import com.caimei.model.vo.ProductListVo;
 import com.caimei.model.vo.ProductTypeListVo;
@@ -40,20 +44,22 @@ public class AuthProductApi {
      */
     @ApiOperation("授权商品列表")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1商品列表,2商品审核列表"),
+            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1商品列表,2管理员商品审核列表,3供应商商品审核列表"),
             @ApiImplicitParam(name = "authId", required = true, value = "授权id"),
             @ApiImplicitParam(name = "productName", required = false, value = "商品名称"),
             @ApiImplicitParam(name = "snCode", required = false, value = "商品SN码"),
             @ApiImplicitParam(name = "status", required = false, value = "上线状态:0下线,1上线,2待上线"),
             @ApiImplicitParam(name = "auditStatus", required = false, value = "审核状态:0审核未通过,1审核通过,2待审核"),
+            @ApiImplicitParam(name = "shopAuditStatus", required = false, value = "供应商审核状态:0未审核,1已审核"),
             @ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
     })
     @GetMapping("/list")
-    public ResponseJson<PageInfo<ProductListVo>> getProductList(Integer listType, Integer authId, String productName, String snCode, Integer status, Integer auditStatus,
+    public ResponseJson<PageInfo<ProductListVo>> getProductList(Integer listType, Integer authId, String productName,
+                                                                String snCode, Integer status, Integer auditStatus, Integer shopAuditStatus,
                                                                 @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                                 @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
-        return authProductService.getProductList(listType, authId, productName, snCode, status, auditStatus, pageNum, pageSize);
+        return authProductService.getProductList(listType, authId, productName, snCode, status, auditStatus, shopAuditStatus, pageNum, pageSize);
     }
 
 
@@ -85,16 +91,17 @@ public class AuthProductApi {
      * @param productSaveDto {
      *                   productId              授权商品id
      *                   authId                 授权id
-     *                   brandId                品牌id
      *                   productTypeId          设备分类id
      *                   snCode                 商品SN码
      *                   productImage           商品图片
      *                   certificateImage       授权牌照
      *                   addQrCodeFlag          是否生成二维码授权牌:0否,1是
      *                   addTemplateType        生成二维码授权牌模板:1左下,2右边,3左边
+     *                   purchaseWay            购买渠道
+     *                   invoiceImage           发票图片
      *                   status                 上线状态:0已下线,1已上线,2待上线
      *                   createBy               创建人id
-     *                   paramList              商品参数列表
+     *                   source                 来源:1供应商保存,2机构保存
      * }
      */
     @ApiOperation("添加/编辑授权商品")
@@ -103,12 +110,6 @@ public class AuthProductApi {
         return authProductService.saveProduct(productSaveDto, false);
     }
 
-    /**
-     * 获取授权商品回显数据
-     *
-     * @param productId 授权商品id
-     * @return ProductFormVo
-     */
     @ApiOperation("授权商品回显数据")
     @ApiImplicitParam(name = "productId", required = true, value = "授权商品id")
     @GetMapping("/form/data")
@@ -125,11 +126,10 @@ public class AuthProductApi {
         return authProductService.updateAllWaterMark();
     }
 
-    /**
-     * 审核商品
-     */
     @ApiOperation("审核商品")
-    @ApiImplicitParam(name = "params", value = "productId:授权商品id;auditStatus:审核状态:0审核未通过,1审核通过,2待审核;invalidReason:审核不通过原因;auditBy:审核人用户id", required = true)
+    @ApiImplicitParam(name = "params", value = "productId:授权商品id;auditStatus:审核状态:0审核未通过,1审核通过,2待审核;" +
+            "invalidReason:审核不通过原因;auditBy:审核人用户id;source:来源:1管理员审核,2供应商审核", required = true)
+    @Idempotent(prefix = "idempotent_product", keys = {"#params"}, expire = 5)
     @PostMapping("/audit")
     public ResponseJson auditProduct(@RequestBody String params) {
         JSONObject paramsMap = JSONObject.parseObject(params);
@@ -137,7 +137,18 @@ public class AuthProductApi {
         Integer auditStatus = paramsMap.getInteger("auditStatus");
         String invalidReason = paramsMap.getString("invalidReason");
         Integer auditBy = paramsMap.getInteger("auditBy");
-        return authProductService.auditProduct(productId, auditStatus, invalidReason, auditBy);
+        Integer source = paramsMap.getInteger("source");
+        return authProductService.auditProduct(productId, auditStatus, invalidReason, auditBy, source);
+    }
+
+    @ApiOperation("设备分类回显数据")
+    @ApiImplicitParam(name = "productTypeId", required = true, value = "设备分类id")
+    @GetMapping("/type/form/data")
+    public ResponseJson<ProductTypePo> getProductTypeFormData(Integer productTypeId) {
+        if (null == productTypeId) {
+            return ResponseJson.error("设备分类id不能为空", null);
+        }
+        return authProductService.getProductTypeFromData(productTypeId);
     }
 
     @ApiOperation("添加/编辑设备分类")
@@ -147,19 +158,28 @@ public class AuthProductApi {
         JSONObject paramsMap = JSONObject.parseObject(params);
         Integer productTypeId = paramsMap.getInteger("productTypeId");
         Integer authUserId = paramsMap.getInteger("authUserId");
+        Integer brandId = paramsMap.getInteger("brandId");
         String name = paramsMap.getString("name");
         String image = paramsMap.getString("image");
         Integer createBy = paramsMap.getInteger("createBy");
+        String paramListStr = paramsMap.getString("paramList");
+        List<ProductParamPo> paramList = JSONArray.parseArray(paramListStr, ProductParamPo.class);
         if (null == authUserId) {
             return ResponseJson.error("参数异常,供应商用户id不能为空");
         }
+        if (null == brandId) {
+            return ResponseJson.error("参数异常,品牌id不能为空");
+        }
         if (StringUtils.isEmpty(name)) {
             return ResponseJson.error("参数异常,设备分类名称不能为空");
         }
         if (StringUtils.isEmpty(image)) {
             return ResponseJson.error("参数异常,图片不能为空");
         }
-        return authProductService.saveProductType(productTypeId, authUserId, name, image, createBy);
+        if (null == paramList || paramList.size() <= 0) {
+            return ResponseJson.error("参数异常,参数列表不能为空", null);
+        }
+        return authProductService.saveProductType(productTypeId, authUserId, brandId, name, image, createBy, paramList, 1);
     }
 
     @ApiOperation("删除设备分类")

+ 89 - 0
src/main/java/com/caimei/controller/admin/auth/AuthTemplateApi.java

@@ -0,0 +1,89 @@
+package com.caimei.controller.admin.auth;
+
+import com.alibaba.fastjson.JSONObject;
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.TemplateVo;
+import com.caimei.service.auth.AuthTemplateService;
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 授权牌模板API
+ * @author Aslee
+ * @date 2022/7/6
+ */
+@Api(tags = "授权牌模板API")
+@Slf4j
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/auth/template")
+public class AuthTemplateApi {
+
+    private final AuthTemplateService authTemplateService;
+
+    @ApiOperation("授权牌模板列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "listType", required = true, value = "列表类型:1管理员列表,2供应商列表"),
+            @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
+            @ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
+            @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
+    })
+    @GetMapping("/list")
+    public ResponseJson<PageInfo<TemplateVo>> getTemplateList(Integer listType, Integer authUserId,
+                                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                                                              @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
+        return authTemplateService.getTemplateList(listType, authUserId, pageNum, pageSize);
+    }
+
+    @ApiOperation("授权牌模板表单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "templateId", required = false, value = "模板id"),
+            @ApiImplicitParam(name = "authId", required = false, value = "机构id"),
+            @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
+            @ApiImplicitParam(name = "authFlag", required = false, value = "是否作为机构授权牌模板:1是0否"),
+            @ApiImplicitParam(name = "status", required = false, value = "启用状态:0停用,1启用")
+    })
+    @GetMapping("/form/data")
+    public ResponseJson<TemplateVo> getTemplateFormData(Integer templateId, Integer authId, Integer authUserId, Integer authFlag, Integer status) {
+        if (null == templateId && null == authId && null == authUserId) {
+            return ResponseJson.error("参数异常", null);
+        }
+        return authTemplateService.getTemplateFormData(templateId, authId, authUserId, authFlag, status);
+    }
+
+    @ApiOperation("添加/编辑授权模板")
+    @ApiImplicitParam(name = "params", required = true, value = "templateId:模板id;templateImage:模板图片;" +
+            "authUserId:供应商用户id;status:状态:1启用,0停用;qrPosition:二维码位置;qrSize:二维码尺寸;" +
+            "logoSize:logo尺寸;authFlag:1设置为机构授权牌模板;productFlag:1设置为设备授权牌模板")
+    @PostMapping("/save")
+    public ResponseJson saveTemplate(@RequestBody String params){
+        JSONObject parseObject = JSONObject.parseObject(params);
+        Integer templateId = parseObject.getInteger("templateId");
+        String templateImage = parseObject.getString("templateImage");
+        Integer authUserId = parseObject.getInteger("authUserId");
+        Integer status = parseObject.getInteger("status");
+        String qrPosition = parseObject.getString("qrPosition");
+        Integer qrSize = parseObject.getInteger("qrSize");
+        String logoSize = parseObject.getString("logoSize");
+        Integer authFlag = parseObject.getInteger("authFlag");
+        Integer productFlag = parseObject.getInteger("productFlag");
+        if (null != templateId) {
+            if ((null != authFlag || null != productFlag) && null == authUserId) {
+                return ResponseJson.error("供应商用户id不能为空");
+            }
+        } else {
+            if (StringUtils.isEmpty(templateImage)) {
+                return ResponseJson.error("模板图片不能为空");
+            }
+        }
+        return authTemplateService.saveTemplate(templateId, templateImage, authUserId, status, qrPosition, qrSize, logoSize, authFlag, productFlag);
+    }
+
+}

+ 6 - 8
src/main/java/com/caimei/controller/auth/DefaultApi.java → src/main/java/com/caimei/controller/admin/auth/DefaultApi.java

@@ -1,11 +1,9 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
-import com.caimei.module.base.entity.bo.JsonModel;
+import com.caimei.model.ResponseJson;
 import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -25,13 +23,13 @@ public class DefaultApi {
 
     @GetMapping("/unauthorized")
     @ApiOperation("Token失效")
-    public JsonModel unauthorized() {
-        return new JsonModel().error(-99, "Token失效请重新登录!");
+    public ResponseJson unauthorized() {
+        return ResponseJson.error(-99, "Token失效请重新登录!");
     }
 
     @GetMapping("/error")
     @ApiOperation("处理非法请求")
-    public JsonModel error() {
-        return new JsonModel().error(-100, "非法的请求!");
+    public ResponseJson error() {
+        return ResponseJson.error(-100, "非法的请求!");
     }
 }

+ 1 - 1
src/main/java/com/caimei/controller/auth/DoctorApi.java → src/main/java/com/caimei/controller/admin/auth/DoctorApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;

+ 3 - 3
src/main/java/com/caimei/controller/auth/DownloadApi.java → src/main/java/com/caimei/controller/admin/auth/DownloadApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
 import com.caimei.service.auth.DownloadService;
 import io.swagger.annotations.Api;
@@ -46,10 +46,10 @@ public class DownloadApi {
     }
 
 
-    @ApiOperation("一键下载授权牌/二维码")
+    @ApiOperation("一键下载授权牌/设备二维码/机构二维码")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id"),
-            @ApiImplicitParam(name = "type", required = true, value = "1授权牌,2二维码")
+            @ApiImplicitParam(name = "type", required = true, value = "1授权牌,2设备二维码,3机构二维码")
     })
     @GetMapping("/shop/image")
     public void downloadImage(Integer authUserId, Integer type, HttpServletRequest request, HttpServletResponse response) throws Exception {

+ 63 - 0
src/main/java/com/caimei/controller/admin/auth/LogisticsApi.java

@@ -0,0 +1,63 @@
+package com.caimei.controller.admin.auth;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.aliyuncs.utils.StringUtils;
+import com.caimei.model.ResponseJson;
+import com.caimei.service.auth.LogisticsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 物流API
+ *
+ * @author : Aslee
+ * @date : 2022/6/15
+ */
+@Api(tags = "物流API")
+@Slf4j
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/logistics")
+public class LogisticsApi {
+
+    private final LogisticsService logisticsService;
+
+
+    @ApiOperation("寄送授权牌")
+    @ApiImplicitParam(name = "params", value = "authId:授权id;companyId:物流公司id;logisticsNumber:快递单号;" +
+            "imageList:图片备注列表;remarks:备注;mobile:收货人手机号", required = true)
+    @PostMapping("/certificate/send")
+    public ResponseJson send(@RequestBody String params) {
+        JSONObject paramsMap = JSONObject.parseObject(params);
+        Integer authId = paramsMap.getInteger("authId");
+        Integer companyId = paramsMap.getInteger("companyId");
+        String logisticsNumber = paramsMap.getString("logisticsNumber");
+        String imageParam = paramsMap.getString("imageList");
+        JSONArray imageList = null;
+        if (StringUtils.isNotEmpty(imageParam)) {
+            imageList = JSONObject.parseArray(imageParam);
+        }
+        String remarks = paramsMap.getString("remarks");
+        String mobile = paramsMap.getString("mobile");
+        return logisticsService.sendCertificate(authId, companyId, logisticsNumber, imageList, remarks, mobile);
+    }
+
+    @ApiOperation("寄送授权牌物流详情")
+    @ApiImplicitParam(name = "authId", value = "授权id", required = true)
+    @GetMapping("/certificate/details")
+    public ResponseJson certificateLogistics(Integer authId) {
+        return logisticsService.certificateLogistics(authId);
+    }
+
+    @ApiOperation("物流公司数据")
+    @GetMapping("/company/data")
+    public ResponseJson getLogisticsCompany() {
+        return logisticsService.getLogisticsCompany();
+    }
+
+}

+ 20 - 4
src/main/java/com/caimei/controller/auth/ShopApi.java → src/main/java/com/caimei/controller/admin/auth/ShopApi.java

@@ -1,5 +1,6 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.dto.ShopInfoDto;
@@ -40,7 +41,7 @@ public class ShopApi {
      */
     @ApiOperation("供应商列表")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1供应商列表,2授权信息审核列表,3资料审核列表,4医师审核列表,5添加会员列表,6设备分类审核列表"),
+            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1供应商列表,2授权信息审核列表,3资料审核列表,4医师审核列表,5添加会员列表,6设备分类审核列表,7授权牌物流列表"),
             @ApiImplicitParam(name = "shopName", required = false, value = "供应商名称"),
             @ApiImplicitParam(name = "loginAccount", required = false, value = "登录账号"),
             @ApiImplicitParam(name = "shopType", required = false, value = "供应商类型:1品牌方,2代理商"),
@@ -48,14 +49,15 @@ public class ShopApi {
             @ApiImplicitParam(name = "mobile", required = false, value = "手机号"),
             @ApiImplicitParam(name = "linkMan", required = false, value = "联系人"),
             @ApiImplicitParam(name = "lowerAuditStatus", required = false, value = "下级审核状态,0未完成审核,1已完成审核"),
+            @ApiImplicitParam(name = "sendStatus", required = false, value = "寄送状态:0未寄送,1已寄送"),
             @ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
     })
     @GetMapping("/list")
-    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName,String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus,
+    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName,String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                           @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
-        return shopService.getShopList(listType, shopName, loginAccount, shopType, brandId, mobile, linkMan, lowerAuditStatus, pageNum, pageSize);
+        return shopService.getShopList(listType, shopName, loginAccount, shopType, brandId, mobile, linkMan, lowerAuditStatus, sendStatus, pageNum, pageSize);
     }
 
     /**
@@ -138,6 +140,7 @@ public class ShopApi {
             Integer countryId = (Integer) infoMap.get("countryId");
             String brandAuthLogo = (String) infoMap.get("brandAuthLogo");
             String securityLink = (String) infoMap.get("securityLink");
+            String manufacturer = (String) infoMap.get("manufacturer");
             Integer statementType = (Integer) infoMap.get("statementType");
             String statementContent = (String) infoMap.get("statementContent");
             String statementLink = (String) infoMap.get("statementLink");
@@ -151,6 +154,7 @@ public class ShopApi {
             shopInfo.setCountryId(countryId);
             shopInfo.setBrandAuthLogo(brandAuthLogo);
             shopInfo.setSecurityLink(securityLink);
+            shopInfo.setManufacturer(manufacturer);
             shopInfo.setStatementType(statementType);
             shopInfo.setStatementContent(statementContent);
             shopInfo.setStatementLink(statementLink);
@@ -294,4 +298,16 @@ public class ShopApi {
         String loginAccount = parseObject.getString("loginAccount");
         return shopService.bindLoginAccount(authUserId, mobile, verifyCode, loginAccount);
     }
+
+    @ApiOperation("一键更新机构授权牌")
+    @ApiImplicitParam(name = "params",value = "authUserId:供应商用户id")
+    @PostMapping("/authImage/update/all")
+    public ResponseJson updateAllAuthImage(@RequestBody String params ){
+        JSONObject parseObject = JSONObject.parseObject(params);
+        Integer authUserId = parseObject.getInteger("authUserId");
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空");
+        }
+        return shopService.updateAllAuthImage(authUserId);
+    }
 }

+ 1 - 1
src/main/java/com/caimei/controller/auth/UploadApi.java → src/main/java/com/caimei/controller/admin/auth/UploadApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
 import com.caimei.service.auth.UploadService;
 import com.caimei.utils.OSSUtils;

+ 1 - 6
src/main/java/com/caimei/controller/auth/UserApi.java → src/main/java/com/caimei/controller/admin/auth/UserApi.java

@@ -1,20 +1,15 @@
-package com.caimei.controller.auth;
+package com.caimei.controller.admin.auth;
 
 import com.caimei.model.ResponseJson;
-import com.caimei.model.dto.PackageDto;
 import com.caimei.model.dto.PasswordDto;
 import com.caimei.model.vo.UserLoginVo;
-import com.caimei.model.vo.VipConfigurationVo;
 import com.caimei.service.auth.UserService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
-import org.springframework.http.HttpHeaders;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
 import java.util.Map;
 
 

+ 1 - 1
src/main/java/com/caimei/controller/data/ArticleApi.java → src/main/java/com/caimei/controller/admin/data/ArticleApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.data;
+package com.caimei.controller.admin.data;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;

+ 1 - 1
src/main/java/com/caimei/controller/data/FileApi.java → src/main/java/com/caimei/controller/admin/data/FileApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.data;
+package com.caimei.controller.admin.data;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;

+ 1 - 1
src/main/java/com/caimei/controller/data/ImageApi.java → src/main/java/com/caimei/controller/admin/data/ImageApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.data;
+package com.caimei.controller.admin.data;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;

+ 3 - 2
src/main/java/com/caimei/controller/data/VideoApi.java → src/main/java/com/caimei/controller/admin/data/VideoApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.data;
+package com.caimei.controller.admin.data;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;
@@ -56,10 +56,11 @@ public class VideoApi {
         Integer videoId = paramsMap.getInteger("videoId");
         Integer authUserId = paramsMap.getInteger("authUserId");
         String videoTitle = paramsMap.getString("videoTitle");
+        String videoImage = paramsMap.getString("videoImage");
         String videoName = paramsMap.getString("videoName");
         String videoPreviewUrl = paramsMap.getString("videoPreviewUrl");
         String videoDownloadUrl = paramsMap.getString("videoDownloadUrl");
-        return videoService.saveVideo(videoId, authUserId, videoTitle, videoName, videoPreviewUrl, videoDownloadUrl);
+        return videoService.saveVideo(videoId, authUserId, videoTitle, videoImage, videoName, videoPreviewUrl, videoDownloadUrl);
     }
 
     @ApiOperation("更新视频状态")

+ 1 - 3
src/main/java/com/caimei/controller/pay/PayApi.java → src/main/java/com/caimei/controller/admin/pay/PayApi.java

@@ -1,8 +1,7 @@
-package com.caimei.controller.pay;
+package com.caimei.controller.admin.pay;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;
-import com.caimei.model.dto.PayVipDto;
 import com.caimei.utils.RequestUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -12,7 +11,6 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.HashMap;
 import java.util.Map;
 
 /**

+ 1 - 1
src/main/java/com/caimei/controller/sys/SysMenuApi.java → src/main/java/com/caimei/controller/admin/sys/SysMenuApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.sys;
+package com.caimei.controller.admin.sys;
 
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.SysMenu;

+ 1 - 1
src/main/java/com/caimei/controller/sys/SysRoleApi.java → src/main/java/com/caimei/controller/admin/sys/SysRoleApi.java

@@ -1,4 +1,4 @@
-package com.caimei.controller.sys;
+package com.caimei.controller.admin.sys;
 
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.SysRole;

+ 1 - 3
src/main/java/com/caimei/controller/sys/SysUserApi.java → src/main/java/com/caimei/controller/admin/sys/SysUserApi.java

@@ -1,14 +1,12 @@
-package com.caimei.controller.sys;
+package com.caimei.controller.admin.sys;
 
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.SysUser;
-import com.caimei.model.po.UserProfile;
 import com.caimei.service.sys.SysUserService;
 import com.github.pagehelper.PageInfo;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
 
 /**
  * Description

+ 1 - 2
src/main/java/com/caimei/controller/vip/VipApi.java → src/main/java/com/caimei/controller/admin/vip/VipApi.java

@@ -1,9 +1,8 @@
-package com.caimei.controller.vip;
+package com.caimei.controller.admin.vip;
 
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.SysMenu;
-import com.caimei.model.po.SysRole;
 import com.caimei.model.vo.*;
 import com.caimei.service.vip.VipService;
 import com.github.pagehelper.PageInfo;

+ 21 - 8
src/main/java/com/caimei/controller/wechat/LoginApi.java

@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -23,14 +24,14 @@ import org.springframework.web.bind.annotation.RestController;
 @Api(tags = "微信机构用户登录API")
 @RestController
 @RequiredArgsConstructor
-@RequestMapping("/wx/user")
+@RequestMapping("/wx/user/login")
 public class LoginApi {
 
     private final LoginService loginService;
 
     @ApiOperation("服务号授权登录")
     @ApiImplicitParam(name = "params", value = "code登录凭证;appId;", required = true)
-    @PostMapping("/login/authorization")
+    @PostMapping("/authorization")
     public ResponseJson<WxClubUserVo> authorizationLogin(@RequestBody String params) {
         JSONObject parseObject = JSONObject.parseObject(params);
         String code = parseObject.getString("code");
@@ -51,7 +52,7 @@ public class LoginApi {
 
     @ApiOperation("服务号验证码登录")
     @ApiImplicitParam(name = "params", value = "mobile:手机号;verifyCode:验证码;invitationCode:邀请码;accessToken;openId;appId", required = true)
-    @PostMapping("/login/service/invitation/code")
+    @PostMapping("/service/invitation/code")
     public ResponseJson<WxClubUserVo> invitationCode(@RequestBody String params) throws Exception {
         JSONObject parseObject = JSONObject.parseObject(params);
         String mobile = parseObject.getString("mobile");
@@ -64,7 +65,7 @@ public class LoginApi {
 
     @ApiOperation("订阅号验证码登录")
     @ApiImplicitParam(name = "params", value = "mobile:手机号;verifyCode:验证码;openId;appId", required = true)
-    @PostMapping("/login/subscribe/verify/code")
+    @PostMapping("/subscribe/verify/code")
     public ResponseJson<WxClubUserVo> loginByVerifyCode(@RequestBody String params){
         JSONObject parseObject = JSONObject.parseObject(params);
         String mobile = parseObject.getString("mobile");
@@ -73,9 +74,21 @@ public class LoginApi {
         return loginService.loginByVerifyCode(mobile, verifyCode, authUserId);
     }
 
-    @ApiOperation("校验token是否失效")
-    @PostMapping("/token/check")
-    public ResponseJson checkToken(){
-        return ResponseJson.success("token有效");
+    @ApiOperation("密码登录")
+    @ApiImplicitParam(name = "params", value = "mobile:手机号;password:密码;authUserId:供应商用户id", required = true)
+    @PostMapping("/password")
+    public ResponseJson<WxClubUserVo> passwordLogin(@RequestBody String params) {
+        JSONObject parseObject = JSONObject.parseObject(params);
+        String mobile = parseObject.getString("mobile");
+        String password = parseObject.getString("password");
+        Integer authUserId = parseObject.getInteger("authUserId");
+        if (StringUtils.isEmpty(mobile) || StringUtils.isEmpty(password)) {
+            return ResponseJson.error("参数异常", null);
+        }
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        return loginService.passwordLogin(mobile, password, authUserId);
     }
+
 }

+ 88 - 0
src/main/java/com/caimei/controller/wechat/RegisterApi.java

@@ -0,0 +1,88 @@
+package com.caimei.controller.wechat;
+
+import com.alibaba.fastjson.JSONObject;
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.WxClubUserVo;
+import com.caimei.service.wechat.RegisterService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+
+
+/**
+ * 机构用户登录API
+ *
+ * @author : Aslee
+ * @date : 2021/5/11
+ */
+@Api(tags = "微信机构用户注册API")
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/wx/user/register")
+public class RegisterApi {
+
+    private final RegisterService registerService;
+
+    @ApiOperation("普通注册")
+    @ApiImplicitParam(name = "params", value = "mobile:手机号;verifyCode:验证码;password:密码;authUserId:供应商用户id;", required = true)
+    @PostMapping("/simple")
+    public ResponseJson<WxClubUserVo> simpleRegister(@RequestBody String params) {
+        JSONObject parseObject = JSONObject.parseObject(params);
+        String mobile = parseObject.getString("mobile");
+        String verifyCode = parseObject.getString("verifyCode");
+        String password = parseObject.getString("password");
+        Integer authUserId = parseObject.getInteger("authUserId");
+        if (StringUtils.isEmpty(mobile)) {
+            return ResponseJson.error("手机号不能为空", null);
+        }
+        if (StringUtils.isEmpty(verifyCode)) {
+            return ResponseJson.error("验证码不能为空", null);
+        }
+        if (StringUtils.isEmpty(password)) {
+            return ResponseJson.error("密码不能为空", null);
+        }
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        return registerService.simpleRegister(mobile, verifyCode, password, authUserId, null);
+    }
+
+    @ApiOperation("全部注册")
+    @ApiImplicitParam(name = "params", value = "registerType:1机构用户注册,2机构认证,3设备认证;" +
+            "authUserId:供应商用户id;" +
+            "authId:机构id;" +
+            "clubUserId:机构用户id;" +
+            "clubUserInfo:机构用户数据;" +
+            "authInfo:机构数据;" +
+            "productInfo:设备数据", required = true)
+    @PostMapping("/all")
+    public ResponseJson allRegister(@RequestBody String params) {
+        JSONObject parseObject = JSONObject.parseObject(params);
+        // 注册类型,以逗号分割
+        String registerType = parseObject.getString("registerType");
+        if (StringUtils.isEmpty(registerType)) {
+            return ResponseJson.error("注册类型不能为空", null);
+        }
+        // 供应商用户id
+        Integer authUserId = parseObject.getInteger("authUserId");
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        Integer clubUserId = parseObject.getInteger("clubUserId");
+        Integer authId = parseObject.getInteger("authId");
+        // 机构用户数据
+        String clubUserInfo = parseObject.getString("clubUserInfo");
+        // 认证机构数据
+        String authInfo = parseObject.getString("authInfo");
+        // 认证设备数据
+        String productInfo = parseObject.getString("productInfo");
+        if (null == productInfo) {
+            return ResponseJson.error("认证设备数据异常", null);
+        }
+        return registerService.allRegister(authUserId, clubUserId, authId, registerType, clubUserInfo, authInfo, productInfo);
+    }
+}

+ 63 - 0
src/main/java/com/caimei/controller/wechat/WxAddressApi.java

@@ -0,0 +1,63 @@
+package com.caimei.controller.wechat;
+
+
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.AddressSelectVo;
+import com.caimei.service.auth.AddressService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 地址Api
+ *
+ * @author : Aslee
+ * @date : 2021/7/2
+ */
+@Api(tags = "微信地址API")
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/wx/address")
+public class WxAddressApi {
+
+    private final AddressService addressService;
+
+    /**
+     * 收货地址下拉选项列表
+     */
+    @ApiOperation("收货地址下拉选项列表(旧:/club/province(city)(town))")
+    @ApiImplicitParams({
+            @ApiImplicitParam(required = false, name = "type", value = "选项类型:0省(默认),1市,2区"),
+            @ApiImplicitParam(required = false, name = "parentId", value = "父级地址Id")
+    })
+    @GetMapping("/select")
+    public ResponseJson<List<AddressSelectVo>> getSelectAddress(Integer type, Integer parentId) {
+        if (null == type) {
+            type = 0;
+        } else {
+            if (null == parentId) {
+                return ResponseJson.error("父级地址Id不能为空!", null);
+            }
+        }
+        return addressService.getSelectAddress(type, parentId);
+    }
+
+
+    /**
+     * 所有地址下拉完整数据
+     */
+    @ApiOperation("所有地址完整数据(旧:/club/address)")
+    @GetMapping("/select/all")
+    public ResponseJson<List<AddressSelectVo>> getAllSelectAddress() {
+        return addressService.getAllSelectAddress();
+    }
+
+}

+ 159 - 15
src/main/java/com/caimei/controller/wechat/WxAuthApi.java

@@ -1,12 +1,11 @@
 package com.caimei.controller.wechat;
 
-import com.caimei.aop.IpSave;
+import com.alibaba.fastjson.JSONObject;
 import com.caimei.model.ResponseJson;
+import com.caimei.model.dto.ProductSaveDto;
+import com.caimei.model.po.CmBrandAuthPo;
 import com.caimei.model.vo.*;
-import com.caimei.module.base.entity.vo.AuthProductVo;
-import com.caimei.service.auth.AuthClubService;
-import com.caimei.service.auth.AuthProductService;
-import com.caimei.service.auth.DoctorService;
+import com.caimei.service.auth.*;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -15,10 +14,11 @@ import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * @author Aslee
@@ -31,10 +31,14 @@ import org.springframework.web.bind.annotation.RestController;
 public class WxAuthApi {
     private final AuthClubService authClubService;
 
+    private final AuthService authService;
+
     private final AuthProductService authProductService;
 
     private final DoctorService doctorService;
 
+    private final ShopService shopService;
+
     @ApiOperation("供应商信息")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
@@ -60,7 +64,6 @@ public class WxAuthApi {
             @ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
     })
-    @IpSave(saveName = "机构列表",saveParams = false)
     @GetMapping("/club/list")
     public ResponseJson<PageInfo<WxClubListVo>> getWxClubList(Integer authUserId, String appId, String lngAndLat, String clubName, Integer provinceId,
                                                               Integer cityId, Integer townId,
@@ -74,7 +77,6 @@ public class WxAuthApi {
 
     @ApiOperation("已认证机构详情")
     @ApiImplicitParam(required = false, name = "authId", value = "正品联盟机构Id")
-    @IpSave(saveName = "机构详情",saveParams = true)
     @GetMapping("/club/details")
     public ResponseJson<WxClubDetailsVo> getWxClubDetails(Integer authId) {
         return authClubService.getWxClubDetails(authId);
@@ -98,18 +100,160 @@ public class WxAuthApi {
         return authProductService.getWxProductTypeList(authUserId, appId, name, pageNum, pageSize);
     }
 
-    @ApiOperation("认证商品列表")
+    @ApiOperation("认证商品列表")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "productTypeId", required = true, value = "设备分类id"),
+            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1供应商设备分类上线设备列表 2设备认证列表"),
+            @ApiImplicitParam(name = "authId", required = false, value = "机构id"),
+            @ApiImplicitParam(name = "authParty", required = false, value = "机构名称"),
+            @ApiImplicitParam(name = "productTypeId", required = false, value = "设备分类id"),
             @ApiImplicitParam(name = "snCode", required = false, value = "sn码后四位"),
             @ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
     })
     @GetMapping("/product/list")
-    public ResponseJson<PageInfo<WxProductListVo>> getWxProductList(Integer productTypeId, String snCode,
+    public ResponseJson<PageInfo<WxProductListVo>> getWxProductList(Integer listType, Integer authId, Integer productTypeId,
+                                                                    String authParty, String snCode,
                                                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                                     @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
-        return authProductService.getWxProductList(productTypeId, snCode, pageNum, pageSize);
+        return authProductService.getWxProductList(listType, authId, authParty, productTypeId, snCode, pageNum, pageSize);
+    }
+
+    /**
+     * 获取授权商品回显数据
+     */
+    @ApiOperation("授权商品回显数据")
+    @ApiImplicitParam(name = "productId", required = true, value = "授权商品id")
+    @GetMapping("/product/form/data")
+    public ResponseJson<ProductFormVo> getProductFormData(Integer productId) {
+        return authProductService.getProductFormData(productId);
+    }
+
+    /**
+     * 品牌列表
+     *
+     * @param type 1品牌方可用品牌列表,2代理商可用品牌列表,3供应商可用品牌列表
+     * @return AuthVo
+     */
+    @ApiOperation("品牌列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "1品牌方品牌列表,2代理商品牌列表,3供应商可用品牌列表", required = true),
+            @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
+    })
+    @GetMapping("/brand/list")
+    public ResponseJson<List<BrandVo>> getBrandList(Integer type, Integer authUserId) {
+        return shopService.getBrandList(type, authUserId);
+    }
+
+    /**
+     * 添加/编辑授权商品
+     * @param productSaveDto {
+     *                   productId              授权商品id
+     *                   authId                 授权id
+     *                   brandId                品牌id
+     *                   productTypeId          设备分类id
+     *                   snCode                 商品SN码
+     *                   productImage           商品图片
+     *                   certificateImage       授权牌照
+     *                   addQrCodeFlag          是否生成二维码授权牌:0否,1是
+     *                   addTemplateType        生成二维码授权牌模板:1左下,2右边,3左边
+     *                   purchaseWay            购买渠道
+     *                   invoiceImage           发票图片
+     *                   status                 上线状态:0已下线,1已上线,2待上线
+     *                   createBy               创建人id
+     *                   source                 来源:1供应商保存,2机构保存
+     *                   paramList              商品参数列表
+     * }
+     */
+    @ApiOperation("添加/编辑授权商品")
+    @PostMapping("/product/save")
+    public ResponseJson saveProduct(@RequestBody ProductSaveDto productSaveDto) throws IOException {
+        return authProductService.saveProduct(productSaveDto, false);
+    }
+
+    /**
+     * 授权机构回显数据
+     */
+    @ApiOperation("授权机构回显数据")
+    @ApiImplicitParam(name = "authId", required = true, value = "机构用户id")
+    @GetMapping("/form/data")
+    public ResponseJson<AuthFormVo> getAuthFormData(Integer authId) {
+        return authService.getAuthFormData(authId);
+    }
+
+
+    @ApiOperation("添加/编辑授权")
+    @ApiImplicitParam(name = "params", value = "authId:授权id;authUserId:供应商用户id;authParty:授权机构;provinceId;cityId;" +
+            "townId;address;lngAndLat;mobile;userMobile:对应机构用户手机号;" +
+            "firstClubType:一级分类为医美=1,生美=2,项目公司=3,个人=4,其他=5;" +
+            "secondClubType:医美的二级分类为诊所=1、门诊=2、医院=3,其他=4。生美二级分类,美容院=5,养生馆=6,其他=7;" +
+            "medicalLicenseImage:医疗许可证图;empNum:员工人数;"+
+            "logo;customFlag:是否需要自定义属性:0否,1是;remarks:店铺备注;createBy:创建人id;source:1供应商保存,2机构保存", required = true)
+    @PostMapping("/save")
+    public ResponseJson saveAuth(@RequestBody String params) {
+        JSONObject paramsMap = JSONObject.parseObject(params);
+        Integer authId = paramsMap.getInteger("authId");
+        Integer authUserId = paramsMap.getInteger("authUserId");
+        Integer provinceId = paramsMap.getInteger("provinceId");
+        Integer cityId = paramsMap.getInteger("cityId");
+        Integer townId = paramsMap.getInteger("townId");
+        String address = paramsMap.getString("address");
+        String lngAndLat = paramsMap.getString("lngAndLat");
+        String mobile = paramsMap.getString("mobile");
+        String userMobile = paramsMap.getString("userMobile");
+        Integer firstClubType = paramsMap.getInteger("firstClubType");
+        Integer secondClubType = paramsMap.getInteger("secondClubType");
+        String medicalLicenseImage = paramsMap.getString("medicalLicenseImage");
+        Integer empNum = paramsMap.getInteger("empNum");
+        String logo = paramsMap.getString("logo");
+        Integer customFlag = paramsMap.getInteger("customFlag");
+        String remarks = paramsMap.getString("remarks");
+        List<String> bannerList = (List<String>) paramsMap.get("bannerList");
+        String authParty = paramsMap.getString("authParty");
+        Integer createBy = paramsMap.getInteger("createBy");
+        Integer source = paramsMap.getInteger("source");
+        if (null == source) {
+            // 默认供应商保存
+            source = 1;
+        }
+        /*
+            组装授权数据
+         */
+        CmBrandAuthPo auth = new CmBrandAuthPo();
+        auth.setId(authId);
+        auth.setAuthUserId(authUserId);
+        auth.setAuthParty(authParty);
+        auth.setProvinceId(provinceId);
+        auth.setCityId(cityId);
+        auth.setTownId(townId);
+        auth.setAddress(address);
+        auth.setCustomFlag(customFlag);
+        auth.setRemarks(remarks);
+        if (StringUtils.isEmpty(lngAndLat)) {
+            return ResponseJson.error("参数异常,经纬度不能为空");
+        }
+        String[] split = lngAndLat.split(",");
+        auth.setLng(new BigDecimal(split[0]));
+        auth.setLat(new BigDecimal(split[1]));
+        auth.setMobile(mobile);
+        auth.setUserMobile(userMobile);
+        auth.setFirstClubType(firstClubType);
+        auth.setSecondClubType(secondClubType);
+        auth.setMedicalLicenseImage(medicalLicenseImage);
+        auth.setEmpNum(empNum);
+        auth.setLogo(logo);
+        auth.setCreateBy(createBy);
+        // 机构用户编辑授权
+        return authService.saveAuth(auth, bannerList, false, 2);
+    }
+
+    @ApiOperation("设备分类下拉框列表")
+    @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id")
+    @GetMapping("/product/type/select")
+    public ResponseJson<List<ProductTypeListVo>> getProductTypeSelectList(Integer authUserId) {
+        if (null == authUserId) {
+            return ResponseJson.error("参数异常,供应商用户id不能为空", null);
+        }
+        return authProductService.getProductTypeSelectList(authUserId);
     }
 
     @ApiOperation("已认证商品详情")

+ 99 - 0
src/main/java/com/caimei/controller/wechat/WxUploadApi.java

@@ -0,0 +1,99 @@
+package com.caimei.controller.wechat;
+
+import com.caimei.service.auth.UploadService;
+import com.caimei.utils.OSSUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author Aslee
+ * @date 2021/5/14
+ */
+@Api(tags = "微信上传API")
+@Slf4j
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/wx/upload")
+public class WxUploadApi {
+    private static final Logger logger = LoggerFactory.getLogger(WxUploadApi.class);
+    @Value("${caimei.imageDomain}")
+    private String imageDomain;
+    private final UploadService uploadService;
+
+    /**
+     * 上传图片
+     */
+    @ApiOperation("上传图片")
+    @ApiImplicitParam(name = "file", value = "图片", required = true)
+    @PostMapping("/image")
+    public Map<String, Object> uploadImage(MultipartFile file) throws IOException {
+        Map<String, Object> map = new HashMap<>(2);
+        String saveFile;
+        if (file != null ) {
+            // 保存文件
+            saveFile = uploadService.saveFile(file);
+            map.put("data", saveFile);
+            map.put("msg", "上传成功");
+            logger.info("【图片上传】>>>>>>>>>>>>>>>>图片上传成功:" + saveFile);
+        } else {
+            map.put("msg", "上传失败");
+            logger.info("【图片上传】>>>>>>>>>>>>>>>>图片上传失败:");
+        }
+        return map;
+    }
+
+
+
+    @ApiOperation("上传文件")
+    @ApiImplicitParam(name = "file", value = "文件", required = true)
+    @PostMapping("/file")
+    public Map<String, Object> uploadFile(MultipartFile file) throws IOException {
+        Map<String, Object> map = new HashMap<>(2);
+        String fileAllName = file.getOriginalFilename();
+        String realName = fileAllName.substring(0, fileAllName.lastIndexOf("."));
+        String fileType = fileAllName.substring(fileAllName.lastIndexOf(".") + 1);
+        String fileName = file.getResource().getFilename();
+        String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+        String filePath = uuid + "." + fileType;
+        String contentType = OSSUtils.getContentType(fileAllName);
+        log.info(">>>>>>>>>>>>>上传文件");
+        //保存本地
+        File uploadFile = OSSUtils.ossUpload(file);
+        //将文件上传oss
+        log.info("开始上传>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        log.info("开始时间" + format.format(new Date()));
+        String previewUrl = OSSUtils.ossUpload(filePath, uploadFile, contentType, null);
+        log.info("结束时间" + format.format(new Date()));
+        if (StringUtils.isNotEmpty(previewUrl)) {
+            map.put("previewUrl", previewUrl);
+            map.put("downloadUrl", filePath);
+            map.put("fileName", fileName);
+            map.put("msg", "上传成功");
+            logger.info(">>>>>>>>>>>>>>>>文件上传成功:" + previewUrl);
+        } else {
+            map.put("msg", "上传失败");
+            logger.info(">>>>>>>>>>>>>>>>文件上传失败:");
+        }
+        return map;
+    }
+}

+ 99 - 0
src/main/java/com/caimei/controller/wechat/WxUserApi.java

@@ -0,0 +1,99 @@
+package com.caimei.controller.wechat;
+
+import com.alibaba.fastjson.JSONObject;
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.WxClubUserVo;
+import com.caimei.service.wechat.RegisterService;
+import com.caimei.service.wechat.WxUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 机构用户登录API
+ *
+ * @author : Aslee
+ * @date : 2021/5/11
+ */
+@Api(tags = "微信机构用户API")
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/wx/user")
+public class WxUserApi {
+
+    private final WxUserService wxUserService;
+
+    @ApiOperation("获取用户信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mobile", required = false, value = "手机号"),
+            @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
+            @ApiImplicitParam(name = "clubUserId", required = false, value = "机构用户id")
+    })
+    @GetMapping("/info")
+    public ResponseJson<Map<String, Object>> getUserInfo(String mobile, Integer authUserId, Integer clubUserId, Integer authId) {
+        if (StringUtils.isEmpty(mobile) && null == clubUserId && null == authId) {
+            return ResponseJson.error("参数异常", null);
+        }
+        if (StringUtils.isNotEmpty(mobile) && null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        return wxUserService.getUserInfo(mobile, authUserId, clubUserId, authId);
+    }
+
+    @ApiOperation("登录注册验证码发送")
+    @ApiImplicitParam(name = "params", value = "mobile:手机号;authUserId:供应商用户id;type:1注册验证码,2忘记密码验证码")
+    @PostMapping("/login/code/send")
+    public ResponseJson sendForgetCode(@RequestBody String params) {
+        JSONObject parseObject = JSONObject.parseObject(params);
+        String mobile = parseObject.getString("mobile");
+        Integer authUserId = parseObject.getInteger("authUserId");
+        Integer type = parseObject.getInteger("type");
+        if (StringUtils.isEmpty(mobile)) {
+            return ResponseJson.error("手机号不能为空", null);
+        }
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        if (null == type) {
+            return ResponseJson.error("验证码类型不能为空");
+        }
+        return wxUserService.sendLoginCode(mobile, authUserId, type);
+    }
+
+    @ApiOperation("修改密码")
+    @ApiImplicitParam(name = "params", value = "mobile:手机号;verifyCode:验证码;password:新密码;authUserId:供应商用户id")
+    @PostMapping("/password/update")
+    public ResponseJson updatePassword(@RequestBody String params) {
+        JSONObject parseObject = JSONObject.parseObject(params);
+        String mobile = parseObject.getString("mobile");
+        String verifyCode = parseObject.getString("verifyCode");
+        String password = parseObject.getString("password");
+        Integer authUserId = parseObject.getInteger("authUserId");
+        if (StringUtils.isEmpty(mobile)) {
+            return ResponseJson.error("手机号不能为空", null);
+        }
+        if (StringUtils.isEmpty(verifyCode)) {
+            return ResponseJson.error("验证码不能为空", null);
+        }
+        if (StringUtils.isEmpty(password)) {
+            return ResponseJson.error("新密码不能为空", null);
+        }
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        return wxUserService.updatePassword(mobile, verifyCode, password, authUserId);
+    }
+
+    @ApiOperation("校验token是否失效")
+    @PostMapping("/token/check")
+    public ResponseJson checkToken(){
+        return ResponseJson.success("token有效");
+    }
+}

+ 0 - 1
src/main/java/com/caimei/mapper/cmMapper/AddressMapper.java

@@ -1,7 +1,6 @@
 package com.caimei.mapper.cmMapper;
 
 import com.caimei.model.vo.AddressSelectVo;
-import com.caimei.module.base.entity.vo.AddressVo;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;

+ 34 - 2
src/main/java/com/caimei/mapper/cmMapper/AuthMapper.java

@@ -3,7 +3,9 @@ package com.caimei.mapper.cmMapper;
 import com.caimei.model.po.CmBrandAuthPo;
 import com.caimei.model.po.LdmDataPo;
 import com.caimei.model.po.TownPo;
+import com.caimei.model.vo.AuthFormVo;
 import com.caimei.model.vo.AuthVo;
+import com.caimei.model.vo.TemplateVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -19,7 +21,7 @@ import java.util.List;
 @Mapper
 public interface AuthMapper {
 
-    List<AuthVo> getAuthList(@Param("listType") Integer listType, @Param("authUserId") Integer authUserId, @Param("authParty") String authParty, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus, @Param("lowerAuditStatus") Integer lowerAuditStatus);
+    List<AuthVo> getAuthList(@Param("listType") Integer listType, @Param("authUserId") Integer authUserId, @Param("authParty") String authParty, @Param("mobile") String mobile, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus, @Param("lowerAuditStatus") Integer lowerAuditStatus, @Param("shopAuditStatus") Integer shopAuditStatus, @Param("sendStatus") Integer sendStatus);
 
     void updateAuthStatusByAuthId(@Param("authId") Integer authId, @Param("status") Integer status);
 
@@ -35,7 +37,7 @@ public interface AuthMapper {
 
     Integer getClubStatus(Integer authId);
 
-    CmBrandAuthPo getAuthById(Integer authId);
+    AuthFormVo getAuthFormById(Integer authId);
 
     Integer getAuthIdByAuthParty(@Param("authParty") String authParty, @Param("authUserId") Integer authUserId);
 
@@ -74,4 +76,34 @@ public interface AuthMapper {
     List<AuthVo> getAuthByNameAndAddress(@Param("authParty") String authParty, @Param("address") String address);
 
     void updateRemarks(@Param("authId") Integer authId, @Param("remarks") String remarks);
+
+    AuthFormVo getAuthBaseInfo(@Param("authUserId") Integer authUserId, @Param("authId") Integer authId);
+
+    AuthVo getAuthById(Integer authId);
+
+    void updateAuthShopAuditStatus(@Param("authId") Integer authId, @Param("status") Integer status, @Param("shopAuditStatus") Integer auditStatus, @Param("shopInvalidReason") String invalidReason, @Param("shopAuditBy") Integer auditBy, @Param("shopAuditTime") Date auditTime);
+
+    List<String> getTownNames();
+
+    List<String> getProvinceNames();
+
+    List<String> getCityNames(Integer ProvinceId);
+
+    Integer getCityIdByProvinceId(@Param("provinceId")Integer provinceId,@Param("cityName") String cityName);
+
+    String getProvinceNameById(Integer provinceId);
+
+    String getCityNameByCityId(Integer cityId);
+
+    String getTownNameById(Integer townId);
+
+    void updateSendStatus(Integer authId);
+
+    Integer getAdminUserId();
+
+    TemplateVo getAuthTemplate(@Param("authId") Integer authId, @Param("authUserId") Integer authUserId, @Param("templateType") Integer templateType);
+
+    void updateAuthImage(CmBrandAuthPo auth);
+
+    List<CmBrandAuthPo> getAllAuth(Integer authUserId);
 }

+ 17 - 8
src/main/java/com/caimei/mapper/cmMapper/AuthProductMapper.java

@@ -4,9 +4,6 @@ import com.caimei.model.po.ProductParamPo;
 import com.caimei.model.po.ProductPo;
 import com.caimei.model.po.ProductTypePo;
 import com.caimei.model.vo.*;
-import com.caimei.module.base.entity.po.CmBrandProductParamPo;
-import com.caimei.module.base.entity.vo.AuthProductVo;
-import com.caimei.module.base.entity.vo.StatementFileVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -22,7 +19,7 @@ import java.util.List;
 @Mapper
 public interface AuthProductMapper {
 
-    List<ProductListVo> getProductList(@Param("listType") Integer listType, @Param("authId") Integer authId, @Param("productName") String productName, @Param("snCode") String snCode, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus);
+    List<ProductListVo> getProductList(@Param("listType") Integer listType, @Param("authId") Integer authId, @Param("productName") String productName, @Param("snCode") String snCode, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus, @Param("shopAuditStatus") Integer shopAuditStatus);
 
     void updateProductStatusByProductId(@Param("productId") Integer productId, @Param("status") Integer status);
 
@@ -50,9 +47,9 @@ public interface AuthProductMapper {
 
     void updateImageByProductId(ProductPo product);
 
-    void updateProductAuditStatus(@Param("productId") Integer productId, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus, @Param("invalidReason") String invalidReason, @Param("auditBy") Integer auditBy, @Param("auditTime") Date auditTime);
+    void updateProductAuditStatus(@Param("productId") Integer productId, @Param("productTypeId") Integer productTypeId, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus, @Param("invalidReason") String invalidReason, @Param("auditBy") Integer auditBy, @Param("auditTime") Date auditTime);
 
-    List<WxProductListVo> getWxProductList(@Param("productTypeId") Integer productTypeId, @Param("snCode") String snCode);
+    List<WxProductListVo> getWxProductList(@Param("listType") Integer listType, @Param("authId") Integer authId, @Param("authParty") String authParty, @Param("productTypeId") Integer productTypeId, @Param("snCode") String snCode);
 
     Integer getBrandIdByBrandName(String brand);
 
@@ -64,7 +61,7 @@ public interface AuthProductMapper {
 
     StatementFileVo getStatementFile(Integer authUserId, Integer brandId);
 
-    List<CmBrandProductParamPo> getAuthProductParams(Integer productId);
+    List<ProductParamPo> getAuthProductParams(Integer productId);
 
     List<WxProductListVo> getClubProductList(Integer authId);
 
@@ -82,7 +79,19 @@ public interface AuthProductMapper {
 
     List<WxProductTypeListVo> getWxProductTypeList(Integer authUserId, String name);
 
-    ProductTypePo getProductType(Integer productTypeId);
+    ProductTypePo getProductType(Integer productTypeId, String productName, Integer authUserId);
 
     Integer getProductCountByTypeId(Integer productTypeId);
+
+    void updateProductShopAuditStatus(@Param("productId") Integer productId, @Param("productTypeId") Integer productTypeId, @Param("status") Integer status, @Param("shopAuditStatus") Integer auditStatus, @Param("shopInvalidReason") String invalidReason, @Param("shopAuditBy") Integer auditBy, @Param("shopAuditTime") Date auditTime);
+
+    ProductPo getProductPo(Integer productId);
+
+    Integer getAuthUserIdByProductId(Integer productId);
+
+    void deleteParamsByProductTypeId(Integer productTypeId);
+
+    void insertProductTypeParam(@Param("productTypeId") Integer productTypeId, @Param("paramName") String paramName, @Param("paramContent") String paramContent);
+
+    List<ProductParamPo> getProductTypeParamList(Integer productTypeId);
 }

+ 34 - 0
src/main/java/com/caimei/mapper/cmMapper/AuthTemplateMapper.java

@@ -0,0 +1,34 @@
+package com.caimei.mapper.cmMapper;
+
+import com.caimei.model.vo.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2022/7/6
+ */
+@Mapper
+public interface AuthTemplateMapper {
+    /**
+     * 模板列表
+     * @param listType
+     * @param authUserId
+     * @return
+     */
+    List<TemplateVo> getTemplateList(@Param("listType") Integer listType, @Param("authUserId") Integer authUserId);
+
+    void insertTemplate(@Param("templateImage") String templateImage, @Param("authUserId") Integer authUserId, @Param("templateSize") String templateSize, @Param("qrPosition") String qrPosition, @Param("qrSize") Integer qrSize, @Param("logoSize") String logoSize);
+
+    void updateSelective(@Param("templateId") Integer templateId, @Param("templateImage") String templateImage, @Param("templateSize") String templateSize, @Param("authUserId") Integer authUserId, @Param("status") Integer status, @Param("qrPosition") String qrPosition, @Param("qrSize") Integer qrSize, String logoSize, @Param("authFlag") Integer authFlag, @Param("productFlag") Integer productFlag);
+
+    void clearAuthFlag(Integer authUserId);
+
+    void clearProductFlag(Integer authUserId);
+
+    TemplateVo getTemplateFormData(@Param("templateId") Integer templateId, @Param("authId") Integer authId, @Param("authUserId") Integer authUserId, @Param("authFlag") Integer authFlag, @Param("status") Integer status);
+}

+ 14 - 3
src/main/java/com/caimei/mapper/cmMapper/ClubMapper.java

@@ -5,7 +5,6 @@ import com.caimei.model.vo.*;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.Date;
 import java.util.List;
 
 /**
@@ -18,7 +17,7 @@ import java.util.List;
 public interface ClubMapper {
     List<ClubVo> getClubList(@Param("authUserId") Integer authUserId, @Param("clubName") String clubName);
 
-    List<ClubUserVo> getClubUserList(@Param("authId") Integer authId, @Param("mobile") String mobile, String name, @Param("status") Integer status);
+    List<ClubUserVo> getClubUserList(@Param("authUserId") Integer authUserId, @Param("mobile") String mobile, String name, @Param("status") Integer status);
 
     void insertClubUser(ClubUserPo clubUser);
 
@@ -28,11 +27,23 @@ public interface ClubMapper {
 
     void insertFeedback(@Param("clubUserId") Integer clubUserId, @Param("content") String content);
 
-    WxClubUserVo getWxClubUser(@Param("mobile") String mobile, @Param("appId") String appId, @Param("authUserId") Integer authUserId, @Param("authId") Integer authId);
+    WxClubUserVo getWxClubUser(@Param("mobile") String mobile, @Param("appId") String appId, @Param("authUserId") Integer authUserId, @Param("authId") Integer authId, @Param("clubUserId") Integer clubUserId);
 
     WxClubDetailsVo getClubDetails(Integer authId);
 
     void updateClubUser(ClubUserPo clubUser);
 
     void deleteClubUser(Integer clubUserId);
+
+    void updatePassword(@Param("mobile") String mobile, @Param("password") String password, @Param("authUserId") Integer authUserId);
+
+    void bindAuthId(@Param("clubUserId") Integer clubUserId, @Param("authId") Integer authId);
+
+    void updateStatus(@Param("clubUserId") Integer clubUserId, @Param("status") Integer status);
+
+    void updateClubUserPassword(@Param("clubUserId") Integer clubUserId, @Param("password") String md5Password);
+
+    void unbindAuthId(Integer clubUserId);
+
+    String getDbPassword(Integer clubUserId);
 }

+ 3 - 0
src/main/java/com/caimei/mapper/cmMapper/FileMapper.java

@@ -3,6 +3,7 @@ package com.caimei.mapper.cmMapper;
 import com.caimei.model.po.CourseFilePo;
 import com.caimei.model.po.ProductImagePo;
 import com.caimei.model.po.FilePo;
+import com.caimei.model.vo.AuthVo;
 import com.caimei.model.vo.CourseFileListVo;
 import com.caimei.model.vo.FileListVo;
 import com.caimei.model.vo.WxFileListVo;
@@ -48,4 +49,6 @@ public interface FileMapper {
     void deleteCourseFileByFileId(Integer fileId);
 
     List<ProductImagePo> getProductImageList(Integer authUserId);
+
+    List<AuthVo> getAuthImageList(Integer authUserId);
 }

+ 31 - 0
src/main/java/com/caimei/mapper/cmMapper/LogisticsMapper.java

@@ -0,0 +1,31 @@
+package com.caimei.mapper.cmMapper;
+
+import com.caimei.model.po.CertificateLogisticsPo;
+import com.caimei.model.po.CmBrandAuthPo;
+import com.caimei.model.po.LdmDataPo;
+import com.caimei.model.po.TownPo;
+import com.caimei.model.vo.AuthFormVo;
+import com.caimei.model.vo.AuthVo;
+import com.caimei.model.vo.CertificateLogisticsVo;
+import com.caimei.model.vo.LogisticsCompanyVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2022/6/15
+ */
+@Mapper
+public interface LogisticsMapper {
+
+    void sendCertificate(CertificateLogisticsPo logistics);
+
+    CertificateLogisticsVo getCertificateLogistics(Integer authId);
+
+    List<LogisticsCompanyVo> getLogisticsCompanyList(Integer companyId);
+}

+ 1 - 1
src/main/java/com/caimei/mapper/cmMapper/ShopMapper.java

@@ -18,7 +18,7 @@ import java.util.List;
 @Mapper
 public interface ShopMapper {
 
-    List<ShopListVo> getShopList(@Param("listType") Integer listType, @Param("shopName") String shopName,@Param("loginAccount")  String loginAccount, @Param("shopType") Integer shopType, @Param("brandId") Integer brandId, @Param("mobile") String mobile, @Param("linkMan") String linkMan, @Param("lowerAuditStatus") Integer lowerAuditStatus);
+    List<ShopListVo> getShopList(@Param("listType") Integer listType, @Param("shopName") String shopName, @Param("loginAccount") String loginAccount, @Param("shopType") Integer shopType, @Param("brandId") Integer brandId, @Param("mobile") String mobile, @Param("linkMan") String linkMan, @Param("lowerAuditStatus") Integer lowerAuditStatus, @Param("sendStatus") Integer sendStatus);
 
     void updateShopStatusByUserId(@Param("authUserId") Integer authUserId, @Param("status") Integer status);
 

+ 2 - 0
src/main/java/com/caimei/mapper/cmMapper/SystemMapper.java

@@ -206,4 +206,6 @@ public interface SystemMapper {
     void deleteRoleMenuPermission(Integer menuId);
 
     void deleteMenuRoleRelation(Integer menuId);
+
+    List<Integer> getMenuIdList(String parentId, int menuType);
 }

+ 53 - 20
src/main/java/com/caimei/model/dto/ProductSaveDto.java

@@ -2,8 +2,6 @@ package com.caimei.model.dto;
 
 
 import com.caimei.model.po.ProductParamPo;
-import com.caimei.module.base.entity.po.CmBrandProductParamPo;
-import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotNull;
@@ -18,43 +16,78 @@ import java.util.List;
  */
 @Data
 public class ProductSaveDto {
-    @ApiModelProperty("授权商品id")
+    /**
+     * 授权商品id
+     */
     private Integer productId;
 
-    @NotNull(message = "授权id不能为空")
-    @ApiModelProperty("授权id")
+    /**
+     * 授权id
+     */
     private Integer authId;
 
-    @NotNull(message = "品牌id不能为空")
-    @ApiModelProperty("品牌id")
+    /**
+     * 品牌id
+     */
     private Integer brandId;
 
-    @ApiModelProperty("设备分类id")
+    /**
+     * 设备分类id
+     */
     private Integer productTypeId;
 
-    @NotNull(message = "商品SN码不能为空")
-    @ApiModelProperty("商品SN码")
+    /**
+     * 设备名称
+     */
+    private String productName;
+
+    /**
+     * 商品SN码
+     */
     private String snCode;
 
-    @NotNull(message = "商品图片不能为空")
-    @ApiModelProperty("商品图片")
+    /**
+     * 商品图片
+     */
     private String productImage;
 
-    @NotNull(message = "授权牌照不能为空")
-    @ApiModelProperty("授权牌照")
+    /**
+     * 授权牌照
+     */
     private String certificateImage;
 
-    @ApiModelProperty("是否生成二维码授权牌:0否,1是")
+    /**
+     * 是否生成二维码授权牌:0否,1是
+     */
     private Integer addQrCodeFlag;
 
-    @ApiModelProperty("生成二维码授权牌模板:1左下,2右边,3左边")
+    /**
+     * 生成二维码授权牌模板:1左下,2右边,3左边
+     */
     private Integer addTemplateType;
 
-    @NotNull(message = "创建人id不能为空")
-    @ApiModelProperty("创建人id")
+    /**
+     * 购买渠道
+     */
+    private String purchaseWay;
+
+    /**
+     * 发票图片
+     */
+    private String invoiceImage;
+
+    /**
+     * 创建人id
+     */
     private Integer createBy;
 
-    @NotNull(message = "商品参数列表不能为空")
-    @ApiModelProperty("商品参数列表")
+    /**
+     * 商品参数列表
+     */
     private List<ProductParamPo> paramList;
+
+    /**
+     * 来源:1供应商保存,2机构保存
+     */
+    private Integer source;
 }

+ 5 - 0
src/main/java/com/caimei/model/dto/ShopInfoDto.java

@@ -35,6 +35,11 @@ public class ShopInfoDto {
      */
     private String securityLink;
 
+    /**
+     * 制造商
+     */
+    private String manufacturer;
+
     /**
      * 公众号二维码图片
      */

+ 1 - 0
src/main/java/com/caimei/model/en/QrCodeSize.java

@@ -9,6 +9,7 @@ import java.util.Date;
  * @author Aslee
  */
 public class QrCodeSize {
+    public static final int XLARGE = 1000;
     public static final int LARGE = 137;
     public static final int MEDIUM = 104;
     public static final int SMALL = 70;

+ 62 - 0
src/main/java/com/caimei/model/po/CertificateLogisticsPo.java

@@ -0,0 +1,62 @@
+package com.caimei.model.po;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * cm_brand_article
+ * @author  Aslee
+ */
+@Data
+public class CertificateLogisticsPo {
+    /**
+     * 类型:1 采美365  2 呵呵商城 3 大宗采购 4认证通
+     */
+    private Integer type;
+
+    /**
+     * 机构id
+     */
+    private Integer authId;
+
+    /**
+     * 快递单当前的状态(0:在途,即货物处于运输过程中;1:揽件,货物已由快递公司揽收并且产生了第一条跟踪信息;2:疑难,货物寄送过程出了问题;3:签收,收件人已签收;4:退签,即货物由于用户拒签、超区等原因退回,而且发件人已经签收;5:派件,即快递正在进行同城派件;6:退回,货物正处于退回发件人的途中;)
+     */
+    private Integer state;
+
+    /**
+     * 快递公司名称
+     */
+    private String companyName;
+
+    /**
+     * 快递公司代码
+     */
+    private String companyCode;
+
+    /**
+     * 快递单号
+     */
+    private String logisticsNumber;
+
+    /**
+     * 图片备注
+     */
+    private String remarksImage;
+
+    /**
+     * 文字备注
+     */
+    private String remarks;
+
+    /**
+     * 最后更新时间
+     */
+    private Date updateDate;
+
+    /**
+     * 认证通机构收货人手机号
+     */
+    private String mobile;
+}

+ 15 - 0
src/main/java/com/caimei/model/po/ClubUserPo.java

@@ -16,6 +16,11 @@ public class ClubUserPo {
      */
     private Integer id;
 
+    /**
+     * 供应商用户id
+     */
+    private Integer authUserId;
+
     /**
      * 机构id
      */
@@ -35,4 +40,14 @@ public class ClubUserPo {
      * 手机号
      */
     private String mobile;
+
+    /**
+     * 手机号
+     */
+    private String password;
+
+    /**
+     * 状态:0停用,1启用
+     */
+    private Integer status;
 }

+ 90 - 0
src/main/java/com/caimei/model/po/CmBrandAuthPo.java

@@ -67,6 +67,31 @@ public class CmBrandAuthPo {
      */
     private String mobile;
 
+    /**
+     * 对应机构用户手机号
+     */
+    private String userMobile;
+
+    /**
+     * 一级分类为医美=1,生美=2,项目公司=3,个人=4,其他=5
+     */
+    private Integer firstClubType;
+
+    /**
+     * 医美的二级分类为诊所=1、门诊=2、医院=3,其他=4。生美二级分类,美容院=5,养生馆=6,其他=7
+     */
+    private Integer secondClubType;
+
+    /**
+     * 医疗许可证图片
+     */
+    private String medicalLicenseImage;
+
+    /**
+     * 员工人数
+     */
+    private Integer empNum;
+
     /**
      * 机构logo
      */
@@ -87,16 +112,46 @@ public class CmBrandAuthPo {
      */
     private Integer status;
 
+    /**
+     * 管理员审核人id,对应cm_brand_auth_user
+     */
+    private Integer auditBy;
+
     /**
      * 审核状态:0审核未通过,1审核通过,2待审核
      */
     private Integer auditStatus;
 
+    /**
+     * 审核时间
+     */
+    private Date auditTime;
+
+    /**
+     * 供应商审核人id
+     */
+    private Integer shopAuditBy;
+
+    /**
+     * 供应商审核状态:0审核未通过,1审核通过,2待审核
+     */
+    private Integer shopAuditStatus;
+
+    /**
+     * 供应商审核时间
+     */
+    private Date shopAuditTime;
+
     /**
      * 创建人Id
      */
     private Integer createBy;
 
+    /**
+     * 创建来源:1供应商添加,2机构用户添加
+     */
+    private Integer createSource;
+
     /**
      * 删除标志:1已删除,0不是
      */
@@ -112,4 +167,39 @@ public class CmBrandAuthPo {
      */
     private Integer maxParamNum;
 
+    /**
+     * 认证编号
+     */
+    private String authCode;
+
+    /**
+     * 认证日期
+     */
+    private Date authDate;
+
+    /**
+     * 授权牌logo(logo与机构名称组合)
+     */
+    private String authImageLogo;
+
+    /**
+     * 授权牌(自定义上传)
+     */
+    private String authImage;
+
+    /**
+     * pc添加水印授权牌
+     */
+    private String pcAuthImage;
+
+    /**
+     * 小程序添加水印授权牌
+     */
+    private String appletsAuthImage;
+
+    /**
+     * 授权牌类型:1模板库生成,2自定义上传
+     */
+    private Integer authImageType;
+
 }

+ 38 - 1
src/main/java/com/caimei/model/po/ProductPo.java

@@ -2,6 +2,8 @@ package com.caimei.model.po;
 
 import java.io.Serializable;
 import java.util.Date;
+
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 /**
@@ -32,6 +34,11 @@ public class ProductPo {
      */
     private Integer productTypeId;
 
+    /**
+     * 设备名称
+     */
+    private String name;
+
     /**
      * sn码
      */
@@ -40,7 +47,7 @@ public class ProductPo {
     /**
      * 商品图片
      */
-    private String productImage;
+    private String image;
 
     /**
      * pc添加水印商品图片
@@ -82,6 +89,16 @@ public class ProductPo {
      */
     private Integer addTemplateType;
 
+    /**
+     * 购买渠道
+     */
+    private String purchaseWay;
+
+    /**
+     * 发票图片
+     */
+    private String invoiceImage;
+
     /**
      * 上线状态:0已下线,1已上线,2待上线
      */
@@ -92,6 +109,11 @@ public class ProductPo {
      */
     private Integer auditStatus;
 
+    /**
+     * 供应商审核状态:0审核未通过,1审核通过,2待审核
+     */
+    private Integer shopAuditStatus;
+
     /**
      * 创建时间
      */
@@ -101,4 +123,19 @@ public class ProductPo {
      * 创建人Id
      */
     private Integer createBy;
+
+    /**
+     * 创建来源:1供应商添加,2机构用户添加
+     */
+    private Integer createSource;
+
+    /**
+     * 管理员审核人id,对应cm_brand_auth_user
+     */
+    private Integer auditBy;
+
+    /**
+     * 审核时间
+     */
+    private Date auditTime;
 }

+ 31 - 0
src/main/java/com/caimei/model/po/ProductTypePo.java

@@ -3,6 +3,7 @@ package com.caimei.model.po;
 import lombok.Data;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * cm_brand_auth_product
@@ -22,6 +23,16 @@ public class ProductTypePo {
      */
     private Integer authUserId;
 
+    /**
+     * 品牌id
+     */
+    private Integer brandId;
+
+    /**
+     * 品牌名称
+     */
+    private String brandName;
+
     /**
      * 设备分类名称
      */
@@ -61,4 +72,24 @@ public class ProductTypePo {
      * 创建人Id
      */
     private Integer createBy;
+
+    /**
+     * 创建人Id
+     */
+    private Integer createSource;
+
+    /**
+     * 管理员审核人id,对应cm_brand_auth_user
+     */
+    private Integer auditBy;
+
+    /**
+     * 审核时间
+     */
+    private Date auditTime;
+
+    /**
+     * 参数列表
+     */
+    private List<ProductParamPo> paramList;
 }

+ 2 - 0
src/main/java/com/caimei/model/po/TownPo.java

@@ -10,4 +10,6 @@ public class TownPo {
     private Integer cityId;
 
     private Integer townId;
+
+    private Integer provinceId;
 }

+ 5 - 0
src/main/java/com/caimei/model/po/VideoPo.java

@@ -25,6 +25,11 @@ public class VideoPo {
      */
     private String title;
 
+    /**
+     * 视频封面
+     */
+    private String image;
+
     /**
      * 视频名称
      */

+ 126 - 13
src/main/java/com/caimei/model/vo/AuthFormVo.java

@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -14,42 +16,153 @@ import java.util.List;
  */
 @Data
 public class AuthFormVo implements Serializable {
-    @ApiModelProperty("授权机构id")
+    /**
+     * 授权机构id
+     */
     private Integer authId;
 
-    @ApiModelProperty("授权机构")
+    /**
+     * 授权机构
+     */
     private String authParty;
 
-    @ApiModelProperty("省id")
+    /**
+     * 省id
+     */
     private Integer provinceId;
 
-    @ApiModelProperty("市id")
+    /**
+     * 市id
+     */
     private Integer cityId;
 
-    @ApiModelProperty("区id")
+    /**
+     * 区id
+     */
     private Integer townId;
 
-    @ApiModelProperty("区域")
+    /**
+     * 区域
+     */
     private String area;
 
-    @ApiModelProperty("详细地址")
+    /**
+     * 详细地址
+     */
     private String address;
 
-    @ApiModelProperty("经纬度")
+    /**
+     * 经纬度
+     */
     private String lngAndLat;
 
-    @ApiModelProperty("联系方式")
+    /**
+     * 经度
+     */
+    private BigDecimal lng;
+
+    /**
+     * 纬度
+     */
+    private BigDecimal lat;
+
+    /**
+     * 联系方式
+     */
     private String mobile;
 
-    @ApiModelProperty("机构logo")
+    /**
+     * 对应机构用户手机号
+     */
+    private String userMobile;
+
+    /**
+     * 一级分类为医美=1,生美=2,项目公司=3,个人=4,其他=5
+     */
+    private Integer firstClubType;
+
+    /**
+     * 医美的二级分类为诊所=1、门诊=2、医院=3,其他=4。生美二级分类,美容院=5,养生馆=6,其他=7
+     */
+    private Integer secondClubType;
+
+    /**
+     * 医疗许可证图片
+     */
+    private String medicalLicenseImage;
+
+    /**
+     * 员工人数
+     */
+    private Integer empNum;
+
+    /**
+     * 机构logo
+     */
     private String logo;
 
-    @ApiModelProperty("轮播图")
+    /**
+     * 轮播图
+     */
     private List<String> bannerList;
 
-    @ApiModelProperty("是否需要自定义属性:0否,1是")
+    /**
+     * 是否需要自定义属性:0否,1是
+     */
     private Integer customFlag;
 
-    @ApiModelProperty("店铺备注")
+    /**
+     * 店铺备注
+     */
     private String remarks;
+
+    /**
+     * 认证编号
+     */
+    private String authCode;
+
+    /**
+     * 认证日期
+     */
+    private Date authDate;
+
+    /**
+     * 授权牌logo(logo与机构名称组合)
+     */
+    private String authImageLogo;
+
+    /**
+     * 授权牌(自定义上传)
+     */
+    private String authImage;
+
+    /**
+     * 授权牌类型:1模板库生成,2自定义上传
+     */
+    private Integer authImageType;
+
+    /**
+     * 审核状态:0审核未通过,1审核通过,2待审核
+     */
+    private Integer auditStatus;
+
+    /**
+     * 供应商审核状态:0审核未通过,1审核通过,2待审核
+     */
+    private Integer shopAuditStatus;
+
+    /**
+     * 审核不通过原因
+     */
+    private String invalidReason;
+
+    /**
+     * 是否已绑定用户账号:0未绑定,1已绑定
+     */
+    private Integer bindStatus;
+
+    /**
+     * 机构授权牌模板
+     */
+    private TemplateVo authTemplate;
 }

+ 121 - 0
src/main/java/com/caimei/model/vo/AuthProductVo.java

@@ -0,0 +1,121 @@
+package com.caimei.model.vo;
+
+import com.caimei.model.po.ProductParamPo;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Aslee
+ */
+@Data
+public class AuthProductVo {
+    /**
+     * 商品名称
+     */
+    private String productName;
+    /**
+     * 商品SN码
+     */
+    private String snCode;
+    /**
+     * 商品图片
+     */
+    private String productImage;
+    /**
+     * 供应商公众号二维码图片
+     */
+    private String qrCodeImage;
+    /**
+     * 授权牌照
+     */
+    private String certificateImage;
+    /**
+     * 品牌授权Id
+     */
+    private Integer authId;
+    /**
+     * 品牌授权logo
+     */
+    private String authLogo;
+    /**
+     * 品牌Id
+     */
+    private Integer brandId;
+    /**
+     * 品牌名称
+     */
+    private String brandName;
+    /**
+     * 产地
+     */
+    private String productionPlace;
+    /**
+     * 防伪链接
+     */
+    private String securityLink;
+    /**
+     * 制造商
+     */
+    private String manufacturer;
+    /**
+     * 供应商类型:1品牌方,2代理商
+     */
+    private Integer shopType;
+    /**
+     * 供应商名称
+     */
+    private String shopName;
+    /**
+     * 供应商用户id
+     */
+    private Integer authUserId;
+    /**
+     * 声明类型:1弹窗声明,2链接声明
+     */
+    private Integer statementType;
+    /**
+     * 声明弹窗内容
+     */
+    private String statementContent;
+    /**
+     * 声明链接
+     */
+    private String statementLink;
+    /**
+     * 声明图片
+     */
+    private String statementImage;
+    /**
+     * 声明文件
+     */
+    private StatementFileVo statementFile;
+    /**
+     * 被授权方
+     */
+    private String authParty;
+    /**
+     * 机构logo
+     */
+    private String clubLogo;
+    /**
+     * 商品参数
+     */
+    private List<ProductParamPo> paramList;
+    /**
+     * pc商品图片(含水印)
+     */
+    private String pcImage;
+    /**
+     * 小程序商品图片(含水印)
+     */
+    private String appletsImage;
+    /**
+     * pc授权牌照图片(含水印)
+     */
+    private String pcCertificateImage;
+    /**
+     * 小程序授权牌照图片(含水印)
+     */
+    private String appletsCertificateImage;
+}

+ 25 - 0
src/main/java/com/caimei/model/vo/AuthVo.java

@@ -15,15 +15,27 @@ public class AuthVo {
     @ApiModelProperty("授权id")
     private Integer authId;
 
+    @ApiModelProperty("供应商用户id")
+    private Integer authUserId;
+
     @ApiModelProperty("授权机构")
     private String authParty;
 
+    @ApiModelProperty("机构用户手机号")
+    private String mobile;
+
     @ApiModelProperty("上线状态:0已下线,1已上线,2待上线")
     private Integer status;
 
     @ApiModelProperty("审核状态:0审核未通过,1审核通过,2待审核")
     private Integer auditStatus;
 
+    @ApiModelProperty("供应商审核状态:0审核未通过,1审核通过,2待审核")
+    private Integer shopAuditStatus;
+
+    @ApiModelProperty("寄送状态:0未寄送,1已寄送")
+    private Integer sendStatus;
+
     @ApiModelProperty("创建时间")
     private Date createTime;
 
@@ -36,6 +48,9 @@ public class AuthVo {
     @ApiModelProperty("下级待审核数量")
     private Integer waitAuditNum;
 
+    @ApiModelProperty("供应商审核下级待审核数量")
+    private Integer shopWaitAuditNum;
+
     @ApiModelProperty("审核人")
     private String auditBy;
 
@@ -44,4 +59,14 @@ public class AuthVo {
 
     @ApiModelProperty("审核不通过原因")
     private String invalidReason;
+
+    /**
+     * 供应商审核人
+     */
+    private String shopAuditBy;
+
+    /**
+     * 供应商审核时间
+     */
+    private Date shopAuditTime;
 }

+ 69 - 0
src/main/java/com/caimei/model/vo/CertificateLogisticsVo.java

@@ -0,0 +1,69 @@
+package com.caimei.model.vo;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * cm_brand_article
+ * @author  Aslee
+ */
+@Data
+public class CertificateLogisticsVo {
+
+    /**
+     * 机构名称
+     */
+    private String authParty;
+
+    /**
+     * 快递单当前的状态(0:在途,即货物处于运输过程中;1:揽件,货物已由快递公司揽收并且产生了第一条跟踪信息;2:疑难,货物寄送过程出了问题;3:签收,收件人已签收;4:退签,即货物由于用户拒签、超区等原因退回,而且发件人已经签收;5:派件,即快递正在进行同城派件;6:退回,货物正处于退回发件人的途中;)
+     */
+    private Integer state;
+
+    /**
+     * 快递公司名称
+     */
+    private String companyName;
+
+    /**
+     * 快递公司代码
+     */
+    private String companyCode;
+
+    /**
+     * 快递单号
+     */
+    private String logisticsNumber;
+
+    /**
+     * 物流跟踪信息
+     */
+    private String info;
+
+    /**
+     * 图片备注
+     */
+    private String remarksImage;
+
+    /**
+     * 图片列表
+     */
+    private List<String> imageList;
+
+    /**
+     * 文字备注
+     */
+    private String remarks;
+
+    /**
+     * 最后更新时间
+     */
+    private Date updateDate;
+
+    /**
+     * json转换物流追踪信息
+     */
+    private List<RouterVo> routerList;
+}

+ 3 - 0
src/main/java/com/caimei/model/vo/ClubUserVo.java

@@ -31,6 +31,9 @@ public class ClubUserVo {
     @ApiModelProperty("openId")
     private String openId;
 
+    @ApiModelProperty("启用状态:0停用,1启用")
+    private Integer status;
+
     @ApiModelProperty("添加时间")
     private Date addTime;
 }

+ 33 - 0
src/main/java/com/caimei/model/vo/LogisticsCompanyVo.java

@@ -0,0 +1,33 @@
+package com.caimei.model.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 选择地址下拉框列表 数据
+ *
+ * @author : Charles
+ * @date : 2021/7/2
+ */
+@Data
+public class LogisticsCompanyVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 物流公司id
+     */
+    private Integer id;
+
+    /**
+     * 公司名称
+     */
+    private String companyName;
+
+    /**
+     * 公司代码
+     */
+    private String companyCode;
+}

+ 64 - 13
src/main/java/com/caimei/model/vo/ProductFormVo.java

@@ -14,42 +14,93 @@ import java.util.List;
  */
 @Data
 public class ProductFormVo {
-    @ApiModelProperty("商品id")
+    /**
+     * 商品id
+     */
     private Integer productId;
 
-    @ApiModelProperty("授权id")
+    /**
+     * 授权id
+     */
     private Integer authId;
 
-    @ApiModelProperty("品牌id")
+    /**
+     * 品牌id
+     */
     private Integer brandId;
 
-    @ApiModelProperty("品牌名称")
+    /**
+     * 品牌名称
+     */
     private String brandName;
 
-    @ApiModelProperty("设备分类id")
+    /**
+     * 设备分类id
+     */
     private Integer productTypeId;
 
-    @ApiModelProperty("商品名称")
+    /**
+     * 商品名称
+     */
     private String productName;
 
-    @ApiModelProperty("商品SN码")
+    /**
+     * 商品SN码
+     */
     private String snCode;
 
-    @ApiModelProperty("商品图片")
+    /**
+     * 商品图片
+     */
     private String productImage;
 
-    @ApiModelProperty("授权牌照")
+    /**
+     * 授权牌照
+     */
     private String certificateImage;
 
-    @ApiModelProperty("原授权牌照")
+    /**
+     * 原授权牌照
+     */
     private String originalCertificateImage;
 
-    @ApiModelProperty("是否生成二维码授权牌:0否,1是")
+    /**
+     * 是否生成二维码授权牌:0否,1是
+     */
     private Integer addQrCodeFlag;
 
-    @ApiModelProperty("生成二维码授权牌模板:1左下,2右边,3左边")
+    /**
+     * 生成二维码授权牌模板:1左下,2右边,3左边
+     */
     private Integer addTemplateType;
 
-    @ApiModelProperty("商品参数列表")
+    /**
+     * 购买渠道
+     */
+    private String purchaseWay;
+
+    /**
+     * 发票图片
+     */
+    private String invoiceImage;
+
+    /**
+     * 商品参数列表
+     */
     private List<ProductParamPo> paramList;
+
+    /**
+     * 审核状态:0审核未通过,1审核通过,2待审核
+     */
+    private Integer auditStatus;
+
+    /**
+     * 供应商审核状态:0审核未通过,1审核通过,2待审核
+     */
+    private Integer shopAuditStatus;
+
+    /**
+     * 审核不通过原因
+     */
+    private String invalidReason;
 }

+ 13 - 0
src/main/java/com/caimei/model/vo/ProductListVo.java

@@ -26,6 +26,9 @@ public class ProductListVo {
     @ApiModelProperty("审核状态:0审核未通过,1审核通过,2待审核")
     private Integer auditStatus;
 
+    @ApiModelProperty("供应商审核状态:0审核未通过,1审核通过,2待审核")
+    private Integer shopAuditStatus;
+
     @ApiModelProperty("创建时间")
     private Date createTime;
 
@@ -40,4 +43,14 @@ public class ProductListVo {
 
     @ApiModelProperty("审核不通过原因")
     private String invalidReason;
+
+    /**
+     * 供应商审核人
+     */
+    private String shopAuditBy;
+
+    /**
+     * 供应商审核时间
+     */
+    private Date shopAuditTime;
 }

+ 80 - 0
src/main/java/com/caimei/model/vo/RossAddressVo.java

@@ -0,0 +1,80 @@
+package com.caimei.model.vo;
+
+public class RossAddressVo {
+    private String address;
+    private String shopName;//shop
+    private String imgs;
+    private String allimg;
+    private String phone;
+    private String description;
+    private String shopTitle;
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getImgs() {
+        return imgs;
+    }
+
+    public void setImgs(String imgs) {
+        this.imgs = imgs;
+    }
+
+    public String getAllimg() {
+        return allimg;
+    }
+
+    public void setAllimg(String allimg) {
+        this.allimg = allimg;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getShopTitle() {
+        return shopTitle;
+    }
+
+    public void setShopTitle(String shopTitle) {
+        this.shopTitle = shopTitle;
+    }
+
+    @Override
+    public String toString() {
+        return "Address{" +
+                "address='" + address + '\'' +
+                ", shopName='" + shopName + '\'' +
+                ", imgs='" + imgs + '\'' +
+                ", allimg='" + allimg + '\'' +
+                ", phone='" + phone + '\'' +
+                ", description='" + description + '\'' +
+                ", shopTitle='" + shopTitle + '\'' +
+                '}';
+    }
+}

+ 21 - 0
src/main/java/com/caimei/model/vo/RouterVo.java

@@ -0,0 +1,21 @@
+package com.caimei.model.vo;
+
+import lombok.Data;
+
+/**
+ * 物流跟踪信息描述Entity
+ * @author Administrator
+ */
+@Data
+public class RouterVo {
+
+    /**
+     * 描述
+     */
+    private String desc;
+
+    /**
+     * 时间
+     */
+    private String time;
+}

+ 5 - 0
src/main/java/com/caimei/model/vo/ShopInfoVo.java

@@ -34,6 +34,11 @@ public class ShopInfoVo {
      */
     private String securityLink;
 
+    /**
+     * 制造商
+     */
+    private String manufacturer;
+
     /**
      * 代理声明类型:1弹窗,2链接,3图片,4文件
      */

+ 15 - 0
src/main/java/com/caimei/model/vo/StatementFileVo.java

@@ -0,0 +1,15 @@
+package com.caimei.model.vo;
+
+import com.caimei.model.po.CmBrandAuthFilePo;
+import lombok.Data;
+
+/**
+ * @author Aslee
+ */
+@Data
+public class StatementFileVo extends CmBrandAuthFilePo {
+    /**
+     * 访问声明文件链接
+     */
+    private String url;
+}

+ 73 - 0
src/main/java/com/caimei/model/vo/TemplateVo.java

@@ -0,0 +1,73 @@
+package com.caimei.model.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author Aslee
+ * @date 2022/7/6
+ */
+@Data
+public class TemplateVo {
+    /**
+     * 模板id
+     */
+    private Integer templateId;
+
+    /**
+     * 模板图片
+     */
+    private String templateImage;
+
+    /**
+     * 模板尺寸
+     */
+    private String templateSize;
+
+    /**
+     *供应商用户id
+     */
+    private Integer authUserId;
+
+    /**
+     *供应商名称
+     */
+    private String shopName;
+
+    /**
+     *作为机构认证模板:1是,其余否
+     */
+    private Integer authFlag;
+
+    /**
+     *作为设备认证模板:1是,其余否
+     */
+    private Integer productFlag;
+
+    /**
+     * 二维码位置:top,left
+     */
+    private String qrPosition;
+
+    /**
+     * 二维码尺寸
+     */
+    private Integer qrSize;
+
+    /**
+     * logo尺寸
+     */
+    private String logoSize;
+
+    /**
+     * 状态:0停用,1启用
+     */
+    private Integer status;
+
+    /**
+     * 添加时间
+     */
+    private Date addTime;
+}

+ 3 - 0
src/main/java/com/caimei/model/vo/VideoListVo.java

@@ -18,6 +18,9 @@ public class VideoListVo {
     @ApiModelProperty("视频标题")
     private String videoTitle;
 
+    @ApiModelProperty("视频封面")
+    private String videoImage;
+
     @ApiModelProperty("视频名称")
     private String videoName;
 

+ 9 - 0
src/main/java/com/caimei/model/vo/WxClubUserVo.java

@@ -27,6 +27,15 @@ public class WxClubUserVo {
     @ApiModelProperty("openId")
     private String openId;
 
+    @ApiModelProperty("管理员审核状态")
+    private String auditStatus;
+
+    @ApiModelProperty("供应商审核状态")
+    private String shopAuditStatus;
+
     @ApiModelProperty("accessToken")
     private String accessToken;
+
+    @ApiModelProperty("状态:0停用,1启用")
+    private Integer status;
 }

+ 3 - 0
src/main/java/com/caimei/model/vo/WxProductListVo.java

@@ -29,4 +29,7 @@ public class WxProductListVo {
 
     @ApiModelProperty("机构名称")
     private String clubName;
+
+    @ApiModelProperty("审核状态:0未通过,1已通过,2待审核")
+    private String auditStatus;
 }

+ 3 - 0
src/main/java/com/caimei/model/vo/WxVideoListVo.java

@@ -18,6 +18,9 @@ public class WxVideoListVo {
     @ApiModelProperty("视频标题")
     private String videoTitle;
 
+    @ApiModelProperty("视频封面")
+    private String videoImage;
+
     @ApiModelProperty("视频名称")
     private String videoName;
 

+ 2 - 2
src/main/java/com/caimei/service/auth/AddressService.java

@@ -3,8 +3,6 @@ package com.caimei.service.auth;
 
 import com.caimei.model.ResponseJson;
 import com.caimei.model.vo.AddressSelectVo;
-import com.caimei.module.base.entity.vo.AddressVo;
-import com.github.pagehelper.PageInfo;
 
 import java.util.List;
 
@@ -27,4 +25,6 @@ public interface AddressService {
      * 所有地址下拉完整数据
      */
     ResponseJson<List<AddressSelectVo>> getAllSelectAddress();
+
+    ResponseJson addressTest() throws Exception;
 }

+ 15 - 3
src/main/java/com/caimei/service/auth/AuthClubService.java

@@ -25,7 +25,7 @@ public interface AuthClubService {
 
     /**
      * 机构用户列表
-     * @param authId    机构id
+     * @param authUserId    供应商用户id
      * @param mobile    手机号
      * @param name
      * @param status    状态:1未绑定,2已绑定,3已过期
@@ -33,7 +33,7 @@ public interface AuthClubService {
      * @param pageSize  一页多少条
      * @return  ClubUserVo
      */
-    ResponseJson<PageInfo<ClubUserVo>> getClubUserList(Integer authId, String mobile, String name, Integer status, Integer pageNum, Integer pageSize);
+    ResponseJson<PageInfo<ClubUserVo>> getClubUserList(Integer authUserId, String mobile, String name, Integer status, Integer pageNum, Integer pageSize);
 
     /**
      * 微信公众号机构列表
@@ -73,10 +73,22 @@ public interface AuthClubService {
     /**
      * 添加/编辑机构用户
      */
-    ResponseJson saveClubUser(Integer clubUserId, Integer authId, String name, String mobile);
+    ResponseJson saveClubUser(Integer clubUserId, Integer authUserId, String mobile);
 
     /**
      * 删除机构用户
      */
     ResponseJson deleteClubUser(Integer clubUserId);
+
+    /**
+     * 更新用户状态
+     */
+    ResponseJson updateStatus(Integer clubUserId, Integer status);
+
+    /**
+     * 重置机构用户密码
+     * @param clubUserId
+     * @return
+     */
+    ResponseJson resetClubUserPassword(Integer clubUserId);
 }

+ 16 - 5
src/main/java/com/caimei/service/auth/AuthProductService.java

@@ -2,8 +2,9 @@ package com.caimei.service.auth;
 
 import com.caimei.model.ResponseJson;
 import com.caimei.model.dto.ProductSaveDto;
+import com.caimei.model.po.ProductParamPo;
+import com.caimei.model.po.ProductTypePo;
 import com.caimei.model.vo.*;
-import com.caimei.module.base.entity.vo.AuthProductVo;
 import com.github.pagehelper.PageInfo;
 
 import java.io.IOException;
@@ -27,11 +28,12 @@ public interface AuthProductService {
      * @param snCode        商品SN码
      * @param status        上线状态:0下线,1上线,2待上线
      * @param auditStatus   审核状态:0审核未通过,1审核通过,2待审核
+     * @param shopAuditStatus   供应商审核状态:0审核未通过,1审核通过,2待审核
      * @param pageNum       第几页
      * @param pageSize      一页多少条
      * @return  ProductListVo
      */
-    ResponseJson<PageInfo<ProductListVo>> getProductList(Integer listType, Integer authId, String productName, String snCode, Integer status, Integer auditStatus, Integer pageNum, Integer pageSize);
+    ResponseJson<PageInfo<ProductListVo>> getProductList(Integer listType, Integer authId, String productName, String snCode, Integer status, Integer auditStatus, Integer shopAuditStatus, Integer pageNum, Integer pageSize);
 
     /**
      * 更新授权商品状态
@@ -93,20 +95,24 @@ public interface AuthProductService {
      * @param auditStatus       审核状态
      * @param invalidReason     审核不通过原因
      * @param auditBy           审核人用户id
+     * @param source
      * @return ResponseJson
      */
-    ResponseJson auditProduct(Integer productId, Integer auditStatus, String invalidReason, Integer auditBy);
+    ResponseJson auditProduct(Integer productId, Integer auditStatus, String invalidReason, Integer auditBy, Integer source);
 
 
     /**
      * 微信公众号机构列表
+     *
+     * @param listType
+     * @param authParty
      * @param productTypeId         设备分类id
      * @param snCode   sn码后四位
      * @param pageNum       第几页
      * @param pageSize      一页多少条
      * @return
      */
-    ResponseJson<PageInfo<WxProductListVo>> getWxProductList(Integer productTypeId, String snCode, Integer pageNum, Integer pageSize);
+    ResponseJson<PageInfo<WxProductListVo>> getWxProductList(Integer listType, Integer authId, String authParty, Integer productTypeId, String snCode, Integer pageNum, Integer pageSize);
 
     /**
      * 认证商品详情
@@ -118,7 +124,7 @@ public interface AuthProductService {
     /**
      * 保存设备分类
      */
-    ResponseJson saveProductType(Integer productTypeId, Integer authUserId, String name, String image, Integer createBy) throws IOException;
+    ResponseJson<ProductTypePo> saveProductType(Integer productTypeId, Integer authUserId, Integer brandId, String name, String image, Integer createBy, List<ProductParamPo> paramList, Integer createSource) throws IOException;
 
     /**
      * 删除设备分类
@@ -150,6 +156,11 @@ public interface AuthProductService {
      */
     ResponseJson<PageInfo<WxProductTypeListVo>> getWxProductTypeList(Integer authUserId, String appId, String name, Integer pageNum, Integer pageSize);
 
+    /**
+     * 设备分类回显数据
+     * @return
+     */
+    ResponseJson<ProductTypePo> getProductTypeFromData(Integer productTypeId);
 }
 
 

+ 28 - 19
src/main/java/com/caimei/service/auth/AuthService.java

@@ -4,6 +4,7 @@ import com.caimei.model.ResponseJson;
 import com.caimei.model.po.CmBrandAuthPo;
 import com.caimei.model.vo.AuthFormVo;
 import com.caimei.model.vo.AuthVo;
+import com.caimei.model.vo.TemplateVo;
 import com.github.pagehelper.PageInfo;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -21,17 +22,19 @@ public interface AuthService {
     /**
      * 授权列表
      *
-     * @param listType   列表类型:1授权列表,2授权审核列表
-     * @param authUserId 供应商用户id
-     * @param authParty  授权机构
-     * @param status    上线状态:0已下线,1已上线,2待上线
-     * @param auditStatus  审核状态:0审核未通过,1审核通过,2待审核
-     * @param lowerAuditStatus  商品信息审核状态:0未完成审核,1已完成审核
-     * @param pageNum    第几页
-     * @param pageSize   一页多少条
+     * @param listType         列表类型:1授权列表,2授权审核列表
+     * @param authUserId       供应商用户id
+     * @param authParty        授权机构
+     * @param mobile
+     * @param status           上线状态:0已下线,1已上线,2待上线
+     * @param auditStatus      审核状态:0审核未通过,1审核通过,2待审核
+     * @param lowerAuditStatus 商品信息审核状态:0未完成审核,1已完成审核
+     * @param shopAuditStatus  供应商审核状态:0审核未通过,1审核通过,2待审核
+     * @param pageNum          第几页
+     * @param pageSize         一页多少条
      * @return AuthVo
      */
-    ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty, Integer status, Integer auditStatus, Integer lowerAuditStatus, Integer pageNum, Integer pageSize);
+    ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty, String mobile, Integer status, Integer auditStatus, Integer lowerAuditStatus, Integer shopAuditStatus, Integer sendStatus, Integer pageNum, Integer pageSize);
 
     /**
      * 更新授权状态
@@ -54,9 +57,10 @@ public interface AuthService {
      *
      * @param auth       授权机构
      * @param bannerList 轮播图列表
+     * @param source     来源:1供应商保存,2机构保存
      * @return ResponseJson
      */
-    ResponseJson saveAuth(CmBrandAuthPo auth, List<String> bannerList, boolean importFlag);
+    ResponseJson saveAuth(CmBrandAuthPo auth, List<String> bannerList, boolean importFlag, Integer source);
 
     /**
      * 审核品牌授权
@@ -65,9 +69,10 @@ public interface AuthService {
      * @param auditStatus       审核状态
      * @param invalidReason     审核不通过原因
      * @param auditBy           审核人用户id
+     * @param source
      * @return ResponseJson
      */
-    ResponseJson auditAuth(Integer authId, Integer auditStatus, String invalidReason, Integer auditBy);
+    ResponseJson auditAuth(Integer authId, Integer auditStatus, String invalidReason, Integer auditBy, Integer source);
 
     /**
      * 导入excel中的授权机构和商品数据
@@ -78,14 +83,6 @@ public interface AuthService {
      */
     ResponseJson importDataByExcel(MultipartFile file, Integer authUserId, Integer createBy);
 
-    /**
-     * 导入excel中的授权机构和商品数据
-     * @param file          excel表格
-     * @param authUserId    供应商用户id
-     * @param createBy
-     * @return
-     */
-    ResponseJson importLdmData(Integer authUserId);
 
     /**
      * 导出授权机构和商品数据
@@ -113,4 +110,16 @@ public interface AuthService {
      * @return
      */
     ResponseJson importLdmImage(Integer authUserId);
+
+    /**
+     * 生成机构授权牌
+     * @param auth
+     * @return
+     */
+    String generateAuthImage(TemplateVo authTemplate, CmBrandAuthPo auth);
+
+    /**
+     * 添加水印
+     */
+    String addWaterMark(String image,Integer type);
 }

+ 53 - 0
src/main/java/com/caimei/service/auth/AuthTemplateService.java

@@ -0,0 +1,53 @@
+package com.caimei.service.auth;
+
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.*;
+import com.github.pagehelper.PageInfo;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2022/7/6
+ */
+public interface AuthTemplateService {
+
+    /**
+     * 授权牌模板列表
+     * @param listType
+     * @param authUserId
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PageInfo<TemplateVo>> getTemplateList(Integer listType, Integer authUserId, Integer pageNum, Integer pageSize);
+
+    /**
+     * 保存授权牌模板
+     *
+     * @param templateId
+     * @param templateImage
+     * @param authUserId
+     * @param status
+     * @param qrPosition
+     * @param qrSize
+     * @param logoSize
+     * @param authFlag
+     * @param productFlag
+     * @return
+     */
+    ResponseJson saveTemplate(Integer templateId, String templateImage, Integer authUserId, Integer status, String qrPosition, Integer qrSize, String logoSize, Integer authFlag, Integer productFlag);
+
+    /**
+     * 模板表单数据
+     * @param templateId    模板id
+     * @param authId
+     * @param authUserId
+     * @param authFlag
+     * @param status
+     * @return
+     */
+    ResponseJson<TemplateVo> getTemplateFormData(Integer templateId, Integer authId, Integer authUserId, Integer authFlag, Integer status);
+}
+
+

+ 31 - 0
src/main/java/com/caimei/service/auth/LogisticsService.java

@@ -0,0 +1,31 @@
+package com.caimei.service.auth;
+
+import com.alibaba.fastjson.JSONArray;
+import com.caimei.model.ResponseJson;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2022/6/15
+ */
+public interface LogisticsService {
+
+    /**
+     * 寄送机构授权牌
+     */
+    ResponseJson sendCertificate(Integer authId, Integer companyId, String logisticsNumber, JSONArray imageList, String remarks, String mobile);
+
+    /**
+     * 寄送授权牌物流详情
+     * @param authId
+     * @return
+     */
+    ResponseJson certificateLogistics(Integer authId);
+
+    /**
+     * 物流公司数据
+     * @return
+     */
+    ResponseJson getLogisticsCompany();
+}

+ 8 - 1
src/main/java/com/caimei/service/auth/ShopService.java

@@ -31,7 +31,7 @@ public interface ShopService {
      * @param pageSize  一页多少条
      * @return PageInfo<ShopVo>
      */
-    ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer pageNum, Integer pageSize);
+    ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus, Integer pageNum, Integer pageSize);
 
     /**
      * 更新供应商状态
@@ -162,4 +162,11 @@ public interface ShopService {
      * 绑定登录账号
      */
     ResponseJson bindLoginAccount(Integer authUserId, String mobile, String verifyCode, String loginAccount);
+
+    /**
+     * 更新供应商下所有机构授权牌
+     * @param authUserId
+     * @return
+     */
+    ResponseJson updateAllAuthImage(Integer authUserId);
 }

+ 1975 - 0
src/main/java/com/caimei/service/auth/impl/AddressServiceImpl.java

@@ -1,14 +1,29 @@
 package com.caimei.service.auth.impl;
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.caimei.mapper.cmMapper.AddressMapper;
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.model.ResponseJson;
+import com.caimei.model.po.CmBrandAuthPo;
+import com.caimei.model.po.TownPo;
 import com.caimei.model.vo.AddressSelectVo;
+import com.caimei.model.vo.RossAddressVo;
 import com.caimei.service.auth.AddressService;
+import com.caimei.service.auth.UploadService;
+import com.caimei.utils.RequestUtil;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Description
@@ -21,6 +36,15 @@ import java.util.List;
 public class AddressServiceImpl implements AddressService {
     @Resource
     private AddressMapper addressMapper;
+    @Resource
+    private AuthMapper authMapper;
+
+    private UploadService uploadService;
+
+    @Autowired
+    public void setUploadService(UploadService uploadService) {
+        this.uploadService = uploadService;
+    }
 
     /**
      * 收货地址下拉选项列表
@@ -47,6 +71,7 @@ public class AddressServiceImpl implements AddressService {
     }
 
     @Override
+    @Cacheable(value = "getAllAddress")
     public ResponseJson<List<AddressSelectVo>> getAllSelectAddress() {
         // 获取所有省份列表
         List<AddressSelectVo> provinceList = addressMapper.getAllProvinceList();
@@ -63,4 +88,1954 @@ public class AddressServiceImpl implements AddressService {
         return ResponseJson.success(provinceList);
     }
 
+    @Override
+    public ResponseJson addressTest() throws Exception {
+        String ss ="0:\n" +
+                "address:广东省广州市天河区珠江新城珠江东路6号周大福金融中心瑰丽府邸\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "description: \"圣贝拉\"\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "phone: \"4001061080\"\n" +
+                "shop: \"广州分店\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "\n" +
+                "1:\n" +
+                "address: \"广东省广州市天河区-天河北路388号侨怡苑二层3号铺(天河北公交站)\"\n" +
+                "allimg: \"/public/uploads/7c/e177aeb1b0178eddba92a5d6b85af1.jpg,/public/uploads/b0/05b0841950c69baf9603e9997669d7.jpg\"\n" +
+                "description: \"颐天健\"\n" +
+                "img: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "phone: \"1812742734\"\n" +
+                "shop: \"广州-天河北店\"\n" +
+                "title: \"颐天健中医养生连锁\"\n" +
+                "\n" +
+                "\n" +
+                "2:\n" +
+                "address: \"广东省广州市海珠区滨江东路555号金海湾二楼迪斯尼英语对面\"\n" +
+                "allimg: \"\"\n" +
+                "description: \"颐天健中医养生连锁\"\n" +
+                "img: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "phone: \"4000933023\"\n" +
+                "shop: \"广州-金海湾店\"\n" +
+                "title: \"颐天健中医养生连锁\"\n" +
+                "\n" +
+                "3:\n" +
+                "address: \"广东省广州市越秀区小北路198号越秀宾馆7楼\"\n" +
+                "allimg: \"/public/uploads/6a/be879fb3532b9191b6c26349d3ca61.jpg,/public/uploads/4b/6b6f8b95f7f51d30c8485ecd2cac19.jpg\"\n" +
+                "description: \"颐天健中医养生连锁\"\n" +
+                "img: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "phone: \"020-83108882\"\n" +
+                "shop: \"广州-越秀宾馆店\"\n" +
+                "title: \"颐天健中医养生连锁\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "4:\n" +
+                "address: \"广东省深圳市罗湖区世界金融中心B座1619(近kkmall,地王大厦)\"\n" +
+                "allimg: \"/public/uploads/9b/47618bc5cbad0b4f110cec9050dd86.jpg\"\n" +
+                "description: \"H&amp;V美颜馆 \"\n" +
+                "img: \"/public/uploads/9b/47618bc5cbad0b4f110cec9050dd86.jpg\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"深圳总店\"\n" +
+                "title: \"莤施美\"\n" +
+                "\n" +
+                "\n" +
+                "5:\n" +
+                "address: \"广东省深圳市福田区福田街道岗厦社区深南大道1003号东方新天地广场C1405\"\n" +
+                "allimg: \"/public/uploads/37/d6475b478a21df900481712afd8d2f.jpg\"\n" +
+                "description: \"深圳姿沁医疗美容诊所\"\n" +
+                "img: \"/public/uploads/37/d6475b478a21df900481712afd8d2f.jpg\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "title: \"深圳姿沁医疗美容诊所\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "6:\n" +
+                "address: \"广东省深圳市罗湖区-蔡屋围红宝路金龙大厦2104\"\n" +
+                "allimg: \"/public/uploads/36/23d72792a340f8a63e337c46e7247f.jpg\"\n" +
+                "description: \"安德科美医疗器械有限公司\"\n" +
+                "img: \"/public/uploads/36/23d72792a340f8a63e337c46e7247f.jpg\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "title: \"安德科美医疗器械有限公司\"\n" +
+                "\n" +
+                "\n" +
+                "7:\n" +
+                "address: \"广东省深圳市南山区中心路3008号深圳湾1号T7座莱佛士酒店4108\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg,/public/uploads/cb/c89856f01eff1e308aea19c8dec808.jpg,/public/uploads/88/d5aa893ecaaeed36162035adb4424a.jpg,/public/uploads/27/4d48989db49db2b2164f7156b63dca.jpg\"\n" +
+                "description: \"圣贝拉母婴护理中心\"\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "phone: \"18875920258\"\n" +
+                "shop: \"深圳分店\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "8:\n" +
+                "address: \"广东省揭阳市普宁市流沙大道江景新城南门10号\"\n" +
+                "allimg: \"/public/uploads/7f/f984519132d1c6cce168d24bd40810.jpg,/public/uploads/be/314e319c3a5fc890546bdb0369d016.jpg,/public/uploads/a1/4d5a3914c95ee539d129117407909c.jpg\"\n" +
+                "description: \"媄人荟美容SPA\"\n" +
+                "img: \"/public/uploads/18/e12d146f826b2b581138030e6ba1ea.jpg\"\n" +
+                "phone: \"0663-2258266\"\n" +
+                "shop: \"普宁分店\"\n" +
+                "title: \"媄人荟美容养生会所\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "9:\n" +
+                "address: \"广东省东莞市塘厦镇湖景路3号锦绣花园8-12号商铺\"\n" +
+                "allimg: \"/public/uploads/4b/6b6f8b95f7f51d30c8485ecd2cac19.jpg,/public/uploads/f2/76f216301503002035578ea8f01cdb.jpg\"\n" +
+                "description: \"颐天健中医养生连锁\"\n" +
+                "img: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "phone: \"0769-82553316\"\n" +
+                "shop: \"东莞分店\"\n" +
+                "title: \"颐天健中医养生连锁\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "10:\n" +
+                "address: \"上海市浦东新区牡丹路105号\"\n" +
+                "allimg: \"/public/uploads/19/c7ffd7db40926bcc0845282cbf2cab.jpg\"\n" +
+                "description: \"上海超超名媛会所\"\n" +
+                "img: \"/public/uploads/19/c7ffd7db40926bcc0845282cbf2cab.jpg\"\n" +
+                "phone: \"021-50922330\"\n" +
+                "shop: \"\"\n" +
+                "title: \"超超名媛会所\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "11:\n" +
+                "address: \"上海市虹口区曲阳路630弄3-1临\"\n" +
+                "allimg: \"/public/uploads/4b/79161135caf7332f94dceb445b8faf.jpg\"\n" +
+                "description: \"童颜神话健康肌肤管理中心\"\n" +
+                "img: \"/public/uploads/4b/79161135caf7332f94dceb445b8faf.jpg\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "title: \"童颜神话健康肌肤管理中心\"\n" +
+                "\n" +
+                "\n" +
+                "12:\n" +
+                "address: \"上海市青浦区赵巷镇业辉路222弄2号\"\n" +
+                "allimg: \"/public/uploads/90/e2b4a7e2b162db2f29630b0c392037.jpg,/public/uploads/77/cacced272300ec1f1c85915de94ef1.jpg\"\n" +
+                "description: \"百蕙健康管理中心\"\n" +
+                "img: \"/public/uploads/80/32515bf39a40e6e9ab89d393f169cc.jpg\"\n" +
+                "phone: \"021-69750896\"\n" +
+                "shop: \"\"\n" +
+                "title: \"百蕙健康管理中心\"\n" +
+                "\n" +
+                "\n" +
+                "13:\n" +
+                "address: \"上海市黄浦区中山东一路32号\"\n" +
+                "allimg: \"/public/uploads/54/3cce4990359070db15c0165b2fcded.jpg,/public/uploads/4a/05d59334c9e04929feaa8754850eaf.jpg\"\n" +
+                "description: \"圣贝拉母婴护理中心\"\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "phone: \"4001061080\"\n" +
+                "shop: \"\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "14:\n" +
+                "address: \"南京市江东中路329金奥国际中心4楼419\"\n" +
+                "allimg: \"/public/uploads/cc/9c29cb1b56c78ce7fbbfbe1b148874.jpg,/public/uploads/ac/df68a5ea479ce2f7b3c1462f301080.jpg,/public/uploads/f1/358fe665ac96e616b39953ab6b037b.jpg\"\n" +
+                "description: \"切瑞诗抗衰美肤中心\"\n" +
+                "img: \"/public/uploads/d8/6b974d4932c933a60747122a46f143.jpg\"\n" +
+                "phone: \"18652995995\"\n" +
+                "shop: \"\"\n" +
+                "title: \"切瑞诗抗衰美肤中心\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "15:\n" +
+                "address: \"江苏省徐州市泉山区中山南路80中山饭店\"\n" +
+                "allimg: \"/public/uploads/f8/1c9255c1c4c8917a2ab61c6e19f1bd.jpg\"\n" +
+                "description: \"双福寇波美容养生调理中心\"\n" +
+                "img: \"/public/uploads/f8/1c9255c1c4c8917a2ab61c6e19f1bd.jpg\"\n" +
+                "keywords: \"双福寇波美容养生调理中心\"\n" +
+                "phone: \"0516-83832999\"\n" +
+                "shop: \"\"\n" +
+                "title: \"双福蔻波美容养生调理中心\"\n" +
+                "\n" +
+                "\n" +
+                "16:\n" +
+                "address: \"南京市江宁区天元西路59号2号楼中南创新中心801室\"\n" +
+                "allimg: \"/public/uploads/62/fc583bce51ea068a9e6fe216b34d32.jpg\"\n" +
+                "description: \"华冠集团\"\n" +
+                "img: \"/public/uploads/62/fc583bce51ea068a9e6fe216b34d32.jpg\"\n" +
+                "phone: \"13267334444\"\n" +
+                "shop: \"南京华冠健康\"\n" +
+                "title: \"华冠集团\"\n" +
+                "\n" +
+                "\n" +
+                "17:\n" +
+                "address: \"江苏省常熟市闽江东路76号\"\n" +
+                "allimg: \"/public/uploads/7a/b141f50279beeeb141e562828cb313.png\"\n" +
+                "description: \"瑞莱美肌\"\n" +
+                "img: \"/public/uploads/7a/b141f50279beeeb141e562828cb313.png\"\n" +
+                "phone: \"15606239998\"\n" +
+                "shop: \"\"\n" +
+                "title: \"瑞莱美肌\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "18:\n" +
+                "address: \"杭州萧山区绿都港汇31楼\"\n" +
+                "allimg: \"/public/uploads/22/a30f62a230f40d678a93f9dfdc0772.jpg\"\n" +
+                "description: \"皓予企业\"\n" +
+                "img: \"/public/uploads/22/a30f62a230f40d678a93f9dfdc0772.jpg\"\n" +
+                "keywords: \"皓予企业\"\n" +
+                "phone: \"15158189258\"\n" +
+                "shop: \"\"\n" +
+                "title: \"皓予企业\"\n" +
+                "\n" +
+                "\n" +
+                "19:\n" +
+                "address: \"江苏省徐州市泉山区建国西路恒盛广场4楼\"\n" +
+                "allimg: \"/public/uploads/f8/1c9255c1c4c8917a2ab61c6e19f1bd.jpg\"\n" +
+                "description: \"蔻波养生会所\"\n" +
+                "img: \"/public/uploads/f8/1c9255c1c4c8917a2ab61c6e19f1bd.jpg\"\n" +
+                "keywords: \"蔻波养生会所\"\n" +
+                "phone: \"18052178858\"\n" +
+                "shop: \"\"\n" +
+                "title: \"蔻波养生会所\"\n" +
+                "\n" +
+                "\n" +
+                "20:\n" +
+                "address: \"江苏省徐州市云龙区彭祖大道绿地公馆4号馆\"\n" +
+                "allimg: \"/public/uploads/b3/cded9624ae5222fc97ed1c7a933369.jpg\"\n" +
+                "description: \"丽瑶医疗整形\"\n" +
+                "img: \"/public/uploads/b3/cded9624ae5222fc97ed1c7a933369.jpg\"\n" +
+                "phone: \"13218805095\"\n" +
+                "shop: \"\"\n" +
+                "title: \"丽瑶医疗整形\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "21:\n" +
+                "address: \"浙江省金华市浦江县新华东路77号3楼\"\n" +
+                "allimg: \"/public/uploads/d7/49d99b0394fb2352aee773d1fcbafe.jpg\"\n" +
+                "description: \"东方美美容美体\"\n" +
+                "img: \"/public/uploads/d7/49d99b0394fb2352aee773d1fcbafe.jpg\"\n" +
+                "phone: \"15257928372\"\n" +
+                "shop: \"\"\n" +
+                "title: \"东方美美容美体\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "22:\n" +
+                "address: \"浙江省杭州市江干区钱江路1366号杭州柏悦酒店36层(万象城)\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style=&quot;color: rgb(47, 102, 135); font-family: 宋体, Arial; font-size: 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;&quot;&gt;圣贝拉母婴护理中心&lt;/span&gt; &lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:21:48\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"圣贝拉母婴护理中心\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 23\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "keywords: \"圣贝拉母婴护理中心\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"4001061080\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:21:48\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "23:\n" +
+                "address: \"北京市朝阳区呼家楼朝阳门外大街京广大厦瑰丽酒店9F\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;圣贝拉母婴护理中心&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:23:18\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"圣贝拉母婴护理中心\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 24\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "keywords: \"圣贝拉母婴护理中心\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"4000303096转94629\"\n" +
+                "shop: \"瑰丽酒店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:23:18\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "24:\n" +
+                "address: \"北京市东城区王府井金鱼胡同8号王府半岛酒店8F(毗邻协和国际)\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;圣贝拉母婴护理中心&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:24:57\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"圣贝拉母婴护理中心\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 25\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "keywords: \"圣贝拉母婴护理中心\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"4001061080\"\n" +
+                "shop: \"王府半岛酒店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:24:57\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "25:\n" +
+                "address: \"北京市海淀区花园东路11号泰兴大厦7层\"\n" +
+                "allimg: \"/public/uploads/e6/2caa8b8411ff8e0b1ac823cd09bb6a.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style=&quot;color: rgb(47, 102, 135); font-family: 宋体, Arial; font-size: 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;&quot;&gt;暖莲美颜美疗汇&lt;/span&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:30:56\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"暖莲美颜美疗汇\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 26\n" +
+                "img: \"/public/uploads/98/306cc714772824df0a3e701ce367a8.jpg\"\n" +
+                "keywords: \"暖莲美颜美疗汇\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"010-57625288\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"暖莲美颜美疗汇\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:30:56\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "26:\n" +
+                "address: \"北京\"\n" +
+                "allimg: \"/public/uploads/e5/d167a3a03331d8a1cb02b7c25b681a.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;暖莲生命养护中心&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:31:51\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"暖莲生命养护中心\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 27\n" +
+                "img: \"/public/uploads/98/306cc714772824df0a3e701ce367a8.jpg\"\n" +
+                "keywords: \"暖莲生命养护中心\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"暖莲生命养护中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:31:51\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "27:\n" +
+                "address: \"枣庄市市中区华山北路76号(居然之家北)\"\n" +
+                "allimg: \"/public/uploads/a8/3218bf2c7b0394b283a0064821ad7b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style=&quot;color: rgb(47, 102, 135); font-family: 宋体, Arial; font-size: 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;&quot;&gt;乔美奇健康调理中心&lt;/span&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:33:17\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"乔美奇健康调理中心\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 28\n" +
+                "img: \"/public/uploads/a8/3218bf2c7b0394b283a0064821ad7b.jpg\"\n" +
+                "keywords: \"乔美奇健康调理中心\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"0632-3828886\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"乔美奇健康调理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:33:17\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "28:\n" +
+                "address: \"四川省成都市武侯区-天府大道北段华尔道夫酒店42F\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style=&quot;color: rgb(47, 102, 135); font-family: 宋体, Arial; font-size: 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;&quot;&gt;圣贝拉母婴护理中心&lt;/span&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:34:43\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"圣贝拉母婴护理中心\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 29\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "keywords: \"圣贝拉母婴护理中心\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-68706777\"\n" +
+                "shop: \"成都分店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:34:43\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "29:\n" +
+                "address: \"陕西省西安市雁塔区雁南一路9号曼蒂广场1层F019-F021号\"\n" +
+                "allimg: \"/public/uploads/2e/1078d5a6a10701e2319e60b2265411.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;漾慕国际&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:37:52\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"漾慕国际\"\n" +
+                "flag: \"1\"\n" +
+                "hits: 0\n" +
+                "id: 30\n" +
+                "img: \"/public/uploads/2e/1078d5a6a10701e2319e60b2265411.jpg\"\n" +
+                "keywords: \"漾慕国际\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"89839870\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"漾慕医疗美容抗衰中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:37:52\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "30:\n" +
+                "address: \"四川省成都市武侯区科华北路62号力宝大厦2楼8号\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;汉裳汉方美肌SPA&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:38:49\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"汉棠汉方の美肌SPA·体验空间\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 31\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"汉棠汉方の美肌SPA·体验空间\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-85571477\"\n" +
+                "shop: \"川大店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:38:49\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "31:\n" +
+                "address: \"四川省成都市武侯区大悦路518号大悦城3F-J06号\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style=&quot;color: rgb(47, 102, 135); font-family: 宋体, Arial; font-size: 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;&quot;&gt;汉棠汉方の美肌SPA&amp;middot;体验空间&lt;/span&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:43:35\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"汉棠汉方の美肌SPA·体验空间\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 32\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"汉棠汉方の美肌SPA·体验空间\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-85551517\"\n" +
+                "shop: \"大悦城店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:43:35\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "32:\n" +
+                "address: \"四川省成都市锦江区汇源北路391号附5号2楼\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg,/public/uploads/b7/f137a2b13a0945b907b3914b291373.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style=&quot;color: rgb(47, 102, 135); font-family: 宋体, Arial; font-size: 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;&quot;&gt;汉棠汉方の美肌SPA&amp;middot;体验空间&lt;/span&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:45:40\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"汉棠汉方の美肌SPA·体验空间\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 33\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"汉棠汉方の美肌SPA·体验空间\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-86663069\"\n" +
+                "shop: \"攀成钢店\"\n" +
+                "sort: 6\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:45:40\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "33:\n" +
+                "address: \"四川省成都市高新区剑南大道中段998号世豪广场五层A7a\"\n" +
+                "allimg: \"/public/uploads/b7/f137a2b13a0945b907b3914b291373.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;汉堂汉方医学诊所&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-11 10:47:37\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"汉堂汉方医学诊所\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 34\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"汉堂汉方医学诊所\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-87359706\"\n" +
+                "shop: \"天府二街店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-11 10:47:37\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "34:\n" +
+                "address: \"江苏省苏州市工业园区苏雅路苏悦广场北楼二层  极值美学\"\n" +
+                "allimg: \"/public/uploads/c7/20ae8f526f18c8e505765db3d90716.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;极值美学&lt;/p&gt;\"\n" +
+                "create_time: \"2021-06-15 16:52:57\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"极值美学\"\n" +
+                "flag: \"2\"\n" +
+                "hits: 0\n" +
+                "id: 35\n" +
+                "img: \"/public/uploads/3e/f02c05a16fc3a8ff6547023e600202.jpg\"\n" +
+                "keywords: \"极值美学\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"0512-66060015\"\n" +
+                "shop: \"苏州园区店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"极值美学\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-06-15 16:52:57\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "35:\n" +
+                "address: \"广州周大福金融中心5009\"\n" +
+                "allimg: \"/public/uploads/cf/26f4e309b1eacd19305cb9ab30b913.png,/public/uploads/c1/b9dce2b956e32913bf377e6a1b6f24.jpg,/public/uploads/9e/e6e6213372da71814bbdf9acbb0ec0.jpg,/public/uploads/f5/8212d3bfb8a0b38e241f08b6077e8d.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style='color: rgb(33, 37, 41); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;'&gt;ROS&amp;#39;S (BINARY PREMIUM)&lt;/span&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2021-07-29 18:23:33\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROS&#39;S (BINARY PREMIUM) \"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 36\n" +
+                "img: \"/public/uploads/cf/26f4e309b1eacd19305cb9ab30b913.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"(020) 6186 3358\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"广州维密体塑生物科技有限公司\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-07-29 18:23:33\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "36:\n" +
+                "address: \"汕头市龙湖区华山南路群光广场南塔13楼1318号\"\n" +
+                "allimg: \"/public/uploads/24/0a6f6179975ae56107d7b76591ccd8.jpg,/public/uploads/07/ad243d589dcd95339189f8a04e2b53.jpg,/public/uploads/3c/b027ff5f422ec839a86eab25d0549a.jpg,/public/uploads/65/eb23b073d4538a419b279116bedd50.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS授权机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-17 10:55:44\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS授权机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 37\n" +
+                "img: \"/public/uploads/dc/203d71f14c1c186cbbdcfbe6b6a9a2.jpg\"\n" +
+                "keywords: \"ROSS授权机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"19867866198\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"石榴皮肤管理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 10:55:44\"\n" +
+                "\n" +
+                "\n" +
+                "\n" +
+                "37:\n" +
+                "address: \"上海市浦东新区春泉路58弄50号\"\n" +
+                "allimg: \"/public/uploads/a6/2cfb86b42d9da2af5cc700ca79d270.jpg,/public/uploads/58/b69c8a70d51d506ddfb8752f3c7a49.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS授权使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-17 11:09:22\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS授权使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 38\n" +
+                "img: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "keywords: \"ROSS授权使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"021-38686002\"\n" +
+                "shop: \"唐镇店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"戴西养生堂SPA\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 11:09:22\"\n" +
+                "\n" +
+                "38:\n" +
+                "address: \"广东省河源兴源东路怡兴阁b棟\"\n" +
+                "allimg: \"/public/uploads/1a/a7a967f4fc0c81342d6399b5797e96.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;修身堂&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-17 11:16:16\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"修身堂\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 39\n" +
+                "img: \"/public/uploads/1a/a7a967f4fc0c81342d6399b5797e96.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"(0762)3664889\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"修身堂\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 11:16:16\"\n" +
+                "\n" +
+                "39:\n" +
+                "address: \"武汉市武昌区水果湖街办事处东湖路169号知音传媒公司院内2号楼\"\n" +
+                "allimg: \"\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;h3 data-spm-anchor-id=&quot;0.0.0.i16.42e51c4eqlPNPo&quot; style='font-weight: 400; margin: 0px; font-family: &quot;Microsoft Yahei&quot;; padding: 6px 0px; text-indent: 10px; color: rgb(51, 51, 51); font-size: 15px; max-width: 292px; height: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245); text-decoration-style: initial; text-decoration-color: initial;'&gt;弗蕾亚母婴中心&lt;/h3&gt;\"\n" +
+                "create_time: \"2021-08-17 11:19:22\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"弗蕾亚母婴中心\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 40\n" +
+                "img: \"/public/uploads/b9/c02bc6f6c049169842ea8ad78044f0.jpg\"\n" +
+                "keywords: \"弗蕾亚母婴中心\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"18140552869\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"弗蕾亚母婴中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 11:19:22\"\n" +
+                "\n" +
+                "40:\n" +
+                "address: \"海宁市开元名都大酒店50层5015\"\n" +
+                "allimg: \"/public/uploads/ac/f4a4a08f89828cd21a54f672a943b7.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;谧静&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-17 11:21:19\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"谧静\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 41\n" +
+                "img: \"/public/uploads/ac/f4a4a08f89828cd21a54f672a943b7.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"谧静\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 11:21:19\"\n" +
+                "\n" +
+                "41:\n" +
+                "address: \"北京市朝阳区广渠路33号院1号楼A单元901号  \"\n" +
+                "allimg: \"/public/uploads/e5/110f092ea4aab2969a7dc4978d1422.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style='color: rgb(0, 0, 0); font-family: &quot;SF Pro Text&quot;, &quot;Helvetica Neue&quot;, Helvetica, Tahoma, Arial, &quot;Microsoft Yahei&quot;, 微软雅黑, &quot;PingFang SC&quot;, 苹方, sans-serif; font-size: 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;'&gt;北京兰采佩生物科技有限责任公司&lt;/span&gt; &lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-17 11:49:03\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"北京兰采佩生物科技有限责任公司\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 42\n" +
+                "img: \"/public/uploads/e5/110f092ea4aab2969a7dc4978d1422.jpg\"\n" +
+                "keywords: \"北京兰采佩生物科技有限责任公司\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"北京兰采佩生物科技有限责任公司\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 11:49:03\"\n" +
+                "\n" +
+                "42:\n" +
+                "address: \"广东省佛山市顺德区大良街保利国际金融中心1号楼3404\"\n" +
+                "allimg: \"/public/uploads/c0/bc97c73c2fa4dc489eb522cc25f13d.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;莤施美&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-17 11:51:47\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"莤施美\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 43\n" +
+                "img: \"/public/uploads/c0/bc97c73c2fa4dc489eb522cc25f13d.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"15818000777\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"广东丽泽美科医疗器械有限公司\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 11:51:47\"\n" +
+                "\n" +
+                "43:\n" +
+                "address: \"江苏省苏州市工业园区星海街210号星海人家1-107\"\n" +
+                "allimg: \"/public/uploads/c7/3dfbe83cefb513fd0b666652f35917.jpg,/public/uploads/20/88a220964305b2d2244e7783e30bed.jpg,/public/uploads/d9/ce28eeab5fb6f74ceb43a9d8ae3c89.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;尚淑坊&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-17 15:54:17\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"尚淑坊\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 44\n" +
+                "img: \"/public/uploads/ba/460604824766a6f5692ff697afd447.jpg\"\n" +
+                "keywords: \"尚淑坊\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"18112596662\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"尚淑坊\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-17 15:54:17\"\n" +
+                "\n" +
+                "44:\n" +
+                "address: \"湖北省武汉市江汉区新华路马场路589号大武汉1911写字楼A栋15楼13-14号\"\n" +
+                "allimg: \"/public/uploads/36/0018afaa180888e5aaa18020a6e9e3.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;18986035837&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-19 18:06:04\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"18986035837\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 45\n" +
+                "img: \"/public/uploads/36/0018afaa180888e5aaa18020a6e9e3.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"18986035837\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"康乃馨\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-19 18:06:04\"\n" +
+                "\n" +
+                "45:\n" +
+                "address: \"上海市闵行区申长路869号龙湖虹桥天街A馆5层\"\n" +
+                "allimg: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS戴西养生堂&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 09:42:02\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS戴西养生堂\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 46\n" +
+                "img: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "keywords: \"ROSS戴西养生堂\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"(021) 5458 0982\"\n" +
+                "shop: \"龙湖虹桥天街店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"戴西养生堂SPA\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 09:42:02\"\n" +
+                "\n" +
+                "46:\n" +
+                "address: \"上海市静安区新闸路833号1楼-2\"\n" +
+                "allimg: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 09:47:15\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 47\n" +
+                "img: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "keywords: \"ROSS使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"(021) 5280 6821\"\n" +
+                "shop: \"新闸路店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"ROSS使用机构\"\n" +
+                "title: \"戴西SPA\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 09:47:15\"\n" +
+                "\n" +
+                "47:\n" +
+                "address: \"上海市静安区万航渡路818号吉臣酒店10-11楼\"\n" +
+                "allimg: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 09:49:54\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 48\n" +
+                "img: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "keywords: \"ROSS使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"(021) 6390 6608\"\n" +
+                "shop: \"静安店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"ROSS使用机构\"\n" +
+                "title: \"戴西月子会所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 09:49:54\"\n" +
+                "\n" +
+                "48:\n" +
+                "address: \"浙江省宁波市慈溪市南三环路慈溪新城吾悦广场4楼4040商铺\"\n" +
+                "allimg: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg,/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 09:50:45\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 49\n" +
+                "img: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \" (0574) 6345 0066\"\n" +
+                "shop: \"慈溪吾悦广场店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"ROSS使用机构\"\n" +
+                "title: \"戴西养生堂\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 09:50:45\"\n" +
+                "\n" +
+                "49:\n" +
+                "address: \"浙江省宁波市余姚市凤山街道时代第五街众安时代广场13栋4楼A4-8  \"\n" +
+                "allimg: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 09:52:19\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 50\n" +
+                "img: \"/public/uploads/21/2fa71b476f1228172cb24ff5eebc25.jpg\"\n" +
+                "keywords: \"ROSS使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"(0574) 6261 6300\"\n" +
+                "shop: \"余姚店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"ROSS使用机构\"\n" +
+                "title: \"戴西养生堂\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 09:52:19\"\n" +
+                "\n" +
+                "50:\n" +
+                "address: \"上海市静安区石门一路366号6F\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 10:14:45\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 51\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "keywords: \"ROSS使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"4001061080\"\n" +
+                "shop: \"上海镛舍店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 10:14:45\"\n" +
+                "\n" +
+                "51:\n" +
+                "address: \"厦门市湖里区七尚酒店别墅6栋\"\n" +
+                "allimg: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 10:16:10\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 52\n" +
+                "img: \"/public/uploads/c6/f4db4f4167696ca54e7e9bd2f39918.jpg\"\n" +
+                "keywords: \"ROSS使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"4001061080\"\n" +
+                "shop: \"厦门七尚店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"圣贝拉母婴护理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 10:16:10\"\n" +
+                "\n" +
+                "52:\n" +
+                "address: \"四川省成都市青羊区清江西路86号附102号\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 10:18:03\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 53\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-61355886\"\n" +
+                "shop: \"金沙店 \"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"ROSS使用机构\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 10:18:03\"\n" +
+                "\n" +
+                "53:\n" +
+                "address: \"四川省成都市温江区光华大道三段合生汇L2-3/L2-4\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 10:20:04\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 54\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"ROSS使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-86695055\"\n" +
+                "shop: \"温江店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 10:20:04\"\n" +
+                "\n" +
+                "54:\n" +
+                "address: \"成都市高新区交子大道300号悠方购物中心L3-318\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS使用机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 10:26:05\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS使用机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 55\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"ROSS使用机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"028-86699155\"\n" +
+                "shop: \"悠方店 \"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 10:26:05\"\n" +
+                "\n" +
+                "55:\n" +
+                "address: \"四川省成都市金牛区花照壁西顺街400号附205号2楼\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS合作机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 10:28:17\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS合作机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 56\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"ROSS合作机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \" 028-87779578\"\n" +
+                "shop: \"西宸店 \"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 10:28:17\"\n" +
+                "\n" +
+                "56:\n" +
+                "address: \"四川省绵阳市科创园区剑南路388号长兴星城6幢2层2号\"\n" +
+                "allimg: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS合作机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 10:28:59\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS合作机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 57\n" +
+                "img: \"/public/uploads/9e/021f74e953ba964a09c6bcc457e52b.jpg\"\n" +
+                "keywords: \"ROSS合作机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"0816-2266033\"\n" +
+                "shop: \"绵阳店 \"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"汉棠汉方医学诊所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 10:28:59\"\n" +
+                "\n" +
+                "57:\n" +
+                "address: \"陕西省西安市科技路33号世纪金花中心三层东区F3-65\"\n" +
+                "allimg: \"/public/uploads/2e/1078d5a6a10701e2319e60b2265411.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ross合作机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 14:27:32\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROSS合作机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 58\n" +
+                "img: \"/public/uploads/2e/1078d5a6a10701e2319e60b2265411.jpg\"\n" +
+                "keywords: \"ROSS合作机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"130 2854 4096\"\n" +
+                "shop: \"高新店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"漾慕国际美学抗衰中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 14:27:32\"\n" +
+                "\n" +
+                "58:\n" +
+                "address: \"陕西省西安市凤城八路168号汉神购物广场二楼\"\n" +
+                "allimg: \"/public/uploads/2e/1078d5a6a10701e2319e60b2265411.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ross合作机构&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 14:32:59\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ross合作机构\\n\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 59\n" +
+                "img: \"/public/uploads/2e/1078d5a6a10701e2319e60b2265411.jpg\"\n" +
+                "keywords: \"ross合作机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"182 9281 5633\"\n" +
+                "shop: \"凤城八路汉神店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"漾慕国际\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 14:32:59\"\n" +
+                "\n" +
+                "59:\n" +
+                "address: \"江苏省苏州市苏震桃路188号永旺梦乐城2层258-259\"\n" +
+                "allimg: \"/public/uploads/3e/f02c05a16fc3a8ff6547023e600202.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ross合作机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 14:36:21\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ross合作机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 60\n" +
+                "img: \"/public/uploads/3e/f02c05a16fc3a8ff6547023e600202.jpg\"\n" +
+                "keywords: \"ross合作机构\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"180 1275 6885\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"极植美学\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 14:36:21\"\n" +
+                "\n" +
+                "60:\n" +
+                "address: \"广东省广州市番禺区万达金街68铺\"\n" +
+                "allimg: \"/public/uploads/48/fdb5b1325ee9c978f9a0a55ab1f4a0.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ross合作机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 14:37:14\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ross合作机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 61\n" +
+                "img: \"/public/uploads/48/fdb5b1325ee9c978f9a0a55ab1f4a0.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"186 2094 3127\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"星颜丽妃科技美肤\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 14:37:14\"\n" +
+                "\n" +
+                "61:\n" +
+                "address: \"广东省深圳市宝安区大仟里一楼L198\"\n" +
+                "allimg: \"/public/uploads/54/4dfcc9c46982158cad601c33937d94.png,/public/uploads/54/4dfcc9c46982158cad601c33937d94.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROS&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 14:41:24\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"ROS\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 62\n" +
+                "img: \"/public/uploads/54/4dfcc9c46982158cad601c33937d94.png\"\n" +
+                "keywords: \"ROSS\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"15986648621\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"希瑞尔科技美肤健康管理中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 14:41:24\"\n" +
+                "\n" +
+                "62:\n" +
+                "address: \"广东省东莞市塘厦镇湖景路3号锦绣花园8-12号商铺\"\n" +
+                "allimg: \"\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style='color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;'&gt;颐天健中医养生连锁&lt;/span&gt; &lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 14:57:53\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"颐天健中医养生连锁 \"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 63\n" +
+                "img: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"0769-822553316\"\n" +
+                "shop: \"塘厦直营店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"颐天健中医养生连锁\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 14:57:53\"\n" +
+                "\n" +
+                "63:\n" +
+                "address: \"广东省深圳市福田区园岭八街园东花园天阶1号2号111-114号\"\n" +
+                "allimg: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style='color: rgb(33, 37, 41); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;'&gt;ROS&amp;#39;S (BINARY PREMIUM)&lt;/span&gt; &lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-24 15:15:23\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROS&#39;S (BINARY PREMIUM) \"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 64\n" +
+                "img: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"深圳福田店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"颐天健中医养生连锁\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-24 15:15:23\"\n" +
+                "\n" +
+                "64:\n" +
+                "address: \"广东省广州市海明路金碧华府南门1楼\"\n" +
+                "allimg: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;合作机构&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-25 14:21:16\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"合作机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 65\n" +
+                "img: \"/public/uploads/3c/dd87c54e8ee48f8572d66af09b18ad.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"13229440173\"\n" +
+                "shop: \"广粤天地店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"颐天健中医养生连锁\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-25 14:21:16\"\n" +
+                "\n" +
+                "65:\n" +
+                "address: \"江苏省苏州市虎丘区狮山街道 详细地址: 狮山龙湖天街A-5F-03\"\n" +
+                "allimg: \"/public/uploads/3e/f02c05a16fc3a8ff6547023e600202.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;合作门店&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-25 14:31:18\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"合作门店\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 66\n" +
+                "img: \"/public/uploads/3e/f02c05a16fc3a8ff6547023e600202.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"13816628605\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"极值美学\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-25 14:31:18\"\n" +
+                "\n" +
+                "66:\n" +
+                "address: \"山东省临沂市兰山区北城新区临沂大剧院水边南边50米美甲店\"\n" +
+                "allimg: \"/public/uploads/d5/a17a4bca215c160d83253bfbba5b59.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ross合作门店&lt;/p&gt;\"\n" +
+                "create_time: \"2021-08-25 14:32:20\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ross合作门店\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 67\n" +
+                "img: \"/public/uploads/d5/a17a4bca215c160d83253bfbba5b59.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"17762055522\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"Rika Beauty\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-08-25 14:32:20\"\n" +
+                "\n" +
+                "67:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/46/9d4a0c1341c1e51a89652e6ace88b4.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;中国再生医学&lt;/p&gt;\"\n" +
+                "create_time: \"2021-09-29 15:26:51\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"中国再生医学\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 68\n" +
+                "img: \"/public/uploads/46/9d4a0c1341c1e51a89652e6ace88b4.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"中国再生医学星空医疗美学门诊\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-09-29 15:26:51\"\n" +
+                "\n" +
+                "68:\n" +
+                "address: \"江苏省江阴市青果路14号4楼\"\n" +
+                "allimg: \"/public/uploads/4a/5d8fef09a7faf01a182427c6a39005.jpg,/public/uploads/fe/8038d1d346fd5b1f33f6d42da7bcf8.jpg,/public/uploads/35/62ae81c7b7e4462138115f9f3dc7e9.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;金翅鸟健康管理&lt;/p&gt;\"\n" +
+                "create_time: \"2021-10-22 16:57:21\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"金翅鸟健康管理\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 69\n" +
+                "img: \"/public/uploads/99/e2fc949ee671a0afe474173b92babe.jpg\"\n" +
+                "keywords: \"金翅鸟健康管理\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"0510-86800000\"\n" +
+                "shop: \"江阴\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"金翅鸟健康管理(江阴)有限公司\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-10-22 16:57:21\"\n" +
+                "\n" +
+                "69:\n" +
+                "address: \"\"\n" +
+                "allimg: \"\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;绍兴纪美国际&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:31:25\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"绍兴纪美国际\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 70\n" +
+                "img: \"\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"绍兴纪美国际\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:31:25\"\n" +
+                "\n" +
+                "70:\n" +
+                "address: \"\"\n" +
+                "allimg: \"\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS中国区合作机构:北京伊凡美&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:32:11\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"ROSS中国区合作机构:北京伊凡美\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 71\n" +
+                "img: \"\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"北京伊凡美\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:32:11\"\n" +
+                "\n" +
+                "71:\n" +
+                "address: \"\"\n" +
+                "allimg: \"\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;ROSS中国区合作机构:上海梓凝生物科技有限公司&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:32:50\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"ROSS中国区合作机构:上海梓凝生物科技有限公司\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 72\n" +
+                "img: \"\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"上海梓凝生物科技有限公司\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:32:50\"\n" +
+                "\n" +
+                "72:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/6b/630e79fb1f8d846586e4b5b7ffbf9e.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;依霖&amp;middot;艺术&amp;middot;SPA&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:34:52\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 73\n" +
+                "img: \"/public/uploads/6b/630e79fb1f8d846586e4b5b7ffbf9e.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"宣化店\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"依霖·艺术·SPA\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:34:52\"\n" +
+                "\n" +
+                "73:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/37/fbb2328c091e7b5454f589ebe616f1.png,/public/uploads/42/acf9e34c2d404300e92b1bfe50c426.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;北京泰和生物科技有限公司&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:37:28\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"北京泰和生物科技有限公司\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 74\n" +
+                "img: \"/public/uploads/42/acf9e34c2d404300e92b1bfe50c426.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"北京泰和生物科技有限公司\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:37:28\"\n" +
+                "\n" +
+                "74:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/37/fbb2328c091e7b5454f589ebe616f1.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;北京环球风尚美容&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:38:37\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"北京环球风尚美容\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 75\n" +
+                "img: \"/public/uploads/37/fbb2328c091e7b5454f589ebe616f1.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"北京环球风尚美容\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:38:37\"\n" +
+                "\n" +
+                "75:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/5e/5adf13b5f0f7e9a0d14e5067767d46.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;苏州澳泰众创贸易有限公司&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:39:00\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"苏州澳泰众创贸易有限公司\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 76\n" +
+                "img: \"/public/uploads/37/fbb2328c091e7b5454f589ebe616f1.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"苏州澳泰众创贸易有限公司\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:39:00\"\n" +
+                "\n" +
+                "76:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/02/53bb323a020074868c4118331156ba.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;武汉美诗婷&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:41:29\"\n" +
+                "desc: \"\"\n" +
+                "    description: \"武汉美诗婷\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 77\n" +
+                "img: \"/public/uploads/02/53bb323a020074868c4118331156ba.png\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"武汉美诗婷\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:41:29\"\n" +
+                "\n" +
+                "77:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/2b/2c2be2496c5819d2e490150ac0b7c2.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;香港和敬&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 14:50:25\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"香港和敬\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 78\n" +
+                "img: \"/public/uploads/2b/2c2be2496c5819d2e490150ac0b7c2.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"上海私享佳\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 14:50:25\"\n" +
+                "\n" +
+                "78:\n" +
+                "address: \"湖北省武汉市江汉区民生路世纪中心2812\"\n" +
+                "allimg: \"\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;星提旺花&lt;/p&gt;\"\n" +
+                "create_time: \"2021-11-22 17:03:47\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"星提旺花\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 79\n" +
+                "img: \"\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"星提旺花\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2021-11-22 17:03:47\"\n" +
+                "\n" +
+                "79:\n" +
+                "address: \"浙江省绍兴市越城区塔山街道鲁迅中路179号咸亨酒店(北区5号楼休闲中心)\"\n" +
+                "allimg: \"/public/uploads/6f/d4a340a206fb3556f44a580a200d86.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;潺SPA&lt;/p&gt;\"\n" +
+                "create_time: \"2022-02-11 15:19:23\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"潺SPA\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 80\n" +
+                "img: \"/public/uploads/6f/d4a340a206fb3556f44a580a200d86.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"13758553666\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"潺SPA\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2022-02-11 15:19:23\"\n" +
+                "\n" +
+                "80:\n" +
+                "address: \"\"\n" +
+                "allimg: \"/public/uploads/7d/7e0dfb4c42a6f80ad6ceffeed904b3.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style='color: rgb(33, 37, 41); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;'&gt;ROS&amp;#39;S (BINARY PREMIUM)&lt;/span&gt;&lt;/p&gt;\"\n" +
+                "create_time: \"2022-02-19 11:54:42\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROS&#39;S (BINARY PREMIUM) \"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 81\n" +
+                "img: \"/public/uploads/7d/7e0dfb4c42a6f80ad6ceffeed904b3.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"东森•自然美\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2022-02-19 11:54:42\"\n" +
+                "\n" +
+                "81:\n" +
+                "address: \"中大国际商业中心B3层\"\n" +
+                "allimg: \"/public/uploads/95/b4e78cc04fa7ae8af6219fdf1786cc.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&lt;span style='color: rgb(33, 37, 41); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;'&gt;ROS&amp;#39;S (BINARY PREMIUM)&lt;/span&gt; &lt;/p&gt;\"\n" +
+                "create_time: \"2022-02-19 12:03:33\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "flag: \"\"\n" +
+                "hits: 3\n" +
+                "id: 82\n" +
+                "img: \"/public/uploads/95/b4e78cc04fa7ae8af6219fdf1786cc.jpg\"\n" +
+                "keywords: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"029-89523752\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"西安美丽宣言科技美容纤体中心\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2022-02-19 12:03:33\"\n" +
+                "\n" +
+                "82:\n" +
+                "address: \"武汉市东西湖区宏图大道8号卓尔万豪酒店23楼\"\n" +
+                "allimg: \"/public/uploads/1f/594643172436f4a02ecb00e099141e.jpg,/public/uploads/da/0a302ce2a10b96792db05c9cbd1418.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;&amp;nbsp;STAR WIN星好旺母婴护理机构&lt;/p&gt;\"\n" +
+                "create_time: \"2022-04-01 17:41:33\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \" STAR WIN星好旺母婴护理机构\"\n" +
+                "flag: \"\"\n" +
+                "hits: 2\n" +
+                "id: 83\n" +
+                "img: \"/public/uploads/75/b0892b8741388d99630cabda598a78.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"13886149971\"\n" +
+                "shop: \"星好旺\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"STAR WIN星好旺母婴护理机构\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2022-04-01 17:41:33\"\n" +
+                "\n" +
+                "83:\n" +
+                "address: \"辽宁省盘锦市兴隆台区蓝色康桥F区西门\"\n" +
+                "allimg: \"/public/uploads/94/b82372dc60e91e90dcaf06522690e0.jpg\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;名洋美容生活馆&lt;/p&gt;\"\n" +
+                "create_time: \"2022-05-10 10:34:12\"\n" +
+                "desc: \"ROS'S (BINARY PREMIUM)\"\n" +
+                "    description: \"名洋美容生活馆\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 84\n" +
+                "img: \"/public/uploads/94/b82372dc60e91e90dcaf06522690e0.jpg\"\n" +
+                "keywords: \"\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"0427-2689588\"\n" +
+                "shop: \"\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"\"\n" +
+                "title: \"名洋美容养生馆\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2022-05-10 10:34:12\"\n" +
+                "\n" +
+                "84:\n" +
+                "address: \"广东省东莞市东城街道振兴路180号\"\n" +
+                "allimg: \"/public/uploads/15/46a62f19c6c495e59d144d4605ed71.png\"\n" +
+                "cid: 6\n" +
+                "content: \"&lt;p&gt;中盟摩登妈妈月子会所&lt;/p&gt;\"\n" +
+                "create_time: \"2022-06-07 11:33:16\"\n" +
+                "desc: \"ROSS (BINARY PREMIUM)\"\n" +
+                "    description: \"中盟摩登妈妈月子会所\"\n" +
+                "flag: \"\"\n" +
+                "hits: 0\n" +
+                "id: 85\n" +
+                "img: \"/public/uploads/15/46a62f19c6c495e59d144d4605ed71.png\"\n" +
+                "keywords: \"中盟摩登妈妈月子会所\"\n" +
+                "lang: \"zh-cn\"\n" +
+                "phone: \"400 101 3268\"\n" +
+                "shop: \"东莞\"\n" +
+                "sort: 0\n" +
+                "status: 1\n" +
+                "tags: \"中盟摩登妈妈月子会所\"\n" +
+                "title: \"中盟摩登妈妈月子会所\"\n" +
+                "uid: 0\n" +
+                "update_time: \"2022-06-07 11:33:16\"\n" ;
+
+        String[] split = ss.split("\n");
+        StringBuffer real = new StringBuffer();
+        for (String s : split) {
+            if (s.contains("address")) {
+                real.append(s).append("\n");
+            }
+            if (s.contains("allimg")) {
+                real.append(s).append("\n");
+            }
+            if (s.contains("description")) {
+                real.append(s).append("\n");
+            }
+            if (s.contains("img") && !s.contains("allimg")) {
+                real.append(s).append("\n");
+            }
+            if (s.contains("phone")) {
+                real.append(s).append("\n");
+            }
+            if (s.contains("shop")) {
+                real.append(s).append("\n");
+            }
+            if (s.contains("title")) {
+                real.append(s).append("\n");
+            }
+        }
+        String[] split1 = real.toString().split("\n");
+        RossAddressVo address = new RossAddressVo();
+        for (int i = 0; i < split1.length; i++) {
+            if (0 == i % 7) {
+                String[] split2 = split1[i].split(":");
+                String s = split2[1];
+                String s1 = cleanBlank(s);
+                address.setAddress(s1);
+            }
+            if (1 == i % 7) {
+                String[] split2 = split1[i].split(":");
+                String s = split2[1];
+                String s1 = cleanBlank(s);
+                address.setAllimg(s1);
+            }
+            if (2 == i % 7) {
+                String[] split2 = split1[i].split(":");
+                String s = split2[1];
+                String s1 = cleanBlank(s);
+                address.setDescription(s1);
+            }
+            if (3 == i % 7) {
+                String[] split2 = split1[i].split(":");
+                String s = "http://spainross.com" + split2[1];
+                String s1 = cleanBlank(s);
+                address.setImgs(s1);
+            }
+            if (4 == i % 7) {
+                String[] split2 = split1[i].split(":");
+                String s = split2[1];
+                String s1 = cleanBlank(s);
+                address.setPhone(s1);
+            }
+            if (5 == i % 7) {
+                String[] split2 = split1[i].split(":");
+                String s = split2[1];
+                String s1 = cleanBlank(s);
+                address.setShopName(s1);
+            }
+            if (6 == i % 7) {
+                String[] split2 = split1[i].split(":");
+                String s = split2[1];
+                String s1 = cleanBlank(s);
+                address.setShopTitle(s1);
+            }
+            if (6 == i % 7) {
+                CmBrandAuthPo cmBrandAuthPo = new CmBrandAuthPo();
+                cmBrandAuthPo.setAuthParty(address.getShopTitle() + (StringUtils.isNotEmpty(address.getShopName()) ? "(" + address.getShopName() + ")" : ""));
+                cmBrandAuthPo.setRemarks(address.getDescription());
+                cmBrandAuthPo.setMobile(address.getPhone());
+                cmBrandAuthPo.setAuthUserId(12);
+                if (StringUtils.isNotEmpty(address.getImgs())) {
+                    String imagePath = address.getImgs();
+                    String fileName = imagePath.substring(imagePath.lastIndexOf("/") + 1);
+                    String imageUrl = uploadService.saveFileByUrl(imagePath, fileName);
+                    cmBrandAuthPo.setLogo(imageUrl);
+                }
+                cmBrandAuthPo.setStatus(1);
+                cmBrandAuthPo.setCustomFlag(0);
+                cmBrandAuthPo.setFirstClubType(5);
+                cmBrandAuthPo.setCreateBy(12);
+                cmBrandAuthPo.setCreateSource(1);
+                Date now = new Date();
+                cmBrandAuthPo.setAuditBy(1);
+                cmBrandAuthPo.setAuditStatus(1);
+                cmBrandAuthPo.setAuditTime(now);
+                cmBrandAuthPo.setShopAuditBy(12);
+                cmBrandAuthPo.setShopAuditStatus(1);
+                cmBrandAuthPo.setShopAuditTime(now);
+                cmBrandAuthPo.setDelFlag(0);
+                if (StringUtils.isNotBlank(address.getAddress())) {
+                    String url = "https://restapi.amap.com/v3/geocode/geo?address="+address.getAddress()+"&key=9935007fc2048e62f9f593de49c346d9";
+                    String result = RequestUtil.sendGet(url);
+                    JSONObject jsonObject = JSONObject.parseObject(result);
+                    String status = jsonObject.getString("status");
+                    if ("1".equals(status)) {
+                        String geocodes = jsonObject.getString("geocodes");
+                        JSONArray jsonArray = JSONObject.parseArray(geocodes);
+                        JSONObject addressInfo = JSONObject.parseObject(jsonArray.get(0).toString());
+                        String lngAndLat = addressInfo.getString("location");
+                        String[] locationSplit = lngAndLat.split(",");
+                        BigDecimal lng = new BigDecimal(locationSplit[0]);
+                        BigDecimal lat = new BigDecimal(locationSplit[1]);
+                        cmBrandAuthPo.setLng(lng);
+                        cmBrandAuthPo.setLat(lat);
+                    }
+                    Map<String, Object> town = getTown(address.getAddress());
+                    TownPo to = (TownPo) town.get("town");
+                    String str = (String) town.get("str");
+                    cmBrandAuthPo.setAddress(str);
+                    cmBrandAuthPo.setTownId(to.getTownId());
+                    cmBrandAuthPo.setCityId(to.getCityId());
+                    cmBrandAuthPo.setProvinceId(to.getProvinceId());
+                }
+                authMapper.insertAuth(cmBrandAuthPo);
+                if (address.getAllimg().contains(",")) {
+                    String[] split2 = address.getAllimg().split(",");
+                    for (String s : split2) {
+                        String imagePath = "http://spainross.com" + s;
+                        String fileName = imagePath.substring(imagePath.lastIndexOf("/") + 1);
+                        String imageUrl = uploadService.saveFileByUrl(imagePath, fileName);
+                        authMapper.insertBanner(cmBrandAuthPo.getId(), imageUrl);
+                    }
+                } else {
+                    String allimg = address.getAllimg();
+                    String imagePath = "http://spainross.com" + allimg;
+                    String fileName = imagePath.substring(imagePath.lastIndexOf("/") + 1);
+                    String imageUrl = uploadService.saveFileByUrl(imagePath, fileName);
+                    authMapper.insertBanner(cmBrandAuthPo.getId(), imageUrl);
+                }
+            }
+        }
+        return ResponseJson.success();
+    }
+
+
+    public String cleanBlank(String str) {
+        if (str != null && (str.contains("\\") || str.contains("") || str.contains("\"") || str.contains(" \""))) {
+            String replaceFlag = str.replace("\\", "");
+            str = replaceFlag.replace("\"", "").replaceAll(" ", "").trim();
+            return str;
+        }
+        return str;
+    }
+
+    public Map<String, Object> getTown(String str) {
+        TownPo townPo = new TownPo();
+        List<String> townNames = authMapper.getTownNames();
+        for (String townName : townNames) {
+            if (str.contains(townName)) {
+                townPo = authMapper.getTownList(townName).get(0);
+            }
+            if(null!=townPo.getCityId()){
+                townPo.setProvinceId(authMapper.getProvinceIdByCityId(townPo.getCityId()));
+            }
+        }
+        if (null == townPo.getTownId()) {
+            List<String> provinceNames = authMapper.getProvinceNames();
+            for (String provinceName : provinceNames) {
+                if (str.contains(provinceName)) {
+                    townPo.setProvinceId(authMapper.getProvinceId(provinceName));
+                }
+            }
+            List<String> cityNames = authMapper.getCityNames(townPo.getProvinceId());
+            for (String cityName : cityNames) {
+                if (str.contains(cityName)) {
+                    townPo.setCityId(authMapper.getCityIdByProvinceId(townPo.getProvinceId(), cityName));
+                }
+            }
+        }
+
+        Integer provinceId = townPo.getProvinceId();
+        if (null != provinceId) {
+            String provinceName = authMapper.getProvinceNameById(provinceId);
+            str = str.replace(provinceName, "");
+        }
+        Integer cityId = townPo.getCityId();
+        if (null != cityId) {
+            String cityName = authMapper.getCityNameByCityId(cityId);
+            str = str.replace(cityName, "");
+        }
+        Integer townId = townPo.getTownId();
+        if (null != townId) {
+            String townName = authMapper.getTownNameById(townId);
+            str = str.replace(townName, "");
+        }
+        String s = cleanBlank(str);
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("town", townPo);
+        map.put("str", s);
+        return map;
+    }
 }

+ 11 - 2
src/main/java/com/caimei/service/auth/impl/ArticleServiceImpl.java

@@ -1,6 +1,7 @@
 package com.caimei.service.auth.impl;
 
 import com.caimei.mapper.cmMapper.ArticleMapper;
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.ArticlePo;
 import com.caimei.model.vo.ArticleFormVo;
@@ -30,6 +31,9 @@ public class ArticleServiceImpl implements ArticleService {
     @Resource
     private ArticleMapper articleMapper;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Override
     public ResponseJson<PageInfo<ArticleListVo>> getArticleList(Integer listType, Integer authUserId, String articleTitle, Integer auditStatus, Integer status, Integer pageNum, Integer pageSize) {
         if (null == authUserId) {
@@ -66,8 +70,13 @@ public class ArticleServiceImpl implements ArticleService {
         article.setImage(articleImage);
         article.setContent(articleContent);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        article.setStatus(2);
-        article.setAuditStatus(2);
+//        article.setStatus(2);
+//        article.setAuditStatus(2);
+        article.setStatus(1);
+        article.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        article.setAuditBy(adminUserId);
+        article.setAuditTime(new Date());
         if (null == articleId) {
             article.setAuthUserId(authUserId);
             article.setCreateTime(new Date());

+ 48 - 9
src/main/java/com/caimei/service/auth/impl/AuthClubServiceImpl.java

@@ -5,7 +5,8 @@ import com.caimei.model.ResponseJson;
 import com.caimei.model.po.ClubUserPo;
 import com.caimei.model.vo.*;
 import com.caimei.service.auth.AuthClubService;
-import com.caimei.utils.CodeUtil;
+import com.caimei.utils.Md5Util;
+import com.caimei.utils.SmsUtils;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
@@ -52,12 +53,12 @@ public class AuthClubServiceImpl implements AuthClubService {
     }
 
     @Override
-    public ResponseJson<PageInfo<ClubUserVo>> getClubUserList(Integer authId, String mobile, String name, Integer status, Integer pageNum, Integer pageSize) {
-        if (null == authId) {
-            return ResponseJson.error("参数异常,请输入授权机构id", null);
+    public ResponseJson<PageInfo<ClubUserVo>> getClubUserList(Integer authUserId, String mobile, String name, Integer status, Integer pageNum, Integer pageSize) {
+        if (null == authUserId) {
+            return ResponseJson.error("参数异常,请输入供应商用户id", null);
         }
         PageHelper.startPage(pageNum, pageSize);
-        List<ClubUserVo> clubUserList = clubMapper.getClubUserList(authId, mobile, name, status);
+        List<ClubUserVo> clubUserList = clubMapper.getClubUserList(authUserId, mobile, name, status);
         PageInfo<ClubUserVo> pageData = new PageInfo<>(clubUserList);
         return ResponseJson.success(pageData);
     }
@@ -132,22 +133,32 @@ public class AuthClubServiceImpl implements AuthClubService {
     }
 
     @Override
-    public ResponseJson saveClubUser(Integer clubUserId, Integer authId, String name, String mobile) {
+    public ResponseJson saveClubUser(Integer clubUserId, Integer authUserId, String mobile) {
         // 是否为添加操作
         boolean insertFlag = null == clubUserId;
         // 构建机构用户
         ClubUserPo clubUser = new ClubUserPo();
-        clubUser.setAuthId(authId);
-        clubUser.setName(name);
+        clubUser.setAuthUserId(authUserId);
         clubUser.setMobile(mobile);
         if (insertFlag) {
             // 根据手机号校验该机构下是否已添加该机构用户
-            WxClubUserVo wxClubUser = clubMapper.getWxClubUser(mobile, null, null, authId);
+            WxClubUserVo wxClubUser = clubMapper.getWxClubUser(mobile, null, authUserId, null, null);
             if (null != wxClubUser) {
                 return ResponseJson.error("该用户已存在,请勿重复添加");
             }
             clubUser.setAddTime(new Date());
+            clubUser.setPassword("rzt123456");
+            clubUser.setStatus(1);
             clubMapper.insertClubUser(clubUser);
+            String content = "您认证通登录密码为:rzt123456";
+            Boolean sendSms = SmsUtils.sendSms(11, mobile, content);
+            if (!sendSms) {
+                log.info("供应商添加机构用户-密码发送失败,手机号:" + mobile);
+                return ResponseJson.error("发送失败,请确认手机号无误");
+            } else {
+                log.info("供应商添加机构用户-密码发送成功,手机号:" + mobile);
+
+            }
         } else {
             clubUser.setId(clubUserId);
             clubMapper.updateClubUser(clubUser);
@@ -160,4 +171,32 @@ public class AuthClubServiceImpl implements AuthClubService {
         clubMapper.deleteClubUser(clubUserId);
         return ResponseJson.success("删除机构用户成功");
     }
+
+    @Override
+    public ResponseJson updateStatus(Integer clubUserId, Integer status) {
+        clubMapper.updateStatus(clubUserId, status);
+        return ResponseJson.success("修改成功");
+    }
+
+    @Override
+    public ResponseJson resetClubUserPassword(Integer clubUserId) {
+        if (clubUserId == null) {
+            return ResponseJson.error("请输入机构用户id");
+        }
+        String newPassword = "rzt123456";
+        String md5Password = Md5Util.md5(newPassword);
+        clubMapper.updateClubUserPassword(clubUserId, md5Password);
+        WxClubUserVo clubUser = clubMapper.getWxClubUser(null, null, null, null, clubUserId);
+        String mobile = clubUser.getMobile();
+        String content = "您认证通登录密码为:" + newPassword;
+        Boolean sendSms = SmsUtils.sendSms(11, mobile, content);
+        if (!sendSms) {
+            log.info("机构用户重置密码发送失败,手机号:" + mobile);
+            return ResponseJson.error("发送失败,请确认手机号无误");
+        } else {
+            log.info("机构用户重置密码发送成功,手机号:" + mobile);
+
+        }
+        return ResponseJson.success("密码重置成功");
+    }
 }

+ 245 - 105
src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java

@@ -2,6 +2,7 @@ package com.caimei.service.auth.impl;
 
 import com.aliyun.oss.OSS;
 import com.aliyun.oss.OSSClientBuilder;
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.AuthProductMapper;
 import com.caimei.mapper.cmMapper.ShopMapper;
 import com.caimei.model.ResponseJson;
@@ -10,8 +11,6 @@ import com.caimei.model.po.ProductParamPo;
 import com.caimei.model.po.ProductPo;
 import com.caimei.model.po.ProductTypePo;
 import com.caimei.model.vo.*;
-import com.caimei.module.base.entity.vo.AuthProductVo;
-import com.caimei.module.base.entity.vo.StatementFileVo;
 import com.caimei.service.auth.AuthProductService;
 import com.caimei.service.auth.UploadService;
 import com.caimei.utils.Base64Util;
@@ -50,6 +49,9 @@ public class AuthProductServiceImpl implements AuthProductService {
     @Resource
     private ShopMapper shopMapper;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Value("${caimei.imageDomain}")
     private String imageDomain;
 
@@ -72,13 +74,15 @@ public class AuthProductServiceImpl implements AuthProductService {
     private String bucketName = "caimei-oss";
 
     @Override
-    public ResponseJson<PageInfo<ProductListVo>> getProductList(Integer listType, Integer authId, String productName, String snCode, Integer status, Integer auditStatus, Integer pageNum, Integer pageSize) {
+    public ResponseJson<PageInfo<ProductListVo>> getProductList(Integer listType, Integer authId, String productName,
+                                                                String snCode, Integer status, Integer auditStatus,
+                                                                Integer shopAuditStatus, Integer pageNum, Integer pageSize) {
         if (null == authId) {
             return ResponseJson.error("参数异常,请输入授权id", null);
         }
         listType = null == listType ? 1 : listType;
         PageHelper.startPage(pageNum, pageSize);
-        List<ProductListVo> productList = authProductMapper.getProductList(listType, authId, productName, snCode, status, auditStatus);
+        List<ProductListVo> productList = authProductMapper.getProductList(listType, authId, productName, snCode, status, auditStatus, shopAuditStatus);
         PageInfo<ProductListVo> pageData = new PageInfo<>(productList);
         return ResponseJson.success(pageData);
     }
@@ -119,20 +123,38 @@ public class AuthProductServiceImpl implements AuthProductService {
         Integer authId = productSaveDto.getAuthId();
         Integer brandId = productSaveDto.getBrandId();
         Integer productTypeId = productSaveDto.getProductTypeId();
+        String productName = productSaveDto.getProductName();
+        String productImage = productSaveDto.getProductImage();
         String snCode = productSaveDto.getSnCode();
         String certificateImage = productSaveDto.getCertificateImage();
         Integer addQrCodeFlag = productSaveDto.getAddQrCodeFlag();
         Integer addTemplateType = productSaveDto.getAddTemplateType();
         Integer createBy = productSaveDto.getCreateBy();
+        String purchaseWay = productSaveDto.getPurchaseWay();
+        String invoiceImage = productSaveDto.getInvoiceImage();
+        Integer source = null == productSaveDto.getSource() ? 1 : productSaveDto.getSource();
         List<ProductParamPo> paramList = productSaveDto.getParamList();
         if (null == authId) {
             return ResponseJson.error("参数异常,请输入授权id", null);
         }
-        if (null == brandId) {
-            return ResponseJson.error("参数异常,请输入品牌id", null);
-        }
+        AuthVo auth = authMapper.getAuthById(authId);
         if (null == productTypeId) {
-            return ResponseJson.error("参数异常,请输入设备分类id", null);
+            // 新增设备分类,需要传入设备名称,品牌id,参数列表
+            if (null == brandId) {
+                return ResponseJson.error("参数异常,请输入品牌id", null);
+            }
+            if (StringUtils.isEmpty(productName)) {
+                return ResponseJson.error("参数异常,请输入设备分类id或设备名称", null);
+            }
+            if (StringUtils.isNotEmpty(productName)) {
+                ProductTypePo productType = authProductMapper.getProductType(null, productName, auth.getAuthUserId());
+                if (null != productType) {
+                    productTypeId = productType.getProductTypeId();
+                }
+            }
+            if (null == paramList || paramList.size() <= 0) {
+                return ResponseJson.error("参数异常,商品参数列表不能为空", null);
+            }
         }
         if (StringUtils.isBlank(snCode)) {
             return ResponseJson.error("参数异常,请输入商品SN码", null);
@@ -141,10 +163,10 @@ public class AuthProductServiceImpl implements AuthProductService {
         if (null != productIdBySnCode && !productIdBySnCode.equals(productId)) {
             return ResponseJson.error("参数异常,该商品SN码已存在,请重新输入", null);
         }
-        if (StringUtils.isBlank(certificateImage)) {
+        /*if (1 == source && StringUtils.isBlank(certificateImage)) {
             return ResponseJson.error("参数异常,请上传授权牌照", null);
-        }
-        if (!importFlag) {
+        }*/
+        if (!importFlag && 1 == source) {
             if (null == addQrCodeFlag) {
                 return ResponseJson.error("参数异常,请选择是否生成二维码授权牌", null);
             }
@@ -152,9 +174,6 @@ public class AuthProductServiceImpl implements AuthProductService {
                 return ResponseJson.error("参数异常,请选择二维码授权牌模板", null);
             }
         }
-        if (null == paramList || paramList.size() <= 0) {
-            return ResponseJson.error("参数异常,商品参数列表不能为空", null);
-        }
         // 是否为添加操作
         boolean insertFlag = null == productId;
         /*
@@ -165,32 +184,51 @@ public class AuthProductServiceImpl implements AuthProductService {
         product.setAuthId(authId);
         // 品牌id
         product.setBrandId(brandId);
-        // 商品名称
+        // 设备分类id
         product.setProductTypeId(productTypeId);
+        if (null == productTypeId) {
+            // 设备名称(仅机构添加新设备时使用)
+            product.setName(productName);
+            // 设备图片(仅机构添加新设备时使用)
+            product.setImage(productImage);
+        }
         // sn码
         product.setSnCode(snCode);
         // 授权牌照
         product.setCertificateImage(certificateImage);
         product.setAddQrCodeFlag(addQrCodeFlag);
         product.setAddTemplateType(addTemplateType);
+        // 购买渠道
+        product.setPurchaseWay(purchaseWay);
+        // 发票图片
+        product.setInvoiceImage(invoiceImage);
         // 商品信息保存后,上线状态默认为“待上线”,审核状态为“待审核”
-        product.setStatus(2);
-        product.setAuditStatus(2);
+        /*product.setStatus(2);
+        product.setAuditStatus(2);*/
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        product.setStatus(1 == source ? 1 : 2);
+        product.setAuditStatus(1 == source ? 1 : 2);
+        Integer adminUserId = authMapper.getAdminUserId();
+        product.setAuditBy(adminUserId);
+        product.setAuditTime(new Date());
+        product.setShopAuditStatus(1 == source ? 1 : 2);
         if (insertFlag) {
             // 原授权牌照
             product.setOriginalCertificateImage(product.getCertificateImage());
             // 创建人id
             product.setCreateBy(createBy);
+            // 创建来源
+            product.setCreateSource(source);
             // 创建时间
             product.setCreateTime(new Date());
-            if (null == addQrCodeFlag || 0 == addQrCodeFlag) {
-                //授权牌照添加水印
+            if (1 == source && StringUtils.isNotEmpty(product.getCertificateImage()) && (null == addQrCodeFlag || 0 == addQrCodeFlag)) {
+                //授权牌照不添加二维码,直接添加水印
                 product.setPcCertificateImage(addWaterMark(product.getCertificateImage(), 1));
                 product.setAppletsCertificateImage(addWaterMark(product.getCertificateImage(), 2));
             }
             // 插入授权商品
             authProductMapper.insertProduct(product);
-            if (null != addQrCodeFlag && 1 == addQrCodeFlag) {
+            if (1 == source && StringUtils.isNotEmpty(product.getCertificateImage()) && (null != addQrCodeFlag && 1 == addQrCodeFlag)) {
                 // 生成二维码授权牌
                 String addQrCodeImg = addQrCode(product.getCertificateImage(), product.getProductId(), addTemplateType);
                 product.setCertificateImage(addQrCodeImg);
@@ -200,89 +238,102 @@ public class AuthProductServiceImpl implements AuthProductService {
                 //更新授权牌照
                 authProductMapper.updateCertificateImage(product);
             }
+            // 自动生成授权牌
+
         } else {
             // 商品id
             product.setProductId(productId);
-            ProductPo dbProduct = authProductMapper.getImageByProductId(productId);
-            // 数据库该商品授权牌是否添加二维码
-            Integer dbAddQrCodeFlag = dbProduct.getAddQrCodeFlag();
-            // 数据库该商品授权牌添加二维码模板
-            Integer dbAddTemplateType = dbProduct.getAddTemplateType();
-            // 授权牌照是否重新上传
-            boolean updateImageFlag = (StringUtils.isNotBlank(product.getCertificateImage()) && !product.getCertificateImage().equals(dbProduct.getCertificateImage())) || (StringUtils.isEmpty(dbProduct.getPcCertificateImage()) || StringUtils.isEmpty(dbProduct.getAppletsCertificateImage()));
-            boolean addQrCodeSign = false;
-            boolean addWaterMarkSign = false;
-            if (null != dbAddQrCodeFlag && 1 == dbAddQrCodeFlag) {
-                if (0 == addQrCodeFlag) {
-                    // 原本是,现在否
-                    if (updateImageFlag) {
-                        // 新上传图片,将原图片替换为当前图片,生成水印图片
-                        product.setOriginalCertificateImage(product.getCertificateImage());
-                        addWaterMarkSign = true;
+            if (1 == source) {
+                ProductPo dbProduct = authProductMapper.getImageByProductId(productId);
+                // 数据库该商品授权牌是否添加二维码
+                Integer dbAddQrCodeFlag = dbProduct.getAddQrCodeFlag();
+                // 数据库该商品授权牌添加二维码模板
+                Integer dbAddTemplateType = dbProduct.getAddTemplateType();
+                // 授权牌照是否重新上传
+                boolean updateImageFlag = (StringUtils.isNotBlank(product.getCertificateImage()) && !product.getCertificateImage().equals(dbProduct.getCertificateImage())) || (StringUtils.isEmpty(dbProduct.getPcCertificateImage()) || StringUtils.isEmpty(dbProduct.getAppletsCertificateImage()));
+                boolean addQrCodeSign = false;
+                boolean addWaterMarkSign = false;
+                if (StringUtils.isNotEmpty(product.getCertificateImage())) {
+                    if (null != dbAddQrCodeFlag && 1 == dbAddQrCodeFlag) {
+                        if (0 == addQrCodeFlag) {
+                            // 原本是,现在否
+                            if (updateImageFlag) {
+                                // 新上传图片,将原图片替换为当前图片,生成水印图片
+                                product.setOriginalCertificateImage(product.getCertificateImage());
+                                addWaterMarkSign = true;
+                            } else {
+                                // 原图片,将当前授权牌替换为原图,生成水印图片
+                                product.setCertificateImage(dbProduct.getOriginalCertificateImage());
+                                addWaterMarkSign = true;
+                            }
+                        } else if (1 == addQrCodeFlag) {
+                            // 原本是,现在是
+                            if (updateImageFlag) {
+                                // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
+                                product.setOriginalCertificateImage(product.getCertificateImage());
+                                addQrCodeSign = true;
+                                addWaterMarkSign = true;
+                            } else if (!addTemplateType.equals(dbAddTemplateType)) {
+                                // 原图片,更改模板,将当前授权牌替换为原图,生成二维码授权牌,生成水印图片
+                                product.setCertificateImage(dbProduct.getOriginalCertificateImage());
+                                addQrCodeSign = true;
+                                addWaterMarkSign = true;
+                            }
+                            // else 原图片,不更改模板,不做更改
+                        }
                     } else {
-                        // 原图片,将当前授权牌替换为原图,生成水印图片
-                        product.setCertificateImage(dbProduct.getOriginalCertificateImage());
-                        addWaterMarkSign = true;
-                    }
-                } else if (1 == addQrCodeFlag) {
-                    // 原本是,现在是
-                    if (updateImageFlag) {
-                        // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
-                        product.setOriginalCertificateImage(product.getCertificateImage());
-                        addQrCodeSign = true;
-                        addWaterMarkSign = true;
-                    } else if (!addTemplateType.equals(dbAddTemplateType)) {
-                        // 原图片,更改模板,将当前授权牌替换为原图,生成二维码授权牌,生成水印图片
-                        product.setCertificateImage(dbProduct.getOriginalCertificateImage());
-                        addQrCodeSign = true;
-                        addWaterMarkSign = true;
+                        if (1 == addQrCodeFlag) {
+                            // 原本否,现在是
+                            if (updateImageFlag) {
+                                // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
+                                product.setOriginalCertificateImage(product.getCertificateImage());
+                                addQrCodeSign = true;
+                                addWaterMarkSign = true;
+                            } else {
+                                // 原图片,生成二维码授权牌,生成水印图片
+                                addQrCodeSign = true;
+                                addWaterMarkSign = true;
+                            }
+                        } else {
+                            // 原本否,现在否
+                            if (updateImageFlag) {
+                                // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
+                                product.setOriginalCertificateImage(product.getCertificateImage());
+                                addWaterMarkSign = true;
+                            }
+                            // 原图片,不做更改
+                        }
                     }
-                    // else 原图片,不更改模板,不做更改
+                }else {
+                    product.setPcCertificateImage(null);
+                    product.setAppletsCertificateImage(null);
                 }
-            } else {
-                if (1 == addQrCodeFlag) {
-                    // 原本否,现在是
-                    if (updateImageFlag) {
-                        // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
-                        product.setOriginalCertificateImage(product.getCertificateImage());
-                        addQrCodeSign = true;
-                        addWaterMarkSign = true;
-                    } else {
-                        // 原图片,生成二维码授权牌,生成水印图片
-                        addQrCodeSign = true;
-                        addWaterMarkSign = true;
-                    }
-                } else {
-                    // 原本否,现在否
-                    if (updateImageFlag) {
-                        // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
-                        product.setOriginalCertificateImage(product.getCertificateImage());
-                        addWaterMarkSign = true;
-                    }
-                    // 原图片,不做更改
+                if (addQrCodeSign) {
+                    // 生成二维码授权牌
+                    String addQrCodeImg = addQrCode(product.getCertificateImage(), productId, addTemplateType);
+                    product.setCertificateImage(addQrCodeImg);
+                }
+                if (addWaterMarkSign) {
+                    //授权牌照添加水印
+                    product.setPcCertificateImage(addWaterMark(product.getCertificateImage(), 1));
+                    product.setAppletsCertificateImage(addWaterMark(product.getCertificateImage(), 2));
                 }
             }
-            if (addQrCodeSign) {
-                // 生成二维码授权牌
-                String addQrCodeImg = addQrCode(product.getCertificateImage(), productId, addTemplateType);
-                product.setCertificateImage(addQrCodeImg);
-            }
-            if (addWaterMarkSign) {
-                //授权牌照添加水印
-                product.setPcCertificateImage(addWaterMark(product.getCertificateImage(), 1));
-                product.setAppletsCertificateImage(addWaterMark(product.getCertificateImage(), 2));
-            }
+            // 自动生成授权牌
+
             // 更新授权商品
             authProductMapper.updateProductByProductId(product);
         }
         // 删除商品参数
         authProductMapper.deleteParamsByProductId(product.getProductId());
         // 保存商品参数
-        paramList.forEach(param -> {
-            if (StringUtils.isNotBlank(param.getParamName()) && StringUtils.isNotBlank(param.getParamContent())) {
-                authProductMapper.insertProductParam(product.getProductId(), param.getParamName(), param.getParamContent());
-            }
-        });
+        if (null == productTypeId) {
+            paramList.forEach(param -> {
+                if (StringUtils.isNotBlank(param.getParamName()) && StringUtils.isNotBlank(param.getParamContent())) {
+                    authProductMapper.insertProductParam(product.getProductId(), param.getParamName(), param.getParamContent());
+                }
+            });
+        }
         return ResponseJson.success("保存授权商品成功");
     }
 
@@ -317,9 +368,9 @@ public class AuthProductServiceImpl implements AuthProductService {
             if (null != imgFile) {
                 imagePath = uploadService.saveFile(imgFile);
             }
-            log.info(">>>>>>>>>>>>>>>>水印图片上传成功:" + imagePath);
+            log.info(">>>>>>>>>>>>>>>>二维码图片上传成功:" + imagePath);
         } else {
-            log.info(">>>>>>>>>>>>>>>>水印图片上传失败");
+            log.info(">>>>>>>>>>>>>>>>二维码图片上传失败");
         }
         return imagePath;
     }
@@ -333,7 +384,10 @@ public class AuthProductServiceImpl implements AuthProductService {
         if (null == productForm) {
             return ResponseJson.error("商品不存在", null);
         }
-        List<ProductParamPo> paramList = authProductMapper.getParamsByProductId(productId);
+        List<ProductParamPo> paramList = authProductMapper.getProductTypeParamList(productForm.getProductTypeId());
+        if (null == paramList || paramList.size() == 0) {
+            paramList = authProductMapper.getParamsByProductId(productId);
+        }
         productForm.setParamList(paramList);
         return ResponseJson.success(productForm);
     }
@@ -348,10 +402,10 @@ public class AuthProductServiceImpl implements AuthProductService {
         List<ProductPo> productList = authProductMapper.getAllImage();
         productList.forEach(product->{
             try {
-                if (StringUtils.isNotEmpty(product.getProductImage())) {
+                if (StringUtils.isNotEmpty(product.getImage())) {
                     //商品图片添加水印
-                    product.setPcImage(addWaterMark(product.getProductImage(), 1));
-                    product.setAppletsImage(addWaterMark(product.getProductImage(), 2));
+                    product.setPcImage(addWaterMark(product.getImage(), 1));
+                    product.setAppletsImage(addWaterMark(product.getImage(), 2));
                 }
                 if (StringUtils.isNotEmpty(product.getCertificateImage())) {
                     //授权牌照添加水印
@@ -368,7 +422,7 @@ public class AuthProductServiceImpl implements AuthProductService {
     }
 
     @Override
-    public ResponseJson auditProduct(Integer productId, Integer auditStatus, String invalidReason, Integer auditBy) {
+    public ResponseJson auditProduct(Integer productId, Integer auditStatus, String invalidReason, Integer auditBy, Integer source) {
         if (productId == null) {
             return ResponseJson.error("请输入商品id");
         }
@@ -381,22 +435,81 @@ public class AuthProductServiceImpl implements AuthProductService {
         if (auditBy == null) {
             return ResponseJson.error("请输入审核人用户id");
         }
+        source = null == source ? 1 : source;
         Date auditTime = new Date();
         int status = 0;
         if (1 == auditStatus) {
             status = 1;
         }
-        authProductMapper.updateProductAuditStatus(productId, status, auditStatus, invalidReason, auditBy, auditTime);
+        if (1 == source) {
+            // 获取设备信息
+            ProductPo product = authProductMapper.getProductPo(productId);
+            Integer productTypeId = product.getProductTypeId();
+            if (1 == auditStatus && null == productTypeId && StringUtils.isNotEmpty(product.getName()) && StringUtils.isNotEmpty(product.getImage())) {
+                // 新增设备分类
+                Integer authUserId = authProductMapper.getAuthUserIdByProductId(productId);
+                // 查询设备分类是否已存在
+                ProductTypePo productType = authProductMapper.getProductType(null, product.getName(), authUserId);
+                if (null == productType) {
+                    List<ProductParamPo> paramList = authProductMapper.getParamsByProductId(productId);
+                    try {
+                        ResponseJson<ProductTypePo> result = saveProductType(null, authUserId, product.getBrandId(), product.getName(), product.getImage(), product.getCreateBy(), paramList, 2);
+                        int code = result.getCode();
+                        if (0 == code) {
+                            productType = result.getData();
+                            productTypeId = productType.getProductTypeId();
+                            // 设备分类直接审核通过
+                            auditProductType(productTypeId, 1, null, auditBy);
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                } else {
+                    productTypeId = productType.getProductTypeId();
+                }
+            }
+            authProductMapper.updateProductAuditStatus(productId, productTypeId, status, auditStatus, invalidReason, auditBy, auditTime);
+        }
+        if (2 == source) {
+            // 获取设备信息
+            ProductPo product = authProductMapper.getProductPo(productId);
+            Integer productTypeId = product.getProductTypeId();
+            if (1 == auditStatus && null == productTypeId && StringUtils.isNotEmpty(product.getName()) && StringUtils.isNotEmpty(product.getImage())) {
+                // 新增设备分类
+                Integer authUserId = authProductMapper.getAuthUserIdByProductId(productId);
+                // 查询设备分类是否已存在
+                ProductTypePo productType = authProductMapper.getProductType(null, product.getName(), authUserId);
+                if (null == productType) {
+                    List<ProductParamPo> paramList = authProductMapper.getParamsByProductId(productId);
+                    try {
+                        ResponseJson<ProductTypePo> result = saveProductType(null, authUserId, product.getBrandId(), product.getName(), product.getImage(), product.getCreateBy(), paramList, 2);
+                        int code = result.getCode();
+                        if (0 == code) {
+                            productType = result.getData();
+                            productTypeId = productType.getProductTypeId();
+                            // 设备分类直接审核通过
+                            auditProductType(productTypeId, 1, null, auditBy);
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                } else {
+                    productTypeId = productType.getProductTypeId();
+                }
+            }
+            authProductMapper.updateProductShopAuditStatus(productId, productTypeId, status, auditStatus, invalidReason, auditBy, auditTime);
+        }
         return ResponseJson.success("审核商品成功");
     }
 
     @Override
-    public ResponseJson<PageInfo<WxProductListVo>> getWxProductList(Integer productTypeId, String snCode, Integer pageNum, Integer pageSize) {
-        if (null == productTypeId) {
+    public ResponseJson<PageInfo<WxProductListVo>> getWxProductList(Integer listType, Integer authId, String authParty, Integer productTypeId, String snCode, Integer pageNum, Integer pageSize) {
+        listType = null == listType ? 1 : listType;
+        if (1 == listType && null == productTypeId) {
             return ResponseJson.error("参数异常,请输入设备分类id", null);
         }
         PageHelper.startPage(pageNum, pageSize);
-        List<WxProductListVo> productList = authProductMapper.getWxProductList(productTypeId, snCode);
+        List<WxProductListVo> productList = authProductMapper.getWxProductList(listType, authId, authParty, productTypeId, snCode);
         PageInfo<WxProductListVo> pageData = new PageInfo<>(productList);
         return ResponseJson.success(pageData);
     }
@@ -424,7 +537,7 @@ public class AuthProductServiceImpl implements AuthProductService {
     }
 
     @Override
-    public ResponseJson saveProductType(Integer productTypeId, Integer authUserId, String name, String image, Integer createBy) throws IOException {
+    public ResponseJson<ProductTypePo> saveProductType(Integer productTypeId, Integer authUserId, Integer brandId, String name, String image, Integer createBy, List<ProductParamPo> paramList, Integer createSource) throws IOException {
         // 是否为添加操作
         boolean insertFlag = null == productTypeId;
         /*
@@ -432,13 +545,21 @@ public class AuthProductServiceImpl implements AuthProductService {
          */
         ProductTypePo productType = new ProductTypePo();
         productType.setAuthUserId(authUserId);
+        productType.setBrandId(brandId);
         productType.setName(name);
         productType.setImage(image);
         productType.setCreateBy(createBy);
         productType.setCreateTime(new Date());
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        productType.setStatus(2);
-        productType.setAuditStatus(2);
+        /*productType.setStatus(2);
+        productType.setAuditStatus(2);*/
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        productType.setStatus(1 == createSource ? 1 : 2);
+        productType.setAuditStatus(1 == createSource ? 1 : 2);
+        Integer adminUserId = authMapper.getAdminUserId();
+        productType.setAuditBy(adminUserId);
+        productType.setAuditTime(new Date());
+        productType.setCreateSource(createSource);
         if (insertFlag) {
             // 创建人id
             productType.setCreateBy(createBy);
@@ -452,7 +573,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         } else {
             // 设备分类id
             productType.setProductTypeId(productTypeId);
-            ProductTypePo dbProductType = authProductMapper.getProductType(productTypeId);
+            ProductTypePo dbProductType = authProductMapper.getProductType(productTypeId, null, null);
             // 设备分类图片是否重新上传
             boolean updateImageFlag = (StringUtils.isNotBlank(productType.getImage()) && !productType.getImage().equals(dbProductType.getImage()))
                     || (StringUtils.isEmpty(productType.getPcImage()) || StringUtils.isEmpty(productType.getAppletsImage()));
@@ -464,7 +585,17 @@ public class AuthProductServiceImpl implements AuthProductService {
             // 更新设备分类
             authProductMapper.updateProductType(productType);
         }
-        return ResponseJson.success("保存设备分类成功");
+        // 删除设备分类参数
+        authProductMapper.deleteParamsByProductTypeId(productType.getProductTypeId());
+        // 保存商品参数
+        if (null != paramList) {
+            paramList.forEach(param -> {
+                if (StringUtils.isNotBlank(param.getParamName()) && StringUtils.isNotBlank(param.getParamContent())) {
+                    authProductMapper.insertProductTypeParam(productType.getProductTypeId(), param.getParamName(), param.getParamContent());
+                }
+            });
+        }
+        return ResponseJson.success("保存设备分类成功", productType);
     }
 
     @Override
@@ -474,6 +605,7 @@ public class AuthProductServiceImpl implements AuthProductService {
             return ResponseJson.error("该设备有绑定设备认证,暂时无法删除");
         }
         authProductMapper.deleteProductType(productTypeId);
+        authProductMapper.deleteParamsByProductTypeId(productTypeId);
         return ResponseJson.success("删除设备分类成功");
     }
 
@@ -524,4 +656,12 @@ public class AuthProductServiceImpl implements AuthProductService {
         return ResponseJson.success(pageData);
     }
 
+    @Override
+    public ResponseJson<ProductTypePo> getProductTypeFromData(Integer productTypeId) {
+        ProductTypePo productType = authProductMapper.getProductType(productTypeId, null, null);
+        List<ProductParamPo> paramList = authProductMapper.getProductTypeParamList(productTypeId);
+        productType.setParamList(paramList);
+        return ResponseJson.success(productType);
+    }
+
 }

+ 232 - 114
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -6,18 +6,15 @@ import com.caimei.mapper.cmMapper.AuthProductMapper;
 import com.caimei.mapper.ldmMapper.LdmMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.dto.ProductSaveDto;
-import com.caimei.model.po.AuthImportPo;
-import com.caimei.model.po.CmBrandAuthPo;
-import com.caimei.model.po.LdmDataPo;
-import com.caimei.model.po.ProductParamPo;
-import com.caimei.model.vo.AuthFormVo;
-import com.caimei.model.vo.AuthVo;
-import com.caimei.model.vo.ProductFormVo;
+import com.caimei.model.po.*;
+import com.caimei.model.vo.*;
 import com.caimei.service.auth.AuthProductService;
 import com.caimei.service.auth.AuthService;
 import com.caimei.service.auth.ShopService;
 import com.caimei.service.auth.UploadService;
+import com.caimei.utils.Base64Util;
 import com.caimei.utils.ExcelOperateUtil;
+import com.caimei.utils.ImageUtils;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.github.tobato.fastdfs.service.FastFileStorageClient;
@@ -29,18 +26,24 @@ import org.apache.poi.xssf.usermodel.*;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.ClassPathResource;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletResponse;
+import javax.swing.*;
+import java.awt.*;
+import java.awt.Font;
 import java.awt.image.BufferedImage;
 import java.io.*;
 import java.math.BigDecimal;
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
 /**
@@ -59,6 +62,9 @@ public class AuthServiceImpl implements AuthService {
     @Resource
     private LdmMapper ldmMapper;
 
+    @Value("${caimei.zpapi}")
+    private String zpServer;
+
     @Resource
     private AuthProductMapper authProductMapper;
 
@@ -92,17 +98,17 @@ public class AuthServiceImpl implements AuthService {
     @Value("${caimei.imageDomain}")
     private String imageDomain;
 
-    @Autowired
-    private FastFileStorageClient storageClient;
-
     @Override
-    public ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty, Integer status, Integer auditStatus, Integer lowerAuditStatus, Integer pageNum, Integer pageSize) {
+    public ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty,
+                                                      String mobile, Integer status, Integer auditStatus, Integer lowerAuditStatus,
+                                                      Integer shopAuditStatus, Integer sendStatus,
+                                                      Integer pageNum, Integer pageSize) {
         if (null == authUserId) {
             return ResponseJson.error("参数异常,请输入供应商用户id", null);
         }
         listType = null == listType ? 1 : listType;
         PageHelper.startPage(pageNum, pageSize);
-        List<AuthVo> authList = authMapper.getAuthList(listType, authUserId, authParty, status, auditStatus, lowerAuditStatus);
+        List<AuthVo> authList = authMapper.getAuthList(listType, authUserId, authParty, mobile, status, auditStatus, lowerAuditStatus, shopAuditStatus, sendStatus);
         PageInfo<AuthVo> pageData = new PageInfo<>(authList);
         return ResponseJson.success(pageData);
     }
@@ -147,12 +153,9 @@ public class AuthServiceImpl implements AuthService {
         if (null == authId) {
             return ResponseJson.error("参数异常,机构id不能为空", null);
         }
-        CmBrandAuthPo auth = authMapper.getAuthById(authId);
-        AuthFormVo authFormVo = new AuthFormVo();
-        authFormVo.setAuthId(auth.getId());
-        BeanUtils.copyProperties(auth, authFormVo);
-        if (null != auth.getLng()) {
-            authFormVo.setLngAndLat(auth.getLng() + "," + auth.getLat());
+        AuthFormVo authFormVo = authMapper.getAuthFormById(authId);
+        if (null != authFormVo.getLng()) {
+            authFormVo.setLngAndLat(authFormVo.getLng() + "," + authFormVo.getLat());
         }
         List<String> bannerList = authMapper.getBannerList(authId);
         authFormVo.setBannerList(bannerList);
@@ -161,7 +164,7 @@ public class AuthServiceImpl implements AuthService {
 
     @Override
     public ResponseJson<List<AuthVo>> getAuthSelectList(Integer authUserId) {
-        List<AuthVo> authList = authMapper.getAuthList(1, authUserId, null, null, null, null);
+        List<AuthVo> authList = authMapper.getAuthList(1, authUserId, null, null, null, null, null, null, null);
         return ResponseJson.success(authList);
     }
 
@@ -210,7 +213,7 @@ public class AuthServiceImpl implements AuthService {
     }
 
     @Override
-    public ResponseJson saveAuth(CmBrandAuthPo auth, List<String> bannerList, boolean importFlag) {
+    public ResponseJson saveAuth(CmBrandAuthPo auth, List<String> bannerList, boolean importFlag, Integer source) {
         Integer authId = auth.getId();
         Integer authUserId = auth.getAuthUserId();
         String authParty = auth.getAuthParty();
@@ -220,12 +223,35 @@ public class AuthServiceImpl implements AuthService {
         if (StringUtils.isBlank(authParty)) {
             return ResponseJson.error("参数异常,请输入授权机构名称");
         }
-        Integer authIdByAuthParty = authMapper.getAuthIdByAuthParty(authParty, authUserId);
+        /*Integer authIdByAuthParty = authMapper.getAuthIdByAuthParty(authParty, authUserId);
         if (null != authIdByAuthParty && !authIdByAuthParty.equals(authId)) {
-            return ResponseJson.error("参数异常,该授权机构已存在,请重新输入", null);
+            return ResponseJson.error("参数异常,该授权机构已存在,请重新输入");
+        }*/
+        if (null == auth.getFirstClubType()) {
+            return ResponseJson.error("请勾选机构类型");
+        }
+        if ((1 == auth.getFirstClubType() || 2 == auth.getFirstClubType()) && null == auth.getSecondClubType()) {
+            return ResponseJson.error("请勾选二级机构类型");
         }
-        if (null == auth.getCreateBy()) {
-            return ResponseJson.error("参数异常,请输入创建人id");
+        if (1 == auth.getFirstClubType() && StringUtils.isEmpty(auth.getMedicalLicenseImage())) {
+            return ResponseJson.error("请上传医疗许可证");
+        }
+        if (null == auth.getEmpNum()) {
+            return ResponseJson.error("请输入员工人数");
+        }
+        if (1 == source) {
+            if (null == auth.getCreateBy()) {
+                return ResponseJson.error("参数异常,请输入创建人id");
+            }
+            /*if (1 == auth.getAuthImageType() && StringUtils.isEmpty(auth.getAuthImageLogo())) {
+                return ResponseJson.error("授权牌logo不能为空");
+            }*/
+            if (2 == auth.getAuthImageType() && StringUtils.isEmpty(auth.getAuthImage())) {
+                return ResponseJson.error("授权牌不能为空");
+            }
+        }else {
+            // 机构添加默认模板库生成
+            auth.setAuthImageType(1);
         }
         if (!importFlag) {
             if (null == auth.getProvinceId() || null == auth.getCityId() || null == auth.getTownId() || StringUtils.isEmpty(auth.getAddress()) || null == auth.getLng() || null == auth.getLat()) {
@@ -239,9 +265,16 @@ public class AuthServiceImpl implements AuthService {
             }
         }
         // 保存品牌授权信息,上线状态默认为“待上线”,审核状态为“待审核”
-        auth.setStatus(2);
-        auth.setAuditStatus(2);
+        /*auth.setStatus(2);
+        auth.setAuditStatus(2);*/
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        auth.setStatus(1 == source ? 1 : 2);
+        auth.setAuditStatus(1 == source ? 1 : 2);
+        Integer adminUserId = authMapper.getAdminUserId();
+        auth.setAuditBy(adminUserId);
+        auth.setAuditTime(new Date());
         auth.setDelFlag(0);
+        auth.setShopAuditStatus(1 == source ? 1 : 2);
         /*
             保存授权
          */
@@ -252,15 +285,146 @@ public class AuthServiceImpl implements AuthService {
             // 删除原有的轮播图
             authMapper.deleteBanner(auth.getId());
         }
+        // 保存之后生成授权牌和水印授权牌
+        String authImage = null;
+        if (1 == auth.getAuthImageType()) {
+            // 模板库生成
+            // 获取对应模板
+            TemplateVo authTemplate = authMapper.getAuthTemplate(auth.getId(), null, 1);
+            authImage = generateAuthImage(authTemplate, auth);
+            auth.setAuthImage(authImage);
+            // 添加水印
+            if (StringUtils.isNotEmpty(authImage)) {
+                auth.setPcAuthImage(addWaterMark(authImage, 1));
+                auth.setAppletsAuthImage(addWaterMark(authImage, 2));
+                authMapper.updateAuthImage(auth);
+            }
+        }
         // 保存轮播图
         if (null != bannerList) {
-            bannerList.forEach(banner-> authMapper.insertBanner(auth.getId(), banner));
+            bannerList.forEach(banner -> authMapper.insertBanner(auth.getId(), banner));
         }
         return ResponseJson.success("保存品牌授权成功", auth);
     }
 
     @Override
-    public ResponseJson auditAuth(Integer authId, Integer auditStatus, String invalidReason, Integer auditBy) {
+    public String addWaterMark(String image,Integer type){
+        try {
+            //type:1pc,2applets
+            ClassPathResource classPathResource = new ClassPathResource("/images/newPcWaterMark.png");
+            InputStream inputStreamImg = classPathResource.getInputStream();
+            Image pcWaterMarkImg = ImageIO.read(inputStreamImg);
+            classPathResource = new ClassPathResource("/images/newAppletsWaterMark.png");
+            inputStreamImg = classPathResource.getInputStream();
+            Image appletsWaterMarkImg = ImageIO.read(inputStreamImg);
+            String img = ImageUtils.markImageByIcon(type == 1 ? pcWaterMarkImg : appletsWaterMarkImg, image, null);
+            String imagePath = null;
+            if (StringUtils.isNotEmpty(img)) {
+                MultipartFile imgFile = Base64Util.base64ToMultipart(img);
+                if (null != imgFile) {
+                    imagePath = uploadService.saveFile(imgFile);
+                }
+                log.info(">>>>>>>>>>>>>>>>水印图片上传成功:" + imagePath);
+            } else {
+                log.info(">>>>>>>>>>>>>>>>水印图片上传失败");
+            }
+            return imagePath;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    @Override
+    public String generateAuthImage(TemplateVo authTemplate, CmBrandAuthPo auth) {
+        if (null != authTemplate) {
+            // 根据模板id设置相关数据
+            Map<String, Object> templateInfo = getTemplateInfo(authTemplate, auth);
+            Object templateImage = templateInfo.get("templateImage");
+            if (null != templateImage) {
+                String authImage = ImageUtils.generateAuthImage(templateInfo);
+                log.info("【图片上传】>>>>>>>>>>>>>>>>图片临时路径:" + authImage);
+                // 临时图片
+                File tempFile = new File(authImage);
+                String imageUrl = null;
+                try {
+                    imageUrl = imageDomain + "/" + client.uploadFile(authImage);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                // 删除临时图片
+                boolean delete = tempFile.delete();
+                log.info("【图片上传】>>>>>>>>>>>>>>>>删除临时图片:" + delete);
+                return imageUrl;
+            } else {
+                return null;
+            }
+        }
+        return null;
+    }
+
+    private Map<String,Object> getTemplateInfo(TemplateVo template, CmBrandAuthPo auth) {
+        HashMap<String, Object> map = new HashMap<>();
+        Integer templateId = template.getTemplateId();
+        if (1 == templateId) {
+            map.put("templateImage", template.getTemplateImage());
+            double rate = 0.15;
+            if (StringUtils.isNotEmpty(auth.getAuthImageLogo())) {
+                // 获取授权牌logo位置
+                try {
+                    ImageIcon imageIcon = new ImageIcon(new URL(template.getTemplateImage()));
+                    Image srcImg = imageIcon.getImage();
+                    int srcWidth = srcImg.getWidth(null);
+                    ImageIcon authImageLogo = new ImageIcon(new URL(auth.getAuthImageLogo()));
+                    Image authLogo = authImageLogo.getImage();
+                    int authLogoWidth = authLogo.getWidth(null);
+                    int x = (srcWidth - (int) Math.round(238 * rate) - authLogoWidth) / 2 + (int) Math.round(238 * rate);
+                    int y = (int) Math.round(1230 * rate);
+                    map.put("addImage1_x", x);
+                    map.put("addImage1_y", y);
+                    map.put("addImage1_image", auth.getAuthImageLogo());
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            // 添加认证编号信息
+            if (StringUtils.isNotEmpty(auth.getAuthCode())) {
+                map.put("addWord1_content", auth.getAuthCode());
+                map.put("addWord1_color", "218,185,107");
+                map.put("addWord1_type", "思源宋体");
+                map.put("addWord1_style", Font.BOLD);
+                map.put("addWord1_size", (int) Math.round(90 * rate));
+                map.put("addWord1_x", (int) Math.round(2168 * rate));
+                map.put("addWord1_y", (int) Math.round(3165 * rate));
+            }
+            // 添加认证日期信息
+            if (null != auth.getAuthDate()) {
+                SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
+                map.put("addWord2_content", format.format(auth.getAuthDate()));
+                map.put("addWord2_color", "218,185,107");
+                map.put("addWord2_type", "思源宋体");
+                map.put("addWord2_style", Font.PLAIN);
+                map.put("addWord2_size", (int) Math.round(90 * rate));
+                map.put("addWord2_x", (int) Math.round(2085 * rate));
+                map.put("addWord2_y", (int) Math.round(3292 * rate));
+            }
+            // 添加二维码信息
+            if (StringUtils.isNotEmpty(template.getQrPosition())) {
+                String qrCodeLink = zpServer + "/" + auth.getAuthUserId() + "/app/approve/club/detail?id=" + auth.getId();
+                map.put("addQr1_link", qrCodeLink);
+                map.put("addQr1_size", template.getQrSize());
+                String[] split = template.getQrPosition().split(",");
+                if (split.length == 2) {
+                    map.put("addQr1_x", Integer.parseInt(split[0]));
+                    map.put("addQr1_y", Integer.parseInt(split[1]));
+                }
+            }
+        }
+        return map;
+    }
+
+    @Override
+    public ResponseJson auditAuth(Integer authId, Integer auditStatus, String invalidReason, Integer auditBy, Integer source) {
         if (authId == null) {
             return ResponseJson.error("请输入授权id");
         }
@@ -273,9 +437,11 @@ public class AuthServiceImpl implements AuthService {
         if (auditBy == null) {
             return ResponseJson.error("请输入审核人用户id");
         }
+        source = null == source ? 1 : source;
         Date auditTime = new Date();
         // 授权状态更新
         Integer status = null;
+
         if (auditStatus == 0) {
             // 审核不通过,下线授权
             status = 0;
@@ -283,7 +449,12 @@ public class AuthServiceImpl implements AuthService {
             // 审核通过,上线授权
             status = 1;
         }
-        authMapper.updateAuthAuditStatus(authId, status, auditStatus, invalidReason, auditBy, auditTime);
+        if (1 == source) {
+            authMapper.updateAuthAuditStatus(authId, status, auditStatus, invalidReason, auditBy, auditTime);
+        }
+        if (2 == source) {
+            authMapper.updateAuthShopAuditStatus(authId, status, auditStatus, invalidReason, auditBy, auditTime);
+        }
         return ResponseJson.success("审核品牌授权成功");
     }
 
@@ -314,75 +485,6 @@ public class AuthServiceImpl implements AuthService {
         return null;
     }
 
-    @Override
-    public ResponseJson importLdmData(Integer authUserId) {
-        List<LdmDataPo> ldmDataList = authMapper.getLdmData();
-        ldmDataList.forEach(ldmData->{
-            String lngAndLat = ldmData.getLngAndLat();
-            if (StringUtils.isNotEmpty(lngAndLat)) {
-                String[] split = lngAndLat.split(",");
-                BigDecimal lng = new BigDecimal(split[0]);
-                BigDecimal lat = new BigDecimal(split[1]);
-                ldmData.setLng(lng);
-                ldmData.setLat(lat);
-            }
-            String regId1 = ldmData.getRegId1();
-            if (StringUtils.isNotEmpty(regId1)) {
-                Integer provinceId = authMapper.getProvinceId(regId1);
-                ldmData.setProvinceId(provinceId);
-            }
-            String regId2 = ldmData.getRegId2();
-            if (StringUtils.isNotEmpty(regId2)) {
-                Integer cityId = authMapper.getCityId(regId2);
-                ldmData.setCityId(cityId);
-            }
-            String regId3 = ldmData.getRegId3();
-            if (StringUtils.isNotEmpty(regId3)) {
-                Integer townId = authMapper.getTownId(regId3);
-                ldmData.setTownId(townId);
-            }
-            String pic1 = ldmData.getPic1();
-            String pic2 = ldmData.getPic2();
-            String pic3 = ldmData.getPic3();
-            String pic4 = ldmData.getPic4();
-            String pic5 = ldmData.getPic5();
-            List<String> picList = new ArrayList<>();
-            picList.add(pic1);
-            picList.add(pic2);
-            picList.add(pic3);
-            picList.add(pic4);
-            picList.add(pic5);
-            String logo = null;
-            List<String> addPicList = new ArrayList<>();
-            for (String pic : picList) {
-                if (StringUtils.isNotEmpty(pic)) {
-                    try {
-                        String imagePath = "https://wangdian.skinovachina.com" + pic;
-                        String fileName = imagePath.substring(imagePath.lastIndexOf("/") + 1);
-                        String imageUrl = uploadService.saveFileByUrl(imagePath, fileName);
-                        addPicList.add(imageUrl);
-                        if (null == logo) {
-                            logo = imageUrl;
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-            }
-            CmBrandAuthPo authPo = new CmBrandAuthPo();
-            BeanUtils.copyProperties(ldmData, authPo);
-            authPo.setAuthUserId(authUserId);
-            authPo.setCreateBy(authUserId);
-            authPo.setLogo(logo);
-            authMapper.insertAuth(authPo);
-            // 保存轮播图
-            if (addPicList.size() > 0) {
-                addPicList.forEach(banner -> authMapper.insertBanner(authPo.getId(), banner));
-            }
-        });
-        return ResponseJson.success();
-    }
-
     @Override
     public ResponseJson exportDataByExcel(Integer authUserId, HttpServletResponse response) {
         try {
@@ -408,6 +510,8 @@ public class AuthServiceImpl implements AuthService {
             });
             OutputStream outputStream = response.getOutputStream();
             response.reset();
+            response.setHeader("Access-Control-Allow-Origin", "*");
+            response.setHeader("Access-Control-Allow-Credentials", "true");
             response.setHeader("Content-disposition",
                     "attachment; filename="+fileName);
             response.setContentType("application/vnd.ms-excel");
@@ -629,7 +733,8 @@ public class AuthServiceImpl implements AuthService {
                 auth.setAuthUserId(authUserId);
                 auth.setAuthParty(authParty);
                 auth.setCreateBy(createBy);
-                ResponseJson responseJson = saveAuth(auth, null, true);
+                // 导入数据
+                ResponseJson responseJson = saveAuth(auth, null, true, 1);
                 CmBrandAuthPo authPo = (CmBrandAuthPo) responseJson.getData();
                 authId = authPo.getId();
             }
@@ -643,6 +748,7 @@ public class AuthServiceImpl implements AuthService {
                     String certificateImage = productDto.getCertificateImage();
                     productDto.setProductImage(productImage);
                     productDto.setCertificateImage(certificateImage);
+                    productDto.setSource(1);
                     authProductService.saveProduct(productDto, true);
                 } catch (IOException e) {
                     e.printStackTrace();
@@ -701,7 +807,7 @@ public class AuthServiceImpl implements AuthService {
                 }
             }
             authPartySheet.setColumnWidth(0, (columnWidth + 4) * 256);
-
+            List<String> sheetNameList = new ArrayList<>();
             // 创建每个机构对应的商品表
             authPartyList.forEach(authParty -> {
                 // 授权机构名称作为表名
@@ -709,6 +815,12 @@ public class AuthServiceImpl implements AuthService {
                 // 商品列表
                 List<ProductFormVo> productList = authParty.getProductList();
                 // 创建商品工作表
+                int k = 1;
+                while (sheetNameList.contains(productSheetName)) {
+                    productSheetName = productSheetName.replace("(" + (k-1) + ")", "") + "(" + k + ")";
+                    k++;
+                }
+                sheetNameList.add(productSheetName);
                 HSSFSheet productSheet = workbook.createSheet(productSheetName);
                 // 创建列头行
                 HSSFRow productTopRow = productSheet.createRow(0);
@@ -752,20 +864,26 @@ public class AuthServiceImpl implements AuthService {
 //                            productSheet.addMergedRegion(new CellRangeAddress(j + 1,j + 1,j + 1,j + 1)) ;
                             // 头像
                             String imageUrl = productData.get(j);
-                            String fileType = imageUrl.substring(imageUrl.lastIndexOf(".") + 1);
-                            InputStream imageStream = getImageStream(imageUrl);
-                            if (null != imageStream) {
-                                try {
-                                    BufferedImage bufferedImage = ImageIO.read(imageStream);
-                                    ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
-                                    ImageIO.write(bufferedImage, fileType, byteArrayOut);
-                                    byte[] data = byteArrayOut.toByteArray();
-                                    HSSFPatriarch drawingPatriarch = productSheet.createDrawingPatriarch();
-                                    // 设置图片位置
-                                    HSSFClientAnchor anchor = new HSSFClientAnchor(30, 30, 700, 200, (short) j, productRowNum.get(), (short) j, productRowNum.get());
-                                    drawingPatriarch.createPicture(anchor, workbook.addPicture(data, HSSFWorkbook.PICTURE_TYPE_JPEG));
-                                } catch (Exception e) {
-                                    e.printStackTrace();
+                            if (StringUtils.isNotEmpty(imageUrl)) {
+
+                                String fileType = imageUrl.substring(imageUrl.lastIndexOf(".") + 1);
+                                InputStream imageStream = getImageStream(imageUrl);
+                                if (null != imageStream) {
+                                    try {
+                                        BufferedImage bufferedImage = ImageIO.read(imageStream);
+                                        ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
+                                        ImageIO.write(bufferedImage, fileType, byteArrayOut);
+                                        byte[] data = byteArrayOut.toByteArray();
+                                        HSSFPatriarch drawingPatriarch = productSheet.createDrawingPatriarch();
+                                        // 设置图片位置
+                                        HSSFClientAnchor anchor = new HSSFClientAnchor(30, 30, 700, 200, (short) j, productRowNum.get(), (short) j, productRowNum.get());
+                                        drawingPatriarch.createPicture(anchor, workbook.addPicture(data, HSSFWorkbook.PICTURE_TYPE_JPEG));
+                                    } catch (Exception e) {
+                                        e.printStackTrace();
+                                    }
+                                } else {
+                                    productCell.setCellType(CellType.valueOf("STRING"));
+                                    productCell.setCellValue("");
                                 }
                             } else {
                                 productCell.setCellType(CellType.valueOf("STRING"));

+ 94 - 0
src/main/java/com/caimei/service/auth/impl/AuthTemplateServiceImpl.java

@@ -0,0 +1,94 @@
+package com.caimei.service.auth.impl;
+
+import com.caimei.mapper.cmMapper.AuthTemplateMapper;
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.*;
+import com.caimei.service.auth.AuthTemplateService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.net.URL;
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2022/7/6
+ */
+@Slf4j
+@Service
+public class AuthTemplateServiceImpl implements AuthTemplateService {
+
+    @Resource
+    private AuthTemplateMapper authTemplateMapper;
+
+    @Override
+    public ResponseJson<PageInfo<TemplateVo>> getTemplateList(Integer listType, Integer authUserId, Integer pageNum, Integer pageSize) {
+        if (null == listType) {
+            return ResponseJson.error("列表类型不能为空", null);
+        }
+        if (2 == listType && null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        PageHelper.startPage(pageNum, pageSize);
+        List<TemplateVo> templateList = authTemplateMapper.getTemplateList(listType, authUserId);
+        PageInfo<TemplateVo> pageInfo = new PageInfo<>(templateList);
+        return ResponseJson.success(pageInfo);
+    }
+
+    @Override
+    public ResponseJson saveTemplate(Integer templateId, String templateImage, Integer authUserId, Integer status, String qrPosition, Integer qrSize, String logoSize, Integer authFlag, Integer productFlag) {
+        boolean insertFlag = null == templateId;
+        Integer width = null;
+        Integer height = null;
+        String templateSize = null;
+        if (StringUtils.isNotEmpty(templateImage)) {
+            try {
+                BufferedImage image = ImageIO.read(new URL(templateImage));
+                width = image.getWidth();
+                height = image.getHeight();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            templateSize = (null == width ? 0 : width) + "," + (null == height ? 0 : height);
+        }
+        if (insertFlag) {
+            if (StringUtils.isEmpty(qrPosition)) {
+                // 默认左上角
+                qrPosition = "0,0";
+            }
+            authTemplateMapper.insertTemplate(templateImage, authUserId, templateSize, qrPosition, qrSize, logoSize);
+        } else {
+            TemplateVo dbTemplate = authTemplateMapper.getTemplateFormData(templateId, null, null, null, null);
+            if (null != authFlag && 1 == authFlag) {
+                authTemplateMapper.clearAuthFlag(authUserId);
+            }
+            if (null != productFlag && 1 == productFlag) {
+                authTemplateMapper.clearProductFlag(authUserId);
+            }
+            if (null != dbTemplate) {
+                if (null != authUserId && !dbTemplate.getAuthUserId().equals(authUserId)) {
+                    // 更新了供应商,不选中位置
+                    authFlag = 0;
+                    productFlag = 0;
+                }
+                authTemplateMapper.updateSelective(templateId, templateImage, templateSize, authUserId, status, qrPosition, qrSize, logoSize, authFlag, productFlag);
+            }
+        }
+        return ResponseJson.success();
+    }
+
+    @Override
+    public ResponseJson<TemplateVo> getTemplateFormData(Integer templateId, Integer authId, Integer authUserId, Integer authFlag, Integer status) {
+        TemplateVo templateVo = authTemplateMapper.getTemplateFormData(templateId, authId, authUserId, authFlag, status);
+        return ResponseJson.success(templateVo);
+    }
+
+}

+ 31 - 4
src/main/java/com/caimei/service/auth/impl/DownloadServiceImpl.java

@@ -1,9 +1,11 @@
 package com.caimei.service.auth.impl;
 
+import com.aliyuncs.utils.StringUtils;
 import com.caimei.mapper.cmMapper.FileMapper;
 import com.caimei.model.en.QrCodeSize;
 import com.caimei.model.po.ProductImagePo;
 import com.caimei.model.po.UploadFilePo;
+import com.caimei.model.vo.AuthVo;
 import com.caimei.service.auth.DownloadService;
 import com.caimei.service.auth.UploadService;
 import com.caimei.utils.ImageUtils;
@@ -44,6 +46,9 @@ public class DownloadServiceImpl implements DownloadService {
     @Value("${caimei.oldapi}")
     private String wwwServer;
 
+    @Value("${caimei.zpapi}")
+    private String zpServer;
+
     @Value("${spring.profiles.active}")
     private String active;
 
@@ -65,18 +70,21 @@ public class DownloadServiceImpl implements DownloadService {
         }
         ArrayList<UploadFilePo> fileList = new ArrayList<>();
         List<ProductImagePo> productImageList = fileMapper.getProductImageList(authUserId);
+        List<AuthVo> authImageList = fileMapper.getAuthImageList(authUserId);
         if (1 == type) {
             productImageList.forEach(productImage -> {
                 UploadFilePo file = new UploadFilePo();
                 file.setFileUrl(productImage.getCertificateImage());
                 file.setFileName(productImage.getAuthParty() + "-" + productImage.getSnCode());
-                fileList.add(file);
+                if (StringUtils.isNotEmpty(file.getFileUrl())) {
+                    fileList.add(file);
+                }
             });
-        } else {
+        } else if (2 == type) {
             productImageList.forEach(productImage -> {
                 String qrCodeLink = wwwServer + "/product/auth/product-" + productImage.getProductId() + ".html";
                 // 生成二维码
-                BufferedImage qrCodeImage = ImageUtils.createQrCode(qrCodeLink, QrCodeSize.LARGE);
+                BufferedImage qrCodeImage = ImageUtils.createQrCode(qrCodeLink, QrCodeSize.XLARGE);
                 String fileName = productImage.getAuthParty() + "-" + productImage.getSnCode();
                 String imagePath = createBufferedImageFile(qrCodeImage, fileName, "png");
                 UploadFilePo file = new UploadFilePo();
@@ -84,8 +92,27 @@ public class DownloadServiceImpl implements DownloadService {
                 file.setFileName(productImage.getAuthParty() + "-" + productImage.getSnCode());
                 fileList.add(file);
             });
+        } else {
+            List<String> fileNameList = new ArrayList<>();
+            authImageList.forEach(authImage -> {
+                String qrCodeLink = zpServer + "/" + authUserId + "/app/approve/club/detail?id=" + authImage.getAuthId();
+                // 生成二维码
+                BufferedImage qrCodeImage = ImageUtils.createQrCode(qrCodeLink, QrCodeSize.LARGE);
+                String fileName = authImage.getAuthParty();
+                int k = 1;
+                while (fileNameList.contains(fileName)) {
+                    fileName = fileName.replace("(" + (k-1) + ")", "") + "(" + k + ")";
+                    k++;
+                }
+                fileNameList.add(fileName);
+                String imagePath = createBufferedImageFile(qrCodeImage, fileName, "png");
+                UploadFilePo file = new UploadFilePo();
+                file.setFileUrl(imagePath);
+                file.setFileName(authImage.getAuthParty());
+                fileList.add(file);
+            });
         }
-        String fileName = 1 == type ? "授权牌" : "二维码";
+        String fileName = 1 == type ? "授权牌" : 2 == type ? "设备二维码" : "机构二维码";
         // 将授权牌压缩成zip文件
         String imageZipPath = uploadService.createImageZip(fileList);
         download(request, response, imageZipPath, fileName + ".zip");

+ 93 - 0
src/main/java/com/caimei/service/auth/impl/LogisticsServiceImpl.java

@@ -0,0 +1,93 @@
+package com.caimei.service.auth.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.caimei.mapper.cmMapper.AuthMapper;
+import com.caimei.mapper.cmMapper.LogisticsMapper;
+import com.caimei.model.ResponseJson;
+import com.caimei.model.po.*;
+import com.caimei.model.vo.*;
+import com.caimei.service.auth.*;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2021/5/11
+ */
+@Slf4j
+@Service
+public class LogisticsServiceImpl implements LogisticsService {
+
+    @Resource
+    private LogisticsMapper logisticsMapper;
+
+    @Resource
+    private AuthMapper authMapper;
+
+    @Value("${caimei.imageDomain}")
+    private String imageDomain;
+
+    @Override
+    public ResponseJson sendCertificate(Integer authId, Integer companyId, String logisticsNumber, JSONArray imageList, String remarks, String mobile) {
+        List<LogisticsCompanyVo> logisticsCompanyList = logisticsMapper.getLogisticsCompanyList(companyId);
+        if (null == logisticsCompanyList || logisticsCompanyList.size() == 0) {
+            return ResponseJson.error("物流公司不存在");
+        }
+        LogisticsCompanyVo logisticsCompany = logisticsCompanyList.get(0);
+        CertificateLogisticsPo logistics = new CertificateLogisticsPo();
+        logistics.setAuthId(authId);
+        logistics.setCompanyName(logisticsCompany.getCompanyName());
+        logistics.setCompanyCode(logisticsCompany.getCompanyCode());
+        logistics.setLogisticsNumber(logisticsNumber);
+        logistics.setRemarks(remarks);
+        String imageRemarks = "";
+        if (null != imageList){
+            String[] imagePath = new String[imageList.size()];
+            for (int i = 0; i < imagePath.length; i++) {
+                imagePath[i] = imageList.get(i).toString();
+            }
+            imageRemarks = StringUtils.join(imagePath, "##");
+        }
+        logistics.setRemarksImage(imageRemarks);
+        logistics.setType(4);
+        logistics.setState(1);
+        logistics.setUpdateDate(new Date());
+        logistics.setMobile(mobile);
+        logisticsMapper.sendCertificate(logistics);
+        // 更改机构寄送状态
+        authMapper.updateSendStatus(authId);
+        return ResponseJson.success("寄送成功");
+    }
+
+    @Override
+    public ResponseJson certificateLogistics(Integer authId) {
+        CertificateLogisticsVo certificateLogistics = logisticsMapper.getCertificateLogistics(authId);
+        if (null != certificateLogistics) {
+            String remarksImage = certificateLogistics.getRemarksImage();
+            if (StringUtils.isNotEmpty(remarksImage)) {
+                String[] imageArr = remarksImage.split("##");
+                List<String> imageList = Arrays.asList(imageArr);
+                certificateLogistics.setImageList(imageList);
+            }
+            String info = certificateLogistics.getInfo();
+            if (StringUtils.isNotEmpty(info)) {
+                List<RouterVo> routers = JSONArray.parseArray(info, RouterVo.class);
+                certificateLogistics.setRouterList(routers);
+            }
+        }
+        return ResponseJson.success(certificateLogistics);
+    }
+
+    @Override
+    public ResponseJson getLogisticsCompany() {
+        List<LogisticsCompanyVo> logisticsCompanyList = logisticsMapper.getLogisticsCompanyList(null);
+        return ResponseJson.success(logisticsCompanyList);
+    }
+}

+ 35 - 6
src/main/java/com/caimei/service/auth/impl/ShopServiceImpl.java

@@ -1,13 +1,16 @@
 package com.caimei.service.auth.impl;
 
 import com.caimei.components.RedisService;
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.ShopMapper;
 import com.caimei.mapper.cmMapper.UserMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.dto.ShopInfoDto;
 import com.caimei.model.po.CmBrandAuthFilePo;
+import com.caimei.model.po.CmBrandAuthPo;
 import com.caimei.model.po.UserPo;
 import com.caimei.model.vo.*;
+import com.caimei.service.auth.AuthService;
 import com.caimei.service.auth.ShopService;
 import com.caimei.service.sys.SysUserService;
 import com.caimei.utils.*;
@@ -37,9 +40,14 @@ public class ShopServiceImpl implements ShopService {
 
     @Resource
     private RedisService redisService;
+
+    @Resource
+    private AuthService authService;
     @Resource
     private ShopMapper shopMapper;
     @Resource
+    private AuthMapper authMapper;
+    @Resource
     private UserMapper userMapper;
     @Resource
     private SysUserService sysUserService;
@@ -49,10 +57,10 @@ public class ShopServiceImpl implements ShopService {
     private String active;
 
     @Override
-    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer pageNum, Integer pageSize) {
+    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus, Integer pageNum, Integer pageSize) {
         listType = null == listType ? 1 : listType;
         PageHelper.startPage(pageNum, pageSize);
-        List<ShopListVo> shopList = shopMapper.getShopList(listType, shopName, loginAccount, shopType, brandId, mobile, linkMan, lowerAuditStatus);
+        List<ShopListVo> shopList = shopMapper.getShopList(listType, shopName, loginAccount, shopType, brandId, mobile, linkMan, lowerAuditStatus, sendStatus);
         ListIterator<ShopListVo> iterator = shopList.listIterator();
         while (iterator.hasNext()) {
             // 根据是否完成商品信息审核筛选项,设置下级审核状态
@@ -298,9 +306,7 @@ public class ShopServiceImpl implements ShopService {
             // 编辑后的品牌列表和数据库中的品牌列表重复的需要更新的部分
             List<Integer> updateInfoBrandList = new ArrayList<>();
             // 编辑后的供应商品牌id
-            shopInfoList.forEach(shopInfo->{
-                newInfoBrandList.add(shopInfo.getBrandId());
-            });
+            shopInfoList.forEach(shopInfo-> newInfoBrandList.add(shopInfo.getBrandId()));
             for (ShopBrandVo shopBrand : dbInfoBrandList) {
                 // 判断被删除的品牌下是否还有未删除的商品,若存在,提示供应商需要删除后才能删除品牌
                 if (!newInfoBrandList.contains(shopBrand.getBrandId())) {
@@ -422,7 +428,7 @@ public class ShopServiceImpl implements ShopService {
         if (StringUtils.isEmpty(mobile)) {
             return ResponseJson.error("参数异常,请输入手机号");
         }
-        String verifyCode = CodeUtil.generateCodeInt(6);
+        String verifyCode = "prod".equals(active) ? CodeUtil.generateCodeInt(6) : "666666";;
         String content = "您的短信验证码为:" + verifyCode + ",该验证码 5 分钟内有效,请勿泄漏于他人。";
         Boolean sendSms = SmsUtils.sendSms(11, mobile, content);
         if (!sendSms) {
@@ -500,4 +506,27 @@ public class ShopServiceImpl implements ShopService {
         shopMapper.bindLoginAccount(authUserId, loginAccount);
         return ResponseJson.success("绑定成功");
     }
+
+    @Override
+    public ResponseJson updateAllAuthImage(Integer authUserId) {
+        List<CmBrandAuthPo> authList = authMapper.getAllAuth(authUserId);
+        // 获取对应模板
+        TemplateVo authTemplate = authMapper.getAuthTemplate(null, authUserId, 1);
+        if (null == authTemplate) {
+            return ResponseJson.error("请选择使用位置");
+        }
+        authList.forEach(auth->{
+            String authImage;
+            if (1 == auth.getAuthImageType()) {
+                authImage = authService.generateAuthImage(authTemplate, auth);
+                auth.setAuthImage(authImage);
+                if (StringUtils.isNotEmpty(authImage)) {
+                    auth.setPcAuthImage(authService.addWaterMark(authImage, 1));
+                    auth.setAppletsAuthImage(authService.addWaterMark(authImage, 2));
+                    authMapper.updateAuthImage(auth);
+                }
+            }
+        });
+        return ResponseJson.success();
+    }
 }

+ 1 - 1
src/main/java/com/caimei/service/data/VideoService.java

@@ -37,7 +37,7 @@ public interface VideoService {
      * @param videoDownloadUrl       oss名称
      * @return  ResponseJson
      */
-    ResponseJson saveVideo(Integer videoId, Integer authUserId, String videoTitle, String videoName, String videoPreviewUrl, String videoDownloadUrl);
+    ResponseJson saveVideo(Integer videoId, Integer authUserId, String videoTitle, String videoImage, String videoName, String videoPreviewUrl, String videoDownloadUrl);
 
     /**
      * 更新视频状态

+ 11 - 2
src/main/java/com/caimei/service/data/impl/FileServiceImpl.java

@@ -1,5 +1,6 @@
 package com.caimei.service.data.impl;
 
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.FileMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.CourseFilePo;
@@ -53,6 +54,9 @@ public class FileServiceImpl implements FileService {
     @Value("${spring.profiles.active}")
     private String active;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Override
     public ResponseJson<PageInfo<FileListVo>> getFileList(Integer listType, Integer authUserId, Integer fileType, String fileTitle, Integer auditStatus, Integer status, Integer pageNum, Integer pageSize) {
         listType = null == listType ? 1 : listType;
@@ -90,8 +94,13 @@ public class FileServiceImpl implements FileService {
         dataFile.setDownloadUrl(fileDownloadUrl);
         dataFile.setName(fileName);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        dataFile.setStatus(2);
-        dataFile.setAuditStatus(2);
+//        dataFile.setStatus(2);
+//        dataFile.setAuditStatus(2);
+        dataFile.setStatus(1);
+        dataFile.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        dataFile.setAuditBy(adminUserId);
+        dataFile.setAuditTime(new Date());
         if (null != fileId) {
             /*
                 更新文件

+ 11 - 2
src/main/java/com/caimei/service/data/impl/ImageServiceImpl.java

@@ -1,6 +1,7 @@
 package com.caimei.service.data.impl;
 
 import com.alibaba.fastjson.JSONArray;
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.ImageMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.ImagePo;
@@ -35,6 +36,9 @@ public class ImageServiceImpl implements ImageService {
 
     private UploadService uploadService;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Autowired
     public void setUploadService(UploadService uploadService) {
         this.uploadService = uploadService;
@@ -70,8 +74,13 @@ public class ImageServiceImpl implements ImageService {
         ImagePo image = new ImagePo();
         image.setTitle(imageTitle);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        image.setStatus(2);
-        image.setAuditStatus(2);
+//        image.setStatus(2);
+//        image.setAuditStatus(2);
+        image.setStatus(1);
+        image.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        image.setAuditBy(adminUserId);
+        image.setAuditTime(new Date());
         String imageZipUrl = uploadService.saveImageZip(imageArr);
         System.out.println("【图片上传】>>>>>>>>>>>>>>>>图片压缩包上传成功:"+imageZipUrl);
         image.setZipUrl(imageZipUrl);

+ 16 - 3
src/main/java/com/caimei/service/data/impl/VideoServiceImpl.java

@@ -1,5 +1,6 @@
 package com.caimei.service.data.impl;
 
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.VideoMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.VideoPo;
@@ -46,6 +47,9 @@ public class VideoServiceImpl implements VideoService {
     @Value("${spring.profiles.active}")
     private String active;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Override
     public ResponseJson<PageInfo<VideoListVo>> getVideoList(Integer listType, Integer authUserId, String videoTitle, Integer auditStatus, Integer status, Integer pageNum, Integer pageSize) {
         if (null == authUserId) {
@@ -59,13 +63,16 @@ public class VideoServiceImpl implements VideoService {
     }
 
     @Override
-    public ResponseJson saveVideo(Integer videoId, Integer authUserId, String videoTitle, String videoName, String videoPreviewUrl, String videoDownloadUrl) {
+    public ResponseJson saveVideo(Integer videoId, Integer authUserId, String videoTitle, String videoImage, String videoName, String videoPreviewUrl, String videoDownloadUrl) {
         if (null == videoId && null == authUserId) {
             return ResponseJson.error("参数异常,请输入供应商用户id");
         }
         if (StringUtils.isEmpty(videoTitle)) {
             return ResponseJson.error("参数异常,请输入视频标题");
         }
+        if (StringUtils.isEmpty(videoTitle)) {
+            return ResponseJson.error("参数异常,请输入视频封面");
+        }
         if (StringUtils.isEmpty(videoName)) {
             return ResponseJson.error("参数异常,请输入视频名称");
         }
@@ -77,12 +84,18 @@ public class VideoServiceImpl implements VideoService {
         */
         VideoPo video = new VideoPo();
         video.setTitle(videoTitle);
+        video.setImage(videoImage);
         video.setName(videoName);
         video.setPreviewUrl(videoPreviewUrl);
         video.setDownloadUrl(videoDownloadUrl);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        video.setStatus(2);
-        video.setAuditStatus(2);
+//        video.setStatus(2);
+//        video.setAuditStatus(2);
+        video.setStatus(1);
+        video.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        video.setAuditBy(adminUserId);
+        video.setAuditTime(new Date());
         if (null != videoId) {
             /*
                 更新视频

+ 32 - 3
src/main/java/com/caimei/service/sys/impl/SysRoleServiceImpl.java

@@ -13,7 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
-import java.util.List;
+import java.util.*;
 
 /**
  * Description
@@ -50,8 +50,23 @@ public class SysRoleServiceImpl implements SysRoleService {
         SysRole sysRole = getRole(id);
         if (null != sysRole) {
             // 根据角色ID获取菜单Ids
-            List<Integer> menuIdList = systemMapper.getMenuIdsByRoleId(id);
-            String menuIds = CommonUtil.idListToString(menuIdList, ",");
+            List<Integer> roleMenuIdList = systemMapper.getMenuIdsByRoleId(id);
+            // 所有菜单id
+            List<Integer> allMenuIdList = new ArrayList<>();
+            getAllMenuIdList("0", allMenuIdList);
+            ListIterator<Integer> iterator = allMenuIdList.listIterator();
+            // 所有需要移除的菜单id
+            Set<Integer> removeMenuIdSet = new HashSet<>();
+            // 遍历所有菜单id,若角色菜单id不包含,则将其本身及其父菜单id全部移除
+            while (iterator.hasNext()) {
+                Integer menuId = iterator.next();
+                if (!roleMenuIdList.contains(menuId)) {
+                    removeMenuIdSet.add(menuId);
+                    getAllRemoveParentId(menuId, removeMenuIdSet);
+                }
+            }
+            allMenuIdList.removeAll(removeMenuIdSet);
+            String menuIds = CommonUtil.idListToString(allMenuIdList, ",");
             // 根据角色ID获取(权限-菜单)Ids
             List<String> permissionIdList = systemMapper.getPermissionMenuIdsByRoleId(id);
             StringBuilder ids = new StringBuilder(menuIds);
@@ -63,6 +78,20 @@ public class SysRoleServiceImpl implements SysRoleService {
         return ResponseJson.success(sysRole);
     }
 
+    private void getAllMenuIdList(String parentId, List<Integer> allMenuIdList) {
+        List<Integer> menuIdList = systemMapper.getMenuIdList(parentId, 1);
+        allMenuIdList.addAll(menuIdList);
+        menuIdList.forEach(menuId-> getAllMenuIdList(menuId.toString(), allMenuIdList));
+    }
+
+    private void getAllRemoveParentId(Integer menuId, Set<Integer> removeParentIdSet) {
+        Integer parentId = systemMapper.getMenuParentId(menuId);
+        if (0 != parentId) {
+            removeParentIdSet.add(parentId);
+            getAllRemoveParentId(parentId,removeParentIdSet);
+        }
+    }
+
     private SysRole getRole(Integer id) {
         return systemMapper.getRole(id);
     }

+ 11 - 2
src/main/java/com/caimei/service/wechat/LoginService.java

@@ -37,8 +37,17 @@ public interface LoginService {
      * 订阅号验证码登录
      * @param mobile        手机号
      * @param verifyCode    验证码
-     * @param appId         公众号appId
+     * @param authUserId    供应商用户id
      * @return
      */
     ResponseJson<WxClubUserVo> loginByVerifyCode(String mobile, String verifyCode, Integer authUserId);
- }
+
+    /**
+     * 密码登录
+     * @param mobile
+     * @param password
+     * @param authUserId
+     * @return
+     */
+    ResponseJson<WxClubUserVo> passwordLogin(String mobile, String password, Integer authUserId);
+}

+ 23 - 0
src/main/java/com/caimei/service/wechat/RegisterService.java

@@ -0,0 +1,23 @@
+package com.caimei.service.wechat;
+
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.WxClubUserVo;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2021/7/15
+ */
+public interface RegisterService {
+
+    /**
+     * 普通注册
+     */
+    ResponseJson<WxClubUserVo> simpleRegister(String mobile, String verifyCode, String password, Integer authUserId, Integer authId);
+
+    /**
+     * 全部注册
+     */
+    ResponseJson allRegister(Integer authUserId, Integer clubUserId, Integer authId, String registerType, String clubUserInfo, String authInfo, String productInfo);
+}

+ 35 - 0
src/main/java/com/caimei/service/wechat/WxUserService.java

@@ -0,0 +1,35 @@
+package com.caimei.service.wechat;
+
+import com.caimei.model.ResponseJson;
+import com.caimei.model.vo.WxClubUserVo;
+
+import java.util.Map;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2021/7/15
+ */
+public interface WxUserService {
+
+    /**
+     * 获取用户信息
+     *
+     * @param mobile
+     * @param authUserId
+     * @return
+     */
+    ResponseJson<Map<String, Object>> getUserInfo(String mobile, Integer authUserId, Integer clubUserId, Integer authId);
+
+
+    /**
+     * 发送验证码
+     */
+    ResponseJson sendLoginCode(String mobile, Integer authUserId, Integer type);
+
+    /**
+     * 修改密码
+     */
+    ResponseJson updatePassword(String mobile, String verifyCode, String password, Integer authUserId);
+}

+ 52 - 20
src/main/java/com/caimei/service/wechat/impl/LoginServiceImpl.java

@@ -7,14 +7,14 @@ import com.caimei.mapper.cmMapper.LoginMapper;
 import com.caimei.mapper.cmMapper.ShopMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.CmBrandAuthPo;
+import com.caimei.model.vo.AuthVo;
 import com.caimei.model.vo.ShopFormVo;
 import com.caimei.model.vo.WxClubUserVo;
 import com.caimei.service.wechat.LoginService;
-import com.caimei.utils.CodeUtil;
-import com.caimei.utils.SmsUtils;
-import com.caimei.utils.WxUtils;
+import com.caimei.utils.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -42,6 +42,9 @@ public class LoginServiceImpl implements LoginService {
     @Resource
     private AuthMapper authMapper;
 
+    @Value("${spring.profiles.active}")
+    private String active;
+
     @Override
     public ResponseJson<WxClubUserVo> loginByAuthorization(String code, String appId) {
         if (StringUtils.isEmpty(code)) {
@@ -97,11 +100,8 @@ public class LoginServiceImpl implements LoginService {
             return ResponseJson.error("供应商不存在");
         } else {
             shopName = shop.getShopName();
-            if (shopName.contains("上海品辉")) {
-                shopName = "上海品辉";
-            }
         }
-        String verifyCode = CodeUtil.generateCodeInt(6);
+        String verifyCode = "prod".equals(active) ? CodeUtil.generateCodeInt(6) : "666666";
         String content = "欢迎登录" + shopName + "会员,您的短信验证码为:" + verifyCode + ",该验证码 5 分钟内有效,请勿泄漏于他人。";
         Boolean sendSms = SmsUtils.sendSms(11, mobile, content);
         if (!sendSms) {
@@ -139,18 +139,18 @@ public class LoginServiceImpl implements LoginService {
             return ResponseJson.error("验证码错误,请重新输入", null);
         }
         // 校验机构用户是否存在
-        WxClubUserVo wxClubUser = clubMapper.getWxClubUser(mobile, appId, null, null);
-        if (null == wxClubUser) {
+        WxClubUserVo wxClubUser = clubMapper.getWxClubUser(mobile, appId, null, null, null);
+        if (null == wxClubUser || 1 != wxClubUser.getStatus()) {
             return ResponseJson.error("抱歉,您的手机号暂无权限登录", null);
         }
         // 校验机构和供应商的状态是否为已上线
-        CmBrandAuthPo clubPo = authMapper.getAuthById(wxClubUser.getAuthId());
-        Integer shopStatus = shopMapper.getShopStatus(clubPo.getAuthUserId());
-        if (1 != clubPo.getStatus() || 1 != shopStatus) {
+        AuthVo auth = authMapper.getAuthById(wxClubUser.getAuthId());
+        Integer shopStatus = shopMapper.getShopStatus(auth.getAuthUserId());
+        if (1 != auth.getStatus() || 1 != shopStatus) {
             return ResponseJson.error("登录失败", null);
         }
         // 校验appId是否和机构所属供应商的appId相同
-        String dbAppId = shopMapper.getAppId(clubPo.getAuthUserId());
+        String dbAppId = shopMapper.getAppId(auth.getAuthUserId());
         if (StringUtils.isEmpty(dbAppId) || !appId.equals(dbAppId)) {
             return ResponseJson.error("登录失败", null);
         }
@@ -160,7 +160,7 @@ public class LoginServiceImpl implements LoginService {
         WxClubUserVo clubUser = new WxClubUserVo();
         clubUser.setClubUserId(wxClubUser.getClubUserId());
         clubUser.setAuthId(wxClubUser.getAuthId());
-        clubUser.setAuthUserId(clubPo.getAuthUserId());
+        clubUser.setAuthUserId(auth.getAuthUserId());
         clubUser.setMobile(mobile);
         clubUser.setOpenId(openId);
         clubUser.setAccessToken(accessToken);
@@ -186,22 +186,54 @@ public class LoginServiceImpl implements LoginService {
             return ResponseJson.error("验证码错误,请重新输入", null);
         }
         // 获取手机号对应机构用户
-        WxClubUserVo clubUser = clubMapper.getWxClubUser(mobile, null, authUserId, null);
-        if (null == clubUser) {
+        WxClubUserVo clubUser = clubMapper.getWxClubUser(mobile, null, authUserId, null, null);
+        if (null == clubUser || 1 != clubUser.getStatus()) {
             clubUser = new WxClubUserVo();
             clubUser.setMobile(mobile);
             return ResponseJson.error("抱歉,您的手机号暂无权限登录", clubUser);
         }
         // 校验机构和供应商的状态是否为已上线
-        CmBrandAuthPo clubPo = authMapper.getAuthById(clubUser.getAuthId());
-        Integer shopStatus = shopMapper.getShopStatus(clubPo.getAuthUserId());
-        if (1 != clubPo.getStatus() || 1 != shopStatus) {
+        // AuthVo auth = authMapper.getAuthById(clubUser.getAuthId());
+        /*Integer shopStatus = shopMapper.getShopStatus(clubUser.getAuthUserId());
+        if (1 != auth.getStatus() || 1 != shopStatus) {
             return ResponseJson.error("登录失败", null);
-        }
+        }*/
         // 登录成功redis保存token
         String accessToken = UUID.randomUUID().toString();
         redisService.set(accessToken, mobile + "," + authUserId, 60L * 60 * 24);
         clubUser.setAccessToken(accessToken);
         return ResponseJson.success(clubUser);
     }
+
+    @Override
+    public ResponseJson<WxClubUserVo> passwordLogin(String mobile, String password, Integer authUserId) {
+        // 获取手机号对应机构用户
+        WxClubUserVo clubUser = clubMapper.getWxClubUser(mobile, null, authUserId, null, null);
+        Boolean passwordVerify;
+        if (null == clubUser) {
+            return ResponseJson.error("用户不存在", null);
+        } else if (1 != clubUser.getStatus()) {
+            return ResponseJson.error("账号被停用", null);
+        } else {
+            String dbPassword = clubMapper.getDbPassword(clubUser.getClubUserId());
+            // 比对密码
+            passwordVerify = passwordVerify(password, dbPassword);
+            if (passwordVerify) {
+                // 登录成功redis保存token
+                String accessToken = UUID.randomUUID().toString();
+                redisService.set(accessToken, mobile + "," + authUserId, 60L * 60 * 24);
+                clubUser.setAccessToken(accessToken);
+                return ResponseJson.success(clubUser);
+            }
+        }
+        return ResponseJson.error("输入的密码和账户名不匹配", null);
+    }
+
+    /**
+     * 密码校验
+     */
+    private Boolean passwordVerify(String password, String dbPassword) {
+        String md5Password = Md5Util.md5(password);
+        return md5Password.equals(dbPassword);
+    }
 }

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio