Commit ebebf838 authored by 唐峰's avatar 唐峰

放开小程序通过openid登录,增加用户校验逻辑

parent b6348764
package cn.quantgroup.xyqb.controller.test;
import cn.quantgroup.xyqb.model.JsonResult;
import com.ctrip.framework.apollo.ConfigService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RequestMapping("/test")
@RestController
@RefreshScope
public class TestController {
@Value("${channel.register.template}")
......@@ -19,7 +22,10 @@ public class TestController {
@GetMapping("/test1")
public JsonResult test1() {
//
//v--String data =
String property = ConfigService.getAppConfig().getProperty("channel.register.template", "{}");
System.out.println("-----"+property);
return JsonResult.buildSuccessResult(testApollo);
}
}
......@@ -27,11 +27,12 @@ import org.springframework.stereotype.Service;
import java.lang.reflect.Type;
import java.util.Map;
/**
* 微信小程序登录
* 沟通不过,不支持没有手机号码的登录
*/
//@Service
@Service
@Slf4j
public class WechatMiniLoginStrategy implements LoginStrategy {
......
......@@ -20,8 +20,11 @@ public class BctyptPasswordUtil {
}
public static void main(String[] args) {
Boolean aBoolean = BCryptCheckPw("123455lll", "$2a$10$F5zuGyS2wi1Qtfo3yoglU.o4U.nr386JduPGUg28AMrVDdR0vdSjS");
Boolean aBoolean = BCryptCheckPw("1234567890", "$2a$10$0veLnjQDwNv2HVCRTVUI/OaRYnJNUDKyA1wZErqIR.53BZKwi5n.y");
Boolean aBoolean1 = BCryptCheckPw("1234567890", "$2a$10$IxzDGFuT6GDFvJ13akCHZOGdwOG4zgdJFbotvgZodb4wfZ5pyBKUu");
System.out.println(aBoolean);
System.out.println(aBoolean1);
System.out.println(BCryptWithSalt("1234567890"));
}
}
......@@ -118,4 +118,9 @@ public class PasswordUtil {
return infoString;
}
public static void main(String[] args) {
String thePassword = MD5WithSalt("1234567");
System.out.println(thePassword);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment