From a7b62f9fa8f1734b12989a7461ff7649fe5c00df Mon Sep 17 00:00:00 2001 From: XinYi Song <2037158277@qq.com> Date: Mon, 20 Dec 2021 10:32:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=80=BB=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=85=8D=E8=B4=A6=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/model/qo/SysUserQo.java | 43 +++++++++++++++++++ .../xkrs/service/impl/SysUserServiceImpl.java | 3 ++ 2 files changed, 46 insertions(+) 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));