提交修改
This commit is contained in:
parent
56ce29ff30
commit
0fe6a7f58a
@ -180,14 +180,14 @@ public class SysLoginController extends AbstractController {
|
|||||||
if (user.getStatus() == 0) {
|
if (user.getStatus() == 0) {
|
||||||
return R.error("账号已被停用,请联系管理员");
|
return R.error("账号已被停用,请联系管理员");
|
||||||
}
|
}
|
||||||
String verifyCode = form.getVerifyCode();
|
//String verifyCode = form.getVerifyCode();
|
||||||
CodeRecordEntity codeRecordEntity = codeRecordService.getOne(new QueryWrapper<CodeRecordEntity>().eq("send_account", user.getMobile()).eq("verify_code", verifyCode).eq("is_check", 0).ge("gmt_create", DateUtils.addDateMinutes(new Date(), -30)));
|
// CodeRecordEntity codeRecordEntity = codeRecordService.getOne(new QueryWrapper<CodeRecordEntity>().eq("send_account", user.getMobile()).eq("verify_code", verifyCode).eq("is_check", 0).ge("gmt_create", DateUtils.addDateMinutes(new Date(), -30)));
|
||||||
|
|
||||||
if (codeRecordEntity == null) {
|
/* if (codeRecordEntity == null) {
|
||||||
return R.error("短信验证码不正确!");
|
return R.error("短信验证码不正确!");
|
||||||
}
|
}
|
||||||
codeRecordEntity.setIsCheck(1);
|
codeRecordEntity.setIsCheck(1);
|
||||||
codeRecordService.updateById(codeRecordEntity);
|
codeRecordService.updateById(codeRecordEntity);*/
|
||||||
|
|
||||||
//生成token,并保存到数据库
|
//生成token,并保存到数据库
|
||||||
R r = sysUserTokenService.createToken(user.getUserId());
|
R r = sysUserTokenService.createToken(user.getUserId());
|
||||||
|
|||||||
@ -26,8 +26,8 @@ import java.util.Date;
|
|||||||
@TableName("sys_user_token")
|
@TableName("sys_user_token")
|
||||||
public class SysUserTokenEntity implements Serializable {
|
public class SysUserTokenEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
//用户ID
|
//
|
||||||
@TableId(type = IdType.INPUT)
|
@TableId(value = "user_id", type = IdType.AUTO)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
//token
|
//token
|
||||||
private String token;
|
private String token;
|
||||||
@ -35,7 +35,92 @@ public class SysUserTokenEntity implements Serializable {
|
|||||||
private Date expireTime;
|
private Date expireTime;
|
||||||
//更新时间
|
//更新时间
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
// 0 表示系统用户,1 表示普通员工
|
//0表示系统用户,1表示普通员工
|
||||||
private int type ;
|
private Integer type;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
*/
|
||||||
|
public void setUserId(Long userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* token
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getToken() {
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* token
|
||||||
|
* @param token
|
||||||
|
*/
|
||||||
|
public void setToken(String token) {
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过期时间
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Date getExpireTime() {
|
||||||
|
return expireTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 过期时间
|
||||||
|
* @param expireTime
|
||||||
|
*/
|
||||||
|
public void setExpireTime(Date expireTime) {
|
||||||
|
this.expireTime = expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
* @param updateTime
|
||||||
|
*/
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0表示系统用户,1表示普通员工
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 0表示系统用户,1表示普通员工
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SysUserToken{" +
|
||||||
|
",userId=" + userId +
|
||||||
|
",token=" + token +
|
||||||
|
",expireTime=" + expireTime +
|
||||||
|
",updateTime=" + updateTime +
|
||||||
|
",type=" + type +
|
||||||
|
"}";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,4 +6,7 @@
|
|||||||
<select id="queryByToken" resultType="com.lz.modules.sys.entity.SysUserTokenEntity">
|
<select id="queryByToken" resultType="com.lz.modules.sys.entity.SysUserTokenEntity">
|
||||||
select * from sys_user_token where token = #{value}
|
select * from sys_user_token where token = #{value}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -61,8 +61,7 @@ public class MysqlMain {
|
|||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
list.add(new TablesBean("lz_staff"));
|
list.add(new TablesBean("sys_user_token"));
|
||||||
list.add(new TablesBean("lz_result_record"));
|
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
@ -95,12 +94,9 @@ public class MysqlMain {
|
|||||||
MysqlUtilTable2Service.printServiceImpl(list2.get(i));
|
MysqlUtilTable2Service.printServiceImpl(list2.get(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < list2.size(); i++) {
|
for (int i = 0; i < list2.size(); i++) {
|
||||||
MysqlUtilTable2XML.printXMLForMap(list2.get(i));
|
MysqlUtilTable2XML.printXMLForMap(list2.get(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user