|
|
|
@ -2,18 +2,19 @@ package com.xit.biz.ctgy.v2.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.xit.biz.ctgy.dto.MinUserinfoDto;
|
|
|
|
|
import com.xit.biz.ctgy.entity.MinUserinfo;
|
|
|
|
|
import com.xit.biz.ctgy.v2.repository.MinUserinfoDao;
|
|
|
|
|
import com.xit.biz.ctgy.v2.repository.UserDao;
|
|
|
|
|
import com.xit.biz.ctgy.v2.service.IMinUserService;
|
|
|
|
|
import com.xit.core.constant.ErrorCode;
|
|
|
|
|
import com.xit.core.exception.CustomBaseException;
|
|
|
|
|
import com.xit.core.oauth2.utils.HeaderUtil;
|
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
import org.mapstruct.factory.Mappers;
|
|
|
|
|
import org.springframework.data.domain.*;
|
|
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.contains;
|
|
|
|
|
|
|
|
|
|
@AllArgsConstructor
|
|
|
|
@ -21,7 +22,7 @@ import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatc
|
|
|
|
|
public class MinUserService implements IMinUserService {
|
|
|
|
|
|
|
|
|
|
private final PasswordEncoder passwordEncoder;
|
|
|
|
|
private final MinUserinfoDao minUserinfoDao;
|
|
|
|
|
private final UserDao minUserinfoDao;
|
|
|
|
|
|
|
|
|
|
@Transactional//(readOnly = true)
|
|
|
|
|
public Page<MinUserinfo> findMinUsers(final MinUserinfo minUserinfo, Pageable pageable) {
|
|
|
|
@ -39,16 +40,16 @@ public class MinUserService implements IMinUserService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(readOnly = true)
|
|
|
|
|
public MinUserinfo findMinUser() {
|
|
|
|
|
public MinUserinfoDto findMinUser() {
|
|
|
|
|
//cmmUserRepos
|
|
|
|
|
//return Optional.empty(); //cmmUserRepository.findOneWithAuthorities(SecurityUtil.getCurrentMemberId());
|
|
|
|
|
return minUserinfoDao.findMinUserinfoByUserid(HeaderUtil.getUserId());
|
|
|
|
|
return minUserinfoDao.findByUserid(HeaderUtil.getUserId()).orElse(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(readOnly = true)
|
|
|
|
|
public MinUserinfo findMinUserByUserid(final String userid) {
|
|
|
|
|
return minUserinfoDao.findMinUserinfoByUserid(userid);
|
|
|
|
|
public MinUserinfoDto findMinUserByUserid(final String userid) {
|
|
|
|
|
return minUserinfoDao.findByUserid(userid).orElse(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|