|
|
|
|
|
|
|
|
WestreamUser westreamUser = westreamUserMapper.selectOne(new LambdaQueryWrapper<WestreamUser>() |
|
|
WestreamUser westreamUser = westreamUserMapper.selectOne(new LambdaQueryWrapper<WestreamUser>() |
|
|
.eq(WestreamUser::getOpenid, entity.getOpenid()) |
|
|
.eq(WestreamUser::getOpenid, entity.getOpenid()) |
|
|
.eq(WestreamUser::getMark, 1)); |
|
|
.eq(WestreamUser::getMark, 1)); |
|
|
entity.setStatus(1); |
|
|
|
|
|
if(ObjectUtil.isNull(westreamUser)){ |
|
|
|
|
|
//新增 |
|
|
|
|
|
entity.setHeartbeatTime(new Date()); |
|
|
|
|
|
westreamUserMapper.insert(entity); |
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
|
if(ObjectUtil.isNotNull(westreamUser)){ |
|
|
// 编辑 |
|
|
// 编辑 |
|
|
|
|
|
entity.setStatus(1); |
|
|
entity.setHeartbeatTime(new Date()); |
|
|
entity.setHeartbeatTime(new Date()); |
|
|
westreamUserMapper.update(entity,new LambdaQueryWrapper<WestreamUser>() |
|
|
westreamUserMapper.update(entity,new LambdaQueryWrapper<WestreamUser>() |
|
|
.eq(WestreamUser::getOpenid,entity.getOpenid()) |
|
|
.eq(WestreamUser::getOpenid,entity.getOpenid()) |