xiaoqiantx
This commit is contained in:
parent
03e3825dc0
commit
1289e2a378
|
@ -1,7 +1,6 @@
|
||||||
package net.maku.maku.entity;
|
package net.maku.maku.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package net.maku.maku.service.impl;
|
package net.maku.maku.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
@ -16,6 +17,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -60,4 +62,28 @@ public class TUserServiceImpl extends BaseServiceImpl<TUserDao, TUserEntity> imp
|
||||||
removeByIds(idList);
|
removeByIds(idList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TUserEntity login(TUserEntity entity) {
|
||||||
|
LambdaQueryWrapper<TUserEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(TUserEntity::getUsername, entity.getUsername());
|
||||||
|
wrapper.eq(TUserEntity::getPassword, entity.getPassword());
|
||||||
|
TUserEntity one = getOne(wrapper);
|
||||||
|
if(ObjectUtils.isNotNull(one)) {
|
||||||
|
UUID uuid = UUID.randomUUID();
|
||||||
|
one.setAvatar(uuid.toString());
|
||||||
|
updateById(one);
|
||||||
|
return one;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TUserVO updateUser(TUserVO vo) {
|
||||||
|
TUserEntity entity = new TUserEntity();
|
||||||
|
entity.setUsername(vo.getUsername());
|
||||||
|
entity.setPassword(vo.getPassword());
|
||||||
|
updateById(entity);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@ spring:
|
||||||
database: 0
|
database: 0
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
# password: wxbc5b16589b8f183e
|
password: 123456
|
||||||
#timeout: 6000ms # 连接超时时长(毫秒)
|
#timeout: 6000ms # 连接超时时长(毫秒)
|
||||||
datasource:
|
datasource:
|
||||||
dynamic:
|
dynamic:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user