修改登录逻辑
parent
ca906052ec
commit
a8d5031821
@ -0,0 +1,69 @@
|
||||
package com.flossom.miniProgram.config.properties;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 微信配置
|
||||
*
|
||||
* @author flossom
|
||||
*/
|
||||
@Configuration
|
||||
@RefreshScope
|
||||
@ConfigurationProperties(prefix = "wx.config")
|
||||
public class WxConfig {
|
||||
|
||||
/**
|
||||
* appid
|
||||
*/
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* appkey
|
||||
*/
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
* jscode2session
|
||||
* 通过 code 去微信服务器换取 openid 和 session_key
|
||||
*/
|
||||
private String loginUrl;
|
||||
|
||||
/**
|
||||
* 通过 code 去微信服务器换取 手机号码
|
||||
*/
|
||||
private String obtainPhoneUrl;
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getAppKey() {
|
||||
return appKey;
|
||||
}
|
||||
|
||||
public void setAppKey(String appKey) {
|
||||
this.appKey = appKey;
|
||||
}
|
||||
|
||||
public String getLoginUrl() {
|
||||
return loginUrl;
|
||||
}
|
||||
|
||||
public void setLoginUrl(String loginUrl) {
|
||||
this.loginUrl = loginUrl;
|
||||
}
|
||||
|
||||
public String getObtainPhoneUrl() {
|
||||
return obtainPhoneUrl;
|
||||
}
|
||||
|
||||
public void setObtainPhoneUrl(String obtainPhoneUrl) {
|
||||
this.obtainPhoneUrl = obtainPhoneUrl;
|
||||
}
|
||||
}
|
||||
@ -1,40 +1,223 @@
|
||||
package com.flossom.miniProgram.domain.vo;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserMember;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.flossom.common.core.annotation.Excel;
|
||||
|
||||
public class LoginUserVo extends WxUserMember {
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class LoginUserVo {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@Excel(name = "昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@Excel(name = "头像")
|
||||
private String headimg;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 积分
|
||||
*/
|
||||
@Excel(name = "积分")
|
||||
private BigDecimal credit;
|
||||
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
@Excel(name = "手机")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 省id
|
||||
*/
|
||||
@Excel(name = "省id")
|
||||
private String provinceId;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
@Excel(name = "省")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 令牌
|
||||
* 市id
|
||||
*/
|
||||
private String accessToken;
|
||||
@Excel(name = "市id")
|
||||
private String cityId;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
* 市
|
||||
*/
|
||||
private String expiresIn;
|
||||
@Excel(name = "市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区id
|
||||
*/
|
||||
@Excel(name = "区id")
|
||||
private String areaId;
|
||||
|
||||
/**
|
||||
* 区
|
||||
*/
|
||||
@Excel(name = "区")
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
private String token;
|
||||
|
||||
|
||||
public LoginUserVo() {
|
||||
}
|
||||
|
||||
public LoginUserVo(String accessToken, String expiresIn) {
|
||||
this.accessToken = accessToken;
|
||||
this.expiresIn = expiresIn;
|
||||
public LoginUserVo(Long id, String nickname, String headimg, String username, BigDecimal credit, String mobile, String provinceId, String province, String cityId, String city, String areaId, String area, Date birthday, String token) {
|
||||
this.id = id;
|
||||
this.nickname = nickname;
|
||||
this.headimg = headimg;
|
||||
this.username = username;
|
||||
this.credit = credit;
|
||||
this.mobile = mobile;
|
||||
this.provinceId = provinceId;
|
||||
this.province = province;
|
||||
this.cityId = cityId;
|
||||
this.city = city;
|
||||
this.areaId = areaId;
|
||||
this.area = area;
|
||||
this.birthday = birthday;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getHeadimg() {
|
||||
return headimg;
|
||||
}
|
||||
|
||||
public void setHeadimg(String headimg) {
|
||||
this.headimg = headimg;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public BigDecimal getCredit() {
|
||||
return credit;
|
||||
}
|
||||
|
||||
public void setCredit(BigDecimal credit) {
|
||||
this.credit = credit;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getProvinceId() {
|
||||
return provinceId;
|
||||
}
|
||||
|
||||
public void setProvinceId(String provinceId) {
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCityId() {
|
||||
return cityId;
|
||||
}
|
||||
|
||||
public void setCityId(String cityId) {
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(String area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getAccessToken() {
|
||||
return accessToken;
|
||||
public Date getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setAccessToken(String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
public void setBirthday(Date birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getExpiresIn() {
|
||||
return expiresIn;
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setExpiresIn(String expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue