mirror of
https://gitee.com/gz-yami/mall4j.git
synced 2026-03-22 09:17:16 +08:00
增加H5端注册、登录、退出,支付功能
This commit is contained in:
@@ -20,24 +20,19 @@ public enum App {
|
||||
/**
|
||||
* 微信公众号
|
||||
*/
|
||||
MP(2),
|
||||
|
||||
/**
|
||||
* H5
|
||||
*/
|
||||
H5(3)
|
||||
MP(2)
|
||||
;
|
||||
|
||||
|
||||
private Integer num;
|
||||
|
||||
|
||||
public Integer value() {
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
App(Integer num){
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
|
||||
public static App instance(Integer value) {
|
||||
App[] enums = values();
|
||||
for (App statusEnum : enums) {
|
||||
|
||||
@@ -28,10 +28,8 @@ public class YamiUser extends User {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Setter
|
||||
private String userId;
|
||||
|
||||
@Setter
|
||||
private String bizUserId;
|
||||
|
||||
@Setter
|
||||
@@ -43,15 +41,6 @@ public class YamiUser extends User {
|
||||
@Setter
|
||||
private boolean debugger;
|
||||
|
||||
@Setter
|
||||
private String password;
|
||||
|
||||
public YamiUser(String userId, String password, boolean enabled) {
|
||||
super(userId, password, enabled,true, true, true , Collections.emptyList());
|
||||
this.userId = userId;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public YamiUser(String userId, String bizUserId, Integer appId, boolean enabled) {
|
||||
super(appId + StrUtil.COLON + bizUserId, "", enabled,true, true, true , Collections.emptyList());
|
||||
this.userId = userId;
|
||||
|
||||
@@ -37,13 +37,4 @@ public interface YamiUserDetailsService extends UserDetailsService {
|
||||
* @param appConnect
|
||||
*/
|
||||
void insertUserIfNecessary(AppConnect appConnect);
|
||||
|
||||
/**
|
||||
* 账号、密码登录
|
||||
* @param userMail
|
||||
* @param loginPassword
|
||||
* @return
|
||||
*/
|
||||
YamiUser loadUserByUserMail(String userMail, String loginPassword);
|
||||
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class YamiTokenServices implements AuthorizationServerTokenServices, Reso
|
||||
@Override
|
||||
public OAuth2AccessToken createAccessToken(OAuth2Authentication authentication) {
|
||||
|
||||
// OAuth2AccessToken existingAccessToken = tokenStore.getAccessToken(authentication);
|
||||
OAuth2AccessToken existingAccessToken = tokenStore.getAccessToken(authentication);
|
||||
OAuth2RefreshToken refreshToken = null;
|
||||
// 如果有token,直接删除,更新token,避免出现缓存问题
|
||||
// if (existingAccessToken != null) {
|
||||
|
||||
Reference in New Issue
Block a user