|
|
|
@ -3,7 +3,6 @@ package org.dromara.system.service.impl;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
|
|
|
import org.dromara.system.domain.SysSocial;
|
|
|
|
|
import org.dromara.system.domain.bo.SysSocialBo;
|
|
|
|
|
import org.dromara.system.domain.vo.SysSocialVo;
|
|
|
|
@ -66,6 +65,15 @@ public class SysSocialServiceImpl implements ISysSocialService {
|
|
|
|
|
return flag;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新社会化关系
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean updateByBo(SysSocialBo bo) {
|
|
|
|
|
SysSocial update = MapstructUtils.convert(bo, SysSocial.class);
|
|
|
|
|
validEntityBeforeSave(update);
|
|
|
|
|
return baseMapper.updateById(update) > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 保存前的数据校验
|
|
|
|
@ -92,11 +100,7 @@ public class SysSocialServiceImpl implements ISysSocialService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public SysSocialVo selectByAuthId(String authId) {
|
|
|
|
|
return baseMapper.selectVoOne(
|
|
|
|
|
new LambdaQueryWrapper<SysSocial>()
|
|
|
|
|
.eq(SysSocial::getAuthId, authId)
|
|
|
|
|
.orderByDesc(BaseEntity::getCreateTime)
|
|
|
|
|
.last("limit 1"));
|
|
|
|
|
return baseMapper.selectVoOne(new LambdaQueryWrapper<SysSocial>().eq(SysSocial::getAuthId, authId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|