Althars123 3 gadi atpakaļ
vecāks
revīzija
4dda4ad1fd

+ 18 - 40
twzd-common/src/main/java/com/miaxis/common/core/domain/entity/UserInfo.java

@@ -30,30 +30,6 @@ public class UserInfo extends BaseBusinessEntity{
     @ApiModelProperty(value = "主键")
     private Long id;
 
-    /** 性别 1:男性 2:女性 */
-    @Excel(name = "性别 1:男性 2:女性")
-    @TableField("sex")
-    @ApiModelProperty(value = "性别 1:男性 2:女性")
-    private Integer sex;
-
-    /** 身份证明号码 1:身份证号,2:护照,3:军官证,4:其他 */
-    @Excel(name = "身份证明号码 1:身份证号,2:护照,3:军官证,4:其他")
-    @TableField("cardtype")
-    @ApiModelProperty(value = "身份证明号码 1:身份证号,2:护照,3:军官证,4:其他")
-    private Integer cardtype;
-
-    /** 身份证明号码 */
-    @Excel(name = "身份证明号码")
-    @TableField("idcard")
-    @ApiModelProperty(value = "身份证明号码")
-    private String idcard;
-
-    /** 出生日期 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
-    @TableField("birthday")
-    @ApiModelProperty(value = "出生日期")
-    private Date birthday;
 
     /** 手机号码 */
     @Excel(name = "手机号码")
@@ -68,16 +44,16 @@ public class UserInfo extends BaseBusinessEntity{
     @ApiModelProperty(value = "微信号码")
     private String wechar;
 
-    /** 小程序头像地址 */
-    @Excel(name = "小程序头像地址")
+    /** app头像地址 */
+    @Excel(name = "app头像地址")
     @TableField("head_image")
-    @ApiModelProperty(value = "小程序头像地址")
+    @ApiModelProperty(value = "app头像地址")
     private String headImage;
 
-    /** 小程序昵称 */
-    @Excel(name = "小程序昵称")
+    /** app昵称 */
+    @Excel(name = "app昵称")
     @TableField("nick_name")
-    @ApiModelProperty(value = "小程序昵称")
+    @ApiModelProperty(value = "app昵称")
     private String nickName;
 
 
@@ -87,25 +63,27 @@ public class UserInfo extends BaseBusinessEntity{
     @ApiModelProperty(value = "微信openid")
     private String openid;
 
-    /** 业务类型  0:初领 1:增领 9:其他 */
-    @Excel(name = "业务类型  0:初领 1:增领 9:其他")
-    @TableField("busitype")
-    @ApiModelProperty(value = "业务类型  0:初领 1:增领 9:其他")
-    private Integer busitype;
+
 
 
     /** 0 启用 1禁用 */
     @Excel(name = "0 启用 1禁用")
     @TableField("status")
     @ApiModelProperty(value = "0 启用 1禁用")
-    private String status;
+    private Integer status;
+
+    /** 0 否 1是 */
+    @Excel(name = "是否是vip 0 否 1")
+    @TableField("is_vip")
+    @ApiModelProperty(value = "是否是vip 0 否 1是")
+    private Integer isVip;
 
 
     /** 驾校班型Id */
-    @Excel(name = "公众平台用户Id")
-    @TableField("gzpt_user_id")
-    @ApiModelProperty(value = "公众平台用户Id")
-    private Integer gzptUserId;
+    @Excel(name = "联合id")
+    @TableField("union_id")
+    @ApiModelProperty(value = "联合id")
+    private String unionId;
 
 
 

+ 4 - 0
twzd-common/src/main/java/com/miaxis/common/core/domain/model/LoginUser.java

@@ -271,6 +271,10 @@ public class LoginUser implements UserDetails
         if (this.getStudent() != null){
             List<SimpleGrantedAuthority> roleList = new ArrayList<SimpleGrantedAuthority>();
             roleList.add(new SimpleGrantedAuthority("ROLE_STUDENT"));
+            //如果已激活,是vip的话
+            if (this.getStudent().getIsVip() == 1){
+                roleList.add(new SimpleGrantedAuthority("ROLE_VIP"));
+            }
             return roleList;
         }else {
             return null;

+ 1 - 1
twzd-framework/src/main/java/com/miaxis/framework/config/SecurityConfig.java

@@ -102,7 +102,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 // 对于app 开放页面,允许任意访问
                 .antMatchers("/**/open-api/**").permitAll()
                 // 对于登录login 验证码captchaImage 允许匿名访问
-                .antMatchers("/login", "/login/noCode","/captchaImage","/login/jscode","/login/jscode-test").anonymous()
+                .antMatchers("/login", "/login/noCode","/captchaImage","/login/code","/login/code/test","/login/jscode-test").anonymous()
                 //.antMatchers("/student/open/**").permitAll()
                 .antMatchers("/student/**").hasRole("STUDENT")
                 .antMatchers(

+ 3 - 3
twzd-framework/src/main/java/com/miaxis/framework/config/SwaggerConfig.java

@@ -20,7 +20,7 @@ import java.util.List;
 
 /**
  * Swagger2的接口配置
- * 
+ *
  * @author miaxis
  */
 @Configuration
@@ -110,9 +110,9 @@ public class SwaggerConfig
         // 用ApiInfoBuilder进行定制
         return new ApiInfoBuilder()
                 // 设置标题
-                .title("标题:杭州公众平台系统_接口文档")
+                .title("标题:金牌车教系统_接口文档")
                 // 描述
-                .description("描述:仅用于miaxis 公司接口开发")
+                .description("")
                 // 作者信息
                 .contact(new Contact(miaxisConfig.getName(), null, null))
                 // 版本

+ 2 - 2
twzd-framework/src/main/java/com/miaxis/framework/web/service/UserDetailsServiceImpl.java

@@ -69,8 +69,8 @@ public class UserDetailsServiceImpl implements UserDetailsService
                 UserInfo userInfo = userService.getStudentByOpenId(identification);
                 if (userInfo == null) {
                     userInfo = new UserInfo();
-                    userInfo.setHeadImage(configService.selectConfigByKey("xcx_user_image"));
-                    userInfo.setNickName("用户未授权_"+RandomNameUtils.generateName());
+//                    userInfo.setHeadImage(configService.selectConfigByKey("xcx_user_image"));
+//                    userInfo.setNickName("用户未授权_"+RandomNameUtils.generateName());
                     userInfo.setOpenid(identification);
                     userService.saveUserInfo(userInfo);
                 }