diff --git a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0100Mapper.java b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0100Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/ec/mapper/Ec0100Mapper.java rename to src/main/java/kr/xit/fims/biz/ec/mapper/IEc0100Mapper.java index 4318665a..621a1032 100644 --- a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0100Mapper.java +++ b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0100Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Ec0100Mapper { +public interface IEc0100Mapper { List> selectEc0100List(Map paraMap, RowBounds rowBounds); Map selectEc0100(); diff --git a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0200Mapper.java b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0200Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/ec/mapper/Ec0200Mapper.java rename to src/main/java/kr/xit/fims/biz/ec/mapper/IEc0200Mapper.java index 3028c007..a01fbed9 100644 --- a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0200Mapper.java +++ b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0200Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Ec0200Mapper { +public interface IEc0200Mapper { List> selectEc0200List(Map paraMap, RowBounds rowBounds); Map selectEc0200(); diff --git a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0300Mapper.java b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0300Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/ec/mapper/Ec0300Mapper.java rename to src/main/java/kr/xit/fims/biz/ec/mapper/IEc0300Mapper.java index 2d9eda3a..471a9f3d 100644 --- a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0300Mapper.java +++ b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0300Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Ec0300Mapper { +public interface IEc0300Mapper { List> selectEc0300List(Map paraMap, RowBounds rowBounds); Map selectEc0300(); diff --git a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0400Mapper.java b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0400Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/ec/mapper/Ec0400Mapper.java rename to src/main/java/kr/xit/fims/biz/ec/mapper/IEc0400Mapper.java index 82f11a69..7ca6c8a9 100644 --- a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0400Mapper.java +++ b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0400Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Ec0400Mapper { +public interface IEc0400Mapper { List> selectEc0400List(Map paraMap, RowBounds rowBounds); Map selectEc0400(); diff --git a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0500Mapper.java b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0500Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/ec/mapper/Ec0500Mapper.java rename to src/main/java/kr/xit/fims/biz/ec/mapper/IEc0500Mapper.java index 122f0235..68e6a1c8 100644 --- a/src/main/java/kr/xit/fims/biz/ec/mapper/Ec0500Mapper.java +++ b/src/main/java/kr/xit/fims/biz/ec/mapper/IEc0500Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Ec0500Mapper { +public interface IEc0500Mapper { List> selectEc0500List(Map paraMap, RowBounds rowBounds); Map selectEc0500(); diff --git a/src/main/java/kr/xit/fims/biz/ec/service/Ec0100Service.java b/src/main/java/kr/xit/fims/biz/ec/service/Ec0100Service.java index 046d5e59..1a44d4c3 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/Ec0100Service.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/Ec0100Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Ec0100Service { - List> findEc0100List(Map paraMap, RowBounds pagingInfo); - Map findEc0100(String keyField); +import kr.xit.fims.biz.ec.mapper.IEc0100Mapper; +import kr.xit.fims.biz.ec.service.IEc0100Service; +import lombok.AllArgsConstructor; + +@AllArgsConstructor +@Service +public class Ec0100Service implements IEc0100Service { + private final IEc0100Mapper mapper; + + @Override + public List> findEc0100List(Map paraMap, RowBounds rowBounds) { + return mapper.selectEc0100List(paraMap, rowBounds); + } + + @Override + public Map findEc0100(String keyField) { + return mapper.selectEc0100(); + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/Ec0200Service.java b/src/main/java/kr/xit/fims/biz/ec/service/Ec0200Service.java index 678e7c5a..396fa6d6 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/Ec0200Service.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/Ec0200Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Ec0200Service { - List> findEc0200List(Map paraMap, RowBounds pagingInfo); - Map findEc0200(); +import kr.xit.fims.biz.ec.mapper.IEc0200Mapper; +import kr.xit.fims.biz.ec.service.IEc0200Service; +import lombok.AllArgsConstructor; + +@AllArgsConstructor +@Service +public class Ec0200Service implements IEc0200Service { + private final IEc0200Mapper mapper; + + @Override + public List> findEc0200List(Map paraMap, RowBounds rowBounds) { + return mapper.selectEc0200List(paraMap, rowBounds); + } + + @Override + public Map findEc0200() { + return mapper.selectEc0200(); + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/Ec0300Service.java b/src/main/java/kr/xit/fims/biz/ec/service/Ec0300Service.java index f359b86a..df0f0607 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/Ec0300Service.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/Ec0300Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Ec0300Service { - List> findEc0300List(Map paraMap, RowBounds pagingInfo); - Map findEc0300(); +import kr.xit.fims.biz.ec.mapper.IEc0300Mapper; +import kr.xit.fims.biz.ec.service.IEc0300Service; +import lombok.AllArgsConstructor; + +@AllArgsConstructor +@Service +public class Ec0300Service implements IEc0300Service { + private final IEc0300Mapper mapper; + + @Override + public List> findEc0300List(Map paraMap, RowBounds rowBounds) { + return mapper.selectEc0300List(paraMap, rowBounds); + } + + @Override + public Map findEc0300() { + return mapper.selectEc0300(); + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/Ec0400Service.java b/src/main/java/kr/xit/fims/biz/ec/service/Ec0400Service.java index 0342b85d..672d6f6a 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/Ec0400Service.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/Ec0400Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Ec0400Service { - List> findEc0400List(Map paraMap, RowBounds pagingInfo); - Map findEc0400(); +import kr.xit.fims.biz.ec.mapper.IEc0400Mapper; +import kr.xit.fims.biz.ec.service.IEc0400Service; +import lombok.AllArgsConstructor; + +@AllArgsConstructor +@Service +public class Ec0400Service implements IEc0400Service { + private final IEc0400Mapper mapper; + + @Override + public List> findEc0400List(Map paraMap, RowBounds rowBounds) { + return mapper.selectEc0400List(paraMap, rowBounds); + } + + @Override + public Map findEc0400() { + return mapper.selectEc0400(); + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/Ec0500Service.java b/src/main/java/kr/xit/fims/biz/ec/service/Ec0500Service.java index ec35d8e4..1902c9b5 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/Ec0500Service.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/Ec0500Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Ec0500Service { - List> findEc0500List(Map paraMap, RowBounds pagingInfo); - Map findEc0500(); +import kr.xit.fims.biz.ec.mapper.IEc0500Mapper; +import kr.xit.fims.biz.ec.service.IEc0500Service; +import lombok.AllArgsConstructor; + +@AllArgsConstructor +@Service +public class Ec0500Service implements IEc0500Service { + private final IEc0500Mapper mapper; + + @Override + public List> findEc0500List(Map paraMap, RowBounds rowBounds) { + return mapper.selectEc0500List(paraMap, rowBounds); + } + + @Override + public Map findEc0500() { + return mapper.selectEc0500(); + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/IEc0100Service.java b/src/main/java/kr/xit/fims/biz/ec/service/IEc0100Service.java new file mode 100644 index 00000000..6662363b --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEc0100Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.ec.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IEc0100Service { + List> findEc0100List(Map paraMap, RowBounds pagingInfo); + Map findEc0100(String keyField); +} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/IEc0200Service.java b/src/main/java/kr/xit/fims/biz/ec/service/IEc0200Service.java new file mode 100644 index 00000000..96634cf0 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEc0200Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.ec.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IEc0200Service { + List> findEc0200List(Map paraMap, RowBounds pagingInfo); + Map findEc0200(); +} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/IEc0300Service.java b/src/main/java/kr/xit/fims/biz/ec/service/IEc0300Service.java new file mode 100644 index 00000000..906502f9 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEc0300Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.ec.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IEc0300Service { + List> findEc0300List(Map paraMap, RowBounds pagingInfo); + Map findEc0300(); +} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/IEc0400Service.java b/src/main/java/kr/xit/fims/biz/ec/service/IEc0400Service.java new file mode 100644 index 00000000..fef726c0 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEc0400Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.ec.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IEc0400Service { + List> findEc0400List(Map paraMap, RowBounds pagingInfo); + Map findEc0400(); +} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/IEc0500Service.java b/src/main/java/kr/xit/fims/biz/ec/service/IEc0500Service.java new file mode 100644 index 00000000..99fdff67 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEc0500Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.ec.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IEc0500Service { + List> findEc0500List(Map paraMap, RowBounds pagingInfo); + Map findEc0500(); +} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0100ServiceImpl.java b/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0100ServiceImpl.java deleted file mode 100644 index e24e6885..00000000 --- a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0100ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.ec.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.ec.mapper.Ec0100Mapper; -import kr.xit.fims.biz.ec.service.Ec0100Service; -import lombok.AllArgsConstructor; - -@AllArgsConstructor -@Service -public class Ec0100ServiceImpl implements Ec0100Service { - private final Ec0100Mapper mapper; - - @Override - public List> findEc0100List(Map paraMap, RowBounds rowBounds) { - return mapper.selectEc0100List(paraMap, rowBounds); - } - - @Override - public Map findEc0100(String keyField) { - return mapper.selectEc0100(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0200ServiceImpl.java b/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0200ServiceImpl.java deleted file mode 100644 index 9c45b3a0..00000000 --- a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0200ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.ec.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.ec.mapper.Ec0200Mapper; -import kr.xit.fims.biz.ec.service.Ec0200Service; -import lombok.AllArgsConstructor; - -@AllArgsConstructor -@Service -public class Ec0200ServiceImpl implements Ec0200Service { - private final Ec0200Mapper mapper; - - @Override - public List> findEc0200List(Map paraMap, RowBounds rowBounds) { - return mapper.selectEc0200List(paraMap, rowBounds); - } - - @Override - public Map findEc0200() { - return mapper.selectEc0200(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0300ServiceImpl.java b/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0300ServiceImpl.java deleted file mode 100644 index ca89f2e0..00000000 --- a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0300ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.ec.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.ec.mapper.Ec0300Mapper; -import kr.xit.fims.biz.ec.service.Ec0300Service; -import lombok.AllArgsConstructor; - -@AllArgsConstructor -@Service -public class Ec0300ServiceImpl implements Ec0300Service { - private final Ec0300Mapper mapper; - - @Override - public List> findEc0300List(Map paraMap, RowBounds rowBounds) { - return mapper.selectEc0300List(paraMap, rowBounds); - } - - @Override - public Map findEc0300() { - return mapper.selectEc0300(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0400ServiceImpl.java b/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0400ServiceImpl.java deleted file mode 100644 index 611aeb59..00000000 --- a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0400ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.ec.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.ec.mapper.Ec0400Mapper; -import kr.xit.fims.biz.ec.service.Ec0400Service; -import lombok.AllArgsConstructor; - -@AllArgsConstructor -@Service -public class Ec0400ServiceImpl implements Ec0400Service { - private final Ec0400Mapper mapper; - - @Override - public List> findEc0400List(Map paraMap, RowBounds rowBounds) { - return mapper.selectEc0400List(paraMap, rowBounds); - } - - @Override - public Map findEc0400() { - return mapper.selectEc0400(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0500ServiceImpl.java b/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0500ServiceImpl.java deleted file mode 100644 index 369976a7..00000000 --- a/src/main/java/kr/xit/fims/biz/ec/service/impl/Ec0500ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.ec.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.ec.mapper.Ec0500Mapper; -import kr.xit.fims.biz.ec.service.Ec0500Service; -import lombok.AllArgsConstructor; - -@AllArgsConstructor -@Service -public class Ec0500ServiceImpl implements Ec0500Service { - private final Ec0500Mapper mapper; - - @Override - public List> findEc0500List(Map paraMap, RowBounds rowBounds) { - return mapper.selectEc0500List(paraMap, rowBounds); - } - - @Override - public Map findEc0500() { - return mapper.selectEc0500(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java b/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java index 3bc2147c..b75884a3 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java @@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import kr.xit.fims.biz.cmm.FimsConst; -import kr.xit.fims.biz.ec.service.Ec0100Service; +import kr.xit.fims.biz.ec.service.IEc0100Service; import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; @@ -24,7 +24,7 @@ import lombok.AllArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/ec") public class Ec0100Controler { - private final Ec0100Service service; + private final IEc0100Service service; @GetMapping(value = "/ec0100Form") public void ec0100Form(){ diff --git a/src/main/java/kr/xit/fims/biz/ec/web/Ec0200Controler.java b/src/main/java/kr/xit/fims/biz/ec/web/Ec0200Controler.java index 6121a967..aeb06255 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/Ec0200Controler.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/Ec0200Controler.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.ec.service.Ec0200Service; +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; @@ -17,7 +17,7 @@ import lombok.AllArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/ec") public class Ec0200Controler { - private final Ec0200Service service; + private final IEc0200Service service; @GetMapping(value = "/ec0200Form") public void ec0200Form(){ diff --git a/src/main/java/kr/xit/fims/biz/ec/web/Ec0300Controler.java b/src/main/java/kr/xit/fims/biz/ec/web/Ec0300Controler.java index ee8b2079..eeaa5477 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/Ec0300Controler.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/Ec0300Controler.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.ec.service.Ec0300Service; +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; @@ -17,7 +17,7 @@ import lombok.AllArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/ec") public class Ec0300Controler { - private final Ec0300Service service; + private final IEc0300Service service; @GetMapping(value = "/ec0300Form") public void ec0300Form(){ diff --git a/src/main/java/kr/xit/fims/biz/ec/web/Ec0400Controler.java b/src/main/java/kr/xit/fims/biz/ec/web/Ec0400Controler.java index b319cdc4..48733fa0 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/Ec0400Controler.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/Ec0400Controler.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.ec.service.Ec0400Service; +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; @@ -17,7 +17,7 @@ import lombok.AllArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/ec") public class Ec0400Controler { - private final Ec0400Service service; + private final IEc0400Service service; @GetMapping(value = "/ec0400Form") public void ec0400Form(){ diff --git a/src/main/java/kr/xit/fims/biz/ec/web/Ec0500Controler.java b/src/main/java/kr/xit/fims/biz/ec/web/Ec0500Controler.java index 6eaf6531..5ad01435 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/Ec0500Controler.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/Ec0500Controler.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.ec.service.Ec0500Service; +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; @@ -17,7 +17,7 @@ import lombok.AllArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/ec") public class Ec0500Controler { - private final Ec0500Service service; + private final IEc0500Service service; @GetMapping(value = "/ec0500Form") public void ec0500Form(){ diff --git a/src/main/java/kr/xit/fims/biz/ens/adm/service/SendRqstMngMapper.java b/src/main/java/kr/xit/fims/biz/ens/adm/mapper/SendRqstMngMapper.java similarity index 92% rename from src/main/java/kr/xit/fims/biz/ens/adm/service/SendRqstMngMapper.java rename to src/main/java/kr/xit/fims/biz/ens/adm/mapper/SendRqstMngMapper.java index 0868d58a..da58daf6 100644 --- a/src/main/java/kr/xit/fims/biz/ens/adm/service/SendRqstMngMapper.java +++ b/src/main/java/kr/xit/fims/biz/ens/adm/mapper/SendRqstMngMapper.java @@ -1,4 +1,4 @@ -package kr.xit.fims.biz.ens.adm.service; +package kr.xit.fims.biz.ens.adm.mapper; import java.sql.SQLException; import java.util.List; diff --git a/src/main/java/kr/xit/fims/biz/ens/adm/service/StatsBySignTalkByYearMapper.java b/src/main/java/kr/xit/fims/biz/ens/adm/mapper/StatsBySignTalkByYearMapper.java similarity index 91% rename from src/main/java/kr/xit/fims/biz/ens/adm/service/StatsBySignTalkByYearMapper.java rename to src/main/java/kr/xit/fims/biz/ens/adm/mapper/StatsBySignTalkByYearMapper.java index 7bd2cd67..d00a1342 100644 --- a/src/main/java/kr/xit/fims/biz/ens/adm/service/StatsBySignTalkByYearMapper.java +++ b/src/main/java/kr/xit/fims/biz/ens/adm/mapper/StatsBySignTalkByYearMapper.java @@ -1,4 +1,4 @@ -package kr.xit.fims.biz.ens.adm.service; +package kr.xit.fims.biz.ens.adm.mapper; import java.util.List; diff --git a/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/SendRqstMngServiceImpl.java b/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/SendRqstMngServiceImpl.java index 6bfb8e0f..4888c682 100644 --- a/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/SendRqstMngServiceImpl.java +++ b/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/SendRqstMngServiceImpl.java @@ -7,7 +7,7 @@ import org.springframework.stereotype.Service; import kr.xit.fims.biz.ens.adm.model.SendRqstMngSearchVO; import kr.xit.fims.biz.ens.adm.model.SendRqstMngVO; -import kr.xit.fims.biz.ens.adm.service.SendRqstMngMapper; +import kr.xit.fims.biz.ens.adm.mapper.SendRqstMngMapper; import kr.xit.fims.biz.ens.adm.service.SendRqstMngService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/StatsBySignTalkByYearServiceImpl.java b/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/StatsBySignTalkByYearServiceImpl.java index 283758b1..5efc888b 100644 --- a/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/StatsBySignTalkByYearServiceImpl.java +++ b/src/main/java/kr/xit/fims/biz/ens/adm/service/impl/StatsBySignTalkByYearServiceImpl.java @@ -9,7 +9,7 @@ import org.springframework.stereotype.Service; import kr.xit.fims.biz.ens.adm.model.StatsBySignTalkByYearSearchVO; import kr.xit.fims.biz.ens.adm.model.StatsBySignTalkByYearVO; -import kr.xit.fims.biz.ens.adm.service.StatsBySignTalkByYearMapper; +import kr.xit.fims.biz.ens.adm.mapper.StatsBySignTalkByYearMapper; import kr.xit.fims.biz.ens.adm.service.StatsBySignTalkByYearService; @Service diff --git a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0100Mapper.java b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0100Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/rt/mapper/Rt0100Mapper.java rename to src/main/java/kr/xit/fims/biz/rt/mapper/IRt0100Mapper.java index f553ea1d..0efbdec1 100644 --- a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0100Mapper.java +++ b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0100Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Rt0100Mapper { +public interface IRt0100Mapper { List> selectRt0100List(Map paraMap, RowBounds rowBounds); Map selectRt0100(); diff --git a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0200Mapper.java b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0200Mapper.java similarity index 95% rename from src/main/java/kr/xit/fims/biz/rt/mapper/Rt0200Mapper.java rename to src/main/java/kr/xit/fims/biz/rt/mapper/IRt0200Mapper.java index 8bb704f3..ed9d22d5 100644 --- a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0200Mapper.java +++ b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0200Mapper.java @@ -10,7 +10,7 @@ import kr.xit.fims.biz.rt.model.Rt0200VO; import org.apache.ibatis.session.RowBounds; @Mapper -public interface Rt0200Mapper { +public interface IRt0200Mapper { // 목록조회 List> selectRt0200List(final Map paraMap); diff --git a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0300Mapper.java b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0300Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/rt/mapper/Rt0300Mapper.java rename to src/main/java/kr/xit/fims/biz/rt/mapper/IRt0300Mapper.java index 2e45d242..8f2ff36c 100644 --- a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0300Mapper.java +++ b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0300Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Rt0300Mapper { +public interface IRt0300Mapper { List> selectRt0300List(Map paraMap, RowBounds rowBounds); Map selectRt0300(); diff --git a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0400Mapper.java b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0400Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/rt/mapper/Rt0400Mapper.java rename to src/main/java/kr/xit/fims/biz/rt/mapper/IRt0400Mapper.java index 74f7110d..08642abd 100644 --- a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0400Mapper.java +++ b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0400Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Rt0400Mapper { +public interface IRt0400Mapper { List> selectRt0400List(Map paraMap, RowBounds rowBounds); Map selectRt0400(); diff --git a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0500Mapper.java b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0500Mapper.java similarity index 90% rename from src/main/java/kr/xit/fims/biz/rt/mapper/Rt0500Mapper.java rename to src/main/java/kr/xit/fims/biz/rt/mapper/IRt0500Mapper.java index 4eea89f5..d34b725f 100644 --- a/src/main/java/kr/xit/fims/biz/rt/mapper/Rt0500Mapper.java +++ b/src/main/java/kr/xit/fims/biz/rt/mapper/IRt0500Mapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface Rt0500Mapper { +public interface IRt0500Mapper { List> selectRt0500List(Map paraMap, RowBounds rowBounds); Map selectRt0500(); diff --git a/src/main/java/kr/xit/fims/biz/rt/service/IRt0100Service.java b/src/main/java/kr/xit/fims/biz/rt/service/IRt0100Service.java new file mode 100644 index 00000000..c54df6cf --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/rt/service/IRt0100Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.rt.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IRt0100Service { + List> findRt0100List(Map paraMap, RowBounds pagingInfo); + Map findRt0100(); +} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/IRt0200Service.java b/src/main/java/kr/xit/fims/biz/rt/service/IRt0200Service.java new file mode 100644 index 00000000..58f15115 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/rt/service/IRt0200Service.java @@ -0,0 +1,17 @@ +package kr.xit.fims.biz.rt.service; + + +import kr.xit.fims.biz.rt.model.Rt0200SearchVO; +import kr.xit.fims.biz.rt.model.Rt0200VO; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IRt0200Service { + public List> findRt0200List(final Map paraMap, final RowBounds rowBounds); + public List> findRt0200List(final Rt0200SearchVO vo, final RowBounds rowBounds); + + Rt0200VO findRt0200(final String regltId); +} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/IRt0300Service.java b/src/main/java/kr/xit/fims/biz/rt/service/IRt0300Service.java new file mode 100644 index 00000000..99c9a505 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/rt/service/IRt0300Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.rt.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IRt0300Service { + List> findRt0300List(Map paraMap, RowBounds pagingInfo); + Map findRt0300(); +} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/IRt0400Service.java b/src/main/java/kr/xit/fims/biz/rt/service/IRt0400Service.java new file mode 100644 index 00000000..9f593676 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/rt/service/IRt0400Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.rt.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IRt0400Service { + List> findRt0400List(Map paraMap, RowBounds pagingInfo); + Map findRt0400(); +} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/IRt0500Service.java b/src/main/java/kr/xit/fims/biz/rt/service/IRt0500Service.java new file mode 100644 index 00000000..236a173b --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/rt/service/IRt0500Service.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.rt.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface IRt0500Service { + List> findRt0500List(Map paraMap, RowBounds pagingInfo); + Map findRt0500(); +} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/Rt0100Service.java b/src/main/java/kr/xit/fims/biz/rt/service/Rt0100Service.java index c7a0123b..c78464f9 100644 --- a/src/main/java/kr/xit/fims/biz/rt/service/Rt0100Service.java +++ b/src/main/java/kr/xit/fims/biz/rt/service/Rt0100Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Rt0100Service { - List> findRt0100List(Map paraMap, RowBounds pagingInfo); - Map findRt0100(); +import kr.xit.fims.biz.rt.mapper.IRt0100Mapper; +import kr.xit.fims.biz.rt.service.IRt0100Service; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Service +public class Rt0100Service implements IRt0100Service { + private final IRt0100Mapper mapper; + + @Override + public List> findRt0100List(Map paraMap, RowBounds rowBounds) { + return mapper.selectRt0100List(paraMap, rowBounds); + } + + @Override + public Map findRt0100() { + return mapper.selectRt0100(); + } } diff --git a/src/main/java/kr/xit/fims/biz/rt/service/Rt0200Service.java b/src/main/java/kr/xit/fims/biz/rt/service/Rt0200Service.java index c6c894c2..6d517b63 100644 --- a/src/main/java/kr/xit/fims/biz/rt/service/Rt0200Service.java +++ b/src/main/java/kr/xit/fims/biz/rt/service/Rt0200Service.java @@ -1,17 +1,51 @@ package kr.xit.fims.biz.rt.service; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; + +import kr.xit.fims.biz.rt.mapper.IRt0200Mapper; import kr.xit.fims.biz.rt.model.Rt0200SearchVO; import kr.xit.fims.biz.rt.model.Rt0200VO; +import kr.xit.fims.biz.rt.service.IRt0200Service; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Service +public class Rt0200Service implements IRt0200Service { + + private final IRt0200Mapper mapper; + + @Override + public List> findRt0200List(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectRt0200List(paraMap, rowBounds); + } + + @Override + public List> findRt0200List(final Rt0200SearchVO vo, final RowBounds rowBounds) { + return mapper.selectRt0200List(vo, rowBounds); + } + + @Override + public Rt0200VO findRt0200(final String regltId) { + return mapper.selectRt0200(regltId); + } + + public void addProc(final Rt0200VO vo) { + + } + + public void modifyProc(final Rt0200VO vo) { + + } + + public void removeProc(final Rt0200VO vo) { + + } -import java.util.List; -import java.util.Map; -import org.apache.ibatis.session.RowBounds; -public interface Rt0200Service { - public List> findRt0200List(final Map paraMap, final RowBounds rowBounds); - public List> findRt0200List(final Rt0200SearchVO vo, final RowBounds rowBounds); - Rt0200VO findRt0200(final String regltId); } diff --git a/src/main/java/kr/xit/fims/biz/rt/service/Rt0300Service.java b/src/main/java/kr/xit/fims/biz/rt/service/Rt0300Service.java index 3e08fb0e..a3cc61e0 100644 --- a/src/main/java/kr/xit/fims/biz/rt/service/Rt0300Service.java +++ b/src/main/java/kr/xit/fims/biz/rt/service/Rt0300Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Rt0300Service { - List> findRt0300List(Map paraMap, RowBounds pagingInfo); - Map findRt0300(); +import kr.xit.fims.biz.rt.mapper.IRt0300Mapper; +import kr.xit.fims.biz.rt.service.IRt0300Service; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Service +public class Rt0300Service implements IRt0300Service { + private final IRt0300Mapper mapper; + + @Override + public List> findRt0300List(Map paraMap, RowBounds rowBounds) { + return mapper.selectRt0300List(paraMap, rowBounds); + } + + @Override + public Map findRt0300() { + return mapper.selectRt0300(); + } } diff --git a/src/main/java/kr/xit/fims/biz/rt/service/Rt0400Service.java b/src/main/java/kr/xit/fims/biz/rt/service/Rt0400Service.java index b02ff834..8da42072 100644 --- a/src/main/java/kr/xit/fims/biz/rt/service/Rt0400Service.java +++ b/src/main/java/kr/xit/fims/biz/rt/service/Rt0400Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Rt0400Service { - List> findRt0400List(Map paraMap, RowBounds pagingInfo); - Map findRt0400(); +import kr.xit.fims.biz.rt.mapper.IRt0400Mapper; +import kr.xit.fims.biz.rt.service.IRt0400Service; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Service +public class Rt0400Service implements IRt0400Service { + private final IRt0400Mapper mapper; + + @Override + public List> findRt0400List(Map paraMap, RowBounds rowBounds) { + return mapper.selectRt0400List(paraMap, rowBounds); + } + + @Override + public Map findRt0400() { + return mapper.selectRt0400(); + } } diff --git a/src/main/java/kr/xit/fims/biz/rt/service/Rt0500Service.java b/src/main/java/kr/xit/fims/biz/rt/service/Rt0500Service.java index 0a978e4a..b685df85 100644 --- a/src/main/java/kr/xit/fims/biz/rt/service/Rt0500Service.java +++ b/src/main/java/kr/xit/fims/biz/rt/service/Rt0500Service.java @@ -4,8 +4,24 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface Rt0500Service { - List> findRt0500List(Map paraMap, RowBounds pagingInfo); - Map findRt0500(); +import kr.xit.fims.biz.rt.mapper.IRt0500Mapper; +import kr.xit.fims.biz.rt.service.IRt0500Service; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Service +public class Rt0500Service implements IRt0500Service { + private final IRt0500Mapper mapper; + + @Override + public List> findRt0500List(Map paraMap, RowBounds rowBounds) { + return mapper.selectRt0500List(paraMap, rowBounds); + } + + @Override + public Map findRt0500() { + return mapper.selectRt0500(); + } } diff --git a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0100ServiceImpl.java b/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0100ServiceImpl.java deleted file mode 100644 index a68a59ec..00000000 --- a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0100ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.rt.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.rt.mapper.Rt0100Mapper; -import kr.xit.fims.biz.rt.service.Rt0100Service; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class Rt0100ServiceImpl implements Rt0100Service { - private final Rt0100Mapper mapper; - - @Override - public List> findRt0100List(Map paraMap, RowBounds rowBounds) { - return mapper.selectRt0100List(paraMap, rowBounds); - } - - @Override - public Map findRt0100() { - return mapper.selectRt0100(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0200ServiceImpl.java b/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0200ServiceImpl.java deleted file mode 100644 index 8fb37e63..00000000 --- a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0200ServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package kr.xit.fims.biz.rt.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.rt.mapper.Rt0200Mapper; -import kr.xit.fims.biz.rt.model.Rt0200SearchVO; -import kr.xit.fims.biz.rt.model.Rt0200VO; -import kr.xit.fims.biz.rt.service.Rt0200Service; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class Rt0200ServiceImpl implements Rt0200Service { - - private final Rt0200Mapper mapper; - - @Override - public List> findRt0200List(final Map paraMap, final RowBounds rowBounds) { - return mapper.selectRt0200List(paraMap, rowBounds); - } - - @Override - public List> findRt0200List(final Rt0200SearchVO vo, final RowBounds rowBounds) { - return mapper.selectRt0200List(vo, rowBounds); - } - - @Override - public Rt0200VO findRt0200(final String regltId) { - return mapper.selectRt0200(regltId); - } - - public void addProc(final Rt0200VO vo) { - - } - - public void modifyProc(final Rt0200VO vo) { - - } - - public void removeProc(final Rt0200VO vo) { - - } - - - - -} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0300ServiceImpl.java b/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0300ServiceImpl.java deleted file mode 100644 index 1c389a9a..00000000 --- a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0300ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.rt.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.rt.mapper.Rt0300Mapper; -import kr.xit.fims.biz.rt.service.Rt0300Service; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class Rt0300ServiceImpl implements Rt0300Service { - private final Rt0300Mapper mapper; - - @Override - public List> findRt0300List(Map paraMap, RowBounds rowBounds) { - return mapper.selectRt0300List(paraMap, rowBounds); - } - - @Override - public Map findRt0300() { - return mapper.selectRt0300(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0400ServiceImpl.java b/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0400ServiceImpl.java deleted file mode 100644 index 7683bb31..00000000 --- a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0400ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.rt.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.rt.mapper.Rt0400Mapper; -import kr.xit.fims.biz.rt.service.Rt0400Service; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class Rt0400ServiceImpl implements Rt0400Service { - private final Rt0400Mapper mapper; - - @Override - public List> findRt0400List(Map paraMap, RowBounds rowBounds) { - return mapper.selectRt0400List(paraMap, rowBounds); - } - - @Override - public Map findRt0400() { - return mapper.selectRt0400(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0500ServiceImpl.java b/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0500ServiceImpl.java deleted file mode 100644 index fcbb4c91..00000000 --- a/src/main/java/kr/xit/fims/biz/rt/service/impl/Rt0500ServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.rt.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.fims.biz.rt.mapper.Rt0500Mapper; -import kr.xit.fims.biz.rt.service.Rt0500Service; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class Rt0500ServiceImpl implements Rt0500Service { - private final Rt0500Mapper mapper; - - @Override - public List> findRt0500List(Map paraMap, RowBounds rowBounds) { - return mapper.selectRt0500List(paraMap, rowBounds); - } - - @Override - public Map findRt0500() { - return mapper.selectRt0500(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/rt/web/Rt0100Controller.java b/src/main/java/kr/xit/fims/biz/rt/web/Rt0100Controller.java index 4440cbb9..0ee1e21d 100644 --- a/src/main/java/kr/xit/fims/biz/rt/web/Rt0100Controller.java +++ b/src/main/java/kr/xit/fims/biz/rt/web/Rt0100Controller.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.rt.service.Rt0100Service; +import kr.xit.fims.biz.rt.service.IRt0100Service; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; import lombok.RequiredArgsConstructor; @@ -17,7 +17,7 @@ import lombok.RequiredArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/rt") public class Rt0100Controller { - private final Rt0100Service service; + private final IRt0100Service service; @GetMapping(value = "/rt0100Form") public void rt0100Form(){ diff --git a/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java b/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java index b43a6dc4..8e01363b 100644 --- a/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java +++ b/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.rt.service.Rt0200Service; +import kr.xit.fims.biz.rt.service.IRt0200Service; import kr.xit.framework.biz.cache.util.CacheServiceUtils; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; @@ -34,7 +34,7 @@ import lombok.extern.slf4j.Slf4j; @RequestMapping("/fims/biz/rt") public class Rt0200Controller { - private final Rt0200Service service; + private final IRt0200Service service; /** *
메소드 설명: 메인 페이지
diff --git a/src/main/java/kr/xit/fims/biz/rt/web/Rt0300Controler.java b/src/main/java/kr/xit/fims/biz/rt/web/Rt0300Controler.java index a9b51d7e..6d417651 100644 --- a/src/main/java/kr/xit/fims/biz/rt/web/Rt0300Controler.java +++ b/src/main/java/kr/xit/fims/biz/rt/web/Rt0300Controler.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.rt.service.Rt0300Service; +import kr.xit.fims.biz.rt.service.IRt0300Service; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; import lombok.RequiredArgsConstructor; @@ -17,7 +17,7 @@ import lombok.RequiredArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/rt") public class Rt0300Controler { - private final Rt0300Service service; + private final IRt0300Service service; @GetMapping(value = "/rt0300Form") public void rt0300Form(){ diff --git a/src/main/java/kr/xit/fims/biz/rt/web/Rt0400Controler.java b/src/main/java/kr/xit/fims/biz/rt/web/Rt0400Controler.java index ae323acf..ef0b353e 100644 --- a/src/main/java/kr/xit/fims/biz/rt/web/Rt0400Controler.java +++ b/src/main/java/kr/xit/fims/biz/rt/web/Rt0400Controler.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.rt.service.Rt0400Service; +import kr.xit.fims.biz.rt.service.IRt0400Service; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; import lombok.RequiredArgsConstructor; @@ -17,7 +17,7 @@ import lombok.RequiredArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/rt") public class Rt0400Controler { - private final Rt0400Service service; + private final IRt0400Service service; @GetMapping(value = "/rt0400Form") public void rt0400Form(){ diff --git a/src/main/java/kr/xit/fims/biz/rt/web/Rt0500Controler.java b/src/main/java/kr/xit/fims/biz/rt/web/Rt0500Controler.java index e7d8308a..18be4cfc 100644 --- a/src/main/java/kr/xit/fims/biz/rt/web/Rt0500Controler.java +++ b/src/main/java/kr/xit/fims/biz/rt/web/Rt0500Controler.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.fims.biz.rt.service.Rt0500Service; +import kr.xit.fims.biz.rt.service.IRt0500Service; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; import lombok.RequiredArgsConstructor; @@ -17,7 +17,7 @@ import lombok.RequiredArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/rt") public class Rt0500Controler { - private final Rt0500Service service; + private final IRt0500Service service; @GetMapping(value = "/rt0500Form") public void rt0500Form(){ diff --git a/src/main/java/kr/xit/fims/biz/sample/mapper/SampleMapper.java b/src/main/java/kr/xit/fims/biz/sample/mapper/ISampleMapper.java similarity index 91% rename from src/main/java/kr/xit/fims/biz/sample/mapper/SampleMapper.java rename to src/main/java/kr/xit/fims/biz/sample/mapper/ISampleMapper.java index 537a0b17..d2fa82e6 100644 --- a/src/main/java/kr/xit/fims/biz/sample/mapper/SampleMapper.java +++ b/src/main/java/kr/xit/fims/biz/sample/mapper/ISampleMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface SampleMapper { +public interface ISampleMapper { List> selectSampleList(Map paraMap, RowBounds rowBounds); Map selectSample(); diff --git a/src/main/java/kr/xit/fims/biz/sample/service/ISampleService.java b/src/main/java/kr/xit/fims/biz/sample/service/ISampleService.java new file mode 100644 index 00000000..50ea470d --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/sample/service/ISampleService.java @@ -0,0 +1,11 @@ +package kr.xit.fims.biz.sample.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +public interface ISampleService { + List> findSampleList(Map paraMap, RowBounds pagingInfo); + Map findSample(); +} diff --git a/src/main/java/kr/xit/fims/biz/sample/service/SampleService.java b/src/main/java/kr/xit/fims/biz/sample/service/SampleService.java index 4f1dcd3c..533cd5c8 100644 --- a/src/main/java/kr/xit/fims/biz/sample/service/SampleService.java +++ b/src/main/java/kr/xit/fims/biz/sample/service/SampleService.java @@ -4,8 +4,25 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; -public interface SampleService { - List> findSampleList(Map paraMap, RowBounds pagingInfo); - Map findSample(); +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; + +@AllArgsConstructor +@Service +public class SampleService implements ISampleService { + private final ISampleMapper mapper; + + @Override + public List> findSampleList(Map paraMap, RowBounds rowBounds) { + return mapper.selectSampleList(paraMap, rowBounds); + } + + @Override + public Map findSample() { + return mapper.selectSample(); + } } diff --git a/src/main/java/kr/xit/fims/biz/sample/service/impl/SampleServiceImpl.java b/src/main/java/kr/xit/fims/biz/sample/service/impl/SampleServiceImpl.java deleted file mode 100644 index f9d51a07..00000000 --- a/src/main/java/kr/xit/fims/biz/sample/service/impl/SampleServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.fims.biz.sample.service.impl; - -import java.util.List; -import java.util.Map; - -import kr.xit.fims.biz.sample.mapper.SampleMapper; -import kr.xit.fims.biz.sample.service.SampleService; -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import lombok.AllArgsConstructor; - -@AllArgsConstructor -@Service -public class SampleServiceImpl implements SampleService { - private final SampleMapper mapper; - - @Override - public List> findSampleList(Map paraMap, RowBounds rowBounds) { - return mapper.selectSampleList(paraMap, rowBounds); - } - - @Override - public Map findSample() { - return mapper.selectSample(); - } -} diff --git a/src/main/java/kr/xit/fims/biz/sample/web/SampleController.java b/src/main/java/kr/xit/fims/biz/sample/web/SampleController.java index e22a22d9..fa3c0638 100644 --- a/src/main/java/kr/xit/fims/biz/sample/web/SampleController.java +++ b/src/main/java/kr/xit/fims/biz/sample/web/SampleController.java @@ -2,7 +2,7 @@ package kr.xit.fims.biz.sample.web; import java.util.Map; -import kr.xit.fims.biz.sample.service.SampleService; +import kr.xit.fims.biz.sample.service.ISampleService; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -17,7 +17,7 @@ import lombok.AllArgsConstructor; @Controller @RequestMapping(value = "/fims/biz/sample") public class SampleController { - private final SampleService sampleService; + private final ISampleService sampleService; @GetMapping(value = "/sampleForm") public void sampleForm(){ diff --git a/src/main/java/kr/xit/framework/biz/cache/mapper/CacheBbsMapper.java b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheBbsMapper.java similarity index 81% rename from src/main/java/kr/xit/framework/biz/cache/mapper/CacheBbsMapper.java rename to src/main/java/kr/xit/framework/biz/cache/mapper/ICacheBbsMapper.java index bab69e06..4b4add5f 100644 --- a/src/main/java/kr/xit/framework/biz/cache/mapper/CacheBbsMapper.java +++ b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheBbsMapper.java @@ -6,11 +6,10 @@ import java.util.Map; import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; -import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngSearchVO; import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO; @Mapper -public interface CacheBbsMapper { +public interface ICacheBbsMapper { List> selectLatestBbsList(final Map paraMap, final RowBounds rowBounds); List selectBaseBbsList(final Map paraMap); } diff --git a/src/main/java/kr/xit/framework/biz/cache/mapper/CacheCodeMapper.java b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheCodeMapper.java similarity index 89% rename from src/main/java/kr/xit/framework/biz/cache/mapper/CacheCodeMapper.java rename to src/main/java/kr/xit/framework/biz/cache/mapper/ICacheCodeMapper.java index 2b4470ec..cb43e7ad 100644 --- a/src/main/java/kr/xit/framework/biz/cache/mapper/CacheCodeMapper.java +++ b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheCodeMapper.java @@ -6,7 +6,7 @@ import java.util.Map; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface CacheCodeMapper { +public interface ICacheCodeMapper { List> selectCodes(final String codeId); List> selectComboCodes(final Map map); } diff --git a/src/main/java/kr/xit/framework/biz/cache/mapper/CacheMenuMapper.java b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheMenuMapper.java similarity index 79% rename from src/main/java/kr/xit/framework/biz/cache/mapper/CacheMenuMapper.java rename to src/main/java/kr/xit/framework/biz/cache/mapper/ICacheMenuMapper.java index 90fdbf57..fe7edd47 100644 --- a/src/main/java/kr/xit/framework/biz/cache/mapper/CacheMenuMapper.java +++ b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheMenuMapper.java @@ -3,12 +3,10 @@ package kr.xit.framework.biz.cache.mapper; import java.util.List; import java.util.Map; -import org.apache.ibatis.session.RowBounds; - import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper -public interface CacheMenuMapper { +public interface ICacheMenuMapper { List> selectMenuListByUser(final String uniqId); List> selectMenuListByAuthorCode(final String authorCode); diff --git a/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java b/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java index 61442287..44c77fb4 100644 --- a/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java +++ b/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java @@ -1,65 +1,135 @@ package kr.xit.framework.biz.cache.service; +import java.util.HashMap; import java.util.List; import java.util.Map; -import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngSearchVO; +import javax.annotation.Resource; + +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 kr.xit.framework.biz.cache.mapper.ICacheBbsMapper; +import kr.xit.framework.biz.cache.service.ICacheService; +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; + +@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; + + @Value("#{prop['Globals.Xit.Bbs.parntsSntncNo']}") + private String parntsSntncNo; + + @Value("#{prop['Globals.Xit.Bbs.useAt']}") + private String useAt; + + + // --------------------------------------------------------------------------------------------------------- + // Common code + // --------------------------------------------------------------------------------------------------------- + @Cacheable(cacheNames="codeCache", key = "#codeId") + @Override + public List> findCodes(final String codeId) { + return codeMapper.selectCodes(codeId); + } + + @Cacheable(cacheNames="codeComboCache", key = "#codeId + #type") + @Override + public List> findComboCodes(final String codeId, final String type) { + Map map = new HashMap<>(); + map.put("codeId", codeId); + map.put("type", type); + return codeMapper.selectComboCodes(map); + } + + @Override + @CacheEvict(cacheNames="codeCache", allEntries = true) + public void evictAllCodeCache() { + } + + @Override + @CacheEvict(cacheNames="codeCache", key = "#codeId") + public void evictCodeCache(final String codeId) { + } + // --------------------------------------------------------------------------------------------------------- + + + // --------------------------------------------------------------------------------------------------------- + // Menu + // --------------------------------------------------------------------------------------------------------- + @Cacheable(cacheNames="menuCache", key = "#uniqId") + @Override + public List> findMenuListByUser(final String uniqId) { + return menuMapper.selectMenuListByUser(uniqId); + } + + @Cacheable(cacheNames="menuCache", key = "#authorCode") + @Override + public List> findMenuListByAuthorCode(final String authorCode) { + return menuMapper.selectMenuListByAuthorCode(authorCode); + } + + @Override + @CacheEvict(cacheNames="menuCache", allEntries = true) + public void evictAllMenuCache() { + } + + @Override + @CacheEvict(cacheNames="menuCache", key = "#key") + public void evictMenuCache(final String key) { + } + // --------------------------------------------------------------------------------------------------------- + + + + // --------------------------------------------------------------------------------------------------------- + // BBS + // --------------------------------------------------------------------------------------------------------- + @Override + @Cacheable(cacheNames="latestBbsCache") + public List> findLatestBbsList() { + Map paraMap = new HashMap<>(); + paraMap.put("bbsId", this.notiBbsId); + paraMap.put("parntsSntncNo", this.parntsSntncNo); + paraMap.put("useAt", this.useAt); + paraMap.put("page", 1); + paraMap.put("perPage", 10); + return bbsMapper.selectLatestBbsList(paraMap, MybatisUtils.getPagingInfo(paraMap)); + } + + @Override + @Cacheable(cacheNames="baseBbsCache", key = "#paraMap") + public List findBaseBbsList(final Map paraMap) { + return bbsMapper.selectBaseBbsList(paraMap); + } + + @Override + @CacheEvict(cacheNames="latestBbsCache", allEntries = true) + public void evictLatestBbsList() { + } + + @Override + @CacheEvict(cacheNames="baseBbsCache", allEntries = true) + public void evictBaseBbsList(){ + } + + // --------------------------------------------------------------------------------------------------------------- + + + + -public interface CacheService { - - /** - * 코드 그룹 아이디로 모든 코드 목록을 Map 타입으로 조회한다. - * @param codeId - * @return List - */ - List> findCodes(final String codeId); - - /** - * 코드 그룹 아이디로 모든 코드 목록을 Map 타입으로 조회한다. - * @param codeId - * @return List - */ - List> findComboCodes(final String codeId, final String type); - - /** - * 코드 캐시 Evict - */ - void evictAllCodeCache(); - - /** - * 코드 캐시 Evict - */ - void evictCodeCache(final String codeId); - - - - /** - * 사용자별 메뉴 조회 - * @param uniqId - * @return List - */ - List> findMenuListByUser(final String uniqId); - /** - * 궘한별 메뉴 조회 - * @param authorCode - * @return List - */ - List> findMenuListByAuthorCode(final String authorCode); - /** - * 메뉴 캐시 Evict - */ - void evictAllMenuCache(); - - /** - * 메뉴 캐시 Evict - */ - void evictMenuCache(final String userId); - - - - List> findLatestBbsList(); - List findBaseBbsList(final Map paraMap); - void evictLatestBbsList(); - void evictBaseBbsList(); } diff --git a/src/main/java/kr/xit/framework/biz/cache/service/ICacheService.java b/src/main/java/kr/xit/framework/biz/cache/service/ICacheService.java new file mode 100644 index 00000000..7eaf23f3 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cache/service/ICacheService.java @@ -0,0 +1,64 @@ +package kr.xit.framework.biz.cache.service; + +import java.util.List; +import java.util.Map; + +import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO; + +public interface ICacheService { + + /** + * 코드 그룹 아이디로 모든 코드 목록을 Map 타입으로 조회한다. + * @param codeId + * @return List + */ + List> findCodes(final String codeId); + + /** + * 코드 그룹 아이디로 모든 코드 목록을 Map 타입으로 조회한다. + * @param codeId + * @return List + */ + List> findComboCodes(final String codeId, final String type); + + /** + * 코드 캐시 Evict + */ + void evictAllCodeCache(); + + /** + * 코드 캐시 Evict + */ + void evictCodeCache(final String codeId); + + + + /** + * 사용자별 메뉴 조회 + * @param uniqId + * @return List + */ + List> findMenuListByUser(final String uniqId); + /** + * 궘한별 메뉴 조회 + * @param authorCode + * @return List + */ + List> findMenuListByAuthorCode(final String authorCode); + /** + * 메뉴 캐시 Evict + */ + void evictAllMenuCache(); + + /** + * 메뉴 캐시 Evict + */ + void evictMenuCache(final String userId); + + + + List> findLatestBbsList(); + List findBaseBbsList(final Map paraMap); + void evictLatestBbsList(); + void evictBaseBbsList(); +} diff --git a/src/main/java/kr/xit/framework/biz/cache/service/impl/CacheServiceImpl.java b/src/main/java/kr/xit/framework/biz/cache/service/impl/CacheServiceImpl.java deleted file mode 100644 index 76663e77..00000000 --- a/src/main/java/kr/xit/framework/biz/cache/service/impl/CacheServiceImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -package kr.xit.framework.biz.cache.service.impl; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.context.ApplicationContext; -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.cache.mapper.CacheBbsMapper; -import kr.xit.framework.biz.cache.service.CacheService; -import kr.xit.framework.biz.cache.mapper.CacheCodeMapper; -import kr.xit.framework.biz.cache.mapper.CacheMenuMapper; -import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngSearchVO; -import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO; -import kr.xit.framework.support.mybatis.MybatisUtils; -import kr.xit.framework.support.util.JBeanRegistry; -import lombok.AllArgsConstructor; - -@Service -public class CacheServiceImpl implements CacheService { - @Resource - private CacheCodeMapper codeMapper; - @Resource - private CacheMenuMapper menuMapper; - @Resource - private CacheBbsMapper bbsMapper; - - @Value("#{prop['Globals.Xit.RollingNotiBbsId']}") - private String notiBbsId; - - @Value("#{prop['Globals.Xit.Bbs.parntsSntncNo']}") - private String parntsSntncNo; - - @Value("#{prop['Globals.Xit.Bbs.useAt']}") - private String useAt; - - - // --------------------------------------------------------------------------------------------------------- - // Common code - // --------------------------------------------------------------------------------------------------------- - @Cacheable(cacheNames="codeCache", key = "#codeId") - @Override - public List> findCodes(final String codeId) { - return codeMapper.selectCodes(codeId); - } - - @Cacheable(cacheNames="codeComboCache", key = "#codeId + #type") - @Override - public List> findComboCodes(final String codeId, final String type) { - Map map = new HashMap<>(); - map.put("codeId", codeId); - map.put("type", type); - return codeMapper.selectComboCodes(map); - } - - @Override - @CacheEvict(cacheNames="codeCache", allEntries = true) - public void evictAllCodeCache() { - } - - @Override - @CacheEvict(cacheNames="codeCache", key = "#codeId") - public void evictCodeCache(final String codeId) { - } - // --------------------------------------------------------------------------------------------------------- - - - // --------------------------------------------------------------------------------------------------------- - // Menu - // --------------------------------------------------------------------------------------------------------- - @Cacheable(cacheNames="menuCache", key = "#uniqId") - @Override - public List> findMenuListByUser(final String uniqId) { - return menuMapper.selectMenuListByUser(uniqId); - } - - @Cacheable(cacheNames="menuCache", key = "#authorCode") - @Override - public List> findMenuListByAuthorCode(final String authorCode) { - return menuMapper.selectMenuListByAuthorCode(authorCode); - } - - @Override - @CacheEvict(cacheNames="menuCache", allEntries = true) - public void evictAllMenuCache() { - } - - @Override - @CacheEvict(cacheNames="menuCache", key = "#key") - public void evictMenuCache(final String key) { - } - // --------------------------------------------------------------------------------------------------------- - - - - // --------------------------------------------------------------------------------------------------------- - // BBS - // --------------------------------------------------------------------------------------------------------- - @Override - @Cacheable(cacheNames="latestBbsCache") - public List> findLatestBbsList() { - Map paraMap = new HashMap<>(); - paraMap.put("bbsId", this.notiBbsId); - paraMap.put("parntsSntncNo", this.parntsSntncNo); - paraMap.put("useAt", this.useAt); - paraMap.put("page", 1); - paraMap.put("perPage", 10); - return bbsMapper.selectLatestBbsList(paraMap, MybatisUtils.getPagingInfo(paraMap)); - } - - @Override - @Cacheable(cacheNames="baseBbsCache", key = "#paraMap") - public List findBaseBbsList(final Map paraMap) { - return bbsMapper.selectBaseBbsList(paraMap); - } - - @Override - @CacheEvict(cacheNames="latestBbsCache", allEntries = true) - public void evictLatestBbsList() { - } - - @Override - @CacheEvict(cacheNames="baseBbsCache", allEntries = true) - public void evictBaseBbsList(){ - } - - // --------------------------------------------------------------------------------------------------------------- - - - - - -} diff --git a/src/main/java/kr/xit/framework/biz/cmm/model/XitMenuCreatDtlsVO.java b/src/main/java/kr/xit/framework/biz/cmm/model/XitMenuCreatDtlsVO.java index 4b4d3fa6..37995c5b 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/model/XitMenuCreatDtlsVO.java +++ b/src/main/java/kr/xit/framework/biz/cmm/model/XitMenuCreatDtlsVO.java @@ -1,7 +1,12 @@ package kr.xit.framework.biz.cmm.model; -import kr.xit.framework.core.model.BaseVO; -import lombok.Data; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; /** * @@ -13,18 +18,23 @@ import lombok.Data; * @since 2002. 2. 2. * @version 1.0 Copyright(c) XIT All rights reserved. */ -@Data -public class XitMenuCreatDtlsVO extends BaseVO { +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode +@ToString +@Builder +public class XitMenuCreatDtlsVO { /** * serialVersionUID */ private static final long serialVersionUID = 568460849738293096L; - - protected String menuNo; //메뉴 번호 - protected String authorCode; //권한 코드 - protected String mapngCreatId; //매핑 생성 id + private String menuNo; //메뉴 번호 + private String authorCode; //권한 코드 + private String mapngCreatId; //매핑 생성 id diff --git a/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameAnonymousController.java b/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameAnonymousController.java index 16113f47..f8e61d91 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameAnonymousController.java +++ b/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameAnonymousController.java @@ -31,7 +31,7 @@ import kr.xit.framework.biz.mng.user.model.XitUserRegMngSearchVO; import kr.xit.framework.biz.mng.user.model.XitUserRegMngVO; import kr.xit.framework.biz.mng.user.service.XitEntUserRegMngService; import kr.xit.framework.biz.mng.user.service.XitGnrUserRegMngService; -import kr.xit.framework.biz.mng.user.service.UserMgtService; +import kr.xit.framework.biz.mng.user.service.IUserMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE; import kr.xit.framework.core.constants.FrameworkConstants.USER_SE; @@ -62,7 +62,7 @@ public class XitFrameAnonymousController { @Resource private XitEntUserRegMngService xitEntUserRegMngService; @Resource - private UserMgtService xitUserRegMngService; + private IUserMgtService xitUserRegMngService; @Resource private XitFrameUnitService xitFrameUnitService; @Autowired diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthAuthorMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthAuthorMgtMapper.java similarity index 98% rename from src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthAuthorMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthAuthorMgtMapper.java index 5a597193..dd183432 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthAuthorMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthAuthorMgtMapper.java @@ -21,7 +21,7 @@ import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Mapper -public interface AuthAuthorMgtMapper { +public interface IAuthAuthorMgtMapper { /** diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthByUserMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthByUserMgtMapper.java similarity index 94% rename from src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthByUserMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthByUserMgtMapper.java index 79386d9e..912b9763 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthByUserMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthByUserMgtMapper.java @@ -19,7 +19,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Mapper -public interface AuthByUserMgtMapper { +public interface IAuthByUserMgtMapper { List selectAuthUsers(final Map paraMap, final RowBounds rowBounds); XitAuthUsrMngVO selectAuthUser(final T t); } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthGrpMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthGrpMgtMapper.java similarity index 96% rename from src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthGrpMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthGrpMgtMapper.java index b0e6b3d8..6a89e968 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthGrpMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthGrpMgtMapper.java @@ -19,7 +19,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Mapper -public interface AuthGrpMgtMapper { +public interface IAuthGrpMgtMapper { List selectAuthorGroupInfos(final Map paraMap, final RowBounds rowBounds); XitAuthorGroupInfoVO selectAuthorGroupInfo(final String groupId); diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthHierarchyMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthHierarchyMgtMapper.java similarity index 82% rename from src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthHierarchyMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthHierarchyMgtMapper.java index 13d28ad4..34085537 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthHierarchyMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthHierarchyMgtMapper.java @@ -1,13 +1,11 @@ package kr.xit.framework.biz.mng.auth.mapper; -import java.sql.SQLException; import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; -import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngSearchVO; import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO; /** @@ -21,7 +19,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Mapper -public interface AuthHierarchyMgtMapper { +public interface IAuthHierarchyMgtMapper { List selectAuthHierarchies(final Map paraMap, final RowBounds rowBounds); } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthRoleMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthRoleMgtMapper.java similarity index 96% rename from src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthRoleMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthRoleMgtMapper.java index 2f18a75b..aa8e9d4c 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthRoleMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/IAuthRoleMgtMapper.java @@ -19,7 +19,7 @@ import kr.xit.framework.biz.mng.auth.model.XitRoleInfoVO; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Mapper -public interface AuthRoleMgtMapper { +public interface IAuthRoleMgtMapper { /** diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthAuthorMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthAuthorMgtService.java index 8bfe38a5..b57b2904 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthAuthorMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthAuthorMgtService.java @@ -2,41 +2,111 @@ package kr.xit.framework.biz.mng.auth.service; import java.util.List; import java.util.Map; +import java.util.Objects; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO; import kr.xit.framework.biz.mng.auth.model.XitRoleInfoVO; +import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO; +import kr.xit.framework.biz.mng.auth.mapper.IAuthAuthorMgtMapper; +import kr.xit.framework.biz.mng.auth.service.IAuthAuthorMgtService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; -/** - * - * @업무그룹명: 권한관리 Service - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface AuthAuthorMgtService { - - - /** - *
메소드 설명: 권한관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - List findAuthAuthors(final Map paraMap, final RowBounds rowBounds); - List findAuthAuthors(final Map paraMap); - - XitAuthorInfoVO findAuthAuthor(final String authorCode); - void addAuthAuthor(final XitAuthorInfoVO vo); - void modifyAuthAuthor(final XitAuthorInfoVO vo); - void removeAuthAuthor(final String authorCode); - - - List findAuthRoleGrantList(final Map paraMap); - void saveAuthRoleGrantList(final Map paraMap); +@RequiredArgsConstructor +@Slf4j +@Service +public class AuthAuthorMgtService implements IAuthAuthorMgtService { + private final IAuthAuthorMgtMapper mapper; + + /** 부모 권한코드 */ + private static final String PARNTS_AUTHOR = "ROLE_USER"; + /** 자녀 권한코드 */ + private static final String CHLDRN_AUTHOR = "ROLE_ADMIN"; + + + @Override + public List findAuthAuthors(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectAuthorInfos(paraMap, rowBounds); + } + + @Override + public List findAuthAuthors(final Map paraMap) { + return mapper.selectAuthorInfos(paraMap); + } + + @Override + public XitAuthorInfoVO findAuthAuthor(final String authorCode) { + return mapper.selectAuthorInfo(authorCode); + } + + /* ===================================================== + * 2020.05.21 박민규 + * 신규권한 등록프로세스 주석 및 수정 + * -사유: egovFrame의 권한계층은 부모~자녀 순으로 "익명사용자->사용자->관리자"로 기본제공 되며 + * 부모권한에 부여된 ROLE을 자녀가 상속받는 개념이다. + * 다만 기본제공되는 권한계층을 사용 시 카페의 "관리자>매니저>정회원>준회원>비회원"과 같은 권한계층 관리에 적합하기에 + * 업체별(또는 부서별)로 권한그룹을 별도 관리 해야하는 경우에 적합하지 않다. + * -작업내용: 기본제공되는 "익명사용자->사용자->관리자" 관리구조에서 사용자와 관리자 그룹 사이에 신규권한그룹을 삽입하여 + * "익명사용자->사용자->신규권한1/신규권한2/...->관리자"로 권한계층을 구성하여 + * n개의 신규그룹은 "사용자"에게서 기본적인 ROLE을 상속받고 + * n개의 신규그룹의 ROLE을 "관리자"가 상속받도록 한다. + * AS-IS: "익명사용자->사용자->관리자"의 권한계층에 삽입되지 않아 상위권한(PARENT)의 ROLE을 승계받지 못 함. + * TO-BE: "익명사용자->사용자->신규권한1/신규권한2/...->관리자"순의 상하관계를 가지게 되므로 신규권한그룹도 상위권한(PARENT)의 ROLE을 승계 받음. + ===================================================== */ + + @Override + public void addAuthAuthor(final XitAuthorInfoVO vo){ + //권한정보 Insert + mapper.insertAuthorInfo(vo); + + //계층구조생성 + XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO(); + //부모관계 생성 + roleSclsrtRescueVO.setParntsRole(PARNTS_AUTHOR); + roleSclsrtRescueVO.setChldrnRole(vo.getAuthorCode()); + mapper.insertRoleSclsrtRescue(roleSclsrtRescueVO); + //자녀관계 생성 + roleSclsrtRescueVO.setParntsRole(vo.getAuthorCode()); + roleSclsrtRescueVO.setChldrnRole(CHLDRN_AUTHOR); + mapper.insertRoleSclsrtRescue(roleSclsrtRescueVO); + } + + @Override + public void modifyAuthAuthor(final XitAuthorInfoVO vo){ + mapper.updateAuthorInfo(vo); + } + public void removeAuthAuthor(final String authorCode){ + //계층구조 삭제 + XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO(); + roleSclsrtRescueVO.setParntsRole(PARNTS_AUTHOR); + roleSclsrtRescueVO.setChldrnRole(authorCode); + mapper.deleteRoleSclsrtRescue(roleSclsrtRescueVO); + //자녀관계 제거 + roleSclsrtRescueVO.setParntsRole(authorCode); + roleSclsrtRescueVO.setChldrnRole(CHLDRN_AUTHOR); + mapper.deleteRoleSclsrtRescue(roleSclsrtRescueVO); + + mapper.deleteAuthorInfo(authorCode); + } + + @Override + public List findAuthRoleGrantList(final Map paraMap) { + return mapper.selectAuthRoleGrantList(paraMap); + } + + @Override + public void saveAuthRoleGrantList(final Map paraMap) { + List> mapList = (List>)paraMap.get("grantData"); + + mapList.forEach(map -> { + map.put("authorCode", paraMap.get("authorCode")); + if(Objects.equals(map.get("regYn"), "N")) + mapper.deleteRoleGrant(map); + else + mapper.saveRoleGrant(map); + }); + } } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthByUserMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthByUserMgtService.java index 97524e8c..63056263 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthByUserMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthByUserMgtService.java @@ -2,24 +2,66 @@ package kr.xit.framework.biz.mng.auth.service; import java.util.List; import java.util.Map; +import java.util.Objects; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; +import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; +import kr.xit.framework.biz.mng.auth.mapper.IAuthByUserMgtMapper; import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO; +import kr.xit.framework.biz.mng.user.mapper.IUserMgtMapper; +import kr.xit.framework.biz.mng.user.service.IUserMgtService; +import kr.xit.framework.core.utils.XitCmmnUtil; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Service +public class AuthByUserMgtService implements IAuthByUserMgtService { + + private final IAuthByUserMgtMapper mapper; + + private final IUserMgtMapper userMapper; + + private final IAuthGrpMgtService authGrpMgtService; + private final IUserMgtService userMgtService; + + @Override + public List findAuthUsers(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectAuthUsers(paraMap, rowBounds); + } + + @Override + public void saveAuthUserList(List> paraList) { + String sessionUniqId = XitCmmnUtil.getUserInfo().getUniqId(); + paraList.forEach(map -> { + //유효성확인 + authGrpMgtService.isCheckUserForCanChange(sessionUniqId, String.valueOf(map.get("authorCode"))); + + XitUserScrtySetupVO vo = new XitUserScrtySetupVO(); + vo.setScrtySetupTrgetId(String.valueOf(map.get("uniqId"))); + vo.setMberTyCode(String.valueOf(map.get("mberTyCode"))); + vo.setAuthorCode(String.valueOf(map.get("authorCode"))); + + if(Objects.equals("N", map.get("regYn"))){ + userMapper.insertUserScrtySetup(vo); + }else{ + userMapper.updateUserScrtySetup(vo); + } + }); + } + + @Override + public void removeAuthUserList(List> paraList) { + + //삭제 시 사용자의 권한을 소속 그룹의 권한 또는 Defualt 권한으로 설정 + paraList.forEach(map -> { + XitUserScrtySetupVO vo = new XitUserScrtySetupVO(); + vo.setScrtySetupTrgetId(String.valueOf(map.get("uniqId"))); + vo.setMberTyCode(String.valueOf(map.get("mberTyCode"))); + vo.setAuthorCode(userMgtService.getDefaultAuthorCode(String.valueOf(map.get("groupId")))); + userMapper.updateUserScrtySetup(vo); + }); + } -/** - * - * @업무그룹명: 사용자별권한관리 Service - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface AuthByUserMgtService { - - List findAuthUsers(final Map paraMap, final RowBounds rowBounds); - void saveAuthUserList(final List> paraList); - void removeAuthUserList(final List> paraList); } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthGrpMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthGrpMgtService.java index 346d17b8..53edf9e3 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthGrpMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthGrpMgtService.java @@ -4,26 +4,145 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; +import egovframework.rte.fdl.cmmn.exception.FdlException; +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import kr.xit.framework.biz.mng.auth.mapper.IAuthAuthorMgtMapper; +import kr.xit.framework.biz.mng.auth.mapper.IAuthGrpMgtMapper; import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO; +import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO; +import kr.xit.framework.biz.mng.user.mapper.IUserMgtMapper; +import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; +import kr.xit.framework.core.utils.XitCmmnUtil; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; -/** - * - * @업무그룹명: 사용자그룹관리 Service - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface AuthGrpMgtService { - - List findAuthGrps(final Map paraMap, final RowBounds rowBounds); - XitAuthorGroupInfoVO findAuthGrp(final String groupId); - void addAuthGrp(final XitAuthorGroupInfoVO vo); - void modifyAuthGrp(final XitAuthorGroupInfoVO vo); - void removeAuthGrp(final String authorCode); - - void isCheckUserForCanChange(final String uniqId, final String trgetAuthorCode); +@RequiredArgsConstructor +@Slf4j +@Service +public class AuthGrpMgtService implements IAuthGrpMgtService { + + private final IAuthGrpMgtMapper mapper; + private final IAuthAuthorMgtMapper authAuthorMgtMapper; + private final IUserMgtMapper userMgtMapper; + + @Qualifier("groupIdGnrService") + private final EgovIdGnrService groupIdGnrService; + + @Override + public List findAuthGrps(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectAuthorGroupInfos(paraMap, rowBounds); + } + + @Override + public XitAuthorGroupInfoVO findAuthGrp(final String groupId) { + return mapper.selectAuthorGroupInfo(groupId); + } + + @Override + public void addAuthGrp(final XitAuthorGroupInfoVO vo) { + // 유효성 확인 + this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode()); + + try { + vo.setGroupId(groupIdGnrService.getNextStringId()); + } catch (FdlException e) { + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); + } + mapper.insertAuthorGroupInfo(vo); + } + + @Override + public void modifyAuthGrp(final XitAuthorGroupInfoVO vo) { + // 유효성 확인 + this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode()); + + mapper.updateAuthorGroupInfo(vo); + } + + @Override + public void removeAuthGrp(final String groupId) { + mapper.deleteAuthorGroupInfo(groupId); + } + + public void isCheckUserForCanChange(final String uniqId, final String trgetAuthorCode) { + //사용자보안설정 조회 + XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); + userScrtySetupVO.setScrtySetupTrgetId(uniqId); + List listUserScrtySetupVO = userMgtMapper.selectUserScrtySetups(userScrtySetupVO); + String userAuthorCode = XitCmmnUtil.isEmpty(listUserScrtySetupVO)?null:listUserScrtySetupVO.get(0).getAuthorCode(); + + if(!this.isCheckUserAuthorCodeForCanChange(userAuthorCode, trgetAuthorCode)) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "자신의 권한보다 상위 권한을 설정 할 수 없습니다.");; + } + + + private boolean isCheckUserAuthorCodeForCanChange(final String userAuthorCode, final String trgetAuthorCode) { + //역할(권한)계층구조 데이터 목록 조회 + List listRoleSclsrtRescueVO = authAuthorMgtMapper.selectRoleSclsrtRescues(null); + //역할(권한)계층구조를 사용하지 않고 있는 경우 true 반환 + if(XitCmmnUtil.isEmpty(listRoleSclsrtRescueVO)) { + log.debug("Do not use a RoleSclsrtRescue Data !!"); + return true; + }else { + //사용자의 권한 정보가 없을 때(비정상적인 루트로 등록한 사용자 계정으로 판단) + if(XitCmmnUtil.isEmpty(userAuthorCode)) { + log.debug("This user is have not UserScrtySetup Data !!"); + return false; + } + } + boolean isExists = false; + //사용자 권한과 매칭되는 역할(권한)계층정보 유무 확인 + for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) { + if(item.getParntsRole().equals(userAuthorCode)) { + isExists = true; + break; + } + } + //사용자 권한이 최상위 권한이면 true 반환 + if(!isExists) + for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) { + if(item.getChldrnRole().equals(userAuthorCode)) { + log.debug("This user is Top-Level Author !!"); + return true; + } + } + //사용자의 역할(권한)정보가 없으면 false 반환 + if(!isExists) { + log.debug("This user is have not RoleSclsrtRescue Data !!"); + return false; + } + + + /** + * 상위권한 여부 확인 + * + */ + return this.isHighAuthor(listRoleSclsrtRescueVO, userAuthorCode, trgetAuthorCode)?false:true; + } + + private boolean isHighAuthor(final List list, final String authorCode, final String highAuthorCode) { + boolean result = false; + + for (XitRoleSclsrtRescueVO item : list) { + // 상위 권한으로 확인 되었으면 stop + if (result) + break; + // 권한코드가 일치하지 않으면 skip + if (!item.getParntsRole().equals(authorCode)) + continue; + + if (item.getChldrnRole().equals(highAuthorCode)) { // 상위 권한과 일치하면 + result = true; + } else { // 상위 권한과 일치하지 않으면 재호출 + result = this.isHighAuthor(list, item.getChldrnRole(), highAuthorCode); + } + } + + return result; + } } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthHierarchyMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthHierarchyMgtService.java index 6a673b11..8ae39257 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthHierarchyMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthHierarchyMgtService.java @@ -1,26 +1,252 @@ package kr.xit.framework.biz.mng.auth.service; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; +import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO; +import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO; +import kr.xit.framework.biz.mng.auth.mapper.IAuthAuthorMgtMapper; +import kr.xit.framework.biz.mng.auth.mapper.IAuthHierarchyMgtMapper; import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO; +import kr.xit.framework.biz.mng.auth.service.IAuthHierarchyMgtService; +import kr.xit.framework.core.utils.XitCmmnUtil; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; -/** - * - * @업무그룹명: 권한계층관리 Service - * @설명: - * @최초작성일: 2020. 11. 2. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface AuthHierarchyMgtService { - - List findAuthHierarchies(final Map paraMap, final RowBounds pagingInfo); - XitAuthHierarchyMngVO findAuthHierarchyInfo(final XitAuthHierarchyMngVO vo); - - void saveAuthHierarchy(final XitAuthHierarchyMngVO vo); +@RequiredArgsConstructor +@Service +public class AuthHierarchyMgtService implements IAuthHierarchyMgtService { + + private final IAuthHierarchyMgtMapper mapper; + + private final IAuthAuthorMgtMapper authAuthorMgtMapper; + + @Override + public List findAuthHierarchies(final Map paraMap, final RowBounds rowBounds) { + List voList = mapper.selectAuthHierarchies(paraMap, rowBounds); + //권한구조 설정 + + if(XitCmmnUtil.notEmpty(voList)) { + for(XitAuthHierarchyMngVO vo : voList) { + String strAuthorRescueCode = this.getStrAuthHierarchy(vo.getAuthorCode()); + vo.setAuthorRescueCode(strAuthorRescueCode); + vo.setAuthorRescueCodeNm(this.convertKorNm(strAuthorRescueCode)); + } + } + return voList; + } + + @Override + public XitAuthHierarchyMngVO findAuthHierarchyInfo(final XitAuthHierarchyMngVO vo) { + XitAuthHierarchyMngVO result = new XitAuthHierarchyMngVO(); + + List listRoleSclsrtRescueVO = authAuthorMgtMapper.selectRoleSclsrtRescues(new XitRoleSclsrtRescueVO()); + if(XitCmmnUtil.isEmpty(listRoleSclsrtRescueVO)) + return result; + + + String topButtonAuthorCode = this.getStrAuthHierarchy(listRoleSclsrtRescueVO.get(0).getChldrnRole()); + topButtonAuthorCode = topButtonAuthorCode.split(">")[0].trim(); + String strAuthorRescueCode = this.getStrAuthHierarchy(topButtonAuthorCode); + result.setAuthorRescueCode(strAuthorRescueCode); + + return result; + } + + + public void saveAuthHierarchy(final XitAuthHierarchyMngVO vo) { + if(XitCmmnUtil.isEmpty(vo.getAuthorCode())) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "권한코드는 필수조건 입니다."); + + String[] arrAuthorCodeGrp = vo.getAuthorCode().split(","); //권한코드 묶음 목록 + + /** + * 유효성 확인 + * -최상위 부모는 반드시 한개 이어야 한다. + * -최하위 자녀(최고관리자)는 반드시 한개 이어야 한다. + */ + if(arrAuthorCodeGrp[0].split(";").length>1) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"최상위 부모는 한개만 설정 가능 합니다."); + // 최하위 자녀 갯수 확인 + if(arrAuthorCodeGrp[arrAuthorCodeGrp.length-1].split(";").length>1) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"최하위 자녀는 한개만 설정 가능 합니다."); + // 다중상속 구간 갯수 확인 + int cnt = 0; + for(String authorCodeGrp : arrAuthorCodeGrp) { + if(authorCodeGrp.split(";").length > 1) + cnt++; + } + if(cnt > 1) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"다중상속은 하나의 구간만 설정 가능 합니다."); + + //권한계층구조 일괄 제거 + authAuthorMgtMapper.deleteRoleSclsrtRescue(new XitRoleSclsrtRescueVO()); + //권한계층 데이터 등록 + for(int i=0; i메소드 설명: 권한의 권한계층 구조를 문자열로 반환 한다. + * @param authorCode + * @return String 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 11. 2. + */ + private String getStrAuthHierarchy(final String authorCode) { + LinkedHashMap mParnts = new LinkedHashMap(); + LinkedHashMap mChldrn = new LinkedHashMap(); + + + List list = authAuthorMgtMapper.selectRoleSclsrtRescues(new XitRoleSclsrtRescueVO()); + this.getAuthHierarchy(list, authorCode, false, mParnts); + this.getAuthHierarchy(list, authorCode, true, mChldrn); + + StringBuffer sb = new StringBuffer(); + Iterator it = mParnts.keySet().iterator(); + while(it.hasNext()) { + sb.append(mParnts.get(it.next())).append(" > "); + } + sb.append(authorCode).append(" > "); + it = mChldrn.keySet().iterator(); + while(it.hasNext()) { + sb.append(mChldrn.get(it.next())).append(" > "); + } + + String result = sb.toString().trim(); + return result.substring(0, result.length()-2); + } + + /** + *
메소드 설명: 권한코드의 권한구조상의 상/하위 권한을 resultMap(LinkedHashMap)에 담아 반환 한다.
+ * @param list 역할계층구조 목록 데이터 + * @param authorCode 권한코드 + * @param isChldrnSearch 상위권한 탐색 여부(true: 상위권한 탐색, false: 하위권한 탐색) + * @param resultMap 응답객체 + * @return void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 11. 2. + */ + private void getAuthHierarchy(final List list, final String authorCode, final boolean isChldrnSearch, final LinkedHashMap resultMap) { + + for (XitRoleSclsrtRescueVO item : list) { + + if(isChldrnSearch) { + // 권한코드가 일치하지 않으면 skip + if (!item.getParntsRole().equals(authorCode)) + continue; + + //권한코드 Set + if(resultMap.containsKey(authorCode)) { + //동일한 값이면 담지 않음 + if(resultMap.get(authorCode).equals(item.getChldrnRole())) + continue; + + resultMap.put(authorCode, resultMap.get(authorCode)+", "+item.getChldrnRole()); + }else { + //동일한 값이 있으면 담지 않음 + Iterator it = resultMap.values().iterator(); + boolean isExists = false; + LOOP: + while(it.hasNext()) { + String[] values = it.next().split(","); + for(int j=0; j listAuthorInfoVO = authAuthorMgtMapper.selectAuthorInfos(null); + Map mAuthorInfo = new HashMap(); + for(XitAuthorInfoVO item : listAuthorInfoVO) { + mAuthorInfo.put(item.getAuthorCode(), item.getAuthorNm()); + } + + StringBuffer sb = new StringBuffer(); + String[] items = strAuthorRescueCode.split(">"); + for(int i=0; i0) + sb.append(" > "); + + String[] arrAuthorCode = item.split(","); + for(int j=0; j메소드 설명: 롤관리 목록 조회 - * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - List findAuthRoles(final Map paraMap, final RowBounds rowBounds); - - /** - *
메소드 설명: 롤관리 상세정보 조회
- * @param vo - * @return XitAuthRuleMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - XitRoleInfoVO findAuthRole(final String roleCode); - - /** - *
메소드 설명: 롤관리 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - void addAuthRole(final XitRoleInfoVO vo); - - /** - *
메소드 설명: 롤관리 수정
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - void modifyAuthRole(final XitRoleInfoVO vo); - - /** - *
메소드 설명: 롤관리 삭제
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - void removeAuthRole(final String roleCode); + @Override + public List findAuthRoles(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectAuthRoles(paraMap, rowBounds); + } + @Override + public XitRoleInfoVO findAuthRole(final String roleCode) { + return mapper.selectAuthRole(roleCode); + } + + @Override + public void addAuthRole(final XitRoleInfoVO vo) { + String roleTyp = vo.getRoleTy(); + if("method".equals(roleTyp)) roleTyp = "mtd"; + else if("pointcut".equals(roleTyp)) roleTyp = "pct"; + else roleTyp = "web"; + try { + vo.setRoleCode(roleTyp.concat("-").concat(groupIdGnrService.getNextStringId())); + } catch (FdlException e) { + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); + } + mapper.insertAuthRole(vo); + } + + @Override + public void modifyAuthRole(final XitRoleInfoVO vo) { + mapper.updateAuthRole(vo); + } + + @Override + public void removeAuthRole(final String roleCode) { + mapper.deleteAuthRole(roleCode); + } } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthAuthorMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthAuthorMgtService.java new file mode 100644 index 00000000..4c04e4a7 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthAuthorMgtService.java @@ -0,0 +1,42 @@ +package kr.xit.framework.biz.mng.auth.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO; +import kr.xit.framework.biz.mng.auth.model.XitRoleInfoVO; + +/** + * + * @업무그룹명: 권한관리 Service + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IAuthAuthorMgtService { + + + /** + *
메소드 설명: 권한관리 목록 조회
+ * @param searchVO + * @return List 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + List findAuthAuthors(final Map paraMap, final RowBounds rowBounds); + List findAuthAuthors(final Map paraMap); + + XitAuthorInfoVO findAuthAuthor(final String authorCode); + void addAuthAuthor(final XitAuthorInfoVO vo); + void modifyAuthAuthor(final XitAuthorInfoVO vo); + void removeAuthAuthor(final String authorCode); + + + List findAuthRoleGrantList(final Map paraMap); + void saveAuthRoleGrantList(final Map paraMap); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthByUserMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthByUserMgtService.java new file mode 100644 index 00000000..17f35834 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthByUserMgtService.java @@ -0,0 +1,25 @@ +package kr.xit.framework.biz.mng.auth.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO; + +/** + * + * @업무그룹명: 사용자별권한관리 Service + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IAuthByUserMgtService { + + List findAuthUsers(final Map paraMap, final RowBounds rowBounds); + void saveAuthUserList(final List> paraList); + void removeAuthUserList(final List> paraList); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthGrpMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthGrpMgtService.java new file mode 100644 index 00000000..1cd47331 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthGrpMgtService.java @@ -0,0 +1,29 @@ +package kr.xit.framework.biz.mng.auth.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO; + +/** + * + * @업무그룹명: 사용자그룹관리 Service + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IAuthGrpMgtService { + + List findAuthGrps(final Map paraMap, final RowBounds rowBounds); + XitAuthorGroupInfoVO findAuthGrp(final String groupId); + void addAuthGrp(final XitAuthorGroupInfoVO vo); + void modifyAuthGrp(final XitAuthorGroupInfoVO vo); + void removeAuthGrp(final String authorCode); + + void isCheckUserForCanChange(final String uniqId, final String trgetAuthorCode); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthHierarchyMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthHierarchyMgtService.java new file mode 100644 index 00000000..8abdde32 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthHierarchyMgtService.java @@ -0,0 +1,26 @@ +package kr.xit.framework.biz.mng.auth.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO; + +/** + * + * @업무그룹명: 권한계층관리 Service + * @설명: + * @최초작성일: 2020. 11. 2. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IAuthHierarchyMgtService { + + List findAuthHierarchies(final Map paraMap, final RowBounds pagingInfo); + XitAuthHierarchyMngVO findAuthHierarchyInfo(final XitAuthHierarchyMngVO vo); + + void saveAuthHierarchy(final XitAuthHierarchyMngVO vo); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthRoleMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthRoleMgtService.java new file mode 100644 index 00000000..67ac9c6f --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/IAuthRoleMgtService.java @@ -0,0 +1,65 @@ +package kr.xit.framework.biz.mng.auth.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.auth.model.XitRoleInfoVO; + +/** + * + * @업무그룹명: 롤관리 Service + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IAuthRoleMgtService { + + + /** + *
메소드 설명: 롤관리 목록 조회
+ * @param searchVO + * @return List 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + List findAuthRoles(final Map paraMap, final RowBounds rowBounds); + + /** + *
메소드 설명: 롤관리 상세정보 조회
+ * @param vo + * @return XitAuthRuleMngVO 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + XitRoleInfoVO findAuthRole(final String roleCode); + + /** + *
메소드 설명: 롤관리 등록
+ * @param vo void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + void addAuthRole(final XitRoleInfoVO vo); + + /** + *
메소드 설명: 롤관리 수정
+ * @param vo void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + void modifyAuthRole(final XitRoleInfoVO vo); + + /** + *
메소드 설명: 롤관리 삭제
+ * @param vo void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + void removeAuthRole(final String roleCode); + +} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthAuthorMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthAuthorMgtServiceImpl.java deleted file mode 100644 index 7a266a9a..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthAuthorMgtServiceImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -package kr.xit.framework.biz.mng.auth.service.impl; - -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO; -import kr.xit.framework.biz.mng.auth.model.XitRoleInfoVO; -import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO; -import kr.xit.framework.biz.mng.auth.mapper.AuthAuthorMgtMapper; -import kr.xit.framework.biz.mng.auth.service.AuthAuthorMgtService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -@RequiredArgsConstructor -@Slf4j -@Service -public class AuthAuthorMgtServiceImpl implements AuthAuthorMgtService { - private final AuthAuthorMgtMapper mapper; - - /** 부모 권한코드 */ - private static final String PARNTS_AUTHOR = "ROLE_USER"; - /** 자녀 권한코드 */ - private static final String CHLDRN_AUTHOR = "ROLE_ADMIN"; - - - @Override - public List findAuthAuthors(final Map paraMap, final RowBounds rowBounds) { - return mapper.selectAuthorInfos(paraMap, rowBounds); - } - - @Override - public List findAuthAuthors(final Map paraMap) { - return mapper.selectAuthorInfos(paraMap); - } - - @Override - public XitAuthorInfoVO findAuthAuthor(final String authorCode) { - return mapper.selectAuthorInfo(authorCode); - } - - /* ===================================================== - * 2020.05.21 박민규 - * 신규권한 등록프로세스 주석 및 수정 - * -사유: egovFrame의 권한계층은 부모~자녀 순으로 "익명사용자->사용자->관리자"로 기본제공 되며 - * 부모권한에 부여된 ROLE을 자녀가 상속받는 개념이다. - * 다만 기본제공되는 권한계층을 사용 시 카페의 "관리자>매니저>정회원>준회원>비회원"과 같은 권한계층 관리에 적합하기에 - * 업체별(또는 부서별)로 권한그룹을 별도 관리 해야하는 경우에 적합하지 않다. - * -작업내용: 기본제공되는 "익명사용자->사용자->관리자" 관리구조에서 사용자와 관리자 그룹 사이에 신규권한그룹을 삽입하여 - * "익명사용자->사용자->신규권한1/신규권한2/...->관리자"로 권한계층을 구성하여 - * n개의 신규그룹은 "사용자"에게서 기본적인 ROLE을 상속받고 - * n개의 신규그룹의 ROLE을 "관리자"가 상속받도록 한다. - * AS-IS: "익명사용자->사용자->관리자"의 권한계층에 삽입되지 않아 상위권한(PARENT)의 ROLE을 승계받지 못 함. - * TO-BE: "익명사용자->사용자->신규권한1/신규권한2/...->관리자"순의 상하관계를 가지게 되므로 신규권한그룹도 상위권한(PARENT)의 ROLE을 승계 받음. - ===================================================== */ - - @Override - public void addAuthAuthor(final XitAuthorInfoVO vo){ - //권한정보 Insert - mapper.insertAuthorInfo(vo); - - //계층구조생성 - XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO(); - //부모관계 생성 - roleSclsrtRescueVO.setParntsRole(PARNTS_AUTHOR); - roleSclsrtRescueVO.setChldrnRole(vo.getAuthorCode()); - mapper.insertRoleSclsrtRescue(roleSclsrtRescueVO); - //자녀관계 생성 - roleSclsrtRescueVO.setParntsRole(vo.getAuthorCode()); - roleSclsrtRescueVO.setChldrnRole(CHLDRN_AUTHOR); - mapper.insertRoleSclsrtRescue(roleSclsrtRescueVO); - } - - @Override - public void modifyAuthAuthor(final XitAuthorInfoVO vo){ - mapper.updateAuthorInfo(vo); - } - public void removeAuthAuthor(final String authorCode){ - //계층구조 삭제 - XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO(); - roleSclsrtRescueVO.setParntsRole(PARNTS_AUTHOR); - roleSclsrtRescueVO.setChldrnRole(authorCode); - mapper.deleteRoleSclsrtRescue(roleSclsrtRescueVO); - //자녀관계 제거 - roleSclsrtRescueVO.setParntsRole(authorCode); - roleSclsrtRescueVO.setChldrnRole(CHLDRN_AUTHOR); - mapper.deleteRoleSclsrtRescue(roleSclsrtRescueVO); - - mapper.deleteAuthorInfo(authorCode); - } - - @Override - public List findAuthRoleGrantList(final Map paraMap) { - return mapper.selectAuthRoleGrantList(paraMap); - } - - @Override - public void saveAuthRoleGrantList(final Map paraMap) { - List> mapList = (List>)paraMap.get("grantData"); - - mapList.forEach(map -> { - map.put("authorCode", paraMap.get("authorCode")); - if(Objects.equals(map.get("regYn"), "N")) - mapper.deleteRoleGrant(map); - else - mapper.saveRoleGrant(map); - }); - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthByUserMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthByUserMgtServiceImpl.java deleted file mode 100644 index 2ac54dd0..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthByUserMgtServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -package kr.xit.framework.biz.mng.auth.service.impl; - -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; -import kr.xit.framework.biz.mng.auth.mapper.AuthByUserMgtMapper; -import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO; -import kr.xit.framework.biz.mng.auth.service.AuthGrpMgtService; -import kr.xit.framework.biz.mng.auth.service.AuthByUserMgtService; -import kr.xit.framework.biz.mng.user.mapper.UserMgtMapper; -import kr.xit.framework.biz.mng.user.service.UserMgtService; -import kr.xit.framework.core.utils.XitCmmnUtil; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class AuthByUserMgtServiceImpl implements AuthByUserMgtService { - - private final AuthByUserMgtMapper mapper; - - private final UserMgtMapper userMapper; - - private final AuthGrpMgtService authGrpMgtService; - private final UserMgtService userMgtService; - - @Override - public List findAuthUsers(final Map paraMap, final RowBounds rowBounds) { - return mapper.selectAuthUsers(paraMap, rowBounds); - } - - @Override - public void saveAuthUserList(List> paraList) { - String sessionUniqId = XitCmmnUtil.getUserInfo().getUniqId(); - paraList.forEach(map -> { - //유효성확인 - authGrpMgtService.isCheckUserForCanChange(sessionUniqId, String.valueOf(map.get("authorCode"))); - - XitUserScrtySetupVO vo = new XitUserScrtySetupVO(); - vo.setScrtySetupTrgetId(String.valueOf(map.get("uniqId"))); - vo.setMberTyCode(String.valueOf(map.get("mberTyCode"))); - vo.setAuthorCode(String.valueOf(map.get("authorCode"))); - - if(Objects.equals("N", map.get("regYn"))){ - userMapper.insertUserScrtySetup(vo); - }else{ - userMapper.updateUserScrtySetup(vo); - } - }); - } - - @Override - public void removeAuthUserList(List> paraList) { - - //삭제 시 사용자의 권한을 소속 그룹의 권한 또는 Defualt 권한으로 설정 - paraList.forEach(map -> { - XitUserScrtySetupVO vo = new XitUserScrtySetupVO(); - vo.setScrtySetupTrgetId(String.valueOf(map.get("uniqId"))); - vo.setMberTyCode(String.valueOf(map.get("mberTyCode"))); - vo.setAuthorCode(userMgtService.getDefaultAuthorCode(String.valueOf(map.get("groupId")))); - userMapper.updateUserScrtySetup(vo); - }); - } - -} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthGrpMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthGrpMgtServiceImpl.java deleted file mode 100644 index 91b0be09..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthGrpMgtServiceImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package kr.xit.framework.biz.mng.auth.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Service; - -import egovframework.rte.fdl.cmmn.exception.FdlException; -import egovframework.rte.fdl.idgnr.EgovIdGnrService; -import kr.xit.framework.biz.mng.auth.mapper.AuthAuthorMgtMapper; -import kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper; -import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO; -import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO; -import kr.xit.framework.biz.mng.auth.service.AuthGrpMgtService; -import kr.xit.framework.biz.mng.user.mapper.UserMgtMapper; -import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; -import kr.xit.framework.core.utils.XitCmmnUtil; -import kr.xit.framework.support.exception.BizRuntimeException; -import kr.xit.framework.support.util.constants.MessageKey; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -@RequiredArgsConstructor -@Slf4j -@Service -public class AuthGrpMgtServiceImpl implements AuthGrpMgtService { - - private final AuthGrpMgtMapper mapper; - private final AuthAuthorMgtMapper authAuthorMgtMapper; - private final UserMgtMapper userMgtMapper; - - @Qualifier("groupIdGnrService") - private final EgovIdGnrService groupIdGnrService; - - @Override - public List findAuthGrps(final Map paraMap, final RowBounds rowBounds) { - return mapper.selectAuthorGroupInfos(paraMap, rowBounds); - } - - @Override - public XitAuthorGroupInfoVO findAuthGrp(final String groupId) { - return mapper.selectAuthorGroupInfo(groupId); - } - - @Override - public void addAuthGrp(final XitAuthorGroupInfoVO vo) { - // 유효성 확인 - this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode()); - - try { - vo.setGroupId(groupIdGnrService.getNextStringId()); - } catch (FdlException e) { - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); - } - mapper.insertAuthorGroupInfo(vo); - } - - @Override - public void modifyAuthGrp(final XitAuthorGroupInfoVO vo) { - // 유효성 확인 - this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode()); - - mapper.updateAuthorGroupInfo(vo); - } - - @Override - public void removeAuthGrp(final String groupId) { - mapper.deleteAuthorGroupInfo(groupId); - } - - public void isCheckUserForCanChange(final String uniqId, final String trgetAuthorCode) { - //사용자보안설정 조회 - XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); - userScrtySetupVO.setScrtySetupTrgetId(uniqId); - List listUserScrtySetupVO = userMgtMapper.selectUserScrtySetups(userScrtySetupVO); - String userAuthorCode = XitCmmnUtil.isEmpty(listUserScrtySetupVO)?null:listUserScrtySetupVO.get(0).getAuthorCode(); - - if(!this.isCheckUserAuthorCodeForCanChange(userAuthorCode, trgetAuthorCode)) - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "자신의 권한보다 상위 권한을 설정 할 수 없습니다.");; - } - - - private boolean isCheckUserAuthorCodeForCanChange(final String userAuthorCode, final String trgetAuthorCode) { - //역할(권한)계층구조 데이터 목록 조회 - List listRoleSclsrtRescueVO = authAuthorMgtMapper.selectRoleSclsrtRescues(null); - //역할(권한)계층구조를 사용하지 않고 있는 경우 true 반환 - if(XitCmmnUtil.isEmpty(listRoleSclsrtRescueVO)) { - log.debug("Do not use a RoleSclsrtRescue Data !!"); - return true; - }else { - //사용자의 권한 정보가 없을 때(비정상적인 루트로 등록한 사용자 계정으로 판단) - if(XitCmmnUtil.isEmpty(userAuthorCode)) { - log.debug("This user is have not UserScrtySetup Data !!"); - return false; - } - } - boolean isExists = false; - //사용자 권한과 매칭되는 역할(권한)계층정보 유무 확인 - for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) { - if(item.getParntsRole().equals(userAuthorCode)) { - isExists = true; - break; - } - } - //사용자 권한이 최상위 권한이면 true 반환 - if(!isExists) - for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) { - if(item.getChldrnRole().equals(userAuthorCode)) { - log.debug("This user is Top-Level Author !!"); - return true; - } - } - //사용자의 역할(권한)정보가 없으면 false 반환 - if(!isExists) { - log.debug("This user is have not RoleSclsrtRescue Data !!"); - return false; - } - - - /** - * 상위권한 여부 확인 - * - */ - return this.isHighAuthor(listRoleSclsrtRescueVO, userAuthorCode, trgetAuthorCode)?false:true; - } - - private boolean isHighAuthor(final List list, final String authorCode, final String highAuthorCode) { - boolean result = false; - - for (XitRoleSclsrtRescueVO item : list) { - // 상위 권한으로 확인 되었으면 stop - if (result) - break; - // 권한코드가 일치하지 않으면 skip - if (!item.getParntsRole().equals(authorCode)) - continue; - - if (item.getChldrnRole().equals(highAuthorCode)) { // 상위 권한과 일치하면 - result = true; - } else { // 상위 권한과 일치하지 않으면 재호출 - result = this.isHighAuthor(list, item.getChldrnRole(), highAuthorCode); - } - } - - return result; - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthHierarchyMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthHierarchyMgtServiceImpl.java deleted file mode 100644 index c83a485c..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthHierarchyMgtServiceImpl.java +++ /dev/null @@ -1,252 +0,0 @@ -package kr.xit.framework.biz.mng.auth.service.impl; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO; -import kr.xit.framework.biz.mng.auth.model.XitRoleSclsrtRescueVO; -import kr.xit.framework.biz.mng.auth.mapper.AuthAuthorMgtMapper; -import kr.xit.framework.biz.mng.auth.mapper.AuthHierarchyMgtMapper; -import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO; -import kr.xit.framework.biz.mng.auth.service.AuthHierarchyMgtService; -import kr.xit.framework.core.utils.XitCmmnUtil; -import kr.xit.framework.support.exception.BizRuntimeException; -import kr.xit.framework.support.util.constants.MessageKey; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class AuthHierarchyMgtServiceImpl implements AuthHierarchyMgtService { - - private final AuthHierarchyMgtMapper mapper; - - private final AuthAuthorMgtMapper authAuthorMgtMapper; - - @Override - public List findAuthHierarchies(final Map paraMap, final RowBounds rowBounds) { - List voList = mapper.selectAuthHierarchies(paraMap, rowBounds); - //권한구조 설정 - - if(XitCmmnUtil.notEmpty(voList)) { - for(XitAuthHierarchyMngVO vo : voList) { - String strAuthorRescueCode = this.getStrAuthHierarchy(vo.getAuthorCode()); - vo.setAuthorRescueCode(strAuthorRescueCode); - vo.setAuthorRescueCodeNm(this.convertKorNm(strAuthorRescueCode)); - } - } - return voList; - } - - @Override - public XitAuthHierarchyMngVO findAuthHierarchyInfo(final XitAuthHierarchyMngVO vo) { - XitAuthHierarchyMngVO result = new XitAuthHierarchyMngVO(); - - List listRoleSclsrtRescueVO = authAuthorMgtMapper.selectRoleSclsrtRescues(new XitRoleSclsrtRescueVO()); - if(XitCmmnUtil.isEmpty(listRoleSclsrtRescueVO)) - return result; - - - String topButtonAuthorCode = this.getStrAuthHierarchy(listRoleSclsrtRescueVO.get(0).getChldrnRole()); - topButtonAuthorCode = topButtonAuthorCode.split(">")[0].trim(); - String strAuthorRescueCode = this.getStrAuthHierarchy(topButtonAuthorCode); - result.setAuthorRescueCode(strAuthorRescueCode); - - return result; - } - - - public void saveAuthHierarchy(final XitAuthHierarchyMngVO vo) { - if(XitCmmnUtil.isEmpty(vo.getAuthorCode())) - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "권한코드는 필수조건 입니다."); - - String[] arrAuthorCodeGrp = vo.getAuthorCode().split(","); //권한코드 묶음 목록 - - /** - * 유효성 확인 - * -최상위 부모는 반드시 한개 이어야 한다. - * -최하위 자녀(최고관리자)는 반드시 한개 이어야 한다. - */ - if(arrAuthorCodeGrp[0].split(";").length>1) - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"최상위 부모는 한개만 설정 가능 합니다."); - // 최하위 자녀 갯수 확인 - if(arrAuthorCodeGrp[arrAuthorCodeGrp.length-1].split(";").length>1) - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"최하위 자녀는 한개만 설정 가능 합니다."); - // 다중상속 구간 갯수 확인 - int cnt = 0; - for(String authorCodeGrp : arrAuthorCodeGrp) { - if(authorCodeGrp.split(";").length > 1) - cnt++; - } - if(cnt > 1) - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"다중상속은 하나의 구간만 설정 가능 합니다."); - - //권한계층구조 일괄 제거 - authAuthorMgtMapper.deleteRoleSclsrtRescue(new XitRoleSclsrtRescueVO()); - //권한계층 데이터 등록 - for(int i=0; i메소드 설명: 권한의 권한계층 구조를 문자열로 반환 한다. - * @param authorCode - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 11. 2. - */ - private String getStrAuthHierarchy(final String authorCode) { - LinkedHashMap mParnts = new LinkedHashMap(); - LinkedHashMap mChldrn = new LinkedHashMap(); - - - List list = authAuthorMgtMapper.selectRoleSclsrtRescues(new XitRoleSclsrtRescueVO()); - this.getAuthHierarchy(list, authorCode, false, mParnts); - this.getAuthHierarchy(list, authorCode, true, mChldrn); - - StringBuffer sb = new StringBuffer(); - Iterator it = mParnts.keySet().iterator(); - while(it.hasNext()) { - sb.append(mParnts.get(it.next())).append(" > "); - } - sb.append(authorCode).append(" > "); - it = mChldrn.keySet().iterator(); - while(it.hasNext()) { - sb.append(mChldrn.get(it.next())).append(" > "); - } - - String result = sb.toString().trim(); - return result.substring(0, result.length()-2); - } - - /** - *
메소드 설명: 권한코드의 권한구조상의 상/하위 권한을 resultMap(LinkedHashMap)에 담아 반환 한다.
- * @param list 역할계층구조 목록 데이터 - * @param authorCode 권한코드 - * @param isChldrnSearch 상위권한 탐색 여부(true: 상위권한 탐색, false: 하위권한 탐색) - * @param resultMap 응답객체 - * @return void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 11. 2. - */ - private void getAuthHierarchy(final List list, final String authorCode, final boolean isChldrnSearch, final LinkedHashMap resultMap) { - - for (XitRoleSclsrtRescueVO item : list) { - - if(isChldrnSearch) { - // 권한코드가 일치하지 않으면 skip - if (!item.getParntsRole().equals(authorCode)) - continue; - - //권한코드 Set - if(resultMap.containsKey(authorCode)) { - //동일한 값이면 담지 않음 - if(resultMap.get(authorCode).equals(item.getChldrnRole())) - continue; - - resultMap.put(authorCode, resultMap.get(authorCode)+", "+item.getChldrnRole()); - }else { - //동일한 값이 있으면 담지 않음 - Iterator it = resultMap.values().iterator(); - boolean isExists = false; - LOOP: - while(it.hasNext()) { - String[] values = it.next().split(","); - for(int j=0; j listAuthorInfoVO = authAuthorMgtMapper.selectAuthorInfos(null); - Map mAuthorInfo = new HashMap(); - for(XitAuthorInfoVO item : listAuthorInfoVO) { - mAuthorInfo.put(item.getAuthorCode(), item.getAuthorNm()); - } - - StringBuffer sb = new StringBuffer(); - String[] items = strAuthorRescueCode.split(">"); - for(int i=0; i0) - sb.append(" > "); - - String[] arrAuthorCode = item.split(","); - for(int j=0; j findAuthRoles(final Map paraMap, final RowBounds rowBounds) { - return mapper.selectAuthRoles(paraMap, rowBounds); - } - - @Override - public XitRoleInfoVO findAuthRole(final String roleCode) { - return mapper.selectAuthRole(roleCode); - } - - @Override - public void addAuthRole(final XitRoleInfoVO vo) { - String roleTyp = vo.getRoleTy(); - if("method".equals(roleTyp)) roleTyp = "mtd"; - else if("pointcut".equals(roleTyp)) roleTyp = "pct"; - else roleTyp = "web"; - try { - vo.setRoleCode(roleTyp.concat("-").concat(groupIdGnrService.getNextStringId())); - } catch (FdlException e) { - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); - } - mapper.insertAuthRole(vo); - } - - @Override - public void modifyAuthRole(final XitRoleInfoVO vo) { - mapper.updateAuthRole(vo); - } - - @Override - public void removeAuthRole(final String roleCode) { - mapper.deleteAuthRole(roleCode); - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthAuthorMgtController.java b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthAuthorMgtController.java index 0240e542..0532f391 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthAuthorMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthAuthorMgtController.java @@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO; -import kr.xit.framework.biz.mng.auth.service.AuthAuthorMgtService; +import kr.xit.framework.biz.mng.auth.service.IAuthAuthorMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; @@ -39,7 +39,7 @@ import lombok.RequiredArgsConstructor; @RequestMapping("/framework/biz/mng/auth") public class AuthAuthorMgtController { - private final AuthAuthorMgtService service; + private final IAuthAuthorMgtService service; /** diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthByUserMgtController.java b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthByUserMgtController.java index 9559ddca..044d76d5 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthByUserMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthByUserMgtController.java @@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import kr.xit.framework.biz.cache.util.CacheServiceUtils; -import kr.xit.framework.biz.mng.auth.service.AuthByUserMgtService; +import kr.xit.framework.biz.mng.auth.service.IAuthByUserMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; @@ -35,7 +35,7 @@ import lombok.RequiredArgsConstructor; @RequestMapping("/framework/biz/mng/auth") public class AuthByUserMgtController { - private final AuthByUserMgtService service; + private final IAuthByUserMgtService service; /** diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthGrpMgtController.java b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthGrpMgtController.java index a75dcacd..8e00abed 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthGrpMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthGrpMgtController.java @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO; -import kr.xit.framework.biz.mng.auth.service.AuthGrpMgtService; +import kr.xit.framework.biz.mng.auth.service.IAuthGrpMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; @@ -35,7 +35,7 @@ import lombok.RequiredArgsConstructor; @RequestMapping("/framework/biz/mng/auth") public class AuthGrpMgtController { - private final AuthGrpMgtService service; + private final IAuthGrpMgtService service; /** *
메소드 설명: 사용자그룹관리 목록 페이지
diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthHierarchyMgtController.java b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthHierarchyMgtController.java index 0867153f..25f7b80b 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthHierarchyMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthHierarchyMgtController.java @@ -20,8 +20,8 @@ import egovframework.rte.fdl.security.securedobject.EgovSecuredObjectService; import egovframework.rte.fdl.security.userdetails.jdbc.EgovJdbcUserDetailsManager; import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO; import kr.xit.framework.biz.mng.auth.model.XitAuthorInfoVO; -import kr.xit.framework.biz.mng.auth.service.AuthAuthorMgtService; -import kr.xit.framework.biz.mng.auth.service.AuthHierarchyMgtService; +import kr.xit.framework.biz.mng.auth.service.IAuthAuthorMgtService; +import kr.xit.framework.biz.mng.auth.service.IAuthHierarchyMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.exception.BizRuntimeException; @@ -46,8 +46,8 @@ import lombok.RequiredArgsConstructor; @RequestMapping("/framework/biz/mng/auth") public class AuthHierarchyMgtController { - private final AuthHierarchyMgtService service; - private final AuthAuthorMgtService authAuthorMgtService; + private final IAuthHierarchyMgtService service; + private final IAuthAuthorMgtService authAuthorMgtService; private final EgovSecuredObjectService egovSecuredObjectService; private final RoleHierarchyImpl roleHierarchyImpl; diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java index 3c590ba4..74a03775 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java @@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import kr.xit.framework.biz.mng.auth.model.XitRoleInfoVO; -import kr.xit.framework.biz.mng.auth.service.AuthRoleMgtService; +import kr.xit.framework.biz.mng.auth.service.IAuthRoleMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; @@ -37,7 +37,7 @@ import lombok.RequiredArgsConstructor; @RequestMapping("/framework/biz/mng/auth") public class AuthRoleMgtController { - private final AuthRoleMgtService service; + private final IAuthRoleMgtService service; /** *
메소드 설명: 롤관리 목록 페이지
diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeClassificationMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeClassificationMgtMapper.java new file mode 100644 index 00000000..395c6f9a --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeClassificationMgtMapper.java @@ -0,0 +1,49 @@ +package kr.xit.framework.biz.mng.code.mapper; + +import java.sql.SQLException; +import java.util.List; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngSearchVO; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; + +/** + * + * @업무그룹명: 분류코드관리 Mapper + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:07 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +@Mapper +public interface ICodeClassificationMgtMapper { + + /** + *
메소드 설명: 분류코드관리 목록 조회
+ * @param searchVO + * @return List 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public List findList(XitClCodeMngSearchVO searchVO) throws SQLException; + + /** + *
메소드 설명: 분류코드관리 목록 총건수 조회
+ * @param searchVO + * @return int 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public int findListTotCnt(XitClCodeMngSearchVO searchVO) throws SQLException; + + /** + *
메소드 설명: 분류코드관리 상세정보 조회
+ * @param vo + * @return XitClCodeMngVO 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public XitClCodeMngVO findView(XitClCodeMngVO vo) throws SQLException; +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/CodeClassificationMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeClassificationMgtService.java new file mode 100644 index 00000000..8dbfa83a --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeClassificationMgtService.java @@ -0,0 +1,140 @@ +package kr.xit.framework.biz.mng.code.service; + +import java.sql.SQLException; +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import kr.xit.framework.biz.cmm.model.XitCmmnClCodeVO; +import kr.xit.framework.biz.cmm.service.XitFrameCrudService; +import kr.xit.framework.biz.mng.code.mapper.ICodeClassificationMgtMapper; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngSearchVO; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; +import kr.xit.framework.core.message.XitMessageSource; + +@Service +public class CodeClassificationMgtService implements ICodeClassificationMgtService { + + @Resource + private ICodeClassificationMgtMapper mapper; + @Resource + private XitFrameCrudService xitFrameCrudService; + @Resource(name="groupIdGnrService") + private EgovIdGnrService idgenService; + @Resource + private XitMessageSource xitMessageSource; + + @Override + public List findList(XitClCodeMngSearchVO searchVO) { + List result = null; + try { + result = mapper.findList(searchVO); + } catch (SQLException e) { + throw new RuntimeException("분류코드관리 목록 조회 FAIL::", e); + } + return result; + } + + @Override + public int findListTotCnt(XitClCodeMngSearchVO searchVO) { + int result = 0; + try { + result = mapper.findListTotCnt(searchVO); + } catch (SQLException e) { + throw new RuntimeException("분류코드관리 목록 총건수 조회 FAIL::", e); + } + return result; + } + + @Override + public XitClCodeMngVO findView(XitClCodeMngVO vo) { + XitClCodeMngVO result = null; + try { + result = mapper.findView(vo); + } catch (SQLException e) { + throw new RuntimeException("분류코드관리 상세정보 조회 FAIL::", e); + } + return result; + } + + @Override + public void addProc(XitClCodeMngVO vo) { + /** + * 필수값 설정 + */ + XitCmmnClCodeVO cmmnClCodeVO = convertToCrudVO(vo); + cmmnClCodeVO.setFrst_register_id(vo.getFrstRegisterId()); + + /** + * 처리 + */ + xitFrameCrudService.addXitCmmnClCode(cmmnClCodeVO); + + } + + @Override + public void modifyProc(XitClCodeMngVO vo) { + /** + * 필수값 설정 + */ + XitCmmnClCodeVO cmmnClCodeVO = convertToCrudVO(vo); + cmmnClCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); + + /** + * 처리 + */ + xitFrameCrudService.modifyXitCmmnClCode(cmmnClCodeVO); + } + + @Override + public void removeProc(XitClCodeMngVO vo) { + /** + * 필수값 설정 + */ + XitCmmnClCodeVO cmmnClCodeVO = new XitCmmnClCodeVO(); + cmmnClCodeVO.setCl_code(vo.getClCode()); + cmmnClCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); + cmmnClCodeVO.setUse_at("N"); + + /** + * 처리 + */ + xitFrameCrudService.modifyXitCmmnClCode(cmmnClCodeVO); + } + + @Override + public void removesProc(String ids, String userId) { + /** + * 처리 + */ + String [] clCodes = ids.split(";"); + for(int i=0; i + * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다. + * + * + * @return XitCmmnClCodeVO 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + private XitCmmnClCodeVO convertToCrudVO(XitClCodeMngVO vo) { + XitCmmnClCodeVO crudVO = new XitCmmnClCodeVO(); + crudVO.setCl_code (vo.getClCode()); //분류 코드 + crudVO.setCl_code_nm (vo.getClCodeNm()); //분류 코드 명 + crudVO.setCl_code_dc (vo.getClCodeDc()); //분류 코드 설명 + crudVO.setUse_at (vo.getUseAt()); //사용 여부 + + return crudVO; + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeClassificationMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeClassificationMgtService.java new file mode 100644 index 00000000..87a6aace --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeClassificationMgtService.java @@ -0,0 +1,79 @@ +package kr.xit.framework.biz.mng.code.service; + +import java.util.List; + +import kr.xit.framework.biz.mng.code.model.XitClCodeMngSearchVO; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; + +/** + * + * @업무그룹명: 분류코드관리 Service + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface ICodeClassificationMgtService { + + + /** + *
메소드 설명: 분류코드관리 목록 조회
+ * @param searchVO + * @return List 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public List findList(XitClCodeMngSearchVO searchVO); + + /** + *
메소드 설명: 분류코드관리 목록 총건수 조회
+ * @param searchVO + * @return int 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public int findListTotCnt(XitClCodeMngSearchVO searchVO); + + /** + *
메소드 설명: 분류코드관리 상세정보 조회
+ * @param vo + * @return XitClCodeMngVO 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public XitClCodeMngVO findView(XitClCodeMngVO vo); + + /** + *
메소드 설명: 분류코드관리 등록
+ * @param vo void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public void addProc(XitClCodeMngVO vo); + + /** + *
메소드 설명: 분류코드관리 수정
+ * @param vo void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public void modifyProc(XitClCodeMngVO vo); + + /** + *
메소드 설명: 분류코드관리 삭제
+ * @param vo void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public void removeProc(XitClCodeMngVO vo); + + /** + *
메소드 설명: 분류코드관리 다건 삭제
+ * @param ids void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + public void removesProc(String ids, String userId); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/CodeClassificationMgtController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeClassificationMgtController.java new file mode 100644 index 00000000..ad0ca6e9 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeClassificationMgtController.java @@ -0,0 +1,343 @@ +package kr.xit.framework.biz.mng.code.web; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.ui.ModelMap; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.support.SessionStatus; + +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import kr.xit.framework.biz.cmm.model.XitLoginVO; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngSearchVO; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; +import kr.xit.framework.biz.mng.code.service.ICodeClassificationMgtService; +import kr.xit.framework.core.constants.FrameworkConstants; +import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE; +import kr.xit.framework.core.message.XitMessageSource; +import kr.xit.framework.core.utils.XitCmmnUtil; +import kr.xit.framework.core.validation.XitBeanValidator; +import kr.xit.framework.support.util.AjaxUtils; + +/** + * + * @업무그룹명: 분류코드관리 Controller + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:39:52 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +@Controller +@RequestMapping("/framework/biz/mng/code") +public class CodeClassificationMgtController { + + @Resource + private ICodeClassificationMgtService service; + @Autowired + private XitBeanValidator beanValidator; + @Resource(name = "xitMessageSource") + XitMessageSource xitMessageSource; + + @RequestMapping(value = "/mngCodeClassificationMgtForm") + public void mngCodeClassificationMgtForm() { + } + + + + + + + + + + + + + + + + + + + + + + + + + + /** + *
메소드 설명: 분류코드 관리 페이지 조회
+ * @return String 요청처리 후 응답객체 + * @author: 김동규 + * @date: 2020. 7. 31. + */ + @RequestMapping(value = "ClCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) + @ResponseBody + public Map ClCodeMng_listAjax(@ModelAttribute("searchVO") XitClCodeMngSearchVO searchVO, ModelMap model) { + + /** paging */ + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(searchVO.getPage()>-1?searchVO.getPage():searchVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(searchVO.getPerPage()>-1?searchVO.getPerPage():searchVO.getPageUnit()); + paginationInfo.setPageSize(searchVO.getPageSize()); + searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + searchVO.setLastIndex(paginationInfo.getLastRecordIndex()); + searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + Map resultMap = new HashMap(); + try { + /** + * 조회 + */ + int totCnt = service.findListTotCnt(searchVO); + paginationInfo.setTotalRecordCount(totCnt); + /** + * 반환값 설정 + */ + /* *************************** + * tui Grid Response Set + *************************** */ + resultMap.put("result", true); //[tui Grid] result + resultMap.put("message", xitMessageSource.getMessage("success.common.select")); //[tui Grid] result message + Map data = new HashMap(); + data.put("contents", service.findList(searchVO)); //[tui Grid] data-contents + Map pagination = new HashMap(); + pagination.put("page", searchVO.getPage()); + pagination.put("totalCount", totCnt); + data.put("pagination", pagination); //[tui Grid] data-paging + resultMap.put("data", data); //[tui Grid] data + /* *************************** + * //tui Grid Response Set + *************************** */ + } catch (Exception e) { + /** + * 반환값 설정 + */ + //tui Grid Response Set + resultMap.put("result", false); //[tui Grid] result + resultMap.put("message", xitMessageSource.getMessage("fail.common.select")); //[tui Grid] result message + } + + return resultMap; + } + + /** + *
메소드 설명: 요청 페이지로 이동 한다.
+ * @param page + * @param tilesDef 타일즈 적용 Type(none: tiles 미적용) + * @param model + * @return String 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + @RequestMapping(value = "ClCodeMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) + public String ClCodeMng_page(@PathVariable String cmd + , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef + , @ModelAttribute("cmmnClCode") XitClCodeMngVO vo + , @ModelAttribute XitClCodeMngSearchVO searchVO + , ModelMap model) { + switch (cmd) { + case "input": //등록 페이지 + break; + case "edit": //수정 페이지 + case "view": //상세 페이지 + model.addAttribute("cmmnClCode", service.findView(vo)); + model.addAttribute("message", xitMessageSource.getMessage("success.common.select")); + break; + default: + throw new RuntimeException("유효하지 않은 요청 입니다."); + } + + + if(!"".equals(tilesDef)) + tilesDef = "."+tilesDef; + return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitClCodeMng_"+cmd+tilesDef; + + } + + + /** + *
메소드 설명: 요청 팝업 페이지 이동 한다.
+ * @param page + * @param model + * @return String 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 16. + */ + @RequestMapping(value = "ClCodeMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) + public String ClCodeMng_page_popup(@PathVariable String cmd + , @ModelAttribute("cmmnClCode") XitClCodeMngVO vo + , @ModelAttribute XitClCodeMngSearchVO searchVO + , ModelMap model) { + switch (cmd) { + case "": // + break; + default: + throw new RuntimeException("유효하지 않은 요청 입니다."); + } + + + return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitClCodeMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); + } + + + + /** + *
메소드 설명: 분류코드관리 CUD 처리
+ * @return String 요청처리 후 응답객체 + * @author: 박민규 + * @throws IOException + * @throws ServletException + * @date: 2020. 4. 16. + */ + @RequestMapping(value = "ClCodeMng_{cmd}_proc", method=RequestMethod.POST) + public void ClCodeMng_cmd_proc(@PathVariable String cmd + ,@ModelAttribute("vo") XitClCodeMngVO vo + ,@ModelAttribute("searchVO") XitClCodeMngSearchVO searchVO + ,@RequestParam(value="clCodes", required=false, defaultValue="") String clCodes + ,BindingResult bindingResult + ,SessionStatus status + ,Model model + ,HttpServletRequest request + ,HttpServletResponse response + ) throws ServletException, IOException { + + /** + * 처리 분기 + */ + XitLoginVO loginVO = (XitLoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); + String sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_list"; + String message = null; + switch (cmd) { + case "insert": //등록 + //유효성 확인 + //2020.11.24. 주석처리 + beanValidator.validate(vo, bindingResult); +// beanValidator.validate("cmmnClCode", vo, bindingResult); + if (bindingResult.hasErrors()) { + message = xitMessageSource.getMessage("fail.common.insert"); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_input"; + break; + } + //처리 + try { + vo.setFrstRegisterId(loginVO.getUniqId()); + service.addProc(vo); + status.setComplete(); + message = xitMessageSource.getMessage("success.common.insert"); + } catch (RuntimeException e) { + message = e.getMessage(); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_input"; + } catch (Exception e) { + message = xitMessageSource.getMessage("fail.common.insert"); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_input"; + } + break; + +// case "inserts": //다건 등록 +// break; + + case "update": //수정 + //유효성 확인 + //2020.11.24. 주석처리 + beanValidator.validate(vo, bindingResult); +// beanValidator.validate("cmmnClCode", vo, bindingResult); + if (bindingResult.hasErrors()) { + message = xitMessageSource.getMessage("fail.common.update"); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; + break; + } + //처리 + try { + vo.setLastUpdusrId(loginVO.getUniqId()); + service.modifyProc(vo); + status.setComplete(); + message = xitMessageSource.getMessage("success.common.update"); + } catch (RuntimeException e) { + message = e.getMessage(); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; + } catch (Exception e) { + message = xitMessageSource.getMessage("fail.common.update"); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; + } + break; + + case "delete": //삭제 + //처리 + try { + vo.setLastUpdusrId(loginVO.getUniqId()); + service.removeProc(vo); + status.setComplete(); + message = xitMessageSource.getMessage("success.common.delete"); + break; + } catch (RuntimeException e) { + message = e.getMessage(); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; + } catch (Exception e) { + message = xitMessageSource.getMessage("fail.common.delete"); + sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; + } + break; + + case "deletes": //다건 삭제 + //처리 + try { + service.removesProc(clCodes, loginVO.getUniqId()); + status.setComplete(); + message = xitMessageSource.getMessage("success.common.delete"); + } catch (RuntimeException e) { + message = e.getMessage(); + } catch (Exception e) { + message = xitMessageSource.getMessage("fail.common.delete"); + } + break; + + default: + new RuntimeException("유효하지 않은 요청 입니다."); + } + + + + /** + * 응답 설정 + */ + /* ============================ + * 2020.09.10 박민규 + * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선 + * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선 + * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리 + * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward + ============================ */ + //2020.09.10 주석처리 +// model.addAttribute("message", message); +// return sLocationUrl; + model.addAttribute("message", message); + if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 + //반환 데이터 설정 + Map resultMap = new HashMap(); + resultMap.put("message", message); + XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); + }else { //submit 요청 시 + XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); + } + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/XitClCodeMngController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/XitClCodeMngController.java index 021f99b0..172804fb 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/web/XitClCodeMngController.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/web/XitClCodeMngController.java @@ -46,7 +46,7 @@ import kr.xit.framework.support.util.AjaxUtils; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Controller -@RequestMapping("/framework/biz/mng/code/") +@RequestMapping("/framework/biz/mng/ccode/") public class XitClCodeMngController { @Resource diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuByRoleMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuByRoleMgtMapper.java new file mode 100644 index 00000000..742922e9 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuByRoleMgtMapper.java @@ -0,0 +1,17 @@ +package kr.xit.framework.biz.mng.menu.mapper; + +import java.util.List; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; +import kr.xit.framework.biz.cmm.model.XitMenuCreatDtlsVO; +import kr.xit.framework.biz.mng.menu.model.MenuCreateMngVO; + +@Mapper +public interface IMenuByRoleMgtMapper { + + List selectRoleInfos(T t); + + List selectMenuInfoByRoleList(T t); + int deleteMenuCreatDtls(final String authorCode); + int insertMenuCreatDtls(final XitMenuCreatDtlsVO vo); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuMgtMapper.java similarity index 92% rename from src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuMgtMapper.java index 79fb0a28..60f7fab6 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuMgtMapper.java @@ -6,11 +6,9 @@ import java.util.List; import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; -import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; import kr.xit.framework.biz.mng.menu.model.MenuCreateMngSearchVO; import kr.xit.framework.biz.mng.menu.model.MenuCreateMngVO; -import kr.xit.framework.biz.mng.menu.model.MenuListMngSearchVO; -import kr.xit.framework.biz.mng.menu.model.MenuListMngVO; +import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; /** * @@ -23,7 +21,7 @@ import kr.xit.framework.biz.mng.menu.model.MenuListMngVO; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Mapper -public interface MenuMgtMapper { +public interface IMenuMgtMapper { List selectMenuInfos(final T t, final RowBounds rowBounds); List selectMenuInfos(final T t); @@ -39,6 +37,7 @@ public interface MenuMgtMapper { + /** *
메소드 설명: 메뉴정보 전체데이터 삭제
* @return diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/ProgramMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IProgramMgtMapper.java similarity index 95% rename from src/main/java/kr/xit/framework/biz/mng/menu/mapper/ProgramMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/menu/mapper/IProgramMgtMapper.java index fc9b9e47..0fec4c98 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/ProgramMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IProgramMgtMapper.java @@ -8,7 +8,7 @@ import egovframework.rte.psl.dataaccess.mapper.Mapper; import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; @Mapper -public interface ProgramMgtMapper { +public interface IProgramMgtMapper { /** *
메소드 설명: 프로그램관리 목록 조회
diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuByRoleMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuByRoleMgtMapper.java deleted file mode 100644 index 500c626c..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuByRoleMgtMapper.java +++ /dev/null @@ -1,80 +0,0 @@ -//package kr.xit.framework.biz.mng.mapper; -// -//import java.sql.SQLException; -//import java.util.List; -//import java.util.Map; -// -//import egovframework.rte.psl.dataaccess.mapper.Mapper; -//import kr.xit.framework.biz.mng.model.MenuCreateMngSearchVO; -//import kr.xit.framework.biz.mng.model.MenuCreateMngVO; -//import org.apache.ibatis.session.RowBounds; -// -///** -// * -// * @업무그룹명: 메뉴생성관리 Mapper -// * @설명: -// * @최초작성일: 2020. 3. 26. 오전 10:03:50 -// * @최초작성자: 박민규 -// * @author (주)엑스아이티 개발팀 -// * @since 2002. 2. 2. -// * @version 1.0 Copyright(c) XIT All rights reserved. -// */ -//@Mapper -//public interface MenuCreateMngMapper { -// -// /** -// *
메소드 설명: 메뉴생성관리 목록 조회
-// * @param searchVO -// * @return List 요청처리 후 응답객체 -// * @author: 박민규 -// * @date: 2020. 3. 26. -// */ -// public List findList(Map paraMap, RowBounds rowBounds); -// -// /** -// *
메소드 설명: 메뉴생성관리 목록 총건수 조회
-// * @param searchVO -// * @return int 요청처리 후 응답객체 -// * @author: 박민규 -// * @date: 2020. 3. 26. -// */ -// public int findListTotCnt(MenuCreateMngSearchVO searchVO) throws SQLException; -// -// /** -// *
메소드 설명: 메뉴생성관리 상세정보 조회
-// * @param vo -// * @return XitMenuCreateMngVO 요청처리 후 응답객체 -// * @author: 박민규 -// * @date: 2020. 3. 26. -// */ -// public MenuCreateMngVO findView(MenuCreateMngVO vo) throws SQLException; -// -// /** -// *
메소드 설명: 메뉴목록 조회
-// * @param vo -// * @return -// * @author: 박민규 -// * @date: 2020. 3. 31. -// */ -// public List findListOfMenuInfo(MenuCreateMngVO vo) throws SQLException; -// -// /** -// *
메소드 설명: 사용자별 사용자보안설정 데이터 조회
-// * @param searchVO -// * @return XitMenuCreateMngVO 요청처리 후 응답객체 -// * @author: 박민규 -// * @date: 2020. 3. 31. -// */ -// public MenuCreateMngVO findUserScrtySetupByUsr(MenuCreateMngSearchVO searchVO) throws SQLException; -// -// /** -// *
메소드 설명: 매뉴생성내역 전체데이터 삭제
-// * @return int 요청처리 후 응답객체 -// * @author: 박민규 -// * @date: 2020. 3. 31. -// */ -// public int deleteAllMenuCreatDtlsList() throws SQLException; -// -// -// -//} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/model/ProgramMngVO.java b/src/main/java/kr/xit/framework/biz/mng/menu/model/ProgramMngVO.java index fc29d556..8f4da224 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/model/ProgramMngVO.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/model/ProgramMngVO.java @@ -1,6 +1,7 @@ package kr.xit.framework.biz.mng.menu.model; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; @@ -22,6 +23,7 @@ import lombok.ToString; @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode +@Builder @ToString public class ProgramMngVO { /** diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/model/XitMenuInfoVO.java b/src/main/java/kr/xit/framework/biz/mng/menu/model/XitMenuInfoVO.java index 76ee0e0c..02e4a193 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/model/XitMenuInfoVO.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/model/XitMenuInfoVO.java @@ -1,6 +1,7 @@ package kr.xit.framework.biz.mng.menu.model; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; @@ -16,6 +17,7 @@ import lombok.ToString; @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode +@Builder @ToString public class XitMenuInfoVO { private static final long serialVersionUID = -1346557609566350808L; diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/IMenuByRoleMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/IMenuByRoleMgtService.java new file mode 100644 index 00000000..c38cb58e --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/IMenuByRoleMgtService.java @@ -0,0 +1,23 @@ +package kr.xit.framework.biz.mng.menu.service; + +import java.util.List; +import java.util.Map; + +import kr.xit.framework.biz.mng.menu.model.MenuCreateMngVO; + +/** + * + * @업무그룹명: 메뉴생성관리 Service + * @설명: + * @최초작성일: 2020. 3. 26. 오전 10:07:11 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IMenuByRoleMgtService { + + List findRoleInfos(T t); + List findMenuInfoByRoleList(T t); + void saveMenuByRoleList(Map paraMap); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/IMenuMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/IMenuMgtService.java new file mode 100644 index 00000000..5e28c1ba --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/IMenuMgtService.java @@ -0,0 +1,76 @@ +package kr.xit.framework.biz.mng.menu.service; + +import java.io.FileInputStream; +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; +import kr.xit.framework.biz.mng.menu.model.MenuListMngVO; + +/** + * + * @업무그룹명: 메뉴목록관리 Service + * @설명: + * @최초작성일: 2020. 3. 26. 오전 10:07:11 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IMenuMgtService { + + /** + *
메소드 설명: 메뉴목록관리 목록 조회
+ * @param paraMap + * @return List 요청처리 후 응답객체 + * @author: 최정민 + * @date: 2022. 10. 18. + */ + List findMenus(final Map paraMap, final RowBounds rowBounds); + + void addMenu(final XitMenuInfoVO vo); + void modifyMenu(final XitMenuInfoVO vo); + void removeMenu(final String menuNo); + + + + + + + + + + + + + + + + + + /** + *
메소드 설명: 메뉴일괄초기화
+	 * 	-메뉴목록 테이블, 프로그램목록 테이블 전체 삭제
+	 * 
+ * @return boolean 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 3. 27. + */ + public boolean menuBndeAllDelete() throws Exception; + + /** + *
메소드 설명: 메뉴일괄등록 프로세스
+ * @param vo + * @param inputStream + * @return + * @throws Exception String 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 3. 27. + */ + public String addsProc(MenuListMngVO vo, FileInputStream inputStream) throws Exception; + + + +} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/IProgramMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/IProgramMgtService.java new file mode 100644 index 00000000..0d1c8d00 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/IProgramMgtService.java @@ -0,0 +1,43 @@ +package kr.xit.framework.biz.mng.menu.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; + +/** + * + * @업무그룹명: 프로그램관리 Service + * @설명: + * @최초작성일: 2020. 3. 26. 오전 10:07:11 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IProgramMgtService { + + /** + *
메소드 설명: 프로그램 목록 조회
+ */ + List findPrograms(final Map paraMap, final RowBounds rowBounds); + + /** + *
메소드 설명: 프로그램 상세정보 조회
+ */ + ProgramMngVO findProgram(final String progrmFileNm); + + /** + *
메소드 설명: 프로그램 등록
+ */ + int addProgram(final ProgramMngVO vo); + + /** + *
메소드 설명: 프로그램 변경
+ */ + int modifyProgram(final ProgramMngVO vo); + + int removeProgram(final String programFileNm); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuByRoleMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuByRoleMgtService.java index 060d4c27..fbf24580 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuByRoleMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuByRoleMgtService.java @@ -3,77 +3,50 @@ package kr.xit.framework.biz.mng.menu.service; import java.util.List; import java.util.Map; -import kr.xit.framework.biz.mng.menu.model.MenuCreateMngSearchVO; +import org.springframework.stereotype.Service; + +import kr.xit.framework.biz.cmm.model.XitMenuCreatDtlsVO; +import kr.xit.framework.biz.mng.menu.mapper.IMenuByRoleMgtMapper; import kr.xit.framework.biz.mng.menu.model.MenuCreateMngVO; -import org.apache.ibatis.session.RowBounds; +import kr.xit.framework.biz.mng.menu.service.IMenuByRoleMgtService; +import lombok.RequiredArgsConstructor; + +; + +@RequiredArgsConstructor +@Service +public class MenuByRoleMgtService implements IMenuByRoleMgtService { + + private final IMenuByRoleMgtMapper mapper; + + @Override + public List findRoleInfos(T t) { + return mapper.selectRoleInfos(t); + } + + @Override + public List findMenuInfoByRoleList(T t) { + return mapper.selectMenuInfoByRoleList(t); + } + + @Override + public void saveMenuByRoleList(Map paraMap) { + String authorCode = String.valueOf(paraMap.get("authorCode")); + @SuppressWarnings("unchecked") + List menuNoList = (List)paraMap.get("menuNoList"); -/** - * - * @업무그룹명: 메뉴생성관리 Service - * @설명: - * @최초작성일: 2020. 3. 26. 오전 10:07:11 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface MenuByRoleMgtService { + // 해당 권한의 메뉴 삭제 + mapper.deleteMenuCreatDtls(authorCode); - /** - *
메소드 설명: 메뉴생성관리 목록 조회
- * @param map - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 26. - */ - public List findList(Map paraMap, RowBounds rowBounds); - - /** - *
메소드 설명: 메뉴생성관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 26. - */ - public int findListTotCnt(MenuCreateMngSearchVO searchVO); - - /** - *
메소드 설명: 메뉴생성관리 상세정보 조회
- * @param vo - * @return XitMenuCreateMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 26. - */ - public MenuCreateMngVO findView(MenuCreateMngVO vo); - - /** - *
메소드 설명: 메뉴생성관리 다건 등록
- * @param authorCodes 권한코드 - * @param MenuNos 메뉴코드 다건 - * @return void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 26. - */ - public void addsProc(String authorCode, String MenuNos); - - - /** - *
메소드 설명: 메뉴목록 조회
- * @param vo - * @return - * @author: 박민규 - * @date: 2020. 3. 31. - */ - public List findListOfMenuInfo(MenuCreateMngVO vo); - - - /** - *
메소드 설명: 사용자별 사용자보안설정 데이터 조회
- * @param searchVO - * @return XitMenuCreateMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 31. - */ - public MenuCreateMngVO findUserScrtySetupByUsr(MenuCreateMngSearchVO searchVO); - + // 메뉴 등록 + menuNoList.forEach((menuNo) -> { + mapper.insertMenuCreatDtls( + XitMenuCreatDtlsVO + .builder() + .authorCode(authorCode) + .menuNo(menuNo) + .build() + ); + }); + } } diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java index 4a2a89e2..1b289b83 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java @@ -5,36 +5,73 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +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 kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; -import kr.xit.framework.biz.mng.menu.model.MenuListMngSearchVO; +import egovframework.rte.fdl.excel.EgovExcelService; +import kr.xit.framework.biz.cmm.model.ProgrmListVO; +import kr.xit.framework.biz.mng.menu.mapper.IMenuMgtMapper; +import kr.xit.framework.biz.mng.menu.mapper.IProgramMgtMapper; import kr.xit.framework.biz.mng.menu.model.MenuListMngVO; +import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; +import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; +import kr.xit.framework.biz.mng.menu.service.IMenuMgtService; +import kr.xit.framework.core.utils.XitCmmnUtil; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.Checks; +import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; -/** - * - * @업무그룹명: 메뉴목록관리 Service - * @설명: - * @최초작성일: 2020. 3. 26. 오전 10:07:11 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface MenuMgtService { +@Slf4j +@RequiredArgsConstructor +@Service +public class MenuMgtService implements IMenuMgtService { + private final IMenuMgtMapper mapper; + private final IProgramMgtMapper programMngMapper; + @Qualifier("egovExcelService") + private final EgovExcelService egovExcelService; - /** - *
메소드 설명: 메뉴목록관리 목록 조회
- * @param paraMap - * @return List 요청처리 후 응답객체 - * @author: 최정민 - * @date: 2022. 10. 18. - */ - List findMenus(final Map paraMap, final RowBounds rowBounds); - - void addMenu(final XitMenuInfoVO vo); - void modifyMenu(final XitMenuInfoVO vo); - void removeMenu(final String menuNo); + @Override + public List findMenus(final Map paraMap, final RowBounds rowBounds) { + + return mapper.selectMenuInfos(paraMap, rowBounds); + } + + @Override + public void addMenu(final XitMenuInfoVO vo) { + // 메뉴 등록 여부 + if(Checks.isNotEmpty(mapper.selectMenuInfo(XitMenuInfoVO.builder() + .menuNo(vo.getMenuNo()) + .build()))) + throw BizRuntimeException.create(MessageKey.DUP_ERR_MSG); + + // 프로그램 존재 여부 + if(Checks.isEmpty(programMngMapper.selectProgram(ProgramMngVO.builder() + .progrmFileNm(vo.getProgrmFileNm()) + .build()))) + throw BizRuntimeException.create(MessageKey.NOT_FOUND_MSG); + + mapper.insertMenuInfo(vo); + } + + @Override + public void modifyMenu(final XitMenuInfoVO vo) { + mapper.updateMenuInfo(vo); + } + + @Override + public void removeMenu(final String menuNo) { + // 참조하는 메뉴 조회 + if(mapper.selectMenuInfos(XitMenuInfoVO.builder().upperMenuNo(menuNo).build()).size() > 0) + throw BizRuntimeException.create("fail.common.delete.upperMenuExist"); + mapper.deleteMenuInfo(menuNo); + } @@ -50,28 +87,343 @@ public interface MenuMgtService { + + + @Override + public boolean menuBndeAllDelete() throws Exception { + //if(!deleteAllProgrmDtls()){return false;} // 프로그램변경요청 테이블 + if (!deleteAllMenuCreatDtlsList()) { + return false; + } // 메뉴정보생성내역 테이블 + if (!deleteAllMenuList()) { + return false; + } // 메뉴정보 테이블 + if (!deleteAllProgrm()) { + return false; + } // 프로그램목록 테이블 + return true; + } + + + /** + * 메뉴정보 전체데이터 초기화 + * @return boolean + * @exception Exception + */ + private boolean deleteAllMenuList() throws Exception { + //mapper.deleteMenuInfo(null); + return true; + } /** - *
메소드 설명: 메뉴일괄초기화
-	 * 	-메뉴목록 테이블, 프로그램목록 테이블 전체 삭제
-	 * 
- * @return boolean 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 27. + * 메뉴정보생성내역 전체데이터 초기화 + * @return boolean + * @exception Exception + */ + private boolean deleteAllMenuCreatDtlsList() throws Exception { + mapper.deleteAllMenuCreatDtlsList(); + return true; + } + + /** + * 프로그램 정보 전체데이타 초기화 + * @return boolean + * @exception Exception + */ + private boolean deleteAllProgrm() { + //programMngMapper.deleteProgram(null); + return true; + } + + /** + * 프로그램변경내역 정보 전체데이타 초기화 + * @return boolean + * @exception Exception */ - public boolean menuBndeAllDelete() throws Exception; + private boolean deleteAllProgrmDtls() { + //programMngMapper.deleteAllProgrmDtls(); + return true; + } + + @Override + public String addsProc(MenuListMngVO vo, FileInputStream inputStream) throws Exception { + + String message = addsProc(inputStream); + String sMessage = null; + + switch (Integer.parseInt(message)) { + case 99: + log.debug("프로그램목록/메뉴정보테이블 데이타 존재오류 - 초기화 하신 후 다시 처리하세요."); + sMessage = "프로그램목록/메뉴정보테이블 데이타 존재오류 - 초기화 하신 후 다시 처리하세요."; + break; + case 90: + log.debug("파일존재하지 않음."); + sMessage = "파일존재하지 않음."; + break; + case 91: + log.debug("프로그램시트의 cell 갯수 오류."); + sMessage = "프로그램시트의 cell 갯수 오류."; + break; + case 92: + log.debug("메뉴정보시트의 cell 갯수 오류."); + sMessage = "메뉴정보시트의 cell 갯수 오류."; + break; + case 93: + log.debug("엑셀 시트갯수 오류."); + sMessage = "엑셀 시트갯수 오류."; + break; + case 95: + log.debug("메뉴정보 입력시 에러."); + sMessage = "메뉴정보 입력시 에러."; + break; + case 96: + log.debug("프로그램목록입력시 에러."); + sMessage = "프로그램목록입력시 에러."; + break; + default: + log.debug("일괄배치처리 완료."); + sMessage = "일괄배치처리 완료."; + break; + } + log.debug(message); + return sMessage; + } /** - *
메소드 설명: 메뉴일괄등록 프로세스
- * @param vo - * @param inputStream - * @return - * @throws Exception String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 27. + * 메뉴목록_프로그램목록 일괄생성 + * @param inputStream InputStream + * @return String + * @exception Exception */ - public String addsProc(MenuListMngVO vo, FileInputStream inputStream) throws Exception; + private String addsProc(FileInputStream inputStream) throws Exception { + boolean success = false; + String requestValue = null; + //char FILE_SEPARATOR = File.separatorChar; + int progrmSheetRowCnt = 0; + int menuSheetRowCnt = 0; + //String xlsFile = null; + try { + /* + 오류 메세지 정보 + message = "99"; //프로그램목록테이블 데이타 존재오류. + message = "99"; //메뉴정보테이블 데이타 존재오류. + message = "90"; //파일존재하지 않음. + message = "91"; //프로그램시트의 cell 갯수 오류 + message = "92"; //메뉴정보시트의 cell 갯수 오류 + message = "93"; //엑셀 시트갯수 오류 + message = "95"; //메뉴정보 입력시 에러 + message = "96"; //프로그램목록입력시 에러 + message = "0"; //일괄배치처리 완료 + */ + //List listProgrmListVO = xitFrameCrudService.findXitProgrmLists(new ProgrmListVO()); + List listProgrmListVO = programMngMapper.selectPrograms(new ProgrmListVO()); + if (XitCmmnUtil.notEmpty(listProgrmListVO) && listProgrmListVO.size() > 1) { + return requestValue = "99"; + } //프로그램목록테이블 데이타 존재오류. + //List listMenuInfoVO = xitFrameCrudService.findXitMenuInfos(new XitMenuInfoVO()); + List listMenuInfoVO = mapper.selectMenuInfos(null); + if (XitCmmnUtil.notEmpty(listMenuInfoVO) && listMenuInfoVO.size() > 1) { + return requestValue = "99"; + } //메뉴정보테이블 데이타 존재오류. + Workbook hssfWB = egovExcelService.loadWorkbook(inputStream); + //log.debug("hssfWB:::::"+hssfWB); + // 엑셀 파일 시트 갯수 확인 sheet = 2 첫번째시트 = 프로그램목록 두번째시트 = 메뉴목록 + if (hssfWB.getNumberOfSheets() == 2) { + Sheet progrmSheet = hssfWB.getSheetAt(0); //프로그램목록 시트 가져오기 + Sheet menuSheet = hssfWB.getSheetAt(1); //메뉴정보 시트 가져오기 + Row progrmRow = progrmSheet.getRow(1); //프로그램 row 가져오기 + Row menuRow = menuSheet.getRow(1); //메뉴정보 row 가져오기 + progrmSheetRowCnt = progrmRow.getPhysicalNumberOfCells(); //프로그램 cell Cnt + menuSheetRowCnt = menuRow.getPhysicalNumberOfCells(); //메뉴정보 cell Cnt + + // 프로그램 시트 파일 데이타 검증 cell = 5개 + if (progrmSheetRowCnt != 5) { + return requestValue = "91"; //프로그램시트의 cell 갯수 오류 + } + + // 메뉴목록 시트 파일 데이타 검증 cell = 8개 + if (menuSheetRowCnt != 8) { + return requestValue = "92"; //메뉴정보시트의 cell 갯수 오류 + } + + /* sheet1번 = 프로그램목록 , sheet2번 = 메뉴정보 */ + success = progrmRegist(progrmSheet); + if (success) { + success = menuRegist(menuSheet); + if (success) { + return requestValue = "0"; // 일괄배치처리 완료 + } else { + deleteAllMenuCreatDtlsList(); + deleteAllMenuList(); +// deleteAllProgrmDtls(); //2020.04.09 박민규-프로그램변경내역 테이블이 없어 주석처리 + deleteAllProgrm(); + return requestValue = "95"; // 메뉴정보 입력시 에러 + } + } else { +// deleteAllProgrmDtls(); //2020.04.09 박민규-프로그램변경내역 테이블이 없어 주석처리 + deleteAllProgrm(); + return requestValue = "96"; // 프로그램목록입력시 에러 + } + } else { + return requestValue = "93"; // 엑셀 시트갯수 오류 + } + + } catch (Exception e) { + log.debug("{}", e); + + requestValue = "99"; + } + return requestValue; + } + /** + * 프로그램목록 일괄등록 + * @param progrmSheet HSSFSheet + * @return boolean + * @exception Exception + */ + private boolean progrmRegist(Sheet progrmSheet) throws Exception { + int count = 0; + boolean success = false; + try { + int rows = progrmSheet.getPhysicalNumberOfRows(); //행 갯수 가져오기 + for (int j = 1; j < rows; j++) { //row 루프 + ProgramMngVO vo = new ProgramMngVO(); + Row row = progrmSheet.getRow(j); //row 가져오기 + if (row != null) { + //int cells=row.getPhysicalNumberOfCells(); //cell 갯수 가져오기 + + Cell cell = null; + cell = row.getCell(0); //프로그램명 + if (cell != null) { + vo.setProgrmFileNm("" + cell.getStringCellValue()); + } + cell = row.getCell(1); //프로그램한글명 + if (cell != null) { + vo.setProgrmKoreanNm("" + cell.getStringCellValue()); + } + cell = row.getCell(2); //프로그램저장경로 + if (cell != null) { + vo.setProgrmStrePath("" + cell.getStringCellValue()); + } + cell = row.getCell(3); //프로그램 URL + if (cell != null) { + vo.setURL("" + cell.getStringCellValue()); + } + cell = row.getCell(4); //프로그램설명 + if (cell != null) { + vo.setProgrmDc("" + cell.getStringCellValue()); + } + } + if (insertProgrm(vo)) { + count++; + } + } + if (count == rows - 1) { + success = true; + } else { + success = false; + } + } catch (Exception e) { + log.debug("{}", e); + + success = false; + } + return success; + } + /** + * 메뉴정보 일괄등록 + * @param menuSheet HSSFSheet + * @return boolean + * @exception Exception + */ + private boolean menuRegist(Sheet menuSheet) throws Exception { + boolean success = false; + int count = 0; + try { + int rows = menuSheet.getPhysicalNumberOfRows(); //행 갯수 가져오기 + for (int j = 1; j < rows; j++) { //row 루프 + XitMenuInfoVO vo = new XitMenuInfoVO(); + Row row = menuSheet.getRow(j); //row 가져오기 + if (row != null) { + //int cells=row.getPhysicalNumberOfCells(); //cell 갯수 가져오기 + Cell cell = null; + cell = row.getCell(0); //메뉴번호 + if (cell != null) { + Double doubleCell = new Double(cell.getNumericCellValue()); + //vo.setMenuNo(Integer.parseInt("" + doubleCell.longValue())); + vo.setMenuNo("" + doubleCell.longValue()); + } + cell = row.getCell(1); //메뉴순서 + if (cell != null) { + Double doubleCell = new Double(cell.getNumericCellValue()); + //vo.setMenuOrdr(Integer.parseInt("" + doubleCell.longValue())); + vo.setMenuOrdr("" + doubleCell.longValue()); + } + cell = row.getCell(2); //메뉴명 + if (cell != null) { + vo.setMenuNm("" + cell.getStringCellValue()); + } + cell = row.getCell(3); //상위메뉴번호 + if (cell != null) { + Double doubleCell = new Double(cell.getNumericCellValue()); + //vo.setUpperMenuNo(Integer.parseInt("" + doubleCell.longValue())); + vo.setUpperMenuNo("" + doubleCell.longValue()); + } + cell = row.getCell(4); //메뉴설명 + if (cell != null) { + vo.setMenuDc("" + cell.getStringCellValue()); + } + cell = row.getCell(5); //관련이미지경로 + if (cell != null) { + vo.setRelateImagePath("" + cell.getStringCellValue()); + } + cell = row.getCell(6); //관련이미지명 + if (cell != null) { + vo.setRelateImageNm("" + cell.getStringCellValue()); + } + cell = row.getCell(7); //프로그램파일명 + if (cell != null) { + vo.setProgrmFileNm("" + cell.getStringCellValue()); + } + } + try { + this.addMenu(vo); + if (true) { + count++; + } + } catch (Exception e) { + throw e; + } + } + if (count == rows - 1) { + success = true; + } else { + + } + } catch (Exception e) { + log.debug("{}", e); + + success = false; + + } + return success; + } + + + /** + * 프로그램 정보를 등록 + * @param vo ProgrmManageVO + * @return boolean + * @exception Exception + */ + private boolean insertProgrm(ProgramMngVO vo) throws Exception { + //if(XitCmmnUtil.isEmpty(programMngService.findProgram(vo))) + // programMngService.addProc(vo); + //else + // programMngService.modifyProc(vo); + return true; + } } diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/ProgramMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/ProgramMgtService.java index 53db4c6f..0e633b4d 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/ProgramMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/ProgramMgtService.java @@ -4,40 +4,64 @@ import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; +import kr.xit.framework.biz.mng.menu.mapper.IProgramMgtMapper; import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; +import kr.xit.framework.biz.mng.menu.service.IProgramMgtService; +import kr.xit.framework.core.constants.FrameworkConstants; +import kr.xit.framework.core.utils.XitCmmnUtil; +import kr.xit.framework.support.exception.BizRuntimeException; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; -/** - * - * @업무그룹명: 프로그램관리 Service - * @설명: - * @최초작성일: 2020. 3. 26. 오전 10:07:11 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface ProgramMgtService { - - /** - *
메소드 설명: 프로그램 목록 조회
- */ - List findPrograms(final Map paraMap, final RowBounds rowBounds); - - /** - *
메소드 설명: 프로그램 상세정보 조회
- */ - ProgramMngVO findProgram(final String progrmFileNm); - - /** - *
메소드 설명: 프로그램 등록
- */ - int addProgram(final ProgramMngVO vo); - - /** - *
메소드 설명: 프로그램 변경
- */ - int modifyProgram(final ProgramMngVO vo); - - int removeProgram(final String programFileNm); +@Slf4j +@RequiredArgsConstructor +@Service +public class ProgramMgtService implements IProgramMgtService { + + private final IProgramMgtMapper mapper; + + @Override + public List findPrograms(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectPrograms(paraMap, rowBounds); + } + + @Override + public ProgramMngVO findProgram(final String progrmFileNm) { + return mapper.selectProgram(progrmFileNm); + } + + @Override + public int addProgram(final ProgramMngVO vo) { + return mapper.insertProgram(vo); + + } + + @Override + public int modifyProgram(final ProgramMngVO vo) { + String table = "프로그램목록"; + FrameworkConstants.DB_ACTION action = FrameworkConstants.DB_ACTION.U; + + /** + * 필수조건 확인 + */ + String emsg = null; + if(XitCmmnUtil.isEmpty(vo.getProgrmFileNm())) + emsg = String.format("(%s)프로그램파일명(은)는 필수조건 입니다.", table); + if(emsg!=null){ + log.error(emsg); + throw BizRuntimeException.create(emsg); + } + + int result = mapper.updateProgram(vo); + if(result<1) throw BizRuntimeException.create(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm())); + return result; + } + + @Override + public int removeProgram(final String programFileNm) { + return mapper.deleteProgram(programFileNm); + + } } diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuByRoleMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuByRoleMgtServiceImpl.java deleted file mode 100644 index ddd62c86..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuByRoleMgtServiceImpl.java +++ /dev/null @@ -1,123 +0,0 @@ -package kr.xit.framework.biz.mng.menu.service.impl; - -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.cmm.model.XitMenuCreatDtlsVO; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; -import kr.xit.framework.biz.mng.menu.mapper.MenuMgtMapper; -import kr.xit.framework.biz.mng.menu.model.MenuCreateMngSearchVO; -import kr.xit.framework.biz.mng.menu.model.MenuCreateMngVO; -import kr.xit.framework.biz.mng.menu.service.MenuByRoleMgtService; -import kr.xit.framework.core.message.XitMessageSource; - -@Service -public class MenuByRoleMgtServiceImpl implements MenuByRoleMgtService { - - @Resource - private MenuMgtMapper menuMgtMapper; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - - @Override - public List findList(Map paraMap, RowBounds rowBounds) { - //return menuMgtMapper.selectMenuInfos(paraMap, rowBounds); - return null; - } - - @Override - public int findListTotCnt(MenuCreateMngSearchVO searchVO) { - int result = 0; - //result = menuMgtMapper.findListTotCnt(searchVO); - return result; - } - - @Override - public MenuCreateMngVO findView(MenuCreateMngVO vo) { - MenuCreateMngVO result = null; - // result = menuMgtMapper.findView(vo); - return result; - } - - @Override - public void addsProc(String authorCode, String MenuNos) { - - /** - * 유효성 확인 - */ - String[] arrMenuNo = MenuNos.split(","); - if (arrMenuNo == null || (arrMenuNo.length == 0)) { - throw new RuntimeException(xitMessageSource.getMessage("fail.common.insert")); - } - - - /** - * 필수값 설정 - */ - List listMenuCreatDtlsVO = new ArrayList(); - for (int i = 0; i < arrMenuNo.length; i++) { - XitMenuCreatDtlsVO menuCreatDtlsVO = this.convertToCrudVO(arrMenuNo[i], authorCode, null); - listMenuCreatDtlsVO.add(menuCreatDtlsVO); - } - - - /** - * 처리 - */ - //이전에 존재하는 권한코드에 대한 메뉴생성내역 삭제 - XitMenuCreatDtlsVO xitMenuCreatDtlsVO = new XitMenuCreatDtlsVO(); - xitMenuCreatDtlsVO.setAuthorCode(authorCode); - List listBeforeData = xitFrameCrudService.findXitMenuCreatDtlss(xitMenuCreatDtlsVO); - for(XitMenuCreatDtlsVO menuCreatDtlsVO : listBeforeData) { - xitFrameCrudService.removeXitMenuCreatDtls(menuCreatDtlsVO); - } - //메뉴생성내역 테이블에 insert - for (XitMenuCreatDtlsVO menuCreatDtlsVO : listMenuCreatDtlsVO) { - xitFrameCrudService.addXitMenuCreatDtls(menuCreatDtlsVO); - } - - } - - @Override - public List findListOfMenuInfo(MenuCreateMngVO vo) { - List result = null; - // result = menuMgtMapper.findListOfMenuInfo(vo); - return result; - } - - @Override - public MenuCreateMngVO findUserScrtySetupByUsr(MenuCreateMngSearchVO searchVO) { - MenuCreateMngVO result = null; - try { - result = menuMgtMapper.findUserScrtySetupByUsr(searchVO); - } catch (SQLException e) { - throw new RuntimeException("사용자별 사용자보안설정 데이터 조회 FAIL::", e); - } - return result; - } - - - /** - *
메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다.
- * @return XitMenuCreatDtlsVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 27. - */ - private XitMenuCreatDtlsVO convertToCrudVO(String menuNo, String authorCode, String mapngCreatId) { - XitMenuCreatDtlsVO menuCreatDtlsVO = new XitMenuCreatDtlsVO(); - menuCreatDtlsVO.setMenuNo (menuNo); - menuCreatDtlsVO.setAuthorCode (authorCode); - menuCreatDtlsVO.setMapngCreatId(mapngCreatId); - - return menuCreatDtlsVO; - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuMgtServiceImpl.java deleted file mode 100644 index 0b2e7884..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuMgtServiceImpl.java +++ /dev/null @@ -1,423 +0,0 @@ -package kr.xit.framework.biz.mng.menu.service.impl; - -import java.io.FileInputStream; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.apache.ibatis.session.RowBounds; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.Workbook; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -import egovframework.rte.fdl.excel.EgovExcelService; -import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; -import kr.xit.framework.biz.cmm.model.ProgrmListVO; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; -import kr.xit.framework.biz.mng.menu.mapper.ProgramMgtMapper; -import kr.xit.framework.biz.mng.menu.model.MenuListMngVO; -import kr.xit.framework.biz.mng.menu.service.MenuMgtService; -import kr.xit.framework.biz.mng.menu.mapper.MenuMgtMapper; -import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; -import kr.xit.framework.biz.mng.menu.service.ProgramMgtService; -import kr.xit.framework.core.message.XitMessageSource; -import kr.xit.framework.core.utils.XitCmmnUtil; - -@Service -public class MenuMgtServiceImpl implements MenuMgtService { - - private static final Logger logger = LoggerFactory.getLogger(MenuMgtServiceImpl.class); - - @Resource - private MenuMgtMapper mapper; - @Resource - private ProgramMgtMapper programMngMapper; - @Resource - private ProgramMgtService programMngService; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource - private XitMessageSource xitMessageSource; - @Resource(name = "egovExcelService") - private EgovExcelService egovExcelService; - - @Override - public List findMenus(final Map paraMap, final RowBounds rowBounds) { - - return mapper.selectMenuInfos(paraMap, rowBounds); - } - - @Override - public void addMenu(final XitMenuInfoVO vo) { - mapper.insertMenuInfo(vo); - } - - @Override - public void modifyMenu(final XitMenuInfoVO vo) { - mapper.updateMenuInfo(vo); - } - - @Override - public void removeMenu(final String menuNo) { - mapper.deleteMenuInfo(menuNo); - } - - - - - - - - - - - - - - - - - - @Override - public boolean menuBndeAllDelete() throws Exception { - //if(!deleteAllProgrmDtls()){return false;} // 프로그램변경요청 테이블 - if (!deleteAllMenuCreatDtlsList()) { - return false; - } // 메뉴정보생성내역 테이블 - if (!deleteAllMenuList()) { - return false; - } // 메뉴정보 테이블 - if (!deleteAllProgrm()) { - return false; - } // 프로그램목록 테이블 - return true; - } - - - /** - * 메뉴정보 전체데이터 초기화 - * @return boolean - * @exception Exception - */ - private boolean deleteAllMenuList() throws Exception { - mapper.deleteAllMenuList(); - return true; - } - - /** - * 메뉴정보생성내역 전체데이터 초기화 - * @return boolean - * @exception Exception - */ - private boolean deleteAllMenuCreatDtlsList() throws Exception { - mapper.deleteAllMenuCreatDtlsList(); - return true; - } - - /** - * 프로그램 정보 전체데이타 초기화 - * @return boolean - * @exception Exception - */ - private boolean deleteAllProgrm() throws Exception { - //programMngMapper.deleteAllProgrm(); - return true; - } - - /** - * 프로그램변경내역 정보 전체데이타 초기화 - * @return boolean - * @exception Exception - */ - private boolean deleteAllProgrmDtls() throws Exception { - //programMngMapper.deleteAllProgrmDtls(); - return true; - } - - @Override - public String addsProc(MenuListMngVO vo, FileInputStream inputStream) throws Exception { - - String message = addsProc(inputStream); - String sMessage = null; - - switch (Integer.parseInt(message)) { - case 99: - logger.debug("프로그램목록/메뉴정보테이블 데이타 존재오류 - 초기화 하신 후 다시 처리하세요."); - sMessage = "프로그램목록/메뉴정보테이블 데이타 존재오류 - 초기화 하신 후 다시 처리하세요."; - break; - case 90: - logger.debug("파일존재하지 않음."); - sMessage = "파일존재하지 않음."; - break; - case 91: - logger.debug("프로그램시트의 cell 갯수 오류."); - sMessage = "프로그램시트의 cell 갯수 오류."; - break; - case 92: - logger.debug("메뉴정보시트의 cell 갯수 오류."); - sMessage = "메뉴정보시트의 cell 갯수 오류."; - break; - case 93: - logger.debug("엑셀 시트갯수 오류."); - sMessage = "엑셀 시트갯수 오류."; - break; - case 95: - logger.debug("메뉴정보 입력시 에러."); - sMessage = "메뉴정보 입력시 에러."; - break; - case 96: - logger.debug("프로그램목록입력시 에러."); - sMessage = "프로그램목록입력시 에러."; - break; - default: - logger.debug("일괄배치처리 완료."); - sMessage = "일괄배치처리 완료."; - break; - } - logger.debug(message); - return sMessage; - } - - /** - * 메뉴목록_프로그램목록 일괄생성 - * @param inputStream InputStream - * @return String - * @exception Exception - */ - private String addsProc(FileInputStream inputStream) throws Exception { - boolean success = false; - String requestValue = null; - //char FILE_SEPARATOR = File.separatorChar; - int progrmSheetRowCnt = 0; - int menuSheetRowCnt = 0; - //String xlsFile = null; - try { - /* - 오류 메세지 정보 - message = "99"; //프로그램목록테이블 데이타 존재오류. - message = "99"; //메뉴정보테이블 데이타 존재오류. - message = "90"; //파일존재하지 않음. - message = "91"; //프로그램시트의 cell 갯수 오류 - message = "92"; //메뉴정보시트의 cell 갯수 오류 - message = "93"; //엑셀 시트갯수 오류 - message = "95"; //메뉴정보 입력시 에러 - message = "96"; //프로그램목록입력시 에러 - message = "0"; //일괄배치처리 완료 - */ - //List listProgrmListVO = xitFrameCrudService.findXitProgrmLists(new ProgrmListVO()); - List listProgrmListVO = programMngMapper.selectPrograms(new ProgrmListVO()); - if (XitCmmnUtil.notEmpty(listProgrmListVO) && listProgrmListVO.size() > 1) { - return requestValue = "99"; - } //프로그램목록테이블 데이타 존재오류. - //List listMenuInfoVO = xitFrameCrudService.findXitMenuInfos(new XitMenuInfoVO()); - List listMenuInfoVO = mapper.selectMenuInfos(null); - if (XitCmmnUtil.notEmpty(listMenuInfoVO) && listMenuInfoVO.size() > 1) { - return requestValue = "99"; - } //메뉴정보테이블 데이타 존재오류. - Workbook hssfWB = egovExcelService.loadWorkbook(inputStream); - //log.debug("hssfWB:::::"+hssfWB); - // 엑셀 파일 시트 갯수 확인 sheet = 2 첫번째시트 = 프로그램목록 두번째시트 = 메뉴목록 - if (hssfWB.getNumberOfSheets() == 2) { - Sheet progrmSheet = hssfWB.getSheetAt(0); //프로그램목록 시트 가져오기 - Sheet menuSheet = hssfWB.getSheetAt(1); //메뉴정보 시트 가져오기 - Row progrmRow = progrmSheet.getRow(1); //프로그램 row 가져오기 - Row menuRow = menuSheet.getRow(1); //메뉴정보 row 가져오기 - progrmSheetRowCnt = progrmRow.getPhysicalNumberOfCells(); //프로그램 cell Cnt - menuSheetRowCnt = menuRow.getPhysicalNumberOfCells(); //메뉴정보 cell Cnt - - // 프로그램 시트 파일 데이타 검증 cell = 5개 - if (progrmSheetRowCnt != 5) { - return requestValue = "91"; //프로그램시트의 cell 갯수 오류 - } - - // 메뉴목록 시트 파일 데이타 검증 cell = 8개 - if (menuSheetRowCnt != 8) { - return requestValue = "92"; //메뉴정보시트의 cell 갯수 오류 - } - - /* sheet1번 = 프로그램목록 , sheet2번 = 메뉴정보 */ - success = progrmRegist(progrmSheet); - if (success) { - success = menuRegist(menuSheet); - if (success) { - return requestValue = "0"; // 일괄배치처리 완료 - } else { - deleteAllMenuCreatDtlsList(); - deleteAllMenuList(); -// deleteAllProgrmDtls(); //2020.04.09 박민규-프로그램변경내역 테이블이 없어 주석처리 - deleteAllProgrm(); - return requestValue = "95"; // 메뉴정보 입력시 에러 - } - } else { -// deleteAllProgrmDtls(); //2020.04.09 박민규-프로그램변경내역 테이블이 없어 주석처리 - deleteAllProgrm(); - return requestValue = "96"; // 프로그램목록입력시 에러 - } - } else { - return requestValue = "93"; // 엑셀 시트갯수 오류 - } - - } catch (Exception e) { - logger.debug("{}", e); - - requestValue = "99"; - } - return requestValue; - } - - /** - * 프로그램목록 일괄등록 - * @param progrmSheet HSSFSheet - * @return boolean - * @exception Exception - */ - private boolean progrmRegist(Sheet progrmSheet) throws Exception { - int count = 0; - boolean success = false; - try { - int rows = progrmSheet.getPhysicalNumberOfRows(); //행 갯수 가져오기 - for (int j = 1; j < rows; j++) { //row 루프 - ProgramMngVO vo = new ProgramMngVO(); - Row row = progrmSheet.getRow(j); //row 가져오기 - if (row != null) { - //int cells=row.getPhysicalNumberOfCells(); //cell 갯수 가져오기 - - Cell cell = null; - cell = row.getCell(0); //프로그램명 - if (cell != null) { - vo.setProgrmFileNm("" + cell.getStringCellValue()); - } - cell = row.getCell(1); //프로그램한글명 - if (cell != null) { - vo.setProgrmKoreanNm("" + cell.getStringCellValue()); - } - cell = row.getCell(2); //프로그램저장경로 - if (cell != null) { - vo.setProgrmStrePath("" + cell.getStringCellValue()); - } - cell = row.getCell(3); //프로그램 URL - if (cell != null) { - vo.setURL("" + cell.getStringCellValue()); - } - cell = row.getCell(4); //프로그램설명 - if (cell != null) { - vo.setProgrmDc("" + cell.getStringCellValue()); - } - } - if (insertProgrm(vo)) { - count++; - } - } - if (count == rows - 1) { - success = true; - } else { - success = false; - } - } catch (Exception e) { - logger.debug("{}", e); - - success = false; - } - return success; - } - - /** - * 메뉴정보 일괄등록 - * @param menuSheet HSSFSheet - * @return boolean - * @exception Exception - */ - private boolean menuRegist(Sheet menuSheet) throws Exception { - boolean success = false; - int count = 0; - try { - int rows = menuSheet.getPhysicalNumberOfRows(); //행 갯수 가져오기 - for (int j = 1; j < rows; j++) { //row 루프 - XitMenuInfoVO vo = new XitMenuInfoVO(); - Row row = menuSheet.getRow(j); //row 가져오기 - if (row != null) { - //int cells=row.getPhysicalNumberOfCells(); //cell 갯수 가져오기 - Cell cell = null; - cell = row.getCell(0); //메뉴번호 - if (cell != null) { - Double doubleCell = new Double(cell.getNumericCellValue()); - //vo.setMenuNo(Integer.parseInt("" + doubleCell.longValue())); - vo.setMenuNo("" + doubleCell.longValue()); - } - cell = row.getCell(1); //메뉴순서 - if (cell != null) { - Double doubleCell = new Double(cell.getNumericCellValue()); - //vo.setMenuOrdr(Integer.parseInt("" + doubleCell.longValue())); - vo.setMenuOrdr("" + doubleCell.longValue()); - } - cell = row.getCell(2); //메뉴명 - if (cell != null) { - vo.setMenuNm("" + cell.getStringCellValue()); - } - cell = row.getCell(3); //상위메뉴번호 - if (cell != null) { - Double doubleCell = new Double(cell.getNumericCellValue()); - //vo.setUpperMenuNo(Integer.parseInt("" + doubleCell.longValue())); - vo.setUpperMenuNo("" + doubleCell.longValue()); - } - cell = row.getCell(4); //메뉴설명 - if (cell != null) { - vo.setMenuDc("" + cell.getStringCellValue()); - } - cell = row.getCell(5); //관련이미지경로 - if (cell != null) { - vo.setRelateImagePath("" + cell.getStringCellValue()); - } - cell = row.getCell(6); //관련이미지명 - if (cell != null) { - vo.setRelateImageNm("" + cell.getStringCellValue()); - } - cell = row.getCell(7); //프로그램파일명 - if (cell != null) { - vo.setProgrmFileNm("" + cell.getStringCellValue()); - } - } - try { - this.addMenu(vo); - if (true) { - count++; - } - } catch (Exception e) { - throw e; - } - } - if (count == rows - 1) { - success = true; - } else { - - } - } catch (Exception e) { - logger.debug("{}", e); - - success = false; - - } - return success; - } - - - /** - * 프로그램 정보를 등록 - * @param vo ProgrmManageVO - * @return boolean - * @exception Exception - */ - private boolean insertProgrm(ProgramMngVO vo) throws Exception { - //if(XitCmmnUtil.isEmpty(programMngService.findProgram(vo))) - // programMngService.addProc(vo); - //else - // programMngService.modifyProc(vo); - return true; - } - -} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/ProgramMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/ProgramMgtServiceImpl.java deleted file mode 100644 index d9ddf856..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/ProgramMgtServiceImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -package kr.xit.framework.biz.mng.menu.service.impl; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.mng.menu.mapper.ProgramMgtMapper; -import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; -import kr.xit.framework.biz.mng.menu.service.ProgramMgtService; -import kr.xit.framework.core.constants.FrameworkConstants; -import kr.xit.framework.core.utils.XitCmmnUtil; -import kr.xit.framework.support.exception.BizRuntimeException; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@RequiredArgsConstructor -@Service -public class ProgramMgtServiceImpl implements ProgramMgtService { - - private final ProgramMgtMapper mapper; - - @Override - public List findPrograms(final Map paraMap, final RowBounds rowBounds) { - return mapper.selectPrograms(paraMap, rowBounds); - } - - @Override - public ProgramMngVO findProgram(final String progrmFileNm) { - return mapper.selectProgram(progrmFileNm); - } - - @Override - public int addProgram(final ProgramMngVO vo) { - return mapper.insertProgram(vo); - - } - - @Override - public int modifyProgram(final ProgramMngVO vo) { - String table = "프로그램목록"; - FrameworkConstants.DB_ACTION action = FrameworkConstants.DB_ACTION.U; - - /** - * 필수조건 확인 - */ - String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getProgrmFileNm())) - emsg = String.format("(%s)프로그램파일명(은)는 필수조건 입니다.", table); - if(emsg!=null){ - log.error(emsg); - throw BizRuntimeException.create(emsg); - } - - int result = mapper.updateProgram(vo); - if(result<1) throw BizRuntimeException.create(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm())); - return result; - } - - @Override - public int removeProgram(final String programFileNm) { - return mapper.deleteProgram(programFileNm); - - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuByRoleMgtController.java b/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuByRoleMgtController.java index 9e356219..3f7b8459 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuByRoleMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuByRoleMgtController.java @@ -1,200 +1,58 @@ package kr.xit.framework.biz.mng.menu.web; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; import java.util.Map; -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.ui.ModelMap; -import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import kr.xit.framework.biz.mng.menu.model.MenuCreateMngVO; -import kr.xit.framework.biz.mng.menu.service.MenuByRoleMgtService; +import kr.xit.framework.biz.mng.menu.service.IMenuByRoleMgtService; import kr.xit.framework.core.constants.FrameworkConstants; -import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.model.ResultResponse; -import kr.xit.framework.core.utils.XitCmmnUtil; -import kr.xit.framework.core.validation.XitBeanValidator; -import kr.xit.framework.support.mybatis.MybatisUtils; -import kr.xit.framework.support.util.AjaxUtils; +import kr.xit.framework.support.util.AjaxMessageMapRenderer; +import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; -/** - * - * @업무그룹명: 메뉴생성관리 Controller - * @설명: - * @최초작성일: 2020. 3. 25. 오후 4:05:40 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ +@RequiredArgsConstructor @Controller -//@RequestMapping(value = "/_mng_/menu/create/") @RequestMapping(value = "/framework/biz/mng/menu") public class MenuByRoleMgtController { - @Resource - private MenuByRoleMgtService menuCreateMngService; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - - - /** - *
메소드 설명: 메뉴생성관리 목록 페이지
- * @author: 최정민 - * @date: 2022. 10. 18. - */ + private final IMenuByRoleMgtService service; + @GetMapping(value = "/mngMenuByRoleMgtForm") public void mngMenuByRoleMgtForm() { } - /** - * 메소드 설명: 자료 검색 - * Paging처리 : parameter로 Map 사용 - * @RequestParam 필요 - * @param paraMap - * @return String 요청처리 후 응답객체 - * @author: 최정민 - * @date: 2022. 10. 13. - */ - @GetMapping(value = "/MenuCreateMng_list.ajax") - public ModelAndView findsMenuCreate(@RequestParam Map paraMap) { + @RequestMapping(value = "/mngMenuByRoleMgtPopup") + public ModelAndView mngMenuByRoleMgtPopup(final MenuCreateMngVO vo) { + ModelAndView mav = new ModelAndView(); - return ResultResponse.of(menuCreateMngService.findList(paraMap, MybatisUtils.getPagingInfo(paraMap))); + mav.addObject("list_menulist", service.findMenuInfoByRoleList(vo)); + mav.addObject("resultVO", vo); + mav.addObject("pageTitle", "권한별 메뉴"); + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuByRoleMgtPopup.popup"); + return mav; } - - /** - *
메소드 설명: 요청 페이지로 이동 한다.
- * @param tilesDef 타일즈 적용 Type(none: tiles 미적용) - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 26. - */ - @RequestMapping(value = "/mngMenuCreateMgt_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) - public String mngMenuCreateMgt_page(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("menuCreatVO") MenuCreateMngVO vo, ModelMap model) { - switch (cmd) { - case "input": //등록 페이지 - List list_menulist = menuCreateMngService.findListOfMenuInfo(vo); - model.addAttribute("list_menulist", list_menulist); - model.addAttribute("resultVO", vo); - break; -// case "edit": //수정 페이지 -// case "view": //상세 페이지 -// break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - if(!"".equals(tilesDef)) - tilesDef = "."+tilesDef; - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuCreateMgt_"+cmd+tilesDef; - + @GetMapping(value = "/findMenuByRoleList") + public ModelAndView findMenus(@RequestParam final Map paraMap) { + return ResultResponse.of(service.findRoleInfos(paraMap)); } - - - /** - *
메소드 설명: 메뉴생성관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @throws IOException - * @throws ServletException - * @date: 2020. 3. 25. - */ - @RequestMapping(value = "/mngMenuCreateMgt_{cmd}_proc", method=RequestMethod.POST) - public void MenuCreateMng_cmd_proc(HttpServletRequest req - ,@PathVariable String cmd - ,@ModelAttribute("menuCreatVO") MenuCreateMngVO vo - ,@RequestParam(value="checkedAuthorForInsert", required=false, defaultValue="")String checkedAuthorForInsert - ,@RequestParam(value="checkedMenuNoForInsert", required=false, defaultValue="")String checkedMenuNoForInsert - ,BindingResult bindingResult - ,Model model - ,HttpServletRequest request - ,HttpServletResponse response - ) throws ServletException, IOException { - - /** - * 처리 분기 - */ - String sLocationUrl = "forward:/framework/biz/mng/menu/mngMenuCreateMgtForm.do"; - String message = null; - switch (cmd) { -// case "insert": //등록 -// break; - - case "inserts": //다건 등록 - //처리 - try { - menuCreateMngService.addsProc(checkedAuthorForInsert, checkedMenuNoForInsert); - message = xitMessageSource.getMessage("success.common.insert"); - } catch (RuntimeException e) { - message = e.getMessage(); - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - } - sLocationUrl = "forward:/framework/biz/mng/menu/mngMenuCreateMgt_input.do?tilesDef=popup"; - break; - -// case "update": //수정 -// break; - -// case "delete": //삭제 -// break; - -// case "deletes": //다건 삭제 -// break; - - default: - new RuntimeException("유효하지 않은 요청 입니다."); - } - - - - /** - * 응답 설정 - */ - /* ============================ - * 2020.09.10 박민규 - * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선 - * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선 - * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리 - * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward - ============================ */ - //2020.09.10 주석처리 -// model.addAttribute("message", message); -// return sLocationUrl; - model.addAttribute("message", message); - if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 - //반환 데이터 설정 - Map resultMap = new HashMap(); - resultMap.put("message", message); - XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); - }else { //submit 요청 시 - XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); - } + @PostMapping(value = "/saveMenuByRoleList") + public ModelAndView saveMenuByRoleList(@RequestBody final Map paraMap){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + service.saveMenuByRoleList(paraMap); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); + return mav; } } diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuMgtController.java b/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuMgtController.java index c2de31c0..59155ac0 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuMgtController.java @@ -2,50 +2,37 @@ package kr.xit.framework.biz.mng.menu.web; import java.io.File; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.annotation.Resource; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import com.sun.org.apache.xpath.internal.operations.Mod; - import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; -import kr.xit.framework.biz.mng.menu.model.MenuListMngVO; -import kr.xit.framework.biz.mng.menu.service.MenuMgtService; +import kr.xit.framework.biz.mng.menu.service.IMenuMgtService; import kr.xit.framework.core.constants.FrameworkConstants; -import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE; -import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.utils.attachfile.XitAttachFileUtil; import kr.xit.framework.core.utils.attachfile.XitAttachFileVO; -import kr.xit.framework.core.validation.XitBeanValidator; import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.util.AjaxMessageMapRenderer; import kr.xit.framework.support.util.AjaxUtils; -import kr.xit.framework.support.util.Checks; import kr.xit.framework.support.util.ValidationError; import kr.xit.framework.support.util.constants.MessageKey; -import lombok.AllArgsConstructor; +import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; /** @@ -60,15 +47,10 @@ import lombok.extern.slf4j.Slf4j; */ @Controller @Slf4j -@AllArgsConstructor +@RequiredArgsConstructor @RequestMapping(value = "/framework/biz/mng/menu") public class MenuMgtController { - - private final MenuMgtService service; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; + private final IMenuMgtService service; /** @@ -89,13 +71,8 @@ public class MenuMgtController { public ModelAndView mngMenuMgtPopup(final XitMenuInfoVO vo) { ModelAndView mav = new ModelAndView(); - if(Checks.isEmpty(vo)){ - mav.addObject("menuManageVO", new XitMenuInfoVO()); - mav.addObject("pageTitle", "메뉴 등록"); - } else { - mav.addObject("menuManageVO", vo); - mav.addObject("pageTitle", "메뉴 정보(변경)"); - } + mav.addObject("menuManageVO", vo); + mav.addObject("pageTitle", "메뉴 정보 등록 / 변경"); mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuMgtPopup.popup"); return mav; } @@ -134,303 +111,78 @@ public class MenuMgtController { return mav; } - public void uploadMenuExcels(){ -/* + + + + + + + + + + + public void uploadMenuExcels(XitMenuInfoVO vo, HttpServletRequest request, HttpServletResponse response){ List listAttchFile = null; try { listAttchFile = XitAttachFileUtil.fileUpload(request, XitCmmnUtil.setOsPath("/home/tempUpload"), true, 5); } catch (RuntimeException | IOException e1) { - message = xitMessageSource.getMessage("fail.common.msg"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; + //message = xitMessageSource.getMessage("fail.common.msg"); + //sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; } if(XitCmmnUtil.isEmpty(listAttchFile)) { - message = xitMessageSource.getMessage("fail.common.msg"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; + //message = xitMessageSource.getMessage("fail.common.msg"); + //sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; }else { - FileInputStream fis = null; - try { - XitAttachFileVO fileVO = listAttchFile.get(0); - File file = new File(fileVO.getFileFullPath()); - fis = new FileInputStream(file); + XitAttachFileVO fileVO = listAttchFile.get(0); + File file = new File(fileVO.getFileFullPath()); + + try(FileInputStream fis = new FileInputStream(file)){ if (!"".equals(fileVO.getFileName())) { // 2011.10.07 업로드 파일에 대한 확장자를 체크 if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) { if (service.menuBndeAllDelete()) { - message = service.addsProc(vo, fis); + //message = service.addsProc(vo, fis); } else { - message = xitMessageSource.getMessage("fail.common.msg"); - vo.setTmp_Cmd("EgovMenuBndeRegist Error!!"); - model.addAttribute("resultVO", vo); + //message = xitMessageSource.getMessage("fail.common.msg"); + //vo.setTmp_Cmd("EgovMenuBndeRegist Error!!"); + //model.addAttribute("resultVO", vo); } } else { //log.info("xls, xlsx 파일 타입만 등록이 가능합니다."); - message = xitMessageSource.getMessage("fail.common.msg"); + //message = xitMessageSource.getMessage("fail.common.msg"); // model.addAttribute("message", message); // return "forward:/framework/biz/mng/menu/MenuListMng_inputs"; - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; - model.addAttribute("message", message); + //sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; + //model.addAttribute("message", message); if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 //반환 데이터 설정 Map resultMap = new HashMap(); - resultMap.put("message", message); + //resultMap.put("message", message); XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); }else { //submit 요청 시 - XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); + //XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); } } } else { - message = xitMessageSource.getMessage("fail.common.msg"); + //message = xitMessageSource.getMessage("fail.common.msg"); } + } catch (FileNotFoundException e) { + + } catch (ServletException e) { + throw new RuntimeException(e); + } catch (IOException e) { + throw new RuntimeException(e); } catch (Exception e) { + throw new RuntimeException(e); } finally { - try { - if (fis != null) { - fis.close(); - } - } catch (IOException ee) { - log.debug("{}", ee); - } - } - } - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; - break; -*/ - - } - - - - - - - - - - - - /** - *
메소드 설명: 요청 팝업 페이지 이동 한다.
- * @param cmd - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 26. - */ - @RequestMapping(value = "MenuListMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) - public String ProgramMng_page_popup(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("menuManageVO") MenuListMngVO vo - , ModelMap model) { - switch (cmd) { - case "": // - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); + } } - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitMenuListMng_"+cmd+"_popup"+TILES_TYPE.FIMS_POPUP.getVal(); - } - - /** - *
메소드 설명: 메뉴목록관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @throws IOException - * @throws ServletException - * @date: 2020. 3. 25. - */ - @RequestMapping(value = "MenuListMng_{cmd}_proc", method=RequestMethod.POST) - public void MenuListMng_cmd_proc(@PathVariable String cmd - ,@ModelAttribute("menuManageVO") XitMenuInfoVO vo - ,@RequestParam(value="checkedMenuNoForDel", required=false, defaultValue="") String checkedMenuNoForDel - ,BindingResult bindingResult - ,Model model - ,HttpServletRequest request - ,HttpServletResponse response - ) throws ServletException, IOException { - - /** - * 처리 분기 - */ - String sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_list.do"; - String message = null; - switch (cmd) { - case "insert": //등록 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("menuManageVO", vo, bindingResult); - if (bindingResult.hasErrors()) { -// throw new RuntimeException(xitMessageSource.getMessage("fail.common.insert")); - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_input.do"; - break; - } - //처리 - try { - service.addMenu(vo); - message = xitMessageSource.getMessage("success.common.insert"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_input.do"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_input.do"; - } - break; - - case "inserts": //다건 등록 - - List listAttchFile = null; - try { - listAttchFile = XitAttachFileUtil.fileUpload(request, XitCmmnUtil.setOsPath("/home/tempUpload"), true, 5); - } catch (RuntimeException | IOException e1) { - message = xitMessageSource.getMessage("fail.common.msg"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; - } - - if(XitCmmnUtil.isEmpty(listAttchFile)) { - message = xitMessageSource.getMessage("fail.common.msg"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; - }else { - FileInputStream fis = null; - try { - XitAttachFileVO fileVO = listAttchFile.get(0); - File file = new File(fileVO.getFileFullPath()); - fis = new FileInputStream(file); - if (!"".equals(fileVO.getFileName())) { - // 2011.10.07 업로드 파일에 대한 확장자를 체크 - if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) { - if (service.menuBndeAllDelete()) { -// message = service.addsProc(vo, fis); - } else { - message = xitMessageSource.getMessage("fail.common.msg"); - //vo.setTmp_Cmd("EgovMenuBndeRegist Error!!"); - model.addAttribute("resultVO", vo); - } - } else { - //log.info("xls, xlsx 파일 타입만 등록이 가능합니다."); - message = xitMessageSource.getMessage("fail.common.msg"); - - /* ============================ - * 2020.09.10 박민규 - * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선 - * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선 - * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리 - * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward - ============================ */ - //2020.09.10 주석처리 -// model.addAttribute("message", message); -// return "forward:/framework/biz/mng/menu/MenuListMng_inputs"; - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; - model.addAttribute("message", message); - if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 - //반환 데이터 설정 - Map resultMap = new HashMap(); - resultMap.put("message", message); - XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); - }else { //submit 요청 시 - XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); - } - } + //sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; + //break; - } else { - message = xitMessageSource.getMessage("fail.common.msg"); - } - } catch (Exception e) { - } finally { - try { - if (fis != null) { - fis.close(); - } - } catch (IOException ee) { - log.debug("{}", ee); - } - } - } - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do"; - break; - - case "update": //수정 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("menuManageVO", vo, bindingResult); - if (bindingResult.hasErrors()) { -// throw new RuntimeException(xitMessageSource.getMessage("fail.common.update")); - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_edit.do"; - break; - } - //처리 - try { - service.modifyMenu(vo); - message = xitMessageSource.getMessage("success.common.update"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_edit.do"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_edit.do"; - } - break; - - case "delete": //삭제 - //처리 - try { - service.removeMenu(null); - message = xitMessageSource.getMessage("success.common.delete"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_edit.do"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_edit.do"; - } - break; - - case "deletes": //다건 삭제 - //처리 - try { - //service.removesProc(checkedMenuNoForDel); - message = xitMessageSource.getMessage("success.common.delete"); - } catch (RuntimeException e) { - message = e.getMessage(); - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - } - break; - - default: - new RuntimeException("유효하지 않은 요청 입니다."); - } - - - - /** - * 응답 설정 - */ - /* ============================ - * 2020.09.10 박민규 - * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선 - * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선 - * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리 - * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward - ============================ */ - //2020.09.10 주석처리 -// model.addAttribute("message", message); -// return sLocationUrl; - model.addAttribute("message", message); - if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 - //반환 데이터 설정 - Map resultMap = new HashMap(); - resultMap.put("message", message); - XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); - }else { //submit 요청 시 - XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); - } } } diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java b/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java index 3e3bcf93..6e065214 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java @@ -2,21 +2,17 @@ package kr.xit.framework.biz.mng.menu.web; import java.util.Map; -import org.apache.poi.ss.formula.functions.T; import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.Mapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import kr.xit.framework.biz.mng.menu.model.ProgramMngSearchVO; import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; -import kr.xit.framework.biz.mng.menu.service.ProgramMgtService; +import kr.xit.framework.biz.mng.menu.service.IProgramMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; @@ -42,7 +38,7 @@ import lombok.extern.slf4j.Slf4j; @Controller @RequestMapping(value = "/framework/biz/mng/menu") public class ProgramMgtController { - private final ProgramMgtService service; + private final IProgramMgtService service; /** *
메소드 설명: 프로그램관리 목록 페이지
diff --git a/src/main/java/kr/xit/framework/biz/mng/user/mapper/UserMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/user/mapper/IUserMgtMapper.java similarity index 98% rename from src/main/java/kr/xit/framework/biz/mng/user/mapper/UserMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/user/mapper/IUserMgtMapper.java index afdc5518..c035f55d 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/mapper/UserMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/mapper/IUserMgtMapper.java @@ -21,7 +21,7 @@ import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Mapper -public interface UserMgtMapper { +public interface IUserMgtMapper { /** *
메소드 설명: 사용자등록관리 목록 조회
diff --git a/src/main/java/kr/xit/framework/biz/mng/user/service/IUserMgtService.java b/src/main/java/kr/xit/framework/biz/mng/user/service/IUserMgtService.java new file mode 100644 index 00000000..6237d031 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/user/service/IUserMgtService.java @@ -0,0 +1,64 @@ +package kr.xit.framework.biz.mng.user.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.user.model.XitUserEtcOptionVO; +import kr.xit.framework.biz.mng.user.model.XitUserInfoVO; +import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; + +/** + * + * @업무그룹명: 사용자등록관리 Service + * @설명: + * @최초작성일: 2020. 4. 8. 오후 3:33:18 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface IUserMgtService { + + /** + *
메소드 설명: 사용자등록관리 목록 조회
+ * @param searchVO + * @return List 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 8. + */ + List findUsers(final Map paraMap, final RowBounds rowBounds); + XitUserInfoVO findUser(final String uniqId); + + void addUser(final XitUserInfoVO userInfoVO); + void modifyUser(final XitUserInfoVO userInfoVO); + void removeUser(final String userTy, final String uniqId); + + String getDefaultAuthorCode(final String groupId); + + + int addUserScrtySetup(final XitUserScrtySetupVO vo); + int addXitUserEtcOption(final XitUserEtcOptionVO vo); + + + + + + + + + + /** + *
메소드 설명: 사용자 비밀번호 수정
+ * @param uniqId 고유식별ID + * @param id 사용자ID + * @param oldPassword 구 비밀번호 + * @param newPassword 신규 비밀번호 + * @param newPassword2 신규 비밀번호 확인 + * @return void 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 4. 10. + */ + public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java b/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java index f44d3527..a49532f8 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java @@ -2,63 +2,331 @@ package kr.xit.framework.biz.mng.user.service; import java.util.List; import java.util.Map; +import java.util.Objects; import org.apache.ibatis.session.RowBounds; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; +import egovframework.rte.fdl.cmmn.exception.FdlException; +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import kr.xit.framework.biz.cmm.model.XitLoginVO; import kr.xit.framework.biz.mng.user.model.XitUserEtcOptionVO; import kr.xit.framework.biz.mng.user.model.XitUserInfoVO; import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; +import kr.xit.framework.biz.cmm.service.XitFrameCrudService; +import kr.xit.framework.biz.mng.auth.mapper.IAuthGrpMgtMapper; +import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO; +import kr.xit.framework.biz.mng.user.mapper.IUserMgtMapper; +import kr.xit.framework.biz.mng.user.model.XitUserRegMngVO; +import kr.xit.framework.biz.mng.user.service.IUserMgtService; +import kr.xit.framework.core.message.XitMessageSource; +import kr.xit.framework.core.utils.XitCmmnUtil; +import kr.xit.framework.core.utils.XitScrtyUtil; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.Checks; +import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; -/** - * - * @업무그룹명: 사용자등록관리 Service - * @설명: - * @최초작성일: 2020. 4. 8. 오후 3:33:18 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface UserMgtService { +@RequiredArgsConstructor +@Service +public class UserMgtService implements IUserMgtService { + private final IUserMgtMapper mapper; + private final IAuthGrpMgtMapper authGrpMgtMapper; + private final XitFrameCrudService xitFrameCrudService; + private final XitMessageSource xitMessageSource; + @Qualifier("usrEsntlIdGnrService") + private final EgovIdGnrService usrEsntlIdGnrService; - /** - *
메소드 설명: 사용자등록관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 8. - */ - List findUsers(final Map paraMap, final RowBounds rowBounds); - XitUserInfoVO findUser(final String uniqId); + @Override + public List findUsers(final Map paraMap, RowBounds rowBounds) { + return mapper.selectUsers(paraMap, rowBounds); + } + + @Override + public XitUserInfoVO findUser(final String uniqId) { + // TODO : 적용 체크 + if(!this.isUserModifyAuth(uniqId)) + throw new RuntimeException("대상에 대한 열람 권한이 없습니다."); + return mapper.selectUser(uniqId); + } + + + @Override + public void addUser(final XitUserInfoVO vo) { + try { + vo.setUniqId(usrEsntlIdGnrService.getNextStringId()); + } catch (FdlException e) { + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); + } + vo.setUniqId(vo.getUniqId()); //고유식별키 + vo.setUserId(vo.getEmplyrId()); //사용자 id + vo.setUserNm(vo.getEmplyrNm()); //사용자 명 + try { + vo.setPassword(XitScrtyUtil.encryptPassword(vo.getPassword(), vo.getEmplyrId())); + } catch (Exception e) { + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("비밀번호 암호화 실패:: %s", e.getMessage())); + } + vo.setEsntlId(vo.getUniqId()); + + mapper.insertUserInfo(vo); + + // 사용자 권한 + XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); + userScrtySetupVO.setScrtySetupTrgetId(vo.getEsntlId()); + userScrtySetupVO.setMberTyCode("USR03"); + userScrtySetupVO.setAuthorCode(this.getDefaultAuthorCode(vo.getGroupId())); + mapper.insertUserScrtySetup(userScrtySetupVO); + + // 기타 option + XitUserEtcOptionVO userEtcOptionVO = new XitUserEtcOptionVO(); + userEtcOptionVO.setUserId(vo.getUserId()); + userEtcOptionVO.setJobDataAuthor("ONESELF"); //업무 데이터 권한 + userEtcOptionVO.setUserManageAuthor("ONESELF"); //사용자 관리 권한 + mapper.insertUserEtcOption(userEtcOptionVO); + } + + @Override + public void modifyUser(final XitUserInfoVO vo) { + + // TODO : 적용 체크 + if(!this.isUserModifyAuth(vo.getUniqId())) + throw new RuntimeException("대상에 대한 수정 권한이 없습니다."); + + vo.setUserId(vo.getEmplyrId()); //사용자 id + vo.setUserNm(vo.getEmplyrNm()); //사용자 명 + vo.setEsntlId(vo.getUniqId()); + + Map userInfoCheckMap = mapper.selectCheckUserInfo(vo.getUserId()); + if(Checks.isEmpty(userInfoCheckMap) || !Objects.equals(vo.getEsntlId(), userInfoCheckMap.get("esntl_id"))) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "사용자 고유식별값이 일치하지 않습니다."); - void addUser(final XitUserInfoVO userInfoVO); - void modifyUser(final XitUserInfoVO userInfoVO); - void removeUser(final String userTy, final String uniqId); + // 변경이력 등록 and 사용자 정보 변경 + mapper.insertUserInfoChangeDtls(vo.getUserId()); + mapper.updateUserInfo(vo); - String getDefaultAuthorCode(final String groupId); + //그룹ID가 변경되었을 경우 사용자의 권한 갱신 + if(!Objects.equals(vo.getGroupId(), userInfoCheckMap.get("group_id"))) { + XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); + userScrtySetupVO.setScrtySetupTrgetId(vo.getUniqId()); + userScrtySetupVO.setAuthorCode(this.getDefaultAuthorCode(vo.getGroupId())); + if(Checks.isEmpty(mapper.selectUserScrtySetup(userScrtySetupVO.getScrtySetupTrgetId()))) { + userScrtySetupVO.setMberTyCode("USR03"); + mapper.insertUserScrtySetup(userScrtySetupVO); + }else { + mapper.updateUserScrtySetup(userScrtySetupVO); + } + } + } + @Override + public void removeUser(final String userTy, final String userId) { - int addUserScrtySetup(final XitUserScrtySetupVO vo); - int addXitUserEtcOption(final XitUserEtcOptionVO vo); + //업무사용자 삭제 + if (userTy.equals("USR03")){ + Map userInfoCheckMap = mapper.selectCheckUserInfo(userId); + String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("esntl_id")); + //사용자보안설정 삭제 + if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) { + mapper.deleteUserScrtySetup(scrtySetupTrgetId); + } + //사용자정보변경내역 전체 삭제 + mapper.deleteUserInfoChangeDtlsList(userId); + //업무사용자(직원)삭제 + mapper.deleteUserInfo(userId); + //일반회원 삭제 + }else if(userTy.equals("USR01")){ + mapper.deleteGnrlMber(userId); + //기업회원 삭제 + }else if(userTy.equals("USR02")){ //기업회원 삭제 + mapper.deleteEntrprsMber(userId); + } + } + /** + *
+	 * 메소드 설명: 그룹의 기본 권한을 반환 한다.
+	 * 	-그룹 아이디가 빈(Empty) 값이면 "일반사용자(ROLE_USER)" 권한 반환
+	 * 	-그룹 아이디에 대한 그룹정보가 없으면 "일반사용자(ROLE_USER)" 권한 반환
+	 * 	-그룹의 권한코드 설정 값이 빈(Empty) 값이면 "일반사용자(ROLE_USER)" 권한 반환
+	 * 	-그룹의 권한코드 설정 값이 있으면 해당 권한코드 반환
+	 * 
+ * + * @param groupId 그룹 ID + * @return String 요청처리 후 응답객체 + * @author: 박민규 + * @date: 2020. 10. 30. + */ + @Override + public String getDefaultAuthorCode(final String groupId) { + if(Checks.isEmpty(groupId)) return "ROLE_USER"; + + XitAuthorGroupInfoVO vo = authGrpMgtMapper.selectAuthorGroupInfo(groupId); + // 권한 설정 + if (Checks.isEmpty(vo)) + return "ROLE_USER"; + else { + if (Checks.isEmpty(vo.getAuthorCode())) + return "ROLE_USER"; + else + return vo.getAuthorCode(); + } + } + @Override + public int addUserScrtySetup(final XitUserScrtySetupVO vo) { + return mapper.insertUserScrtySetup(vo); + } + @Override + public int addXitUserEtcOption(final XitUserEtcOptionVO vo) { + return mapper.insertUserEtcOption(vo); + } /** - *
메소드 설명: 사용자 비밀번호 수정
- * @param uniqId 고유식별ID - * @param id 사용자ID - * @param oldPassword 구 비밀번호 - * @param newPassword 신규 비밀번호 - * @param newPassword2 신규 비밀번호 확인 - * @return void 요청처리 후 응답객체 + *
메소드 설명: 사용자정보 수정 권한 여부 확인
+	 * 	-보안성 강화를 위해 다음 조건을 충족 하도록 한다.
+	 * 	 :"ROLE_ADMIN 권한"의 사용자는 모든 사용자의 정보 수정이 가능해야 한다.
+	 * 	 :"ROLE_ADMIN 권한"의 사용자정보는 같은 "ROLE_ADMIN 권한"의 사용자만 수정이 가능해야 한다.
+	 * 	 :타인의 정보는 "ROLE_ADMIN 권한" 또는 "사용자관리권한"이 부여된 사용자만 수정이 가능해야 한다.
+	 * 
+ * @param uniqId 고유ID + * @return boolean 요청처리 후 응답객체 * @author: 박민규 - * @date: 2020. 4. 10. + * @date: 2020. 6. 9. */ - public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2); + private boolean isUserModifyAuth(String uniqId) { + XitLoginVO loginSessionVO = XitCmmnUtil.getUserInfo(); + + //본인정보인 경우 + if(loginSessionVO.getUniqId().equals(uniqId)) { + return true; + + }else { + //사용자(수정대상) 권한 조회 + XitUserScrtySetupVO scrtyVO = mapper.selectUserScrtySetup(uniqId); + String tgtAuthorCode = scrtyVO.getAuthorCode(); + + //사용자(수정자) 권한 조회 + scrtyVO = mapper.selectUserScrtySetup(loginSessionVO.getUniqId());; + String userAuthorCode = scrtyVO.getAuthorCode(); + + //사용자(수정자)가 ROLE_ADMIN 권한의 사용자인 경우 + if("ROLE_ADMIN".equals(userAuthorCode)) { + return true; + }else { + //사용자(수정대상)가 ROLE_ADMIN 권한의 사용자인 경우 + if("ROLE_ADMIN".equals(tgtAuthorCode)) { + return false; + } + + XitUserInfoVO tgtUserVO = mapper.selectUser(uniqId); + //Map tgtUserMap = mapper.selectCheckUserInfo(tgtUserVO.getEmplyrId()); + + //사용자관리권한별 분기 + XitUserInfoVO loginUserVO = mapper.selectUser(loginSessionVO.getUniqId()); + //Map loginUserMap = mapper.selectCheckUserInfo(loginUserVO.getEmplyrId()); + + //사용자(수정자) 정보 조회 + switch(loginSessionVO.getUserManageAuthor()) { + case "ALL": //모든 사용자 + return true; + case "DEPT": //자신이 속한 부서의 모든 사용자 + if(loginUserVO.getPstinstCode().equals(tgtUserVO.getPstinstCode())) + return true; + break; + case "ORGNZT": //자신이 속한 조직의 모든 사용자 + if(loginSessionVO.getOrgnztId().equals(tgtUserVO.getOrgnztId())) + return true; + break; + default: + return false; + } + } + return false; + } + } + + + + + + + + + + + + + + + + + + + + + @Override + public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2) { + + /** + * 유효성 확인 + */ + if(!this.isUserModifyAuth(uniqId)) + throw new RuntimeException("대상에 대한 수정 권한이 없습니다."); + XitUserRegMngVO vo = new XitUserRegMngVO(); + vo.setUniqId(uniqId); +// vo = this.findView(vo); + String encryptPass = null; + String encryptNewPass = null; + try { + encryptPass = XitScrtyUtil.encryptPassword(oldPassword, id); + encryptNewPass = XitScrtyUtil.encryptPassword(newPassword, id); + } catch (Exception e) { + throw new RuntimeException(String.format("비밀번호 암호화 실패:: %s", e.getMessage())); + } + //비밀번호 동일 여부 + if (vo.getPassword().equals(encryptPass)) { + //신 비밀번호/비밀번호 확인 동일 여부 + if (!newPassword.equals(newPassword2)) { + throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate2")); + } + } else { + throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate1")); + } + + + /** + * 필수값 설정 + */ + XitUserInfoVO xitUserInfoVO = new XitUserInfoVO(); + xitUserInfoVO.setUserId(id); + xitUserInfoVO.setPassword(encryptNewPass); + + + /** + * 처리 + */ + xitFrameCrudService.modifyXitUserInfo(xitUserInfoVO); + + } + + + + + + + + + + + + + + } diff --git a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/UserMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/user/service/impl/UserMgtServiceImpl.java deleted file mode 100644 index c693e50e..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/UserMgtServiceImpl.java +++ /dev/null @@ -1,332 +0,0 @@ -package kr.xit.framework.biz.mng.user.service.impl; - -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import org.apache.ibatis.session.RowBounds; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Service; - -import egovframework.rte.fdl.cmmn.exception.FdlException; -import egovframework.rte.fdl.idgnr.EgovIdGnrService; -import kr.xit.framework.biz.cmm.model.XitLoginVO; -import kr.xit.framework.biz.mng.user.model.XitUserEtcOptionVO; -import kr.xit.framework.biz.mng.user.model.XitUserInfoVO; -import kr.xit.framework.biz.mng.user.model.XitUserScrtySetupVO; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; -import kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper; -import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO; -import kr.xit.framework.biz.mng.user.mapper.UserMgtMapper; -import kr.xit.framework.biz.mng.user.model.XitUserRegMngVO; -import kr.xit.framework.biz.mng.user.service.UserMgtService; -import kr.xit.framework.core.message.XitMessageSource; -import kr.xit.framework.core.utils.XitCmmnUtil; -import kr.xit.framework.core.utils.XitScrtyUtil; -import kr.xit.framework.support.exception.BizRuntimeException; -import kr.xit.framework.support.util.Checks; -import kr.xit.framework.support.util.constants.MessageKey; -import lombok.RequiredArgsConstructor; - -@RequiredArgsConstructor -@Service -public class UserMgtServiceImpl implements UserMgtService { - private final UserMgtMapper mapper; - private final AuthGrpMgtMapper authGrpMgtMapper; - private final XitFrameCrudService xitFrameCrudService; - private final XitMessageSource xitMessageSource; - @Qualifier("usrEsntlIdGnrService") - private final EgovIdGnrService usrEsntlIdGnrService; - - @Override - public List findUsers(final Map paraMap, RowBounds rowBounds) { - return mapper.selectUsers(paraMap, rowBounds); - } - - @Override - public XitUserInfoVO findUser(final String uniqId) { - // TODO : 적용 체크 - if(!this.isUserModifyAuth(uniqId)) - throw new RuntimeException("대상에 대한 열람 권한이 없습니다."); - return mapper.selectUser(uniqId); - } - - - @Override - public void addUser(final XitUserInfoVO vo) { - try { - vo.setUniqId(usrEsntlIdGnrService.getNextStringId()); - } catch (FdlException e) { - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); - } - vo.setUniqId(vo.getUniqId()); //고유식별키 - vo.setUserId(vo.getEmplyrId()); //사용자 id - vo.setUserNm(vo.getEmplyrNm()); //사용자 명 - try { - vo.setPassword(XitScrtyUtil.encryptPassword(vo.getPassword(), vo.getEmplyrId())); - } catch (Exception e) { - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("비밀번호 암호화 실패:: %s", e.getMessage())); - } - vo.setEsntlId(vo.getUniqId()); - - mapper.insertUserInfo(vo); - - // 사용자 권한 - XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); - userScrtySetupVO.setScrtySetupTrgetId(vo.getEsntlId()); - userScrtySetupVO.setMberTyCode("USR03"); - userScrtySetupVO.setAuthorCode(this.getDefaultAuthorCode(vo.getGroupId())); - mapper.insertUserScrtySetup(userScrtySetupVO); - - // 기타 option - XitUserEtcOptionVO userEtcOptionVO = new XitUserEtcOptionVO(); - userEtcOptionVO.setUserId(vo.getUserId()); - userEtcOptionVO.setJobDataAuthor("ONESELF"); //업무 데이터 권한 - userEtcOptionVO.setUserManageAuthor("ONESELF"); //사용자 관리 권한 - mapper.insertUserEtcOption(userEtcOptionVO); - } - - @Override - public void modifyUser(final XitUserInfoVO vo) { - - // TODO : 적용 체크 - if(!this.isUserModifyAuth(vo.getUniqId())) - throw new RuntimeException("대상에 대한 수정 권한이 없습니다."); - - vo.setUserId(vo.getEmplyrId()); //사용자 id - vo.setUserNm(vo.getEmplyrNm()); //사용자 명 - vo.setEsntlId(vo.getUniqId()); - - Map userInfoCheckMap = mapper.selectCheckUserInfo(vo.getUserId()); - if(Checks.isEmpty(userInfoCheckMap) || !Objects.equals(vo.getEsntlId(), userInfoCheckMap.get("esntl_id"))) - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "사용자 고유식별값이 일치하지 않습니다."); - - // 변경이력 등록 and 사용자 정보 변경 - mapper.insertUserInfoChangeDtls(vo.getUserId()); - mapper.updateUserInfo(vo); - - //그룹ID가 변경되었을 경우 사용자의 권한 갱신 - if(!Objects.equals(vo.getGroupId(), userInfoCheckMap.get("group_id"))) { - XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); - userScrtySetupVO.setScrtySetupTrgetId(vo.getUniqId()); - userScrtySetupVO.setAuthorCode(this.getDefaultAuthorCode(vo.getGroupId())); - - if(Checks.isEmpty(mapper.selectUserScrtySetup(userScrtySetupVO.getScrtySetupTrgetId()))) { - userScrtySetupVO.setMberTyCode("USR03"); - mapper.insertUserScrtySetup(userScrtySetupVO); - }else { - mapper.updateUserScrtySetup(userScrtySetupVO); - } - } - } - @Override - public void removeUser(final String userTy, final String userId) { - - //업무사용자 삭제 - if (userTy.equals("USR03")){ - Map userInfoCheckMap = mapper.selectCheckUserInfo(userId); - String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("esntl_id")); - - //사용자보안설정 삭제 - if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) { - mapper.deleteUserScrtySetup(scrtySetupTrgetId); - } - //사용자정보변경내역 전체 삭제 - mapper.deleteUserInfoChangeDtlsList(userId); - //업무사용자(직원)삭제 - mapper.deleteUserInfo(userId); - - //일반회원 삭제 - }else if(userTy.equals("USR01")){ - mapper.deleteGnrlMber(userId); - - //기업회원 삭제 - }else if(userTy.equals("USR02")){ //기업회원 삭제 - mapper.deleteEntrprsMber(userId); - } - } - - /** - *
-	 * 메소드 설명: 그룹의 기본 권한을 반환 한다.
-	 * 	-그룹 아이디가 빈(Empty) 값이면 "일반사용자(ROLE_USER)" 권한 반환
-	 * 	-그룹 아이디에 대한 그룹정보가 없으면 "일반사용자(ROLE_USER)" 권한 반환
-	 * 	-그룹의 권한코드 설정 값이 빈(Empty) 값이면 "일반사용자(ROLE_USER)" 권한 반환
-	 * 	-그룹의 권한코드 설정 값이 있으면 해당 권한코드 반환
-	 * 
- * - * @param groupId 그룹 ID - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 10. 30. - */ - @Override - public String getDefaultAuthorCode(final String groupId) { - if(Checks.isEmpty(groupId)) return "ROLE_USER"; - - XitAuthorGroupInfoVO vo = authGrpMgtMapper.selectAuthorGroupInfo(groupId); - // 권한 설정 - if (Checks.isEmpty(vo)) - return "ROLE_USER"; - else { - if (Checks.isEmpty(vo.getAuthorCode())) - return "ROLE_USER"; - else - return vo.getAuthorCode(); - } - } - - - @Override - public int addUserScrtySetup(final XitUserScrtySetupVO vo) { - return mapper.insertUserScrtySetup(vo); - } - - @Override - public int addXitUserEtcOption(final XitUserEtcOptionVO vo) { - return mapper.insertUserEtcOption(vo); - } - - - /** - *
메소드 설명: 사용자정보 수정 권한 여부 확인
-	 * 	-보안성 강화를 위해 다음 조건을 충족 하도록 한다.
-	 * 	 :"ROLE_ADMIN 권한"의 사용자는 모든 사용자의 정보 수정이 가능해야 한다.
-	 * 	 :"ROLE_ADMIN 권한"의 사용자정보는 같은 "ROLE_ADMIN 권한"의 사용자만 수정이 가능해야 한다.
-	 * 	 :타인의 정보는 "ROLE_ADMIN 권한" 또는 "사용자관리권한"이 부여된 사용자만 수정이 가능해야 한다.
-	 * 
- * @param uniqId 고유ID - * @return boolean 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 6. 9. - */ - private boolean isUserModifyAuth(String uniqId) { - XitLoginVO loginSessionVO = XitCmmnUtil.getUserInfo(); - - //본인정보인 경우 - if(loginSessionVO.getUniqId().equals(uniqId)) { - return true; - - }else { - //사용자(수정대상) 권한 조회 - XitUserScrtySetupVO scrtyVO = mapper.selectUserScrtySetup(uniqId); - String tgtAuthorCode = scrtyVO.getAuthorCode(); - - //사용자(수정자) 권한 조회 - scrtyVO = mapper.selectUserScrtySetup(loginSessionVO.getUniqId());; - String userAuthorCode = scrtyVO.getAuthorCode(); - - //사용자(수정자)가 ROLE_ADMIN 권한의 사용자인 경우 - if("ROLE_ADMIN".equals(userAuthorCode)) { - return true; - }else { - //사용자(수정대상)가 ROLE_ADMIN 권한의 사용자인 경우 - if("ROLE_ADMIN".equals(tgtAuthorCode)) { - return false; - } - - XitUserInfoVO tgtUserVO = mapper.selectUser(uniqId); - //Map tgtUserMap = mapper.selectCheckUserInfo(tgtUserVO.getEmplyrId()); - - //사용자관리권한별 분기 - XitUserInfoVO loginUserVO = mapper.selectUser(loginSessionVO.getUniqId()); - //Map loginUserMap = mapper.selectCheckUserInfo(loginUserVO.getEmplyrId()); - - //사용자(수정자) 정보 조회 - switch(loginSessionVO.getUserManageAuthor()) { - case "ALL": //모든 사용자 - return true; - case "DEPT": //자신이 속한 부서의 모든 사용자 - if(loginUserVO.getPstinstCode().equals(tgtUserVO.getPstinstCode())) - return true; - break; - case "ORGNZT": //자신이 속한 조직의 모든 사용자 - if(loginSessionVO.getOrgnztId().equals(tgtUserVO.getOrgnztId())) - return true; - break; - default: - return false; - } - } - return false; - } - } - - - - - - - - - - - - - - - - - - - - - @Override - public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2) { - - /** - * 유효성 확인 - */ - if(!this.isUserModifyAuth(uniqId)) - throw new RuntimeException("대상에 대한 수정 권한이 없습니다."); - XitUserRegMngVO vo = new XitUserRegMngVO(); - vo.setUniqId(uniqId); -// vo = this.findView(vo); - String encryptPass = null; - String encryptNewPass = null; - try { - encryptPass = XitScrtyUtil.encryptPassword(oldPassword, id); - encryptNewPass = XitScrtyUtil.encryptPassword(newPassword, id); - } catch (Exception e) { - throw new RuntimeException(String.format("비밀번호 암호화 실패:: %s", e.getMessage())); - } - //비밀번호 동일 여부 - if (vo.getPassword().equals(encryptPass)) { - //신 비밀번호/비밀번호 확인 동일 여부 - if (!newPassword.equals(newPassword2)) { - throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate2")); - } - } else { - throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate1")); - } - - - /** - * 필수값 설정 - */ - XitUserInfoVO xitUserInfoVO = new XitUserInfoVO(); - xitUserInfoVO.setUserId(id); - xitUserInfoVO.setPassword(encryptNewPass); - - - /** - * 처리 - */ - xitFrameCrudService.modifyXitUserInfo(xitUserInfoVO); - - } - - - - - - - - - - - - - - -} diff --git a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitEntUserRegMngServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitEntUserRegMngServiceImpl.java index ad7e4480..acbe1a4c 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitEntUserRegMngServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitEntUserRegMngServiceImpl.java @@ -21,7 +21,7 @@ import kr.xit.framework.biz.mng.user.mapper.XitEntUserRegMngMapper; import kr.xit.framework.biz.mng.user.model.XitEntUserRegMngSearchVO; import kr.xit.framework.biz.mng.user.model.XitEntUserRegMngVO; import kr.xit.framework.biz.mng.user.service.XitEntUserRegMngService; -import kr.xit.framework.biz.mng.user.service.UserMgtService; +import kr.xit.framework.biz.mng.user.service.IUserMgtService; import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.utils.XitScrtyUtil; @@ -33,7 +33,7 @@ public class XitEntUserRegMngServiceImpl implements XitEntUserRegMngService { @Resource private XitEntUserRegMngMapper xitEntUserRegMngMapper; @Resource - private UserMgtService userMgtService; + private IUserMgtService userMgtService; @Resource private XitFrameCrudService xitFrameCrudService; @Resource diff --git a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitGnrUserRegMngServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitGnrUserRegMngServiceImpl.java index 98389404..9b0b6676 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitGnrUserRegMngServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/service/impl/XitGnrUserRegMngServiceImpl.java @@ -21,7 +21,7 @@ import kr.xit.framework.biz.mng.user.mapper.XitGnrUserRegMngMapper; import kr.xit.framework.biz.mng.user.model.XitGnrUserRegMngSearchVO; import kr.xit.framework.biz.mng.user.model.XitGnrUserRegMngVO; import kr.xit.framework.biz.mng.user.service.XitGnrUserRegMngService; -import kr.xit.framework.biz.mng.user.service.UserMgtService; +import kr.xit.framework.biz.mng.user.service.IUserMgtService; import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.utils.XitScrtyUtil; @@ -33,7 +33,7 @@ public class XitGnrUserRegMngServiceImpl implements XitGnrUserRegMngService{ @Resource private XitGnrUserRegMngMapper xitGnrUserRegMngMapper; @Resource - private UserMgtService userMgtService; + private IUserMgtService userMgtService; @Resource private XitFrameCrudService xitFrameCrudService; @Resource diff --git a/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java b/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java index bc1eff75..0749d6f9 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java @@ -25,7 +25,7 @@ import org.springframework.web.servlet.ModelAndView; import kr.xit.framework.biz.mng.user.model.XitUserInfoVO; import kr.xit.framework.biz.mng.user.model.XitUserRegMngSearchVO; import kr.xit.framework.biz.mng.user.model.XitUserRegMngVO; -import kr.xit.framework.biz.mng.user.service.UserMgtService; +import kr.xit.framework.biz.mng.user.service.IUserMgtService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE; import kr.xit.framework.core.model.ResultResponse; @@ -52,7 +52,7 @@ import lombok.RequiredArgsConstructor; @RequestMapping("/framework/biz/mng/usr") public class UserMgtController { - private final UserMgtService service; + private final IUserMgtService service; @GetMapping(value = "/mngUserMgtForm") public void mngUserMgtForm() { diff --git a/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java b/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java index b0d063d2..42c16355 100644 --- a/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java +++ b/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java @@ -3,7 +3,7 @@ package kr.xit.framework.support.util; import org.springframework.context.MessageSource; import org.springframework.context.support.MessageSourceAccessor; -import kr.xit.framework.biz.cache.service.CacheService; +import kr.xit.framework.biz.cache.service.ICacheService; import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.validation.XitBeanValidator; @@ -33,7 +33,7 @@ public class JBeanRegistry { return (XitMessageSource)SpringUtils.getBean(XitMessageSource.class); } - public static CacheService getCacheService() { - return (CacheService)SpringUtils.getBean(CacheService.class); + public static ICacheService getCacheService() { + return (ICacheService)SpringUtils.getBean(ICacheService.class); } } diff --git a/src/main/java/kr/xit/framework/support/util/constants/MessageKey.java b/src/main/java/kr/xit/framework/support/util/constants/MessageKey.java index 2afb298b..11965dce 100644 --- a/src/main/java/kr/xit/framework/support/util/constants/MessageKey.java +++ b/src/main/java/kr/xit/framework/support/util/constants/MessageKey.java @@ -20,4 +20,7 @@ public abstract class MessageKey { public static final String WARN_SESSION_END = "warn.session.end";//세션이 종료 되었습니다.. public static final String EMPTY_MSG_COMBO = "button.select"; + + public static final String DUP_ERR_MSG = "common.isExist.msg"; + public static final String NOT_FOUND_MSG = "custom.isNotExist.msg"; } diff --git a/src/main/resources/sqlmapper/biz/ec/ec0100-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/ec/ec0100-mysql-mapper.xml index 6a45ccb6..7cffc803 100644 --- a/src/main/resources/sqlmapper/biz/ec/ec0100-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/ec/ec0100-mysql-mapper.xml @@ -1,7 +1,7 @@ - + /* ec0200-mysql-mapper|selectEc0200List-|julim */ diff --git a/src/main/resources/sqlmapper/biz/ec/ec0300-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/ec/ec0300-mysql-mapper.xml index dc48e6f1..75e3e57b 100644 --- a/src/main/resources/sqlmapper/biz/ec/ec0300-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/ec/ec0300-mysql-mapper.xml @@ -1,7 +1,7 @@ - + /* ec0400-mysql-mapper|selectEc0400List-|julim */ diff --git a/src/main/resources/sqlmapper/biz/ec/ec0500-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/ec/ec0500-mysql-mapper.xml index f9b24007..bac8cca8 100644 --- a/src/main/resources/sqlmapper/biz/ec/ec0500-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/ec/ec0500-mysql-mapper.xml @@ -1,7 +1,7 @@ - + /* rt0100-mysql-mapper|selectRt0100List-|julim */ diff --git a/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml index 2f19cb18..91a8f954 100644 --- a/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml @@ -1,7 +1,7 @@ - + - - - - - - - /** removeXitAuthorRoleRelate */ - /** 권한역할관계 삭제 */ - DELETE FROM XIT_AUTHOR_ROLE_RELATE - WHERE 1=1 - AND AUTHOR_CODE = #{author_code} - AND ROLE_CODE = #{role_code } - - - - - - - - - /** addXitBbsMastrOption */ - /** 게시판마스터옵션 등록 */ - INSERT INTO XIT_BBS_MASTR_OPTION( - BBS_ID - ,ANSWER_AT - ,STSFDG_AT - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{bbs_id } - ,#{answer_at } - ,#{stsfdg_at } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitBbsMastrOption */ - /** 게시판마스터옵션 수정 */ - UPDATE XIT_BBS_MASTR_OPTION - SET - LAST_UPDT_PNTTM = SYSDATE - ,ANSWER_AT = #{answer_at } - ,STSFDG_AT = #{stsfdg_at } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND BBS_ID = #{bbs_id} - - - /** removeXitBbsMastrOption */ - /** 게시판마스터옵션 삭제 */ - DELETE FROM XIT_BBS_MASTR_OPTION - WHERE 1=1 - AND BBS_ID = #{bbs_id} - - - - - - - - - /** addXitBbsMastr */ - /** 게시판마스터 등록 */ - INSERT INTO XIT_BBS_MASTR( - BBS_ID - ,BBS_NM - ,BBS_INTRCN - ,BBS_TY_CODE - ,BBS_ATTRB_CODE - ,REPLY_POSBL_AT - ,FILE_ATCH_POSBL_AT - ,ATCH_POSBL_FILE_NUMBER - ,ATCH_POSBL_FILE_SIZE - ,USE_AT - ,TMPLAT_ID - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{bbs_id } - ,#{bbs_nm } - ,#{bbs_intrcn } - ,#{bbs_ty_code } - ,#{bbs_attrb_code } - ,#{reply_posbl_at } - ,#{file_atch_posbl_at } - ,#{atch_posbl_file_number} - ,#{atch_posbl_file_size } - ,#{use_at } - ,#{tmplat_id } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitBbsMastr */ - /** 게시판마스터 수정 */ - UPDATE XIT_BBS_MASTR - SET - LAST_UPDT_PNTTM = SYSDATE - ,BBS_NM = #{bbs_nm } - ,BBS_INTRCN = #{bbs_intrcn } - ,BBS_TY_CODE = #{bbs_ty_code } - ,BBS_ATTRB_CODE = #{bbs_attrb_code } - ,REPLY_POSBL_AT = #{reply_posbl_at } - ,FILE_ATCH_POSBL_AT = #{file_atch_posbl_at } - ,ATCH_POSBL_FILE_NUMBER = #{atch_posbl_file_number} - ,ATCH_POSBL_FILE_SIZE = #{atch_posbl_file_size } - ,USE_AT = #{use_at } - ,TMPLAT_ID = #{tmplat_id } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm } - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND BBS_ID = #{bbs_id} - - - /** removeXitBbsMastr */ - /** 게시판마스터 삭제 */ - DELETE FROM XIT_BBS_MASTR - WHERE 1=1 - AND BBS_ID = #{bbs_id} - - - - - - - - /** addXitBbsPrcuse */ - /** 게시판활용 등록 */ - INSERT INTO XIT_BBS_PRCUSE( - TRGET_ID - ,BBS_ID - ,USE_AT - ,REGIST_SE_CODE - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{trget_id } - ,#{bbs_id } - ,#{use_at } - ,#{regist_se_code } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitBbsPrcuse */ - /** 게시판활용 수정 */ - UPDATE XIT_BBS_PRCUSE - SET - LAST_UPDT_PNTTM = SYSDATE - ,USE_AT = #{use_at } - ,REGIST_SE_CODE = #{regist_se_code } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND TRGET_ID = #{trget_id} - AND BBS_ID = #{bbs_id } - - - /** removeXitBbsPrcuse */ - /** 게시판활용 삭제 */ - DELETE FROM XIT_BBS_PRCUSE - WHERE 1=1 - AND TRGET_ID = #{trget_id} - AND BBS_ID = #{bbs_id } - - - - - - - - /** addXitBbs */ - /** 게시판 등록 */ - INSERT INTO XIT_BBS( - BBS_ID - ,NTT_ID - ,NTT_NO - ,NTT_SJ - ,NTT_CN - ,ANSWER_AT - ,PARNTS_SNTNC_NO - ,ANSWER_LC - ,SORT_ORDR - ,RDCNT - ,USE_AT - ,NTCE_BEGIN_DE - ,NTCE_END_DE - ,NTCR_ID - ,NTCR_NM - ,PASSWORD - ,ATCH_FILE_ID - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{bbs_id } - ,#{ntt_id } - ,#{ntt_no } - ,#{ntt_sj } - ,#{ntt_cn } - ,#{answer_at } - ,#{parnts_sntnc_no } - ,#{answer_lc } - ,#{sort_ordr } - ,#{rdcnt } - ,#{use_at } - ,#{ntce_begin_de } - ,#{ntce_end_de } - ,#{ntcr_id } - ,#{ntcr_nm } - ,#{password } - ,#{atch_file_id } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitBbs */ - /** 게시판 수정 */ - UPDATE XIT_BBS - SET - LAST_UPDT_PNTTM = SYSDATE - ,NTT_NO = #{ntt_no } - ,NTT_SJ = #{ntt_sj } - ,NTT_CN = #{ntt_cn } - ,ANSWER_AT = #{answer_at } - ,PARNTS_SNTNC_NO = #{parnts_sntnc_no } - ,ANSWER_LC = #{answer_lc } - ,SORT_ORDR = #{sort_ordr } - ,RDCNT = #{rdcnt } - ,USE_AT = #{use_at } - ,NTCE_BEGIN_DE = #{ntce_begin_de } - ,NTCE_END_DE = #{ntce_end_de } - ,NTCR_ID = #{ntcr_id } - ,NTCR_NM = #{ntcr_nm } - ,PASSWORD = #{password } - ,ATCH_FILE_ID = #{atch_file_id } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND BBS_ID = #{bbs_id} - AND NTT_ID = #{ntt_id} - - - /** removeXitBbs */ - /** 게시판 삭제 */ - DELETE FROM XIT_BBS - WHERE 1=1 - AND BBS_ID = #{bbs_id} - AND NTT_ID = #{ntt_id} - - - - - - - - - /** addXitCmmnClCode */ - /** 공통분류코드 등록 */ - INSERT INTO XIT_CMMN_CL_CODE( - CL_CODE - ,CL_CODE_NM - ,CL_CODE_DC - ,USE_AT - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{cl_code } - ,#{cl_code_nm } - ,#{cl_code_dc } - ,#{use_at } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitCmmnClCode */ - /** 공통분류코드 수정 */ - UPDATE XIT_CMMN_CL_CODE - SET - LAST_UPDT_PNTTM = SYSDATE - ,CL_CODE_NM = #{cl_code_nm } - ,CL_CODE_DC = #{cl_code_dc } - ,USE_AT = #{use_at } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND CL_CODE = #{cl_code} - - - /** removeXitCmmnClCode */ - /** 공통분류코드 삭제 */ - DELETE FROM XIT_CMMN_CL_CODE - WHERE 1=1 - AND CL_CODE = #{cl_code} - - - - - - - - - /** addXitCmmnCode */ - /** 공통코드 등록 */ - INSERT INTO XIT_CMMN_CODE( - CODE_ID - ,CODE_ID_NM - ,CODE_ID_DC - ,USE_AT - ,CL_CODE - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{code_id } - ,#{code_id_nm } - ,#{code_id_dc } - ,#{use_at } - ,#{cl_code } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitCmmnCode */ - /** 공통코드 수정 */ - UPDATE XIT_CMMN_CODE - SET - LAST_UPDT_PNTTM = SYSDATE - ,CODE_ID_NM = #{code_id_nm } - ,CODE_ID_DC = #{code_id_dc } - ,USE_AT = #{use_at } - ,CL_CODE = #{cl_code } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND CODE_ID = #{code_id} - - - /** removeXitCmmnCode */ - /** 공통코드 삭제 */ - DELETE FROM XIT_CMMN_CODE - WHERE 1=1 - AND CODE_ID = #{code_id} - - - - - - - - - - /** addXitCmmnDetailCode */ - /** 공통상세코드 등록 */ - INSERT INTO XIT_CMMN_DETAIL_CODE( - CODE_ID - ,CODE - ,CODE_NM - ,CODE_DC - ,USE_AT - ,ETC_1 - ,ETC_2 - ,ETC_3 - ,ORDR - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{code_id } - ,#{code } - ,#{code_nm } - ,#{code_dc } - ,#{use_at } - ,#{etc_1 } - ,#{etc_2 } - ,#{etc_3 } - ,#{ordr } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitCmmnDetailCode */ - /** 공통상세코드 수정 */ - UPDATE XIT_CMMN_DETAIL_CODE - SET - LAST_UPDT_PNTTM = SYSDATE - ,CODE_NM = #{code_nm } - ,CODE_DC = #{code_dc } - ,USE_AT = #{use_at } - ,ETC_1 = #{etc_1 } - ,ETC_2 = #{etc_2 } - ,ETC_3 = #{etc_3 } - ,ORDR = #{ordr } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND CODE_ID = #{code_id} - AND CODE = #{code } - - - /** removeXitCmmnDetailCode */ - /** 공통상세코드 삭제 */ - DELETE - FROM XIT_CMMN_DETAIL_CODE - WHERE 1=1 - AND CODE_ID = #{code_id} - AND CODE = #{code } - - - - - - - - - /** addXitConectLog */ - /** 접속로그 등록 */ - INSERT INTO XIT_CONECT_LOG( - LOG_ID - ,CONECT_ID - ,CONECT_IP - ,CONECT_MTHD - ,ERROR_OCCRRNC_AT - ,ERROR_CODE - ,CREAT_DT - )VALUES( - #{log_id } - ,#{conect_id } - ,#{conect_ip } - ,#{conect_mthd } - ,#{error_occrrnc_at} - ,#{error_code } - ,SYSDATE - ) - - - /** modifyXitConectLog */ - /** 접속로그 수정 */ - UPDATE XIT_CONECT_LOG - SET - CREAT_DT = CREAT_DT - ,CONECT_ID = #{conect_id } - ,CONECT_IP = #{conect_ip } - ,CONECT_MTHD = #{conect_mthd } - ,ERROR_OCCRRNC_AT = #{error_occrrnc_at} - ,ERROR_CODE = #{error_code } - WHERE 1=1 - AND LOG_ID = #{log_id} - - - /** removeXitConectLog */ - /** 접속로그 삭제 */ - DELETE - FROM XIT_CONECT_LOG - WHERE 1=1 - AND LOG_ID = #{log_id} - - - - - - - - - /** addXitEntrprsMber */ - /** 기업회원 등록 */ - INSERT INTO XIT_ENTRPRS_MBER( - ENTRPRS_MBER_ID - ,ENTRPRS_SE_CODE - ,BIZRNO - ,JURIRNO - ,CMPNY_NM - ,CXFC - ,ZIP - ,ADRES - ,ENTRPRS_MIDDLE_TELNO - ,FXNUM - ,INDUTY_CODE - ,APPLCNT_NM - ,APPLCNT_IHIDNUM - ,SBSCRB_DE - ,ENTRPRS_MBER_STTUS - ,ENTRPRS_MBER_PASSWORD - ,ENTRPRS_MBER_PASSWORD_HINT - ,ENTRPRS_MBER_PASSWORD_CNSR - ,GROUP_ID - ,DETAIL_ADRES - ,ENTRPRS_END_TELNO - ,AREA_NO - ,APPLCNT_EMAIL_ADRES - ,ESNTL_ID - )VALUES( - #{entrprs_mber_id } - ,#{entrprs_se_code } - ,#{bizrno } - ,#{jurirno } - ,#{cmpny_nm } - ,#{cxfc } - ,#{zip } - ,#{adres } - ,#{entrprs_middle_telno } - ,#{fxnum } - ,#{induty_code } - ,#{applcnt_nm } - ,#{applcnt_ihidnum } - ,SYSDATE - ,#{entrprs_mber_sttus } - ,#{entrprs_mber_password } - ,#{entrprs_mber_password_hint} - ,#{entrprs_mber_password_cnsr} - ,#{group_id } - ,#{detail_adres } - ,#{entrprs_end_telno } - ,#{area_no } - ,#{applcnt_email_adres } - ,#{esntl_id } - ) - - - /** modifyXitEntrprsMber */ - /** 기업회원 수정 */ - UPDATE XIT_ENTRPRS_MBER - SET - ESNTL_ID = NVL(#{esntl_id}, ESNTL_ID) - ,ENTRPRS_SE_CODE = #{entrprs_se_code } - ,BIZRNO = #{bizrno } - ,JURIRNO = #{jurirno } - ,CMPNY_NM = #{cmpny_nm } - ,CXFC = #{cxfc } - ,ZIP = #{zip } - ,ADRES = #{adres } - ,ENTRPRS_MIDDLE_TELNO = #{entrprs_middle_telno } - ,FXNUM = #{fxnum } - ,INDUTY_CODE = #{induty_code } - ,APPLCNT_NM = #{applcnt_nm } - ,APPLCNT_IHIDNUM = #{applcnt_ihidnum } - ,SBSCRB_DE = #{sbscrb_de } - ,ENTRPRS_MBER_STTUS = #{entrprs_mber_sttus } - ,ENTRPRS_MBER_PASSWORD = #{entrprs_mber_password } - ,ENTRPRS_MBER_PASSWORD_HINT = #{entrprs_mber_password_hint} - ,ENTRPRS_MBER_PASSWORD_CNSR = #{entrprs_mber_password_cnsr} - ,GROUP_ID = #{group_id } - ,DETAIL_ADRES = #{detail_adres } - ,ENTRPRS_END_TELNO = #{entrprs_end_telno } - ,AREA_NO = #{area_no } - ,APPLCNT_EMAIL_ADRES = #{applcnt_email_adres } - WHERE 1=1 - AND ENTRPRS_MBER_ID = #{entrprs_mber_id} - - - /** removeXitEntrprsMber */ - /** 기업회원 삭제 */ - DELETE FROM XIT_ENTRPRS_MBER - WHERE 1=1 - AND ENTRPRS_MBER_ID = #{entrprs_mber_id} - - - - - - - - - /** addXitFileAttrb */ - /** 파일속성 등록 */ - INSERT INTO XIT_FILE_ATTRB( - ATCH_FILE_ID - ,CREAT_DT - ,USE_AT - )VALUES( - #{atch_file_id} - ,SYSDATE - ,#{use_at } - ) - - - /** modifyXitFileAttrb */ - /** 파일속성 수정 */ - UPDATE XIT_FILE_ATTRB - SET - USE_AT = NVL(#{use_at}, USE_AT) - WHERE 1=1 - AND ATCH_FILE_ID = #{atch_file_id} - - - /** removeXitFileAttrb */ - /** 파일속성 삭제 */ - DELETE FROM XIT_FILE_ATTRB - WHERE 1=1 - AND ATCH_FILE_ID = #{atch_file_id} - - - - - - - - - /** addXitFileDetailInfo */ - /** 파일상세정보 등록 */ - INSERT INTO XIT_FILE_DETAIL_INFO( - ATCH_FILE_ID - ,FILE_SN - ,FILE_STRE_COURS - ,STRE_FILE_NM - ,ORIGNL_FILE_NM - ,FILE_EXTSN - ,FILE_CN - ,FILE_SIZE - )VALUES( - #{atch_file_id } - ,#{file_sn } - ,#{file_stre_cours} - ,#{stre_file_nm } - ,#{orignl_file_nm } - ,#{file_extsn } - ,#{file_cn } - ,#{file_size } - ) - - - /** modifyXitFileDetailInfo */ - /** 파일상세정보 수정 */ - UPDATE XIT_FILE_DETAIL_INFO - SET - FILE_SN = FILE_SN - ,FILE_STRE_COURS = #{file_stre_cours} - ,STRE_FILE_NM = #{stre_file_nm } - ,ORIGNL_FILE_NM = #{orignl_file_nm } - ,FILE_EXTSN = #{file_extsn } - ,FILE_CN = #{file_cn } - ,FILE_SIZE = #{file_size } - WHERE 1=1 - AND ATCH_FILE_ID = #{atch_file_id} - AND FILE_SN = #{file_sn } - - - /** removeXitFileDetailInfo */ - /** 파일상세정보 삭제 */ - DELETE FROM XIT_FILE_DETAIL_INFO - WHERE 1=1 - AND ATCH_FILE_ID = #{atch_file_id} - AND FILE_SN = #{file_sn } - - - - - - - - - /** addXitGnrlMber */ - /** 일반회원 등록 */ - INSERT INTO XIT_GNRL_MBER( - MBER_ID - ,PASSWORD - ,PASSWORD_HINT - ,PASSWORD_CNSR - ,IHIDNUM - ,MBER_NM - ,ZIP - ,ADRES - ,AREA_NO - ,MBER_STTUS - ,DETAIL_ADRES - ,END_TELNO - ,MBTLNUM - ,GROUP_ID - ,MBER_FXNUM - ,MBER_EMAIL_ADRES - ,MIDDLE_TELNO - ,SBSCRB_DE - ,SEXDSTN_CODE - ,ESNTL_ID - )VALUES( - #{mber_id } - ,#{password } - ,#{password_hint } - ,#{password_cnsr } - ,#{ihidnum } - ,#{mber_nm } - ,#{zip } - ,#{adres } - ,#{area_no } - ,#{mber_sttus } - ,#{detail_adres } - ,#{end_telno } - ,#{mbtlnum } - ,#{group_id } - ,#{mber_fxnum } - ,#{mber_email_adres} - ,#{middle_telno } - ,SYSDATE - ,#{sexdstn_code } - ,#{esntl_id } - ) - - - /** modifyXitGnrlMber */ - /** 일반회원 수정 */ - UPDATE XIT_GNRL_MBER - SET - ESNTL_ID = NVL(#{esntl_id }, ESNTL_ID) - ,PASSWORD = #{password } - ,PASSWORD_HINT = #{password_hint } - ,PASSWORD_CNSR = #{password_cnsr } - ,IHIDNUM = #{ihidnum } - ,MBER_NM = #{mber_nm } - ,ZIP = #{zip } - ,ADRES = #{adres } - ,AREA_NO = #{area_no } - ,MBER_STTUS = #{mber_sttus } - ,DETAIL_ADRES = #{detail_adres } - ,END_TELNO = #{end_telno } - ,MBTLNUM = #{mbtlnum } - ,GROUP_ID = #{group_id } - ,MBER_FXNUM = #{mber_fxnum } - ,MBER_EMAIL_ADRES = #{mber_email_adres} - ,MIDDLE_TELNO = #{middle_telno } - ,SBSCRB_DE = #{sbscrb_de } - ,SEXDSTN_CODE = #{sexdstn_code } - WHERE 1=1 - AND MBER_ID = #{mber_id} - - - /** removeXitGnrlMber */ - /** 일반회원 삭제 */ - DELETE FROM XIT_GNRL_MBER - WHERE 1=1 - AND MBER_ID = #{mber_id} - - - - - - - - - /** addXitIds */ - /** IDS 등록 */ - INSERT INTO XIT_IDS( - TABLE_NM - ,NEXT_ID - )VALUES( - #{table_nm} - ,#{next_id} - ) - - - /** modifyXitIds */ - /** IDS 수정 */ - UPDATE XIT_IDS - SET - NEXT_ID = NVL(#{next_id}, NEXT_ID) - WHERE 1=1 - AND TABLE_NM = #{table_nm} - - - /** removeXitIds */ - /** IDS 삭제 */ - DELETE FROM XIT_IDS - WHERE 1=1 - AND TABLE_NM = #{table_nm} - - - - - - - - - /** addXitLoginPolicy */ - /** 로그인정책 등록 */ - INSERT INTO XIT_LOGIN_POLICY( - USER_ID - ,IP_INFO - ,DPLCT_PERM_AT - ,LMTT_AT - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - - ,LAST_UPDUSR_ID - )VALUES( - #{user_id } - ,#{ip_info } - ,#{dplct_perm_at } - ,#{lmtt_at } - ,SYSDATE - ,#{frst_register_id } - ,SYSDATE - - ,#{frst_register_id } - ) - - - /** modifyXitLoginPolicy */ - /** 로그인정책 수정 */ - UPDATE XIT_LOGIN_POLICY - SET - LAST_UPDT_PNTTM = SYSDATE - ,IP_INFO = #{ip_info } - ,DPLCT_PERM_AT = #{dplct_perm_at } - ,LMTT_AT = #{lmtt_at } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND USER_ID = #{user_id} - - - /** removeXitLoginPolicy */ - /** 로그인정책 삭제 */ - DELETE - FROM XIT_LOGIN_POLICY - WHERE 1=1 - AND USER_ID = #{user_id} - - - - - - - - - /** addXitMenuCreatDtls */ - /** 메뉴생성내역 등록 */ - INSERT INTO XIT_MENU_CREAT_DTLS( - MENU_NO - ,AUTHOR_CODE - ,MAPNG_CREAT_ID - )VALUES( - #{menu_no } - ,#{author_code } - ,#{mapng_creat_id} - ) - - - /** modifyXitMenuCreatDtls */ - /** 메뉴생성내역 수정 */ - UPDATE XIT_MENU_CREAT_DTLS - SET - MAPNG_CREAT_ID = NVL(#{mapng_creat_id}, MAPNG_CREAT_ID) - WHERE 1=1 - AND MENU_NO = #{menu_no } - AND AUTHOR_CODE = #{author_code } - - - /** removeXitMenuCreatDtls */ - /** 메뉴생성내역 삭제 */ - DELETE FROM XIT_MENU_CREAT_DTLS - WHERE 1=1 - AND MENU_NO = #{menu_no } - AND AUTHOR_CODE = #{author_code } - - - - - - - - - /** addXitMenuInfo */ - /** 메뉴정보 등록 */ - INSERT INTO XIT_MENU_INFO( - MENU_NO - ,MENU_NM - ,PROGRM_FILE_NM - ,UPPER_MENU_NO - ,MENU_ORDR - ,MENU_DC - ,RELATE_IMAGE_COURS - ,RELATE_IMAGE_NM - )VALUES( - #{menu_no } - ,#{menu_nm } - ,#{progrm_file_nm } - ,#{upper_menu_no } - ,#{menu_ordr } - ,#{menu_dc } - ,#{relate_image_cours} - ,#{relate_image_nm } - ) - - - /** modifyXitMenuInfo */ - /** 메뉴정보 수정 */ - UPDATE XIT_MENU_INFO - SET - MENU_NM = NVL(#{menu_nm }, MENU_NM) - ,PROGRM_FILE_NM = #{progrm_file_nm } - ,UPPER_MENU_NO = #{upper_menu_no } - ,MENU_ORDR = #{menu_ordr } - ,MENU_DC = #{menu_dc } - ,RELATE_IMAGE_COURS = - #{relateImageCours - - ,RELATE_IMAGE_NM = #{relate_image_nm } - WHERE 1=1 - AND MENU_NO = #{menuNo - - - /** removeXitMenuInfo */ - /** 메뉴정보 삭제 */ - DELETE FROM XIT_MENU_INFO - WHERE 1=1 - AND MENU_NO = #{menuNo - - - - - - - - - /** addXitOrgnztInfo */ - /** 조직정보 등록 */ - INSERT INTO XIT_ORGNZT_INFO( - ORGNZT_ID - ,ORGNZT_NM - ,ORGNZT_DC - )VALUES( - #{orgnzt_id } - ,#{orgnzt_nm} - ,#{orgnzt_dc} - ) - - - /** modifyXitOrgnztInfo */ - /** 조직정보 수정 */ - UPDATE XIT_ORGNZT_INFO - SET - ORGNZT_NM = NVL(#{orgnzt_nm}, ORGNZT_NM) - ,ORGNZT_DC = #{orgnzt_dc} - WHERE 1=1 - AND ORGNZT_ID = #{orgnzt_id} - - - /** removeXitOrgnztInfo */ - /** 조직정보 삭제 */ - DELETE FROM XIT_ORGNZT_INFO - WHERE 1=1 - AND ORGNZT_ID = #{orgnzt_id} - - - - - - - - - /** addXitProgrmList */ - /** 프로그램목록 등록 */ - INSERT INTO XIT_PROGRM_LIST( - PROGRM_FILE_NM - ,PROGRM_STRE_COURS - ,PROGRM_KOREAN_NM - ,PROGRM_DC - ,URL - )VALUES( - #{progrm_file_nm } - ,#{progrm_stre_cours} - ,#{progrm_korean_nm } - ,#{progrm_dc } - ,#{url } - ) - - - /** modifyXitProgrmList */ - /** 프로그램목록 수정 */ - UPDATE XIT_PROGRM_LIST - SET - PROGRM_KOREAN_NM = NVL(#{progrm_korean_nm }, PROGRM_KOREAN_NM) - ,PROGRM_STRE_COURS = #{progrm_stre_cours} - ,PROGRM_DC = #{progrm_dc } - ,URL = #{url } - WHERE 1=1 - AND PROGRM_FILE_NM = #{progrm_file_nm} - - - /** removeXitProgrmList */ - /** 프로그램목록 삭제 */ - DELETE FROM XIT_PROGRM_LIST - WHERE 1=1 - AND PROGRM_FILE_NM = #{progrm_file_nm} - - - - - - - - - /** addXitRoleInfo */ - /** 역할정보 등록 */ - INSERT INTO XIT_ROLE_INFO( - ROLE_CODE - ,ROLE_NM - ,ROLE_PTTRN - ,ROLE_DC - ,ROLE_TY - ,ROLE_SORT - ,ROLE_CREAT_DE - )VALUES( - #{role_code } - ,#{role_nm } - ,#{role_pttrn } - ,#{role_dc } - ,#{role_ty } - ,#{role_sort } - ,TO_CHAR(SYSDATE, 'YYYYMMDDHH24MISS') - ) - - - /** modifyXitRoleInfo */ - /** 역할정보 수정 */ - UPDATE XIT_ROLE_INFO - SET - ROLE_NM = NVL(#{role_nm }, ROLE_NM) - ,ROLE_PTTRN = #{role_pttrn } - ,ROLE_DC = #{role_dc } - ,ROLE_TY = #{role_ty } - ,ROLE_SORT = #{role_sort } - ,ROLE_CREAT_DE = #{roleCreatDe - WHERE 1=1 - AND ROLE_CODE = #{roleCode - - - /** removeXitRoleInfo */ - /** 역할정보 삭제 */ - DELETE FROM XIT_ROLE_INFO - WHERE 1=1 - AND ROLE_CODE = #{roleCode - - - - - - - - - /** addXitRoleSclsrtRescue */ - /** 역할계층구조 등록 */ - INSERT INTO XIT_ROLE_SCLSRT_RESCUE( - PARNTS_ROLE - ,CHLDRN_ROLE - )VALUES( - #{parnts_role } - ,#{chldrn_role} - ) - - - /** modifyXitRoleSclsrtRescue */ - /** 역할계층구조 수정 */ - - - - - - - - /** removeXitRoleSclsrtRescue */ - /** 역할계층구조 삭제 */ - DELETE FROM XIT_ROLE_SCLSRT_RESCUE - WHERE 1=1 - AND PARNTS_ROLE = #{parntsRole - AND CHLDRN_ROLE = #{chldrnRole - - - /** removesXitRoleSclsrtRescue */ - /** 역할계층구조 다건 삭제 */ - DELETE FROM XIT_ROLE_SCLSRT_RESCUE - WHERE 1=1 - AND PARNTS_ROLE = #{parntsRole - AND CHLDRN_ROLE = #{chldrnRole - - - - - - - - - /** addXitSysLogSumry */ - /** 시스템로그요약 등록 */ - INSERT INTO XIT_SYS_LOG_SUMRY( - OCCRRNC_DE - ,SRVC_NM - ,METHOD_NM - ,CREAT_CO - ,UPDT_CO - ,RDCNT - ,DELETE_CO - ,OUTPT_CO - ,ERROR_CO - )VALUES( - #{occrrnc_de} - ,#{srvc_nm } - ,#{method_nm} - ,#{creat_co } - ,#{updt_co } - ,#{rdcnt } - ,#{delete_co} - ,#{outpt_co } - ,#{error_co } - ) - - - /** modifyXitSysLogSumry */ - /** 시스템로그요약 수정 */ - - - - - - - - - - - - - - - /** removeXitSysLogSumry */ - /** 시스템로그요약 삭제 */ - DELETE FROM XIT_SYS_LOG_SUMRY - WHERE 1=1 - AND OCCRRNC_DE = #{occrrnc_de} - AND SRVC_NM = #{srvc_nm } - AND METHOD_NM = #{method_nm } - - - - - - - - - /** addXitTmplatInfo */ - /** 템플릿정보 등록 */ - INSERT INTO XIT_TMPLAT_INFO( - TMPLAT_ID - ,TMPLAT_NM - ,TMPLAT_COURS - ,USE_AT - ,TMPLAT_SE_CODE - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{tmplat_id } - ,#{tmplat_nm } - ,#{tmplat_cours } - ,#{use_at } - ,#{tmplat_se_code } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitTmplatInfo */ - /** 템플릿정보 수정 */ - UPDATE XIT_TMPLAT_INFO - SET - LAST_UPDT_PNTTM = SYSDATE - ,TMPLAT_NM = #{tmplat_nm } - ,TMPLAT_COURS = #{tmplat_cours } - ,USE_AT = #{use_at } - ,TMPLAT_SE_CODE = #{tmplat_se_code } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND TMPLAT_ID = #{tmplat_id} - - - /** removeXitTmplatInfo */ - /** 템플릿정보 삭제 */ - DELETE FROM XIT_TMPLAT_INFO - WHERE 1=1 - AND TMPLAT_ID = #{tmplat_id} - - - - - - - - - /** addXitUserAbsnce */ - /** 사용자부재 등록 */ - INSERT INTO XIT_USER_ABSNCE( - USER_ID - ,USER_ABSNCE_AT - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{user_id } - ,#{user_absnce_at } - ,SYSDATE - ,#{frst_register_id } - ,SYSDATE - ,#{last_updusr_id } - ) - - - /** modifyXitUserAbsnce */ - /** 사용자부재 수정 */ - UPDATE XIT_USER_ABSNCE - SET - LAST_UPDT_PNTTM = SYSDATE - ,USER_ABSNCE_AT = #{user_absnce_at } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND USER_ID = #{user_id} - - - /** removeXitUserAbsnce */ - /** 사용자부재 삭제 */ - DELETE FROM XIT_USER_ABSNCE - WHERE 1=1 - AND USER_ID = #{user_id} - - - - - - - - - /** addXitUserEtcOption */ - /** 사용자기타옵션 등록 */ - INSERT INTO XIT_USER_ETC_OPTION( - USER_ID - ,JOB_DATA_AUTHOR - ,USER_MANAGE_AUTHOR - ,ELCTRNSANCTN_USE_AT - ,JOB_CONFM_AUTHOR_AT - )VALUES( - #{user_id } - ,#{job_data_author } - ,#{user_manage_author } - ,#{elctrnsanctn_use_at} - ,#{job_confm_author_at} - ) - - - /** modifyXitUserEtcOption */ - /** 사용자기타옵션 수정 */ - UPDATE XIT_USER_ETC_OPTION - - JOB_DATA_AUTHOR = #{job_data_author }, - USER_MANAGE_AUTHOR = #{user_manage_author }, - ELCTRNSANCTN_USE_AT= #{elctrnsanctn_use_at}, - JOB_CONFM_AUTHOR_AT= #{job_confm_author_at}, - - WHERE 1=1 - AND USER_ID = #{user_id} - - - /** removeXitUserEtcOption */ - /** 사용자기타옵션 삭제 */ - DELETE FROM XIT_USER_ETC_OPTION - WHERE 1=1 - AND USER_ID = #{user_id} - - - - - - - - - - - - /** addXitUserInfoChangeDtls */ - /** 사용자정보변경내역 등록 */ - INSERT INTO XIT_USER_INFO_CHANGE_DTLS( - USER_ID - ,CHANGE_DE - ,ORGNZT_ID - ,GROUP_ID - ,EMPL_NO - ,SEXDSTN_CODE - ,BRTHDY - ,FXNUM - ,HOUSE_ADRES - ,HOUSE_END_TELNO - ,AREA_NO - ,DETAIL_ADRES - ,ZIP - ,OFFM_TELNO - ,MBTLNUM - ,EMAIL_ADRES - ,HOUSE_MIDDLE_TELNO - ,PSTINST_CODE - ,USER_STTUS_CODE - ,ESNTL_ID - )VALUES( - #{user_id } - ,TO_CHAR(SYSDATE, 'YYYYMMDDHH24MISS') - ,#{orgnzt_id } - ,#{group_id } - ,#{empl_no } - ,#{sexdstn_code } - ,#{brthdy } - ,#{fxnum } - ,#{house_adres } - ,#{house_end_telno } - ,#{area_no } - ,#{detail_adres } - ,#{zip } - ,#{offm_telno } - ,#{mbtlnum } - ,#{email_adres } - ,#{house_middle_telno} - ,#{pstinst_code } - ,#{user_sttus_code } - ,#{esntl_id } - ) - - - /** modifyXitUserInfoChangeDtls */ - /** 사용자정보변경내역 수정 */ - UPDATE XIT_USER_INFO_CHANGE_DTLS - SET - CHANGE_DE = TO_CHAR(SYSDATE, 'YYYYMMDDHH24MISS') - ,ORGNZT_ID = #{orgnzt_id } - ,GROUP_ID = #{group_id } - ,EMPL_NO = #{empl_no } - ,SEXDSTN_CODE = #{sexdstn_code } - ,BRTHDY = #{brthdy } - ,FXNUM = #{fxnum } - ,HOUSE_ADRES = #{house_adres } - ,HOUSE_END_TELNO = #{house_end_telno } - ,AREA_NO = #{area_no } - ,DETAIL_ADRES = #{detail_adres } - ,ZIP = #{zip } - ,OFFM_TELNO = #{offm_telno } - ,MBTLNUM = #{mbtlnum } - ,EMAIL_ADRES = #{email_adres } - ,HOUSE_MIDDLE_TELNO = #{house_middle_telno} - ,PSTINST_CODE = #{pstinst_code } - ,USER_STTUS_CODE = #{user_sttus_code } - ,ESNTL_ID = #{esntl_id } - WHERE 1=1 - AND USER_ID = #{user_id } - AND CHANGE_DE = #{change_de} - - - /** removeXitUserInfoChangeDtls */ - /** 사용자정보변경내역 삭제 */ - DELETE FROM XIT_USER_INFO_CHANGE_DTLS - WHERE 1=1 - AND USER_ID = #{user_id } - AND CHANGE_DE = #{change_de} - - - /** removeXitUserInfoChangeDtls */ - /** 사용자정보변경내역 목록 삭제 */ - DELETE FROM XIT_USER_INFO_CHANGE_DTLS - WHERE 1=1 - AND USER_ID = #{user_id } - - - - - - - - - /** addXitUserInfo */ - /** 사용자정보 등록 */ - INSERT INTO XIT_USER_INFO( - USER_ID - ,ORGNZT_ID - ,USER_NM - ,PASSWORD - ,EMPL_NO - ,IHIDNUM - ,SEXDSTN_CODE - ,BRTHDY - ,FXNUM - ,HOUSE_ADRES - ,PASSWORD_HINT - ,PASSWORD_CNSR - ,HOUSE_END_TELNO - ,AREA_NO - ,DETAIL_ADRES - ,ZIP - ,OFFM_TELNO - ,MBTLNUM - ,EMAIL_ADRES - ,OFCPS_NM - ,HOUSE_MIDDLE_TELNO - ,GROUP_ID - ,PSTINST_CODE - ,USER_STTUS_CODE - ,ESNTL_ID - ,CRTFC_DN_VALUE - ,SBSCRB_DE - )VALUES( - #{user_id } - ,#{orgnzt_id } - ,#{user_nm } - ,#{password } - ,#{empl_no } - ,#{ihidnum } - ,#{sexdstn_code } - ,#{brthdy } - ,#{fxnum } - ,#{house_adres } - ,#{password_hint } - ,#{password_cnsr } - ,#{house_end_telno } - ,#{area_no } - ,#{detail_adres } - ,#{zip } - ,#{offm_telno } - ,#{mbtlnum } - ,#{email_adres } - ,#{ofcps_nm } - ,#{house_middle_telno } - ,#{group_id } - ,#{pstinst_code } - ,#{user_sttus_code } - ,#{esntl_id } - ,#{crtfc_dn_value } - ,SYSDATE - ) - - - /** modifyXitUserInfo */ - /** 사용자정보 수정 */ - UPDATE XIT_USER_INFO - SET - SBSCRB_DE = SBSCRB_DE - ,ORGNZT_ID = #{orgnzt_id } - ,USER_NM = #{user_nm } - ,PASSWORD = #{password } - ,EMPL_NO = #{empl_no } - ,IHIDNUM = #{ihidnum } - ,SEXDSTN_CODE = #{sexdstn_code } - ,BRTHDY = #{brthdy } - ,FXNUM = #{fxnum } - ,HOUSE_ADRES = #{house_adres } - ,PASSWORD_HINT = #{password_hint } - ,PASSWORD_CNSR = #{password_cnsr } - ,HOUSE_END_TELNO = #{house_end_telno } - ,AREA_NO = #{area_no } - ,DETAIL_ADRES = #{detail_adres } - ,ZIP = #{zip } - ,OFFM_TELNO = #{offm_telno } - ,MBTLNUM = #{mbtlnum } - ,EMAIL_ADRES = #{email_adres } - ,OFCPS_NM = #{ofcps_nm } - ,HOUSE_MIDDLE_TELNO = #{house_middle_telno } - ,GROUP_ID = #{group_id } - ,PSTINST_CODE = #{pstinst_code } - ,USER_STTUS_CODE = #{user_sttus_code } - ,ESNTL_ID = #{esntl_id } - ,CRTFC_DN_VALUE = #{crtfc_dn_value } - WHERE 1=1 - AND USER_ID = #{user_id} - - - /** removeXitUserInfo */ - /** 사용자정보 삭제 */ - DELETE FROM XIT_USER_INFO - WHERE 1=1 - AND USER_ID = #{user_id} - - - - - - - - - - - /** addXitUserScrtySetup */ - /** 사용자보안설정 등록 */ - INSERT INTO XIT_USER_SCRTY_SETUP( - SCRTY_SETUP_TRGET_ID - ,MBER_TY_CODE - ,AUTHOR_CODE - )VALUES( - #{scrty_setup_trget_id} - ,#{mber_ty_code } - ,#{author_code } - ) - - - /** modifyXitUserScrtySetup */ - /** 사용자보안설정 수정 */ - UPDATE XIT_USER_SCRTY_SETUP - SET - MBER_TY_CODE = NVL(#{mber_ty_code }, MBER_TY_CODE) - ,AUTHOR_CODE = #{author_code } - WHERE 1=1 - AND SCRTY_SETUP_TRGET_ID = #{scrty_setup_trget_id} - - - /** removeXitUserScrtySetup */ - /** 사용자보안설정 삭제 */ - DELETE FROM XIT_USER_SCRTY_SETUP - WHERE 1=1 - AND SCRTY_SETUP_TRGET_ID = #{scrty_setup_trget_id} - - - - - - - - - /** addXitZip */ - /** 우편번호 등록 */ - INSERT INTO XIT_ZIP( - ZIP - ,SN - ,CTPRVN_NM - ,SIGNGU_NM - ,EMD_NM - ,LI_BULD_NM - ,LNBR_DONG_HO - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{zip } - ,#{sn } - ,#{ctprvn_nm } - ,#{signgu_nm } - ,#{emd_nm } - ,#{li_buld_nm } - ,#{lnbr_dong_ho } - ,SYSDATE - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitZip */ - /** 우편번호 수정 */ - UPDATE XIT_ZIP - SET - LAST_UPDT_PNTTM = SYSDATE - ,CTPRVN_NM = #{ctprvn_nm } - ,SIGNGU_NM = #{signgu_nm } - ,EMD_NM = #{emd_nm } - ,LI_BULD_NM = #{li_buld_nm } - ,LNBR_DONG_HO = #{lnbr_dong_ho } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND ZIP = #{zip} - AND SN = #{sn } - - - /** removeXitZip */ - /** 우편번호 삭제 */ - DELETE FROM XIT_ZIP - WHERE 1=1 - AND ZIP = #{zip} - AND SN = #{sn } - - - /** removesXitZip */ - /** 우편번호 다건 삭제 */ - DELETE FROM XIT_ZIP - WHERE 1=1 - AND ZIP = #{zip} - AND SN = #{sn } - - - - - - - - - /** addComtnbatchopert */ - /** 배치작업 등록 */ - INSERT INTO COMTNBATCHOPERT( - BATCH_OPERT_ID - ,BATCH_OPERT_NM - ,BATCH_OPERT_SE - ,BATCH_PROGRM - ,PARAMTR - ,USE_AT - ,FRST_REGISTER_ID - ,FRST_REGIST_PNTTM - ,LAST_UPDUSR_ID - ,LAST_UPDT_PNTTM - )VALUES( - #{batch_opert_id } - ,#{batch_opert_nm } - ,#{batch_opert_se } - ,#{batch_progrm } - ,#{paramtr } - ,#{use_at } - ,#{frst_register_id } - ,SYSDATE - ,#{last_updusr_id } - ,SYSDATE - ) - - - /** modifyComtnbatchopert */ - /** 배치작업 수정 */ - UPDATE COMTNBATCHOPERT - - BATCH_OPERT_NM = #{batch_opert_nm }, - BATCH_OPERT_SE = #{batch_opert_se }, - BATCH_PROGRM = #{batch_progrm }, - PARAMTR = #{paramtr }, - USE_AT = #{use_at }, - FRST_REGISTER_ID = #{frst_register_id }, - FRST_REGIST_PNTTM = #{frst_regist_pnttm}, - LAST_UPDUSR_ID = #{last_updusr_id }, - LAST_UPDT_PNTTM = SYSDATE, - - WHERE 1=1 - AND BATCH_OPERT_ID = #{batch_opert_id } - - - /** removeComtnbatchopert */ - /** 배치작업 삭제 */ - DELETE FROM COMTNBATCHOPERT - WHERE 1=1 - AND BATCH_OPERT_ID = #{batch_opert_id } - - - /** removesComtnbatchopert */ - /** 배치작업 다건 삭제 */ - DELETE FROM COMTNBATCHOPERT - WHERE 1=1 - AND BATCH_OPERT_ID = #{batch_opert_id } - AND BATCH_OPERT_NM = #{batch_opert_nm } - AND BATCH_OPERT_SE = #{batch_opert_se } - AND BATCH_PROGRM = #{batch_progrm } - AND PARAMTR = #{paramtr } - AND USE_AT = #{use_at } - AND FRST_REGISTER_ID = #{frst_register_id } - AND FRST_REGIST_PNTTM = #{frst_regist_pnttm} - AND LAST_UPDUSR_ID = #{last_updusr_id } - AND LAST_UPDT_PNTTM = #{last_updt_pnttm } - - - - - - - - - /** addComtnbatchschdul */ - /** 배치스케줄 등록 */ - INSERT INTO COMTNBATCHSCHDUL( - BATCH_SCHDUL_ID - ,BATCH_OPERT_ID - ,EXECUT_CYCLE - ,EXECUT_SCHDUL_DE - ,EXECUT_SCHDUL_HOUR - ,EXECUT_SCHDUL_MNT - ,EXECUT_SCHDUL_SECND - ,FRST_REGISTER_ID - ,FRST_REGIST_PNTTM - ,LAST_UPDUSR_ID - ,LAST_UPDT_PNTTM - )VALUES( - #{batch_schdul_id } - ,#{batch_opert_id } - ,#{execut_cycle } - ,#{execut_schdul_de } - ,#{execut_schdul_hour } - ,#{execut_schdul_mnt } - ,#{execut_schdul_secnd} - ,#{frst_register_id } - ,SYSDATE - ,#{last_updusr_id } - ,SYSDATE - ) - - - /** modifyComtnbatchschdul */ - /** 배치스케줄 수정 */ - UPDATE COMTNBATCHSCHDUL - - EXECUT_CYCLE = #{execut_cycle }, - EXECUT_SCHDUL_DE = #{execut_schdul_de }, - EXECUT_SCHDUL_HOUR = #{execut_schdul_hour }, - EXECUT_SCHDUL_MNT = #{execut_schdul_mnt }, - EXECUT_SCHDUL_SECND = #{execut_schdul_secnd}, - FRST_REGISTER_ID = #{frst_register_id }, - FRST_REGIST_PNTTM = #{frst_regist_pnttm }, - LAST_UPDUSR_ID = #{last_updusr_id }, - LAST_UPDT_PNTTM = SYSDATE, - - WHERE 1=1 - AND BATCH_SCHDUL_ID = #{batch_schdul_id } - AND BATCH_OPERT_ID = #{batch_opert_id } - - - /** removeComtnbatchschdul */ - /** 배치스케줄 삭제 */ - DELETE FROM COMTNBATCHSCHDUL - WHERE 1=1 - AND BATCH_SCHDUL_ID = #{batch_schdul_id } - AND BATCH_OPERT_ID = #{batch_opert_id } - - - /** removesComtnbatchschdul */ - /** 배치스케줄 다건 삭제 */ - DELETE FROM COMTNBATCHSCHDUL - WHERE 1=1 - AND BATCH_SCHDUL_ID = #{batch_schdul_id } - AND BATCH_OPERT_ID = #{batch_opert_id } - AND EXECUT_CYCLE = #{execut_cycle } - AND EXECUT_SCHDUL_DE = #{execut_schdul_de } - AND EXECUT_SCHDUL_HOUR = #{execut_schdul_hour } - AND EXECUT_SCHDUL_MNT = #{execut_schdul_mnt } - AND EXECUT_SCHDUL_SECND = #{execut_schdul_secnd} - AND FRST_REGISTER_ID = #{frst_register_id } - AND FRST_REGIST_PNTTM = #{frst_regist_pnttm } - AND LAST_UPDUSR_ID = #{last_updusr_id } - AND LAST_UPDT_PNTTM = #{last_updt_pnttm } - - - - - - - - - /** addComtnbatchschduldfk */ - /** 배치스케줄요일 등록 */ - INSERT INTO COMTNBATCHSCHDULDFK( - BATCH_SCHDUL_ID - ,EXECUT_SCHDUL_DFK_SE - )VALUES( - #{batch_schdul_id } - ,#{execut_schdul_dfk_se} - ) - - - /** modifyComtnbatchschduldfk */ - /** 배치스케줄요일 수정 */ - UPDATE COMTNBATCHSCHDULDFK - - EXECUT_SCHDUL_DFK_SE = #{execut_schdul_dfk_se} - - WHERE 1=1 - AND BATCH_SCHDUL_ID = #{batch_schdul_id } - - - /** removeComtnbatchschduldfk */ - /** 배치스케줄요일 삭제 */ - DELETE FROM COMTNBATCHSCHDULDFK - WHERE 1=1 - AND BATCH_SCHDUL_ID = #{batch_schdul_id } - AND EXECUT_SCHDUL_DFK_SE = #{execut_schdul_dfk_se} - - - /** removesComtnbatchschduldfk */ - /** 배치스케줄요일 다건 삭제 */ - DELETE FROM COMTNBATCHSCHDULDFK - WHERE 1=1 - AND BATCH_SCHDUL_ID = #{batch_schdul_id } - AND EXECUT_SCHDUL_DFK_SE = #{execut_schdul_dfk_se} - - - - - - - - - /** addComtnbatchresult */ - /** 배치결과 등록 */ - INSERT INTO COMTNBATCHRESULT( - BATCH_RESULT_ID - ,BATCH_SCHDUL_ID - ,BATCH_OPERT_ID - ,PARAMTR - ,STTUS - ,ERROR_INFO - ,EXECUT_BEGIN_TM - ,EXECUT_END_TM - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - )VALUES( - #{batch_result_id } - ,#{batch_schdul_id } - ,#{batch_opert_id } - ,#{paramtr } - ,#{sttus } - ,#{error_info } - ,#{execut_begin_tm } - ,#{execut_end_tm } - ,SYSDATE - ,#{last_updusr_id } - ,SYSDATE - ,#{frst_register_id } - ) - - - /** modifyComtnbatchresult */ - /** 배치결과 수정 */ - UPDATE COMTNBATCHRESULT - - BATCH_SCHDUL_ID = #{batch_schdul_id }, - BATCH_OPERT_ID = #{batch_opert_id }, - PARAMTR = #{paramtr }, - STTUS = #{sttus }, - ERROR_INFO = #{error_info }, - EXECUT_BEGIN_TM = #{execut_begin_tm }, - EXECUT_END_TM = #{execut_end_tm }, - LAST_UPDT_PNTTM = SYSDATE, - LAST_UPDUSR_ID = #{last_updusr_id }, - FRST_REGIST_PNTTM = #{frst_regist_pnttm}, - FRST_REGISTER_ID = #{frst_register_id }, - - WHERE 1=1 - AND BATCH_RESULT_ID = #{batch_result_id } - - - /** removeComtnbatchresult */ - /** 배치결과 삭제 */ - DELETE FROM COMTNBATCHRESULT - WHERE 1=1 - AND BATCH_RESULT_ID = #{batch_result_id } - - - /** removesComtnbatchresult */ - /** 배치결과 다건 삭제 */ - DELETE FROM COMTNBATCHRESULT - WHERE 1=1 - AND BATCH_RESULT_ID = #{batch_result_id } - AND BATCH_SCHDUL_ID = #{batch_schdul_id } - AND BATCH_OPERT_ID = #{batch_opert_id } - AND PARAMTR = #{paramtr } - AND STTUS = #{sttus } - AND ERROR_INFO = #{error_info } - AND EXECUT_BEGIN_TM = #{execut_begin_tm } - AND EXECUT_END_TM = #{execut_end_tm } - AND LAST_UPDT_PNTTM = #{last_updt_pnttm } - AND LAST_UPDUSR_ID = #{last_updusr_id } - AND FRST_REGIST_PNTTM = #{frst_regist_pnttm} - AND FRST_REGISTER_ID = #{frst_register_id } - - - - diff --git a/src/main/resources/sqlmapper/framework/cmm/XitFrameFile-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitFrameFile-oracle-mapper.xml deleted file mode 100644 index 4df8bbcc..00000000 --- a/src/main/resources/sqlmapper/framework/cmm/XitFrameFile-oracle-mapper.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT - A.ATCH_FILE_ID AS "atchFileId" - ,B.FILE_CN AS "fileCn" - ,B.FILE_SN AS "fileSn" - ,B.FILE_STRE_COURS AS "fileStreCours" - ,B.STRE_FILE_NM AS "streFileNm" - ,B.FILE_EXTSN AS "fileExtsn" - ,B.ORIGNL_FILE_NM AS "orignlFileNm" - ,B.FILE_SIZE AS "fileSize" - ,A.CREAT_DT AS "creatDt" - - - FROM XIT_FILE_ATTRB A - INNER JOIN XIT_FILE_DETAIL_INFO B ON A.ATCH_FILE_ID = B.ATCH_FILE_ID - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/cmm/XitFramePopup-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitFramePopup-oracle-mapper.xml deleted file mode 100644 index 362a5897..00000000 --- a/src/main/resources/sqlmapper/framework/cmm/XitFramePopup-oracle-mapper.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - - - - SELECT ZIP AS "zip" - , SN AS "sn" - , CTPRVN_NM AS "ctprvnNm" - , SIGNGU_NM AS "signguNm" - , EMD_NM AS "emdNm" - , LI_BULD_NM AS "liBuldNm" - , LNBR_DONG_HO AS "lnbrDongHo" - - - FROM XIT_ZIP - - - - - AND ZIP = #{searchKeyword} - - - AND CTPRVN_NM LIKE '%'||#{searchKeyword}||'%' - - - AND SIGNGU_NM LIKE '%'||#{searchKeyword}||'%' - - - AND EMD_NM LIKE '%'||#{searchKeyword}||'%' - - - AND LI_BULD_NM LIKE '%'||#{searchKeyword}||'%' - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/cmm/XitFrameScheduler-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitFrameScheduler-oracle-mapper.xml deleted file mode 100644 index 02425c67..00000000 --- a/src/main/resources/sqlmapper/framework/cmm/XitFrameScheduler-oracle-mapper.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - /** addSysLogSummaryOfYesterday */ - /** 시스템 로그 전날 로그 요약 등록 */ - INSERT INTO XIT_SYS_LOG_SUMRY( - OCCRRNC_DE - ,SRVC_NM - ,METHOD_NM - ,CREAT_CO - ,UPDT_CO - ,RDCNT - ,DELETE_CO - ,OUTPT_CO - ,ERROR_CO - ) - SELECT TO_CHAR(B.CREAT_DT, 'YYYYMMDD') AS "OCCRRNC_DE" - , 'Member-login' AS "SRVC_NM" - , 'actionLogin' AS "METHOD_NM" - , SUM(CASE WHEN B.CONECT_MTHD = 'I' THEN 1 ELSE 0 END) AS "CREAT_CO" - , SUM(CASE WHEN B.CONECT_MTHD = 'U' THEN 1 ELSE 0 END) AS "UPDT_CO" - , SUM(CASE WHEN B.CONECT_MTHD = 'R' THEN 1 ELSE 0 END) AS "RDCNT" - , SUM(CASE WHEN B.CONECT_MTHD = 'O' THEN 1 ELSE 0 END) AS "DELETE_CO" - , 0 AS "OUTPT_CO" - , 0 AS "ERROR_CO" - FROM XIT_CONECT_LOG B - WHERE NOT EXISTS ( - SELECT FA.OCCRRNC_DE - FROM XIT_SYS_LOG_SUMRY FA - WHERE TRIM(FA.OCCRRNC_DE) = TO_CHAR((SYSDATE -1 ), 'YYYYMMDD') - ) - AND TO_CHAR(B.CREAT_DT, 'YYYYMMDD') = TO_CHAR((SYSDATE -1 ), 'YYYYMMDD') - GROUP BY TO_CHAR(B.CREAT_DT, 'YYYYMMDD'), B.CONECT_MTHD - - - diff --git a/src/main/resources/sqlmapper/framework/cmm/XitFrameUnit-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitFrameUnit-oracle-mapper.xml deleted file mode 100644 index 74892f07..00000000 --- a/src/main/resources/sqlmapper/framework/cmm/XitFrameUnit-oracle-mapper.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - WITH TREE_QUERY(MENU_ID, PARNT_MENU_ID, MENU_NAME, MENU_FULL_PATH, MENU_FULL_PATH_NAME, MENU_DEPTH) AS - ( - SELECT - A.MENU_NO AS "MENU_ID" - , A.UPPER_MENU_NO AS "PARNT_MENU_ID" - , A.MENU_NM AS "MENU_NAME" - , ''||A.MENU_NO AS "MENU_FULL_PATH" - , ''||A.MENU_NM AS "MENU_FULL_PATH_NAME" - , 1 AS "MENU_DEPTH" - FROM XIT_MENU_INFO A - INNER JOIN XIT_PROGRM_LIST B ON A.PROGRM_FILE_NM=B.PROGRM_FILE_NM - WHERE A.UPPER_MENU_NO = 0 - UNION ALL - SELECT - A.MENU_NO AS "MENU_ID" - , A.UPPER_MENU_NO AS "PARNT_MENU_ID" - , A.MENU_NM AS "MENU_NAME" - , B.MENU_FULL_PATH || '_' || A.MENU_NO AS "MENU_FULL_PATH" - , B.MENU_FULL_PATH_NAME || ' > ' || A.MENU_NM AS "MENU_FULL_PATH_NAME" - , B.MENU_DEPTH+1 AS "MENU_DEPTH" - FROM XIT_MENU_INFO A - INNER JOIN TREE_QUERY B ON A.UPPER_MENU_NO = B.MENU_ID - WHERE B.MENU_ID != 0 - ) - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/cmm/XitLogin-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitLogin-oracle-mapper.xml deleted file mode 100644 index f10bb8a8..00000000 --- a/src/main/resources/sqlmapper/framework/cmm/XitLogin-oracle-mapper.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/main/resources/sqlmapper/framework/cmm/XitMain-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitMain-oracle-mapper.xml deleted file mode 100644 index f0debc8f..00000000 --- a/src/main/resources/sqlmapper/framework/cmm/XitMain-oracle-mapper.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/cmm/XitTest-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitTest-oracle-mapper.xml deleted file mode 100644 index 3119d61b..00000000 --- a/src/main/resources/sqlmapper/framework/cmm/XitTest-oracle-mapper.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - /** addTest */ - /** 등록 테스트 */ - INSERT INTO XIT_CONECT_LOG( - LOG_ID - ,CONECT_MTHD - ,ERROR_OCCRRNC_AT - ,ERROR_CODE - ,CREAT_DT - )VALUES( - NVL( - #{log_id} - ,'TEST_'||LPAD((SELECT NVL(REPLACE(MAX(LOG_ID),'TEST_',''),0)+1 AS "LOG_ID" FROM XIT_CONECT_LOG WHERE LOG_ID LIKE 'TEST_%') ,14 ,'0') - ) - ,'I' - ,'N' - ,NVL(#{error_code}, '00') - ,SYSDATE - ) - - - /** addListTest */ - /** 리스트 등록 테스트 */ - INSERT INTO XIT_CONECT_LOG( - LOG_ID - ,CONECT_MTHD - ,ERROR_OCCRRNC_AT - ,ERROR_CODE - ,CREAT_DT - ) - - SELECT - NVL( - #{row.log_id} - ,'TEST_'||LPAD((SELECT NVL(REPLACE(MAX(LOG_ID),'TEST_',''),0)+1 AS "LOG_ID" FROM XIT_CONECT_LOG WHERE LOG_ID LIKE 'TEST_%') ,14 ,'0') - ) AS "LOG_ID" - ,'I' AS "CONECT_MTHD" - ,'N' AS "ERROR_OCCRRNC_AT" - ,NVL(#{row.error_code}, '00') AS "ERROR_CODE" - ,SYSDATE AS "CREAT_DT" - FROM DUAL - - - - - /** 접속로그 테이블의 테스트 데이터 일괄 삭제 */ - /** removesXitConectLogForTestData */ - DELETE FROM XIT_CONECT_LOG - WHERE LOG_ID LIKE NVL(#{log_id}, 'BATCH_')||'%' - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/admin/XitAdminDbMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/admin/XitAdminDbMng-oracle-mapper.xml deleted file mode 100644 index fd6a5adf..00000000 --- a/src/main/resources/sqlmapper/framework/mng/admin/XitAdminDbMng-oracle-mapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - - - - - - - - - - - - - - - - - - - - - - /** XitAdminDbMngMapper.addDynamicSql */ - /** 관리자DB관리 동적질의문 등록 */ - ${dynamicSql} - - - /** XitAdminDbMngMapper.modifyDynamicSql */ - /** 관리자DB관리 동적질의문 수정 */ - ${dynamicSql} - - - /** XitAdminDbMngMapper.removeDynamicSql */ - /** 관리자DB관리 동적질의문 삭제 */ - ${dynamicSql} - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/admin/XitConectionLogMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/admin/XitConectionLogMng-oracle-mapper.xml deleted file mode 100644 index 9f2ceaf0..00000000 --- a/src/main/resources/sqlmapper/framework/mng/admin/XitConectionLogMng-oracle-mapper.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT - A.LOG_ID AS "logId" - ,A.CREAT_DT AS "creatDt" - ,A.CONECT_MTHD AS "loginMthd" - ,A.CONECT_IP AS "loginIp" - ,A.CONECT_ID AS "loginId" - ,B.USER_NM AS "loginNm" - - - FROM XIT_CONECT_LOG A - LEFT OUTER JOIN XIT_VW_USER_MASTR B ON A.CONECT_ID = B.ESNTL_ID - - - - AND A.CONECT_MTHD LIKE '%' || #{searchWrd} || '%' - - - AND TO_CHAR(A.CREAT_DT, 'YYYYMMDD') BETWEEN #{searchBgnDe} AND #{searchEndDe} - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/admin/XitConectionStatsMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/admin/XitConectionStatsMng-oracle-mapper.xml deleted file mode 100644 index c90297f6..00000000 --- a/src/main/resources/sqlmapper/framework/mng/admin/XitConectionStatsMng-oracle-mapper.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/auth/AuthByUserMgtMapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/AuthByUserMgtMapper.xml deleted file mode 100644 index c14a3be9..00000000 --- a/src/main/resources/sqlmapper/framework/mng/auth/AuthByUserMgtMapper.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.USER_ID AS "userId" - ,A.USER_NM AS "userNm" - ,A.GROUP_ID AS "groupId" - ,B.MBER_TY_CODE AS "mberTyCode" - ,(SELECT CODE_NM - FROM XIT_CMMN_DETAIL_CODE - WHERE CODE_ID = 'XIT012' - AND CODE = B.MBER_TY_CODE - AND USE_AT = 'Y') AS "mberTyNm" - ,B.AUTHOR_CODE AS "authorCode" - ,CASE WHEN B.SCRTY_SETUP_TRGET_ID IS NULL THEN 'N' - ELSE 'Y' - END AS "regYn" - ,ESNTL_ID AS "uniqId" - - - FROM ( - SELECT MBER_ID USER_ID, MBER_NM USER_NM, GROUP_ID, ESNTL_ID - FROM XIT_GNRL_MBER - UNION ALL - SELECT ENTRPRS_MBER_ID USER_ID, CMPNY_NM USER_NM, GROUP_ID, ESNTL_ID - FROM XIT_ENTRPRS_MBER - UNION ALL - SELECT USER_ID, USER_NM USER_NM, GROUP_ID, ESNTL_ID - FROM XIT_USER_INFO ) A - LEFT OUTER JOIN XIT_USER_SCRTY_SETUP B ON A.ESNTL_ID = B.SCRTY_SETUP_TRGET_ID - - - - - AND A.USER_ID LIKE '%'||#{searchKeyword}||'%' - - - AND A.USER_NM LIKE '%'||#{searchKeyword}||'%' - - - AND A.GROUP_ID = #{searchKeyword} - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT A.GROUP_ID AS "groupId" - ,A.GROUP_NM AS "groupNm" - ,A.GROUP_DC AS "groupDc" - ,A.GROUP_CREAT_DE AS "groupCreatDe" - - - FROM XIT_AUTHOR_GROUP_INFO A - - - - AND A.GROUP_NM LIKE '%' || #{searchKeyword} || '%' - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/auth/XitAuthGrpMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/XitAuthGrpMng-oracle-mapper.xml deleted file mode 100644 index c73514cc..00000000 --- a/src/main/resources/sqlmapper/framework/mng/auth/XitAuthGrpMng-oracle-mapper.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.GROUP_ID AS "groupId" - ,A.GROUP_NM AS "groupNm" - ,A.GROUP_DC AS "groupDc" - ,A.GROUP_CREAT_DE AS "groupCreatDe" - ,A.AUTHOR_CODE AS "authorCode" - ,(SELECT SA.AUTHOR_NM FROM XIT_AUTHOR_INFO SA WHERE SA.AUTHOR_CODE=A.AUTHOR_CODE) AS "authorNm" - - - FROM XIT_AUTHOR_GROUP_INFO A - - - - AND A.GROUP_NM LIKE '%' || #{searchKeyword} || '%' - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/auth/XitAuthHierarchyMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/XitAuthHierarchyMng-oracle-mapper.xml deleted file mode 100644 index e49fac8c..00000000 --- a/src/main/resources/sqlmapper/framework/mng/auth/XitAuthHierarchyMng-oracle-mapper.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.AUTHOR_CODE AS "authorCode" - ,A.AUTHOR_NM AS "authorNm" - ,A.AUTHOR_DC AS "authorDc" - ,A.AUTHOR_CREAT_DE AS "authorCreatDe" - - - FROM XIT_AUTHOR_INFO A - - - - AND A.AUTHOR_NM LIKE '%'||#{searchKeyword}||'%' - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/auth/XitAuthRuleMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/XitAuthRuleMng-oracle-mapper.xml deleted file mode 100644 index 675bd75f..00000000 --- a/src/main/resources/sqlmapper/framework/mng/auth/XitAuthRuleMng-oracle-mapper.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.ROLE_CODE AS "roleCode" - ,A.ROLE_NM AS "roleNm" - ,A.ROLE_PTTRN AS "rolePtn" - ,A.ROLE_DC AS "roleDc" - ,( - SELECT CODE_NM - FROM XIT_CMMN_DETAIL_CODE - WHERE CODE_ID = 'XIT029' AND CODE = A.ROLE_TY) AS "roleTyp" - ,A.ROLE_SORT AS "roleSort" - ,A.ROLE_CREAT_DE AS "roleCreatDe" - - - FROM XIT_ROLE_INFO A - - - - AND A.ROLE_NM LIKE '%'||#{searchKeyword}||'%' - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/auth/XitLoginPolicyMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/XitLoginPolicyMng-oracle-mapper.xml deleted file mode 100644 index e728d6ac..00000000 --- a/src/main/resources/sqlmapper/framework/mng/auth/XitLoginPolicyMng-oracle-mapper.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.USER_ID AS "emplyrId" - ,A.USER_NM AS "emplyrNm" - ,A.USER_SE AS "emplyrSe" - ,B.IP_INFO AS "ipInfo" - ,B.DPLCT_PERM_AT AS "dplctPermAt" - ,B.LMTT_AT AS "lmttAt" - ,B.LAST_UPDUSR_ID AS "userId" - ,B.LAST_UPDT_PNTTM AS "regDate" - ,DECODE (B.USER_ID, NULL, 'N', 'Y') AS "regYn" - - - FROM XIT_VW_USER_MASTR A - LEFT OUTER JOIN XIT_LOGIN_POLICY B ON A.USER_ID = B.USER_ID - - - - - - AND A.USER_NM LIKE '%'||#{searchKeyword}||'%' - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/auth/auth-author-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/auth-author-mysql-mapper.xml index 84b03054..3d1d2c08 100644 --- a/src/main/resources/sqlmapper/framework/mng/auth/auth-author-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/auth/auth-author-mysql-mapper.xml @@ -1,6 +1,6 @@ - + - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.BATCH_OPERT_ID AS "batchOpertId" - ,A.BATCH_OPERT_NM AS "batchOpertNm" - ,A.BATCH_OPERT_SE AS "batchOpertSe" - ,A.BATCH_PROGRM AS "batchProgrm" - ,A.PARAMTR AS "paramtr" - ,TO_CHAR (A.LAST_UPDT_PNTTM, 'YYYY-MM-DD HH24:MI:SS') AS "frstRegisterId" - ,A.LAST_UPDUSR_ID AS "frstRegisterPnttm" - ,A.FRST_REGISTER_ID AS "lastUpdusrId" - ,TO_CHAR (A.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') AS "lastUpdusrPnttm" - - - FROM COMTNBATCHOPERT A - - - AND USE_AT = 'Y' - - - AND A.BATCH_OPERT_NM LIKE '%' || #{searchKeyword} || '%' - - - AND A.BATCH_PROGRM LIKE '%' || #{searchKeyword} || '%' - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/batch/XitBatchResultMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/batch/XitBatchResultMng-oracle-mapper.xml deleted file mode 100644 index 9289debe..00000000 --- a/src/main/resources/sqlmapper/framework/mng/batch/XitBatchResultMng-oracle-mapper.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.BATCH_RESULT_ID AS "batchResultId" - ,A.BATCH_SCHDUL_ID AS "batchSchdulId" - ,A.BATCH_OPERT_ID AS "batchOpertId" - ,B.BATCH_OPERT_NM AS "batchOpertNm" - ,B.BATCH_PROGRM AS "batchProgrm" - ,A.PARAMTR AS "paramtr" - ,A.STTUS AS "sttus" - ,C.CODE_NM AS "sttusNm" - ,A.ERROR_INFO AS "errorInfo" - ,A.EXECUT_BEGIN_TM AS "executBeginTime" - ,A.EXECUT_END_TM AS "executEndTime" - ,TO_CHAR (A.LAST_UPDT_PNTTM, 'YYYY-MM-DD HH24:MI:SS') AS "lastUpdusrPnttm" - ,A.LAST_UPDUSR_ID AS "lastUpdusrId" - ,A.FRST_REGISTER_ID AS "frstRegisterId" - ,TO_CHAR (A.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') AS "frstRegisterPnttm" - - - FROM COMTNBATCHRESULT A - INNER JOIN COMTNBATCHOPERT B ON A.BATCH_OPERT_ID = B.BATCH_OPERT_ID - INNER JOIN XIT_CMMN_DETAIL_CODE C ON A.STTUS = C.CODE AND C.CODE_ID = 'XIT076' - - - - AND A.STTUS = #{sttus} - - - AND SUBSTR(A.EXECUT_BEGIN_TM,1, 8) >= #{searchKeywordFrom} - - - AND SUBSTR(A.EXECUT_BEGIN_TM,1, 8) <= #{searchKeywordTo} - - - - AND B.BATCH_OPERT_NM LIKE '%' || #{searchKeyword} || '%' - - - AND B.BATCH_SCHDUL_ID LIKE '%' || #{searchKeyword} || '%' - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/batch/XitBatchScheduleMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/batch/XitBatchScheduleMng-oracle-mapper.xml deleted file mode 100644 index 155dd97d..00000000 --- a/src/main/resources/sqlmapper/framework/mng/batch/XitBatchScheduleMng-oracle-mapper.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.BATCH_SCHDUL_ID AS "batchSchdulId" - ,A.BATCH_OPERT_ID AS "batchOpertId" - ,A.EXECUT_CYCLE AS "executCycle" - ,C.CODE_NM AS "executCycleNm" - ,A.EXECUT_SCHDUL_DE AS "executSchdulDe" - ,A.EXECUT_SCHDUL_HOUR AS "executSchdulHour" - ,A.EXECUT_SCHDUL_MNT AS "executSchdulMnt" - ,A.EXECUT_SCHDUL_SECND AS "executSchdulSecnd" - ,B.BATCH_OPERT_NM AS "batchOpertNm" - ,B.BATCH_PROGRM AS "batchProgrm" - ,B.PARAMTR AS "paramtr" - ,TO_CHAR (A.LAST_UPDT_PNTTM, 'YYYY-MM-DD HH24:MI:SS') AS "lastUpdusrId" - ,A.LAST_UPDUSR_ID AS "lastUpdusrPnttm" - ,A.FRST_REGISTER_ID AS "frstRegisterId" - ,TO_CHAR (A.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') AS "frstRegisterPnttm" - - - FROM COMTNBATCHSCHDUL A - INNER JOIN COMTNBATCHOPERT B ON A.BATCH_OPERT_ID = B.BATCH_OPERT_ID - INNER JOIN XIT_CMMN_DETAIL_CODE C ON A.EXECUT_CYCLE = C.CODE AND C.CODE_ID = 'XIT047' - - - - - AND B.BATCH_OPERT_NM LIKE '%' || #{searchKeyword} || '%' - - - AND A.BATCH_PROGRM LIKE '%' || #{searchKeyword} || '%' - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/bbs/XitBasicBbsMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/bbs/XitBasicBbsMng-oracle-mapper.xml deleted file mode 100644 index c022a9f6..00000000 --- a/src/main/resources/sqlmapper/framework/mng/bbs/XitBasicBbsMng-oracle-mapper.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.NTT_SJ AS "nttSj" - ,A.NTCR_ID AS "ntcrId" - ,A.NTCR_NM AS "ntcrNm" - ,A.NTT_NO AS "nttNo" - ,A.NTT_CN AS "nttCn" - ,A.PASSWORD AS "password" - ,A.FRST_REGISTER_ID AS "frstRegisterId" - ,NVL (B.USER_NM, A.NTCR_NM) AS "frstRegisterNm" - ,TO_CHAR (A.FRST_REGIST_PNTTM, 'YYYY-MM-DD') AS "frstRegisterPnttm" - ,A.NTCE_BEGIN_DE AS "ntceBgnde" - ,A.NTCE_END_DE AS "ntceEndde" - ,A.RDCNT AS "inqireCo" - ,A.USE_AT AS "useAt" - ,A.ATCH_FILE_ID AS "atchFileId" - ,A.BBS_ID AS "bbsId" - ,A.NTT_ID AS "nttId" - ,A.PARNTS_SNTNC_NO AS "parnts" - ,A.ANSWER_AT AS "replyAt" - ,A.ANSWER_LC AS "replyLc" - ,A.SORT_ORDR AS "sortOrdr" - ,C.BBS_TY_CODE AS "bbsTyCode" - ,C.BBS_ATTRB_CODE AS "bbsAttrbCode" - ,C.REPLY_POSBL_AT AS "replyPosblAt" - ,C.FILE_ATCH_POSBL_AT AS "fileAtchPosblAt" - ,C.ATCH_POSBL_FILE_NUMBER AS "posblAtchFileNumber" - ,C.BBS_NM AS "bbsNm" - - - FROM XIT_BBS A - LEFT OUTER JOIN XIT_VW_USER_MASTR B ON A.FRST_REGISTER_ID = B.ESNTL_ID - LEFT OUTER JOIN XIT_BBS_MASTR C ON A.BBS_ID = C.BBS_ID - - - AND A.BBS_ID = #{bbsId} - AND A.PARNTS_SNTNC_NO = 0 - - - AND A.NTT_SJ LIKE '%' || #{searchWrd} || '%' - - - AND A.NTT_CN LIKE '%' || #{searchWrd} || '%' - - - AND B.USER_NM LIKE '%' || #{searchWrd} || '%' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsCreateMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsCreateMng-oracle-mapper.xml deleted file mode 100644 index 0028ab41..00000000 --- a/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsCreateMng-oracle-mapper.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.BBS_ID AS "bbsId" - ,A.BBS_TY_CODE AS "bbsTyCode" - ,B.CODE_NM AS "bbsTyCodeNm" - ,A.BBS_INTRCN AS "bbsIntrcn" - ,A.BBS_ATTRB_CODE AS "bbsAttrbCode" - ,C.CODE_NM AS "bbsAttrbCodeNm" - ,A.BBS_NM AS "bbsNm" - ,A.TMPLAT_ID AS "tmplatId" - ,D.TMPLAT_NM AS "tmplatNm" - ,D.TMPLAT_COURS AS "tmplatCours" - ,A.FILE_ATCH_POSBL_AT AS "fileAtchPosblAt" - ,A.ATCH_POSBL_FILE_NUMBER AS "posblAtchFileNumber" - ,A.ATCH_POSBL_FILE_SIZE AS "posblAtchFileSize" - ,A.REPLY_POSBL_AT AS "replyPosblAt" - ,A.FRST_REGISTER_ID AS "frstRegisterId" - ,(SELECT SA.USER_NM FROM XIT_VW_USER_MASTR SA WHERE SA.ESNTL_ID = A.FRST_REGISTER_ID) AS "frstRegisterNm" - ,A.USE_AT AS "useAt" - ,TO_CHAR (A.FRST_REGIST_PNTTM, 'YYYY-MM-DD') AS "frstRegisterPnttm" - ,(SELECT NVL (SA.USE_AT, 'N') - FROM XIT_BBS_PRCUSE SA - - WHERE SA.BBS_ID = A.BBS_ID - AND SA.TRGET_ID IN (#{uniqId}, 'SYSTEM_DEFAULT_BOARD')) - AS "authFlag" - - - FROM XIT_BBS_MASTR A - LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM - FROM XIT_CMMN_DETAIL_CODE - WHERE CODE_ID = 'XIT004' AND USE_AT = 'Y') B ON A.BBS_TY_CODE = B.CODE - LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM - FROM XIT_CMMN_DETAIL_CODE - WHERE CODE_ID = 'XIT009' AND USE_AT = 'Y') C ON A.BBS_ATTRB_CODE = C.CODE - LEFT OUTER JOIN XIT_TMPLAT_INFO D ON A.TMPLAT_ID = D.TMPLAT_ID AND D.USE_AT = 'Y' - - - - AND A.USE_AT = #{useAt} - - - - AND A.BBS_NM LIKE '%' || #{searchWrd} || '%' - - - AND B.CODE_NM LIKE '%' || #{searchWrd} || '%' - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsTmplateMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsTmplateMng-oracle-mapper.xml deleted file mode 100644 index 67c5c85c..00000000 --- a/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsTmplateMng-oracle-mapper.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - - SELECT A.TMPLAT_ID AS "tmplatId" - ,A.TMPLAT_NM AS "tmplatNm" - ,A.TMPLAT_SE_CODE AS "tmplatSeCode" - ,A.TMPLAT_COURS AS "tmplatCours" - ,A.USE_AT AS "useAt" - ,A.FRST_REGISTER_ID AS "frstRegisterId" - ,A.FRST_REGIST_PNTTM AS "frstRegisterPnttm" - ,A.LAST_UPDUSR_ID AS "lastUpdusrId" - ,A.LAST_UPDT_PNTTM AS "lastUpdusrPnttm" - ,B.CODE_NM AS "tmplatSeCodeNm" - ,(SELECT SA.USER_NM FROM XIT_VW_USER_MASTR SA WHERE SA.ESNTL_ID=A.FRST_REGISTER_ID) AS "frstRegisterNm" - ,(SELECT SA.USER_NM FROM XIT_VW_USER_MASTR SA WHERE SA.ESNTL_ID=A.LAST_UPDUSR_ID) AS "lastUpdusrNm" - - - FROM XIT_TMPLAT_INFO A - LEFT OUTER JOIN XIT_CMMN_DETAIL_CODE B ON A.TMPLAT_SE_CODE = B.CODE - - - AND B.CODE_ID = 'XIT005' - - AND A.TMPLAT_SE_CODE = #{tmplatSeCode} - - - - AND A.TMPLAT_NM LIKE '%' || #{searchWrd} || '%' - - - AND B.CODE_NM LIKE '%' || #{searchWrd} || '%' - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsUseMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsUseMng-oracle-mapper.xml deleted file mode 100644 index c114069c..00000000 --- a/src/main/resources/sqlmapper/framework/mng/bbs/XitBbsUseMng-oracle-mapper.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.BBS_ID AS "bbsId" - ,E.BBS_NM AS "bbsNm" - ,A.TRGET_ID AS "trgetId" - ,A.REGIST_SE_CODE AS "registSeCode" - ,B.CODE_NM AS "registSeCodeNm" - ,A.USE_AT AS "useAt" - ,A.FRST_REGISTER_ID AS "frstRegisterId" - ,A.FRST_REGIST_PNTTM AS "frstRegisterPnttm" - ,'시스템 활용' AS "cmmntyId" - ,'시스템 활용' AS "cmmntyNm" - ,'시스템 활용' AS "clbId" - ,'시스템 활용' AS "clbNm" - ,'시스템 활용' AS "bbsTyCode" - - - FROM XIT_BBS_PRCUSE A - LEFT OUTER JOIN XIT_CMMN_DETAIL_CODE B ON B.CODE = A.REGIST_SE_CODE - LEFT OUTER JOIN XIT_BBS_MASTR E ON A.BBS_ID = E.BBS_ID - - - AND B.CODE_ID = 'XIT001' - AND A.REGIST_SE_CODE != 'REGC07' - - - AND E.BBS_NM LIKE '%' || #{searchWrd} || '%' - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitCmmnCodeMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/XitCmmnCodeMng-oracle-mapper.xml deleted file mode 100644 index ede8c2f2..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/XitCmmnCodeMng-oracle-mapper.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT B.CL_CODE_NM AS "clCodeNm" - , A.CL_CODE AS "clCode" - , A.CODE_ID AS "codeId" - , A.CODE_ID_NM AS "codeIdNm" - , A.CODE_ID_DC AS "codeIdDc" - , A.USE_AT AS "useAt" - - - FROM XIT_CMMN_CODE A - INNER JOIN XIT_CMMN_CL_CODE B ON A.CL_CODE = B.CL_CODE - - - - AND A.CODE_ID = #{searchKeyword} - - - AND A.CODE_ID_NM LIKE '%'||#{searchKeyword}||'%' - - - AND A.CL_CODE = #{searchKeyword} - AND A.USE_AT = 'Y' - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitDetailCodeMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/XitDetailCodeMng-oracle-mapper.xml deleted file mode 100644 index 4bc8cd0e..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/XitDetailCodeMng-oracle-mapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.CODE_ID AS "codeId" - , B.CODE_ID_NM AS "codeIdNm" - , A.CODE AS "code" - , A.CODE_NM AS "codeNm" - , A.CODE_DC AS "codeDc" - , A.USE_AT AS "useAt" - - - FROM XIT_CMMN_DETAIL_CODE A - INNER JOIN XIT_CMMN_CODE B ON A.CODE_ID = B.CODE_ID - - - AND B.USE_AT = 'Y' - - AND A.CODE_ID = #{searchKeyword} - - - AND A.CODE = #{searchKeyword} - - - AND A.CODE_NM LIKE '%'||#{searchKeyword}||'%' - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitZipCodeMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/XitZipCodeMng-oracle-mapper.xml deleted file mode 100644 index 5c8243ff..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/XitZipCodeMng-oracle-mapper.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.ZIP AS "zip" - ,A.SN AS "sn" - ,A.CTPRVN_NM AS "ctprvnNm" - ,A.SIGNGU_NM AS "signguNm" - ,A.EMD_NM AS "emdNm" - ,A.LI_BULD_NM AS "liBuldNm" - ,A.LNBR_DONG_HO AS "lnbrDongHo" - - - FROM XIT_ZIP A - - - - - AND A.ZIP = #{searchKeyword} - - - AND A.CTPRVN_NM LIKE '%'||#{searchKeyword}||'%' - - - AND A.SIGNGU_NM LIKE '%'||#{searchKeyword}||'%' - - - AND A.EMD_NM LIKE '%'||#{searchKeyword}||'%' - - - AND A.LI_BULD_NM LIKE '%'||#{searchKeyword}||'%' - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitClCodeMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/code-classification-mysql-mapper.xml similarity index 86% rename from src/main/resources/sqlmapper/framework/mng/code/XitClCodeMng-oracle-mapper.xml rename to src/main/resources/sqlmapper/framework/mng/code/code-classification-mysql-mapper.xml index 5829a479..6d28a014 100644 --- a/src/main/resources/sqlmapper/framework/mng/code/XitClCodeMng-oracle-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/code/code-classification-mysql-mapper.xml @@ -1,15 +1,13 @@ - + - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( + SELECT LIST.* FROM( - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} + ) LIST LIMIT #{firstIndex}, #{recordCountPerPage} @@ -27,7 +25,7 @@ AND A.CL_CODE = #{searchKeyword} - AND A.CL_CODE_NM LIKE '%'||#{searchKeyword}||'%' + AND A.CL_CODE_NM LIKE CONCAT('%',#{searchKeyword},'%') AND A.USE_AT = 'Y' diff --git a/src/main/resources/sqlmapper/framework/mng/menu/MenuMgtMapper.xml b/src/main/resources/sqlmapper/framework/mng/menu/MenuMgtMapper.xml deleted file mode 100644 index d4d0a2c8..00000000 --- a/src/main/resources/sqlmapper/framework/mng/menu/MenuMgtMapper.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - SELECT A.AUTHOR_CODE AS "authorCode" - ,A.AUTHOR_NM AS "authorNm" - ,A.AUTHOR_DC AS "authorDc" - ,A.AUTHOR_CREAT_DE AS "authorCreatDe" - ,(SELECT COUNT(B.AUTHOR_CODE) - FROM XIT_MENU_CREAT_DTLS B - WHERE B.AUTHOR_CODE = A.AUTHOR_CODE ) AS "chkYeoBu" - - - FROM XIT_AUTHOR_INFO A - - - - AND A.AUTHOR_CODE LIKE CONCAT('%',#{searchKeyword},'%') - - - - - - - - - - - - - - - - - - - - - - - - - - - /** XitMenuListMngMapper.deleteAllMenuCreatDtlsList */ - /** 메뉴생성내역 전체데이터 삭제 */ - - DELETE FROM XIT_MENU_CREAT_DTLS - - - diff --git a/src/main/resources/sqlmapper/framework/mng/menu/menu-by-role-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/menu/menu-by-role-mysql-mapper.xml new file mode 100644 index 00000000..fb359518 --- /dev/null +++ b/src/main/resources/sqlmapper/framework/mng/menu/menu-by-role-mysql-mapper.xml @@ -0,0 +1,80 @@ + + + + + + + + SELECT xai.author_code + , xai.author_nm + , xai.author_dc + , xai.author_creat_de + , (SELECT COUNT(author_code) + FROM xit_menu_creat_dtls + WHERE xai.author_code = author_code ) AS chkYeoBu + FROM xit_author_info xai + + + AND INSTR(xai.author_code, #{authorCode}) + + + + + + + + + + + + + + + + /* menu-by-role-mysql-mapper|deleteMenuCreatDtls-권한별 메뉴 삭제|julim */ + DELETE + FROM xit_menu_creat_dtls + WHERE author_code = #{authorCode} + + + + /* menu-by-role-mysql-mapper|insertMenuCreatDtls-권한별 메뉴 등록|julim */ + INSERT + INTO xit_menu_creat_dtls ( + menu_no + , author_code + , mapng_creat_id + ) VALUES ( + #{menuNo} + , #{authorCode} + , #{mapngCreatId} + ) + + + diff --git a/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml index 5f1de714..df023e79 100644 --- a/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml @@ -1,7 +1,7 @@ - + - DELETE FROM XIT_MENU_CREAT_DTLS - - - diff --git a/src/main/resources/sqlmapper/framework/mng/menu/menuListMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/menu/menuListMng-oracle-mapper.xml deleted file mode 100644 index afa04bf2..00000000 --- a/src/main/resources/sqlmapper/framework/mng/menu/menuListMng-oracle-mapper.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - /** XitMenuListMngMapper.deleteAllMenuList */ - /** 메뉴정보 전체데이터 삭제 */ - - - DELETE FROM XIT_MENU_INFO - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/menu/program-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/menu/program-mysql-mapper.xml index e3f52850..b6851e08 100644 --- a/src/main/resources/sqlmapper/framework/mng/menu/program-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/menu/program-mysql-mapper.xml @@ -1,7 +1,7 @@ - + - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.PROGRM_FILE_NM AS "progrmFileNm" - ,A.PROGRM_STRE_COURS AS "progrmStrePath" - ,A.PROGRM_KOREAN_NM AS "progrmKoreanNm" - - ,A.PROGRM_DC AS "progrmDc" - ,A.URL AS "URL" - - - FROM XIT_PROGRM_LIST A - - - - AND A.PROGRM_KOREAN_NM LIKE '%' || #{searchKeyword} || '%' - - - - - - - - - - - - - - - - - - - /** XitMenuListMngMapper.deleteAllProgrm */ - /** 프로그램정보 전체데이터 삭제 */ - - DELETE FROM XIT_PROGRM_LIST - - - - - - /** XitMenuListMngMapper.deleteAllProgrmDtls */ - /** 프로그램변경내역 정보 전체데이터 삭제 */ - - DELETE FROM LETTHPROGRMCHANGEDTLS - - diff --git a/src/main/resources/sqlmapper/framework/mng/usr/XitEntUserRegMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/usr/XitEntUserRegMng-oracle-mapper.xml deleted file mode 100644 index de830924..00000000 --- a/src/main/resources/sqlmapper/framework/mng/usr/XitEntUserRegMng-oracle-mapper.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT - A.ESNTL_ID AS "uniqId" - ,'USR02' AS "userTy" - ,A.ENTRPRS_MBER_ID AS "userId" - ,A.CMPNY_NM AS "cmpnyNm" - ,A.APPLCNT_NM AS "userNm" - ,A.APPLCNT_EMAIL_ADRES AS "emailAdres" - ,A.AREA_NO AS "areaNo" - ,A.ENTRPRS_MIDDLE_TELNO AS "middleTelno" - ,A.ENTRPRS_END_TELNO AS "endTelno" - ,'' AS "mbtlnum" - ,A.GROUP_ID AS "groupId" - ,A.ENTRPRS_MBER_STTUS AS "sttus" - ,A.SBSCRB_DE AS "sbscrbDe" - ,(SELECT CODE_NM FROM XIT_CMMN_DETAIL_CODE WHERE USE_AT = 'Y' AND CODE_ID = 'XIT013' AND CODE = A.ENTRPRS_MBER_STTUS) AS "userSttusCode" - - - FROM XIT_ENTRPRS_MBER A - - - - AND A.ENTRPRS_MBER_STTUS LIKE #{sbscrbSttus} - - - - - AND A.ENTRPRS_MBER_ID LIKE #{searchKeyword} - - - AND A.APPLCNT_NM LIKE '%' ||#{searchKeyword}|| '%' - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/usr/XitGnrUserRegMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/usr/XitGnrUserRegMng-oracle-mapper.xml deleted file mode 100644 index 0b02b265..00000000 --- a/src/main/resources/sqlmapper/framework/mng/usr/XitGnrUserRegMng-oracle-mapper.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT - A.ESNTL_ID AS "uniqId" - ,'USR01' AS "userTy" - ,A.MBER_ID AS "userId" - ,A.MBER_NM AS "userNm" - ,A.MBER_EMAIL_ADRES AS "emailAdres" - ,A.AREA_NO AS "areaNo" - ,A.MIDDLE_TELNO AS "middleTelno" - ,A.END_TELNO AS "endTelno" - ,A.MBTLNUM AS "mbtlnum" - ,A.GROUP_ID AS "groupId" - ,A.MBER_STTUS AS "sttus" - ,A.SBSCRB_DE AS "sbscrbDe" - ,(SELECT CODE_NM FROM XIT_CMMN_DETAIL_CODE WHERE USE_AT = 'Y' AND CODE_ID = 'XIT013' AND CODE = A.MBER_STTUS) AS "userSttusCode" - - - - FROM XIT_GNRL_MBER A - - - - AND A.MBER_STTUS LIKE #{sbscrbSttus} - - - - - AND A.MBER_ID LIKE #{searchKeyword} - - - AND A.MBER_NM LIKE '%' ||#{searchKeyword}|| '%' - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/usr/XitUserAbsntMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/usr/XitUserAbsntMng-oracle-mapper.xml deleted file mode 100644 index 51727b8e..00000000 --- a/src/main/resources/sqlmapper/framework/mng/usr/XitUserAbsntMng-oracle-mapper.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT X.USER_ID AS "userId" - ,X.USER_NM AS "userNm" - ,X.USER_ABSNCE_AT AS "userAbsnceAt" - ,X.REG_YN AS "regYn" - ,X.LAST_UPDUSR_ID AS "lastUpdusrId" - ,X.LAST_UPDT_PNTTM AS "lastUpdusrPnttm" - - - FROM ( - SELECT A.USER_ID - ,A.USER_NM - ,(CASE - WHEN B.USER_ABSNCE_AT IS NULL THEN 'N' - ELSE B.USER_ABSNCE_AT - END) - AS USER_ABSNCE_AT - ,(CASE WHEN B.USER_ABSNCE_AT IS NULL THEN 'N' ELSE 'Y' END) - AS REG_YN - ,LAST_UPDUSR_ID - ,LAST_UPDT_PNTTM - FROM XIT_USER_INFO A - LEFT OUTER JOIN XIT_USER_ABSNCE B ON A.USER_ID = B.USER_ID - ) X - - - - AND X.USER_NM LIKE '%'||#{searchKeyword}||'%' - - - AND X.USER_ABSNCE_AT = #{selAbsnceAt} - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/usr/XitUserEtcOptMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/usr/XitUserEtcOptMng-oracle-mapper.xml deleted file mode 100644 index 06e765e8..00000000 --- a/src/main/resources/sqlmapper/framework/mng/usr/XitUserEtcOptMng-oracle-mapper.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.USER_ID AS "userId" - ,A.USER_NM AS "userNm" - ,B.JOB_DATA_AUTHOR AS "jobDataAuthor" - ,B.USER_MANAGE_AUTHOR AS "userManageAuthor" - ,B.ELCTRNSANCTN_USE_AT AS "elctrnsanctnUseAt" - ,B.JOB_CONFM_AUTHOR_AT AS "jobConfmAuthorAt" - - - FROM XIT_USER_INFO A - LEFT JOIN XIT_USER_ETC_OPTION B ON A.USER_ID=B.USER_ID - - - - - AND A.USER_ID LIKE #{searchKeyword} - - - AND A.USER_NM LIKE '%' ||#{searchKeyword}|| '%' - - - AND A.GROUP_ID = #{searchKeyword} - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/usr/XitUserRegMng-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/mng/usr/XitUserRegMng-oracle-mapper.xml deleted file mode 100644 index 204d9edb..00000000 --- a/src/main/resources/sqlmapper/framework/mng/usr/XitUserRegMng-oracle-mapper.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - SELECT * FROM - (SELECT LIST.*, ROWNUM AS "RN" FROM( - - - - ) LIST - ) WHERE RN BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - - - - SELECT A.ESNTL_ID AS "uniqId" - ,'USR03' AS "userTy" - ,A.USER_ID AS "userId" - ,A.USER_NM AS "userNm" - ,A.EMAIL_ADRES AS "emailAdres" - ,A.AREA_NO AS "areaNo" - ,A.HOUSE_MIDDLE_TELNO AS "middleTelno" - ,A.HOUSE_END_TELNO AS "endTelno" - ,A.MBTLNUM AS "mbtlnum" - ,A.GROUP_ID AS "groupId" - ,A.USER_STTUS_CODE AS "sttus" - ,A.SBSCRB_DE AS "sbscrbDe" - ,(SELECT CODE_NM FROM XIT_CMMN_DETAIL_CODE WHERE USE_AT = 'Y' AND CODE_ID = 'XIT013' AND CODE = A.USER_STTUS_CODE) AS "userSttusCode" - - - FROM XIT_USER_INFO A - - - - AND A.USER_STTUS_CODE LIKE #{sbscrbSttus} - - - - - AND A.USER_ID LIKE #{searchKeyword} - - - AND A.USER_NM LIKE '%' ||#{searchKeyword}|| '%' - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml index 6f742354..3a9807c2 100644 --- a/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml @@ -1,6 +1,6 @@ - +