Browse Source

update:打开公众号模块

Harper 1 year ago
parent
commit
3b23b50a5f

+ 11 - 0
feifan-module-member/feifan-module-member-biz/src/main/java/cn/newfeifan/mall/module/member/controller/app/auth/AppAuthController.java

@@ -125,4 +125,15 @@ public class AppAuthController {
         return success(AuthConvert.INSTANCE.convert(signature));
     }
 
+
+    @PostMapping("/weChatOfficialLogin")
+    @Operation(summary = "需要获取到对应的code",
+            description = "绑定二维码后免登录")
+    public CommonResult<SocialWxJsapiSignatureRespDTO> weChatOfficialLogin(@RequestParam("code") String code) {
+        SocialWxJsapiSignatureRespDTO signature = socialClientApi.createWxMpJsapiSignature(
+                UserTypeEnum.MEMBER.getValue(), code);
+        return success(AuthConvert.INSTANCE.convert(signature));
+    }
+
+
 }

+ 7 - 1
feifan-module-member/feifan-module-member-biz/src/main/java/cn/newfeifan/mall/module/member/service/user/MemberUserServiceImpl.java

@@ -218,9 +218,15 @@ public class MemberUserServiceImpl implements MemberUserService {
 
     @Override
     public boolean isPasswordMatch(String rawPassword, String encodedPassword) {
-        return passwordEncoder.matches(rawPassword, encodedPassword);
+        boolean matches = passwordEncoder.matches(rawPassword, encodedPassword);
+        String encode = passwordEncoder.encode(rawPassword);
+        System.out.printf(encode);
+        return matches;
     }
 
+
+
+
     /**
      * 对密码进行加密
      *

+ 5 - 5
feifan-server/pom.xml

@@ -59,11 +59,11 @@
         </dependency>
 
         <!-- 微信公众号模块。默认注释,保证编译速度 -->
-<!--        <dependency>-->
-<!--            <groupId>cn.newfeifan.zx</groupId>-->
-<!--            <artifactId>feifan-module-mp-biz</artifactId>-->
-<!--            <version>${revision}</version>-->
-<!--        </dependency>-->
+        <dependency>
+            <groupId>cn.newfeifan.zx</groupId>
+            <artifactId>feifan-module-mp-biz</artifactId>
+            <version>${revision}</version>
+        </dependency>
 
         <!-- 商城相关模块。默认注释,保证编译速度-->
         <dependency>

+ 1 - 1
feifan-server/src/main/resources/application-local.yaml

@@ -146,7 +146,7 @@ spring:
     admin:
       # Spring Boot Admin Client 客户端的相关配置
       client:
-        url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
+        url: http://localhost:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
         instance:
           service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
       # Spring Boot Admin Server 服务端的相关配置

+ 1 - 1
pom.xml

@@ -18,7 +18,7 @@
         <module>feifan-module-member</module>
 <!--        <module>feifan-module-bpm</module>-->
 <!--        <module>feifan-module-report</module>-->
-<!--        <module>feifan-module-mp</module>-->
+        <module>feifan-module-mp</module>
         <module>feifan-module-pay</module>
         <module>feifan-module-mall</module>
 <!--        <module>feifan-module-crm</module>-->