diff --git a/src/main/java/com/xkrs/model/qo/SysUserQo.java b/src/main/java/com/xkrs/model/qo/SysUserQo.java index e024abe..f58d427 100644 --- a/src/main/java/com/xkrs/model/qo/SysUserQo.java +++ b/src/main/java/com/xkrs/model/qo/SysUserQo.java @@ -4,6 +4,7 @@ import com.xkrs.model.validation.SysUserQoInsert; import com.xkrs.model.validation.SysUserQoUpdate; import org.hibernate.validator.constraints.Range; +import javax.persistence.Column; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; @@ -47,6 +48,24 @@ public class SysUserQo { @NotNull(message = "{SysUser.deleteFlag.null}",groups={SysUserQoUpdate.class}) private Integer deleteFlag; + /** + * 省 + */ + @NotNull(message = "{SysUser.province.illegal}",groups={SysUserQoUpdate.class}) + private String province; + + /** + * 市 + */ + @NotNull(message = "{SysUser.city.illegal}",groups={SysUserQoUpdate.class}) + private String city; + + /** + * 区 + */ + @NotNull(message = "{SysUser.county.illegal}",groups={SysUserQoUpdate.class}) + private String county; + private Integer roleId; private Integer authorityId; @@ -111,6 +130,30 @@ public class SysUserQo { this.deleteFlag = deleteFlag; } + public String getProvince() { + return province; + } + + public void setProvince(String province) { + this.province = province; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getCounty() { + return county; + } + + public void setCounty(String county) { + this.county = county; + } + public Integer getRoleId() { return roleId; } diff --git a/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java b/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java index 5912e6b..ef6c6fc 100644 --- a/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java @@ -89,6 +89,9 @@ public class SysUserServiceImpl implements SysUserService { sysUserEntity.setActiveFlag(0); sysUserEntity.setStatusCode(0); sysUserEntity.setAddTime(getNowTime()); + sysUserEntity.setProvince(sysUserQo.getProvince()); + sysUserEntity.setCity(sysUserQo.getCity()); + sysUserEntity.setCounty(sysUserQo.getCounty()); sysUserEntity.setDeleteFlag(0); int i = (int)(Math.random()*9+1)*100000; sysUserEntity.setIdentifier(String.valueOf(i));