From a71146fa7382dada9ea4b42e2205a399da79dbee Mon Sep 17 00:00:00 2001 From: "DESKTOP-4U0TDEF\\20371" <2037158277@qq.com> Date: Wed, 14 Jul 2021 09:23:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=92=8C=E7=94=A8=E6=88=B7=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/model/entity/SysUserEntity.java | 14 ++++++++++++++ .../com/xkrs/service/impl/SysUserServiceImpl.java | 3 ++- src/main/java/com/xkrs/utils/AddressUtils.java | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/xkrs/model/entity/SysUserEntity.java b/src/main/java/com/xkrs/model/entity/SysUserEntity.java index fd02d3c..f4dcb79 100644 --- a/src/main/java/com/xkrs/model/entity/SysUserEntity.java +++ b/src/main/java/com/xkrs/model/entity/SysUserEntity.java @@ -71,6 +71,11 @@ public class SysUserEntity implements Serializable { @Column(columnDefinition = "varchar(64)") private String lastEntryIp; + /** + * 账号的使用天数 + */ + private Integer dayNum; + public Integer getId() { return id; } @@ -183,6 +188,14 @@ public class SysUserEntity implements Serializable { this.lastEntryIp = lastEntryIp; } + public Integer getDayNum() { + return dayNum; + } + + public void setDayNum(Integer dayNum) { + this.dayNum = dayNum; + } + @Override public String toString() { return "SysUserEntity{" + @@ -200,6 +213,7 @@ public class SysUserEntity implements Serializable { ", lastEntryTime=" + lastEntryTime + ", deleteFlag=" + deleteFlag + ", lastEntryIp='" + lastEntryIp + '\'' + + ", dayNum=" + dayNum + '}'; } } diff --git a/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java b/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java index 11687ab..49f666d 100644 --- a/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java @@ -74,10 +74,11 @@ public class SysUserServiceImpl implements SysUserService { sysUserEntity.setPassword(encry256(sysUserQo.getPassword() + salt)); sysUserEntity.setTelephone(sysUserQo.getUserName()); sysUserEntity.setUserDepartment(sysUserQo.getUserDepartment()); - sysUserEntity.setActiveFlag(1); + sysUserEntity.setActiveFlag(0); sysUserEntity.setStatusCode(0); sysUserEntity.setAddTime(getNowTime()); sysUserEntity.setDeleteFlag(0); + sysUserEntity.setDayNum(7); sysUserDao.save(sysUserEntity); diff --git a/src/main/java/com/xkrs/utils/AddressUtils.java b/src/main/java/com/xkrs/utils/AddressUtils.java index 2c223c2..918a1eb 100644 --- a/src/main/java/com/xkrs/utils/AddressUtils.java +++ b/src/main/java/com/xkrs/utils/AddressUtils.java @@ -99,7 +99,7 @@ public class AddressUtils { } public static void main(String[] args) { - String latAndLng = getLatAndLng("36.8685", "116.6510"); + String latAndLng = getLatAndLng("36.677841", "119.12423"); System.out.println(latAndLng); } }