초기소스
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.wb.domainserver.domain.auth.service;
|
||||
|
||||
import com.wb.domainserver.domain.auth.mapper.AuthMapper;
|
||||
import com.wb.domainserver.domain.auth.vo.AuthVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AuthService {
|
||||
|
||||
|
||||
private final AuthMapper mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 관리자 > 접근 가능한 쇼핑몰 리스트 조회
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public List<String> selectAuthorSopmalList(AuthVO vo){
|
||||
return mapper.selectAuthorSopmalList(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 > 쇼핑몰 페이지 권한 여부
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public Boolean selectAuthorSiteAt(AuthVO vo){
|
||||
int result = mapper.selectAuthorSiteAt(vo);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 > 인트라넷 페이지 권한 여부
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public Boolean selectItrntAuthorSiteAt(AuthVO vo){
|
||||
int result = mapper.selectItrntAuthorSiteAt(vo);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
public Map<String, Object> selectUserAuthor(AuthVO vo){
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
int authAt = mapper.selectUserAuthor(vo);
|
||||
|
||||
if(authAt > 0){
|
||||
result.put("authAt", "Y");
|
||||
}else{
|
||||
result.put("authAt", "N");
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user