当字段属性设置为生成的枚举时,枚举类无法生成
tanshion opened this issue · 1 comments
tanshion commented
<!-- 状态枚举生成插件 -->
<plugin type="com.itfsw.mybatis.generator.plugins.EnumTypeStatusPlugin">
</plugin>
<table tableName="sys_user" domainObjectName="SysUser" enableCountByExample="true">
<property name="enumColumns" value="user_status"/>
<generatedKey column="user_id" sqlStatement="MySql" identity="true"/>
<columnOverride column="user_status" javaType="UserStatus" />
</table>
@Data
public class SysUser {
@Id
@ApiModelProperty(value = "用户ID")
private Integer userId;
@ApiModelProperty(value = "用户名")
private String username;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "昵称")
private String userNickName;
@ApiModelProperty(value = "手机号")
private String userPhone;
@ApiModelProperty(value = "头像")
private String userAvatar;
@ApiModelProperty(value = "用户类型")
private String userType;
@ApiModelProperty(value = "身份证")
private String userIdNo;
@ApiModelProperty(value = "性别")
private String userSex;
@ApiModelProperty(value = "邮箱")
private String userEmail;
@ApiModelProperty(value = "微信openid")
private String userWxOpenid;
@ApiModelProperty(value = "QQ openid")
private String userQqOpenid;
@ApiModelProperty(value = "状态[deleted(0):删除,enable(1):启动,disable(2):禁用]")
private UserStatus userStatus;
@ApiModelProperty(value = "创建时间")
private Date userCreateTime;
@ApiModelProperty(value = "更新时间")
private Date userUpdateTime;
}
生成以上代码,并没有生成 public enum UserStatus{}
tanshion commented
已解决