refactor: sevice method transaction annotation 방식으로 적용

main
Jonguk. Lim 2 years ago
parent bd0b049ced
commit f6a16de715

@ -5,17 +5,18 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.cjm.mapper.ICjmSampleMapper;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@Service
@AllArgsConstructor
@RequiredArgsConstructor
public class CjmSampleService implements ICjmSampleService {
private final ICjmSampleMapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findCjmSamples(final Map<String, Object> paraMap, final RowBounds pagingInfo) {
return mapper.selectSamples(paraMap, pagingInfo);
}

@ -12,8 +12,9 @@ import kr.xit.fims.biz.cjm.service.ICjmSampleService;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/cjm")
public class CjmSampleController {

@ -7,14 +7,11 @@ import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@RequiredArgsConstructor
@Service
public class FimsTotalPopupService implements IFimsTotalPopupService {
private final FimsTotalPopupMapper fimsTotalPopupMapper;
@Override
public FimsTotalPopupVO findTotalView(FimsTotalPopupVO vo) {
return fimsTotalPopupMapper.findTotalView(vo);
@ -24,7 +21,6 @@ public class FimsTotalPopupService implements IFimsTotalPopupService {
fimsTotalPopupMapper.addProc(vo);
}
@Override
@Transactional
public void modifyProc(FimsTotalPopupVO vo) {
@ -43,7 +39,6 @@ public class FimsTotalPopupService implements IFimsTotalPopupService {
@Override
@Transactional
public void removeProc(FimsTotalPopupVO vo) {
//단속정보 삭제

@ -12,6 +12,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.servlet.ModelAndView;
@ -27,7 +28,7 @@ import org.springframework.web.servlet.ModelAndView;
*
*/
@Slf4j
@AllArgsConstructor
@RequiredArgsConstructor
@Controller
@RequestMapping("/cmm/fimsPopup")
public class FimsTotalPopupController {

@ -5,22 +5,26 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.ec.mapper.IEc0100Mapper;
import kr.xit.fims.biz.ec.service.IEc0100Service;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Service
public class Ec0100Service implements IEc0100Service {
private final IEc0100Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findEc0100List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectEc0100List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findEc0100(String keyField) {
return mapper.selectEc0100();
}

@ -5,22 +5,26 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.ec.mapper.IEc0200Mapper;
import kr.xit.fims.biz.ec.service.IEc0200Service;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Service
public class Ec0200Service implements IEc0200Service {
private final IEc0200Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findEc0200List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectEc0200List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findEc0200() {
return mapper.selectEc0200();
}

@ -5,22 +5,26 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.ec.mapper.IEc0300Mapper;
import kr.xit.fims.biz.ec.service.IEc0300Service;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Service
public class Ec0300Service implements IEc0300Service {
private final IEc0300Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findEc0300List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectEc0300List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findEc0300() {
return mapper.selectEc0300();
}

@ -5,22 +5,26 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.ec.mapper.IEc0400Mapper;
import kr.xit.fims.biz.ec.service.IEc0400Service;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Service
public class Ec0400Service implements IEc0400Service {
private final IEc0400Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findEc0400List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectEc0400List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findEc0400() {
return mapper.selectEc0400();
}

@ -5,22 +5,26 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.ec.mapper.IEc0500Mapper;
import kr.xit.fims.biz.ec.service.IEc0500Service;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Service
public class Ec0500Service implements IEc0500Service {
private final IEc0500Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findEc0500List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectEc0500List(paraMap, rowBounds);
}
@Override
@Transactional
public Map<String, Object> findEc0500() {
return mapper.selectEc0500();
}

@ -106,6 +106,7 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
}
@Override
@Transactional(readOnly = true)
public List<NatlNewspaperRcvDTO> findNatlNewspaers(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectEcEsbInterfaces(paraMap, rowBounds);
}

@ -19,8 +19,9 @@ import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.Checks;
import kr.xit.framework.support.util.constants.MessageKey;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/ec")
public class Ec0100Controler {

@ -12,8 +12,9 @@ import kr.xit.fims.biz.ec.service.IEc0200Service;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/ec")
public class Ec0200Controler {

@ -12,8 +12,9 @@ import kr.xit.fims.biz.ec.service.IEc0300Service;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/ec")
public class Ec0300Controler {

@ -12,8 +12,9 @@ import kr.xit.fims.biz.ec.service.IEc0400Service;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/ec")
public class Ec0400Controler {

@ -12,8 +12,9 @@ import kr.xit.fims.biz.ec.service.IEc0500Service;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/ec")
public class Ec0500Controler {

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.rt.mapper.IRt0100Mapper;
import kr.xit.fims.biz.rt.service.IRt0100Service;
@ -16,11 +17,13 @@ public class Rt0100Service implements IRt0100Service {
private final IRt0100Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findRt0100List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectRt0100List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findRt0100() {
return mapper.selectRt0100();
}

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.rt.mapper.IRt0200Mapper;
import kr.xit.fims.biz.rt.model.Rt0200SearchVO;
@ -19,16 +20,19 @@ public class Rt0200Service implements IRt0200Service {
private final IRt0200Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String,Object>> findRt0200List(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectRt0200List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public List<Map<String,Object>> findRt0200List(final Rt0200SearchVO vo, final RowBounds rowBounds) {
return mapper.selectRt0200List(vo, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Rt0200VO findRt0200(final String regltId) {
return mapper.selectRt0200(regltId);
}

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.rt.mapper.IRt0300Mapper;
import kr.xit.fims.biz.rt.service.IRt0300Service;
@ -16,11 +17,13 @@ public class Rt0300Service implements IRt0300Service {
private final IRt0300Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findRt0300List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectRt0300List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findRt0300() {
return mapper.selectRt0300();
}

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.rt.mapper.IRt0400Mapper;
import kr.xit.fims.biz.rt.service.IRt0400Service;
@ -16,11 +17,13 @@ public class Rt0400Service implements IRt0400Service {
private final IRt0400Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findRt0400List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectRt0400List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findRt0400() {
return mapper.selectRt0400();
}

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.rt.mapper.IRt0500Mapper;
import kr.xit.fims.biz.rt.service.IRt0500Service;
@ -16,11 +17,13 @@ public class Rt0500Service implements IRt0500Service {
private final IRt0500Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findRt0500List(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectRt0500List(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findRt0500() {
return mapper.selectRt0500();
}

@ -11,6 +11,7 @@ import kr.xit.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@ -23,23 +24,27 @@ public class Rt100MgtService implements IRt100MgtService {
private final IRt100MgtMapper mapper;
@Override
@Transactional(readOnly = true)
public List<XitClCodeMngVO> findCodeCfns(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectCmmnClCodes(paraMap, rowBounds);
}
@Override
@Transactional
public void addCodeCfn(final XitClCodeMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertCmmnClCode(vo);
}
@Override
@Transactional
public void modifyCodeCfn(final XitClCodeMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateCmmnClCode(vo);
}
@Override
@Transactional
public void removeCodeCfn(final String clCode) {
mapper.deleteCmmnClCode(clCode);
}

@ -2,18 +2,22 @@ package kr.xit.fims.biz.sample.service;
import kr.xit.fims.biz.sample.mapper.ISample2Mapper;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@RequiredArgsConstructor
@Service
@AllArgsConstructor
public class Sample2Service implements ISample2Service{
private final ISample2Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectSampleList(paraMap, rowBounds);

@ -5,23 +5,27 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.sample.mapper.ISampleMapper;
import kr.xit.fims.biz.sample.service.ISampleService;
import kr.xit.fims.biz.sample.service.SampleService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@AllArgsConstructor
@RequiredArgsConstructor
@Service
public class SampleService implements ISampleService {
private final ISampleMapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectSampleList(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findSample() {
return mapper.selectSample();
}

@ -10,22 +10,18 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.cache.mapper.ICacheBbsMapper;
import kr.xit.framework.biz.cache.mapper.ICacheCodeMapper;
import kr.xit.framework.biz.cache.mapper.ICacheMenuMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class CacheService implements ICacheService {
@Resource
private ICacheCodeMapper codeMapper;
@Resource
private ICacheMenuMapper menuMapper;
@Resource
private ICacheBbsMapper bbsMapper;
@Value("#{prop['Globals.Xit.RollingNotiBbsId']}")
private String notiBbsId;
@ -34,7 +30,9 @@ public class CacheService implements ICacheService {
@Value("#{prop['Globals.Xit.Bbs.useAt']}")
private String useAt;
private final ICacheCodeMapper codeMapper;
private final ICacheMenuMapper menuMapper;
private final ICacheBbsMapper bbsMapper;
// ---------------------------------------------------------------------------------------------------------
// Common code
@ -47,6 +45,7 @@ public class CacheService implements ICacheService {
@Cacheable(cacheNames="codeComboCache", key = "#codeId + #type")
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findComboCodes(final String codeId, final String type) {
Map<String, Object> map = new HashMap<>();
map.put("codeId", codeId);
@ -56,11 +55,13 @@ public class CacheService implements ICacheService {
@Override
@CacheEvict(cacheNames="codeCache", allEntries = true)
@Transactional
public void evictAllCodeCache() {
}
@Override
@CacheEvict(cacheNames="codeCache", key = "#codeId + #type")
@Transactional
public void evictCodeCache(final String codeId, final String type) {
}
// ---------------------------------------------------------------------------------------------------------
@ -71,23 +72,27 @@ public class CacheService implements ICacheService {
// ---------------------------------------------------------------------------------------------------------
@Cacheable(cacheNames="menuCache", key = "#uniqId")
@Override
@Transactional(readOnly = true)
public List<Map<String, String>> findMenuListByUser(final String uniqId) {
return menuMapper.selectMenuListByUser(uniqId);
}
@Cacheable(cacheNames="menuCache", key = "#authorCode")
@Override
@Transactional(readOnly = true)
public List<Map<String, String>> findMenuListByAuthorCode(final String authorCode) {
return menuMapper.selectMenuListByAuthorCode(authorCode);
}
@Override
@CacheEvict(cacheNames="menuCache", allEntries = true)
@Transactional
public void evictAllMenuCache() {
}
@Override
@CacheEvict(cacheNames="menuCache", key = "#key")
@Transactional
public void evictMenuCache(final String key) {
}
// ---------------------------------------------------------------------------------------------------------
@ -99,6 +104,7 @@ public class CacheService implements ICacheService {
// ---------------------------------------------------------------------------------------------------------
@Override
@Cacheable(cacheNames="latestBbsCache")
@Transactional(readOnly = true)
public List<Map<String, Object>> findLatestBbsList() {
Map<String, Object> paraMap = new HashMap<>();
paraMap.put("bbsId", this.notiBbsId);
@ -111,17 +117,20 @@ public class CacheService implements ICacheService {
@Override
@Cacheable(cacheNames="baseBbsCache", key = "#paraMap")
@Transactional(readOnly = true)
public List<XitBasicBbsMngVO> findBaseBbsList(final Map<String, Object> paraMap) {
return bbsMapper.selectBaseBbsList(paraMap);
}
@Override
@CacheEvict(cacheNames="latestBbsCache", allEntries = true)
@Transactional
public void evictLatestBbsList() {
}
@Override
@CacheEvict(cacheNames="baseBbsCache", allEntries = true)
@Transactional
public void evictBaseBbsList(){
}

@ -6,6 +6,7 @@ import java.util.Objects;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO;
import kr.xit.framework.biz.mng.auth.model.XitRoleInfoVO;
@ -28,16 +29,19 @@ public class AuthAuthorMgtService implements IAuthAuthorMgtService {
@Override
@Transactional(readOnly = true)
public List<XitAuthorInfoVO> findAuthAuthors(final Map<String,Object> paraMap, final RowBounds rowBounds) {
return mapper.selectAuthorInfos(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public List<XitAuthorInfoVO> findAuthAuthors(final Map<String, Object> paraMap) {
return mapper.selectAuthorInfos(paraMap);
}
@Override
@Transactional(readOnly = true)
public XitAuthorInfoVO findAuthAuthor(final String authorCode) {
return mapper.selectAuthorInfo(authorCode);
}
@ -58,6 +62,7 @@ public class AuthAuthorMgtService implements IAuthAuthorMgtService {
===================================================== */
@Override
@Transactional
public void addAuthAuthor(final XitAuthorInfoVO vo){
//권한정보 Insert
mapper.insertAuthorInfo(vo);
@ -75,9 +80,12 @@ public class AuthAuthorMgtService implements IAuthAuthorMgtService {
}
@Override
@Transactional
public void modifyAuthAuthor(final XitAuthorInfoVO vo){
mapper.updateAuthorInfo(vo);
}
@Transactional
public void removeAuthAuthor(final String authorCode){
//계층구조 삭제
XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO();
@ -93,11 +101,14 @@ public class AuthAuthorMgtService implements IAuthAuthorMgtService {
}
@Override
@Transactional(readOnly = true)
public List<XitRoleInfoVO> findAuthRoleGrantList(final Map<String, Object> paraMap) {
return mapper.selectAuthRoleGrantList(paraMap);
}
@SuppressWarnings("unchecked")
@Override
@Transactional
public void saveAuthRoleGrantList(final Map<String, Object> paraMap) {
List<Map<String,Object>> mapList = (List<Map<String, Object>>)paraMap.get("grantData");

@ -6,6 +6,7 @@ import java.util.Objects;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO;
import kr.xit.framework.biz.mng.auth.mapper.IAuthByUserMgtMapper;
@ -27,11 +28,13 @@ public class AuthByUserMgtService implements IAuthByUserMgtService {
private final IUserMgtService userMgtService;
@Override
@Transactional(readOnly = true)
public List<XitAuthUsrMngVO> findAuthUsers(final Map<String,Object> paraMap, final RowBounds rowBounds) {
return mapper.selectAuthUsers(paraMap, rowBounds);
}
@Override
@Transactional
public void saveAuthUserList(List<Map<String, Object>> paraList) {
String sessionUniqId = XitCmmnUtil.getUserInfo().getUniqId();
paraList.forEach(map -> {
@ -52,6 +55,7 @@ public class AuthByUserMgtService implements IAuthByUserMgtService {
}
@Override
@Transactional
public void removeAuthUserList(List<Map<String, Object>> paraList) {
//삭제 시 사용자의 권한을 소속 그룹의 권한 또는 Defualt 권한으로 설정

@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
@ -34,16 +35,19 @@ public class AuthGrpMgtService implements IAuthGrpMgtService {
private final EgovIdGnrService groupIdGnrService;
@Override
@Transactional(readOnly = true)
public List<XitAuthorGroupInfoVO> findAuthGrps(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectAuthorGroupInfos(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public XitAuthorGroupInfoVO findAuthGrp(final String groupId) {
return mapper.selectAuthorGroupInfo(groupId);
}
@Override
@Transactional
public void addAuthGrp(final XitAuthorGroupInfoVO vo) {
// 유효성 확인
this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode());
@ -57,6 +61,7 @@ public class AuthGrpMgtService implements IAuthGrpMgtService {
}
@Override
@Transactional
public void modifyAuthGrp(final XitAuthorGroupInfoVO vo) {
// 유효성 확인
this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode());
@ -65,10 +70,12 @@ public class AuthGrpMgtService implements IAuthGrpMgtService {
}
@Override
@Transactional
public void removeAuthGrp(final String groupId) {
mapper.deleteAuthorGroupInfo(groupId);
}
@Transactional(readOnly = true)
public void isCheckUserForCanChange(final String uniqId, final String trgetAuthorCode) {
//사용자보안설정 조회
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
@ -122,7 +129,7 @@ public class AuthGrpMgtService implements IAuthGrpMgtService {
*
*
*/
return this.isHighAuthor(listRoleSclsrtRescueVO, userAuthorCode, trgetAuthorCode)?false:true;
return !this.isHighAuthor(listRoleSclsrtRescueVO, userAuthorCode, trgetAuthorCode);
}
private boolean isHighAuthor(final List<XitRoleSclsrtRescueVO> list, final String authorCode, final String highAuthorCode) {

@ -8,6 +8,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO;
import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO;
@ -29,6 +30,7 @@ public class AuthHierarchyMgtService implements IAuthHierarchyMgtService {
private final IAuthAuthorMgtMapper authAuthorMgtMapper;
@Override
@Transactional(readOnly = true)
public List<XitAuthHierarchyMngVO> findAuthHierarchies(final Map<String, Object> paraMap, final RowBounds rowBounds) {
List<XitAuthHierarchyMngVO> voList = mapper.selectAuthHierarchies(paraMap, rowBounds);
//권한구조 설정
@ -44,6 +46,7 @@ public class AuthHierarchyMgtService implements IAuthHierarchyMgtService {
}
@Override
@Transactional(readOnly = true)
public XitAuthHierarchyMngVO findAuthHierarchyInfo(final XitAuthHierarchyMngVO vo) {
XitAuthHierarchyMngVO result = new XitAuthHierarchyMngVO();
@ -60,7 +63,7 @@ public class AuthHierarchyMgtService implements IAuthHierarchyMgtService {
return result;
}
@Transactional
public void saveAuthHierarchy(final XitAuthHierarchyMngVO vo) {
if(XitCmmnUtil.isEmpty(vo.getAuthorCode()))
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "권한코드는 필수조건 입니다.");

@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
@ -25,16 +26,19 @@ public class AuthRoleMgtService implements IAuthRoleMgtService {
private final EgovIdGnrService groupIdGnrService;
@Override
@Transactional(readOnly = true)
public List<XitRoleInfoVO> findAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds) {
return mapper.selectAuthRoles(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public XitRoleInfoVO findAuthRole(final String roleCode) {
return mapper.selectAuthRole(roleCode);
}
@Override
@Transactional
public void addAuthRole(final XitRoleInfoVO vo) {
String roleTyp = vo.getRoleTy();
if("method".equals(roleTyp)) roleTyp = "mtd";
@ -49,11 +53,13 @@ public class AuthRoleMgtService implements IAuthRoleMgtService {
}
@Override
@Transactional
public void modifyAuthRole(final XitRoleInfoVO vo) {
mapper.updateAuthRole(vo);
}
@Override
@Transactional
public void removeAuthRole(final String roleCode) {
mapper.deleteAuthRole(roleCode);
}

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.mng.bbs.mapper.IBoardCreateMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO;
@ -17,33 +18,39 @@ public class BoardCreateMgtService implements IBoardCreateMgtService {
private final IBoardCreateMgtMapper mapper;
@Override
@Transactional(readOnly = true)
public List<XitBbsCreateMngVO> findBoardCreateList(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBoardMastrs(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> List<XitBbsCreateMngVO> findBoardCreateList(final T t) {
return mapper.selectBoardMastrs(t);
}
@Override
@Transactional(readOnly = true)
public <T> XitBbsCreateMngVO findBoardCreate(final T t) {
return mapper.selectBoardMastr(t);
}
@Override
@Transactional
public void addBoardCreate(final XitBbsCreateMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertBoardMastr(vo);
}
@Override
@Transactional
public void modifyBoardCreate(final XitBbsCreateMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBoardMastr(vo);
}
@Override
@Transactional
public <T> void removeBoardCreate(final T t) {
mapper.deleteBoardMastr(t);
}

@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
@ -24,21 +25,25 @@ public class BoardTmplMgtService implements IBoardTmplMgtService {
private final EgovIdGnrService egovIdGnrService;
@Override
@Transactional(readOnly = true)
public List<XitBbsTmplateMngVO> findBoardTmpls(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBoardTmpls(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> List<XitBbsTmplateMngVO> findBoardTmpls(final T t) {
return mapper.selectBoardTmpls(t);
}
@Override
@Transactional(readOnly = true)
public <T> XitBbsTmplateMngVO findBoardTmpl(final T t) {
return mapper.selectBoardTmpl(t);
}
@Override
@Transactional
public void addBoardTmpl(final XitBbsTmplateMngVO vo) {
try {
vo.setTmplatId(egovIdGnrService.getNextStringId());
@ -50,12 +55,14 @@ public class BoardTmplMgtService implements IBoardTmplMgtService {
}
@Override
@Transactional
public void modifyBoardTmpl(final XitBbsTmplateMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBoardTmpl(vo);
}
@Override
@Transactional
public <T> void removeBoardTmpl(final T t) {
mapper.deleteBoardTmpl(t);
}

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.mng.bbs.mapper.IBoardUseMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO;
@ -17,33 +18,39 @@ public class BoardUseMgtService implements IBoardUseMgtService {
private final IBoardUseMgtMapper mapper;
@Override
@Transactional(readOnly = true)
public List<XitBbsUseMngVO> findBoardPrcuseList(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBoardPrcuseList(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> List<XitBbsUseMngVO> findBoardPrcuseList(T t) {
return mapper.selectBoardPrcuseList(t);
}
@Override
@Transactional(readOnly = true)
public <T> XitBbsUseMngVO findBoardPrcuse(T t) {
return mapper.selectBoardPrcuse(t);
}
@Override
@Transactional
public void addBoardPrcuse(XitBbsUseMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertBoardPrcuse(vo);
}
@Override
@Transactional
public void modifyBoardPrcuse(XitBbsUseMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBoardPrcuse(vo);
}
@Override
@Transactional
public <T> void removeBoardPrcuse(T t) {
mapper.deleteBoardPrcuse(t);
}

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.cache.service.ICacheService;
import kr.xit.framework.biz.mng.code.mapper.ICodeCfnMgtMapper;
@ -24,11 +25,13 @@ public class CodeCfnMgtService implements ICodeCfnMgtService {
private final ICacheService cacheService;
@Override
@Transactional(readOnly = true)
public List<XitClCodeMngVO> findCodeCfns(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectCmmnClCodes(paraMap, rowBounds);
}
@Override
@Transactional
public void addCodeCfn(final XitClCodeMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertCmmnClCode(vo);
@ -36,6 +39,7 @@ public class CodeCfnMgtService implements ICodeCfnMgtService {
}
@Override
@Transactional
public void modifyCodeCfn(final XitClCodeMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateCmmnClCode(vo);
@ -43,6 +47,7 @@ public class CodeCfnMgtService implements ICodeCfnMgtService {
}
@Override
@Transactional
public void removeCodeCfn(final String clCode) {
if(codeGrpMgtMapper.selectCmmnGrpCodes(clCode).size() > 0)
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("[%s]%s", clCode, "에 등록된 그룹코드가 존재합니다"));

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.cache.service.ICacheService;
import kr.xit.framework.biz.mng.code.mapper.ICodeDtlMgtMapper;
@ -20,11 +21,13 @@ public class CodeDtlMgtService implements ICodeDtlMgtService {
private final ICacheService cacheService;
@Override
@Transactional(readOnly = true)
public List<XitDetailCodeMngVO> findCodeDtls(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectCmmnDtlCodes(paraMap, rowBounds);
}
@Override
@Transactional
public void addCodeDtl(final XitDetailCodeMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertCmmnDtlCode(vo);
@ -32,6 +35,7 @@ public class CodeDtlMgtService implements ICodeDtlMgtService {
}
@Override
@Transactional
public void modifyCodeDtl(final XitDetailCodeMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateCmmnDtlCode(vo);
@ -39,6 +43,7 @@ public class CodeDtlMgtService implements ICodeDtlMgtService {
}
@Override
@Transactional
public void removeCodeDtl(final XitDetailCodeMngVO vo) {
mapper.deleteCmmnDtlCode(vo);
cacheService.evictCodeCache(vo.getCodeId(), null);

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.cache.service.ICacheService;
import kr.xit.framework.biz.mng.code.mapper.ICodeDtlMgtMapper;
@ -24,11 +25,13 @@ public class CodeGrpMgtService implements ICodeGrpMgtService {
private final ICacheService cacheService;
@Override
@Transactional(readOnly = true)
public List<XitCmmnCodeMngVO> findCodeGrps(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectCmmnGrpCodes(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public void addCodeGrp(final XitCmmnCodeMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertCmmnGrpCode(vo);
@ -36,6 +39,7 @@ public class CodeGrpMgtService implements ICodeGrpMgtService {
}
@Override
@Transactional(readOnly = true)
public void modifyCodeGrp(final XitCmmnCodeMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateCmmnGrpCode(vo);
@ -43,6 +47,7 @@ public class CodeGrpMgtService implements ICodeGrpMgtService {
}
@Override
@Transactional(readOnly = true)
public void removeCodeGrp(final XitCmmnCodeMngVO vo) {
if(codeDtlMgtMapper.selectCmmnDtlCodes(vo.getCodeId()).size() > 0)
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("[%s]%s", vo.getCodeId(), "에 등록된 그룹코드가 존재합니다"));

@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import egovframework.rte.fdl.excel.EgovExcelService;
import kr.xit.framework.biz.mng.code.mapper.IZipCodeMgtMapper;
@ -22,31 +23,37 @@ public class ZipCodeMgtService implements IZipCodeMgtService {
private final EgovExcelService egovExcelService;
@Override
@Transactional(readOnly = true)
public List<XitZipCodeMngVO> findZipCodes(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectZips(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> XitZipCodeMngVO findZipCode(T t) {
return mapper.selectZip(t);
}
@Override
@Transactional
public void addZipCode(final XitZipCodeMngVO vo) {
mapper.insertZip(vo);
}
@Override
@Transactional
public void modifyZipCode(final XitZipCodeMngVO vo) {
mapper.updateZip(vo);
}
@Override
@Transactional
public void removeZipcode(final XitZipCodeMngVO vo) {
mapper.deleteZip(vo);
}
@Override
@Transactional(readOnly = true)
public void uploadZipCodeByExcel(FileInputStream fis) {
//mapper.deleteAllZip(); // 데이타 모두 삭제???

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.cache.service.ICacheService;
import kr.xit.framework.biz.cmm.model.XitMenuCreatDtlsVO;
@ -20,16 +21,19 @@ public class MenuByRoleMgtService implements IMenuByRoleMgtService {
private final ICacheService cacheService;
@Override
@Transactional(readOnly = true)
public <T> List<MenuCreateMngVO> findRoleInfos(T t) {
return mapper.selectRoleInfos(t);
}
@Override
@Transactional(readOnly = true)
public <T> List<MenuCreateMngVO> findMenuInfoByRoleList(T t) {
return mapper.selectMenuInfoByRoleList(t);
}
@Override
@Transactional
public void saveMenuByRoleList(Map<String, Object> paraMap) {
String authorCode = String.valueOf(paraMap.get("authorCode"));
@SuppressWarnings("unchecked")

@ -11,6 +11,7 @@ import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import egovframework.rte.fdl.excel.EgovExcelService;
import kr.xit.framework.biz.cache.service.ICacheService;
@ -39,12 +40,13 @@ public class MenuMgtService implements IMenuMgtService {
private final EgovExcelService egovExcelService;
@Override
@Transactional(readOnly = true)
public List<XitMenuInfoVO> findMenus(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectMenuInfos(paraMap, rowBounds);
}
@Override
@Transactional
public void addMenu(final XitMenuInfoVO vo) {
// 메뉴 등록 여부
if(Checks.isNotEmpty(mapper.selectMenuInfo(XitMenuInfoVO.builder()
@ -63,12 +65,14 @@ public class MenuMgtService implements IMenuMgtService {
}
@Override
@Transactional
public void modifyMenu(final XitMenuInfoVO vo) {
mapper.updateMenuInfo(vo);
cacheService.evictAllMenuCache();
}
@Override
@Transactional
public void removeMenu(final String menuNo) {
// 참조하는 메뉴 조회
if(mapper.selectMenuInfos(XitMenuInfoVO.builder().upperMenuNo(menuNo).build()).size() > 0)
@ -95,6 +99,7 @@ public class MenuMgtService implements IMenuMgtService {
@Override
@Transactional
public boolean menuBndeAllDelete() throws Exception {
//if(!deleteAllProgrmDtls()){return false;} // 프로그램변경요청 테이블
if (!deleteAllMenuCreatDtlsList()) {
@ -151,6 +156,7 @@ public class MenuMgtService implements IMenuMgtService {
}
@Override
@Transactional
public String addsProc(MenuListMngVO vo, FileInputStream inputStream) throws Exception {
String message = addsProc(inputStream);

@ -5,6 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.framework.biz.mng.menu.mapper.IProgramMgtMapper;
import kr.xit.framework.biz.mng.menu.model.ProgramMngVO;
@ -23,22 +24,26 @@ public class ProgramMgtService implements IProgramMgtService {
private final IProgramMgtMapper mapper;
@Override
@Transactional(readOnly = true)
public List<ProgramMngVO> findPrograms(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectPrograms(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public ProgramMngVO findProgram(final String progrmFileNm) {
return mapper.selectProgram(progrmFileNm);
}
@Override
@Transactional
public int addProgram(final ProgramMngVO vo) {
return mapper.insertProgram(vo);
}
@Override
@Transactional
public int modifyProgram(final ProgramMngVO vo) {
String table = "프로그램목록";
FrameworkConstants.DB_ACTION action = FrameworkConstants.DB_ACTION.U;
@ -60,6 +65,7 @@ public class ProgramMgtService implements IProgramMgtService {
}
@Override
@Transactional
public int removeProgram(final String programFileNm) {
return mapper.deleteProgram(programFileNm);

@ -7,6 +7,7 @@ import java.util.Objects;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
@ -39,11 +40,13 @@ public class UserMgtService implements IUserMgtService {
private final EgovIdGnrService usrEsntlIdGnrService;
@Override
@Transactional(readOnly = true)
public List<XitUserInfoVO> findUsers(final Map<String,Object> paraMap, RowBounds rowBounds) {
return mapper.selectUsers(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public XitUserInfoVO findUser(final String uniqId) {
// TODO : 적용 체크
if(!this.isUserModifyAuth(uniqId))
@ -51,8 +54,8 @@ public class UserMgtService implements IUserMgtService {
return mapper.selectUser(uniqId);
}
@Override
@Transactional
public void addUser(final XitUserInfoVO vo) {
try {
vo.setUniqId(usrEsntlIdGnrService.getNextStringId());
@ -87,6 +90,7 @@ public class UserMgtService implements IUserMgtService {
}
@Override
@Transactional
public void modifyUser(final XitUserInfoVO vo) {
// TODO : 적용 체크
@ -120,6 +124,7 @@ public class UserMgtService implements IUserMgtService {
}
}
@Override
@Transactional
public void removeUser(final String userTy, final String userId) {
//업무사용자 삭제
@ -161,6 +166,7 @@ public class UserMgtService implements IUserMgtService {
* @date: 2020. 10. 30.
*/
@Override
@Transactional(readOnly = true)
public String getDefaultAuthorCode(final String groupId) {
if(Checks.isEmpty(groupId)) return "ROLE_USER";
@ -178,11 +184,13 @@ public class UserMgtService implements IUserMgtService {
@Override
@Transactional
public int addUserScrtySetup(final XitUserScrtySetupVO vo) {
return mapper.insertUserScrtySetup(vo);
}
@Override
@Transactional
public int addXitUserEtcOption(final XitUserEtcOptionVO vo) {
return mapper.insertUserEtcOption(vo);
}

Loading…
Cancel
Save