diff --git a/src/main/java/cokr/xit/applib/ogdp/service/bean/DefaultOgdpBean.java b/src/main/java/cokr/xit/applib/ogdp/service/bean/DefaultOgdpBean.java deleted file mode 100644 index 1b5ffba0..00000000 --- a/src/main/java/cokr/xit/applib/ogdp/service/bean/DefaultOgdpBean.java +++ /dev/null @@ -1,78 +0,0 @@ -package cokr.xit.applib.ogdp.service.bean; - -import java.util.List; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Component; - -import cokr.xit.applib.ogdp.OgdpQuery; -import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper; -import cokr.xit.applib.ogdp.dao.DefaultOgdpMapper; -import cokr.xit.base.user.Department; -import cokr.xit.base.user.dao.UserMapper; -import cokr.xit.foundation.component.AbstractBean; -import cokr.xit.foundation.data.DataObject; - -@Component("defaultOgdpBean") -public class DefaultOgdpBean extends AbstractBean { - - @Resource(name="cmmnOgdpMapper") - CmmnOgdpMapper cmmnOgdpMapper; - - @Resource(name = "defaultOgdpMapper") - private DefaultOgdpMapper defaultOgdpMapper; - - @Resource(name = "userMapper") - private UserMapper userMapper; - - - /**지정한 조건에 따라 부서 목록을 조회하여 반환한다. - * @param req 부서 조회 조건 - * @return 부서 목록 - */ - public List getDeptList(OgdpQuery req) { - return defaultOgdpMapper.selectDeptList(req); - } - - /**지정한 조건에 따라 부서 객체들을 반환한다. - * @param req 부서 조회 조건 - * @return 부서 객체 목록 - */ - public List getDepts(OgdpQuery req) { - return defaultOgdpMapper.selectDepts(req); - } - - /**지정한 조건에 따라 부서 객체를 반환한다. - * @param req 부서 조회 조건 - * @return 부서 객체 - */ - public DataObject getDeptInfo(OgdpQuery req) { - return defaultOgdpMapper.selectDeptInfo(req); - } - - /**부서 정보를 등록한다. - * @param dept 부서 - * @return 저장 여부 - * - */ - public boolean create(Department dept) { - - return defaultOgdpMapper.insert(dept); - } - - /**부서 정보를 수정한다. - * @param dept 부서 - * @return 저장 여부 - * - */ - public boolean update(Department dept) { - return defaultOgdpMapper.update(dept); - } - - -} diff --git a/src/main/java/cokr/xit/applib/ogdp/service/bean/DefaultOgdpServiceBean.java b/src/main/java/cokr/xit/applib/ogdp/service/bean/DefaultOgdpServiceBean.java index d6697626..999e3676 100644 --- a/src/main/java/cokr/xit/applib/ogdp/service/bean/DefaultOgdpServiceBean.java +++ b/src/main/java/cokr/xit/applib/ogdp/service/bean/DefaultOgdpServiceBean.java @@ -7,6 +7,7 @@ import javax.annotation.Resource; import org.springframework.stereotype.Service; import cokr.xit.applib.ogdp.OgdpQuery; +import cokr.xit.applib.ogdp.dao.DefaultOgdpMapper; import cokr.xit.applib.ogdp.service.OgdpService; import cokr.xit.base.user.Department; import cokr.xit.foundation.component.AbstractServiceBean; @@ -15,27 +16,27 @@ import cokr.xit.foundation.data.DataObject; @Service("defaultOgdpService") public class DefaultOgdpServiceBean extends AbstractServiceBean implements OgdpService { - @Resource(name = "defaultOgdpBean") - private DefaultOgdpBean defaultOgdpBean; + @Resource(name = "defaultOgdpMapper") + private DefaultOgdpMapper defaultOgdpMapper; @Override public List getDeptList(OgdpQuery req) { - return defaultOgdpBean.getDeptList(req); + return defaultOgdpMapper.selectDeptList(req); } @Override public DataObject getDeptInfo(OgdpQuery req) { - return defaultOgdpBean.getDeptInfo(req); + return defaultOgdpMapper.selectDeptInfo(req); } @Override public String create(Department dept) { - return defaultOgdpBean.create(dept) ? "[S]" : "[F]"; + return defaultOgdpMapper.insert(dept) ? "[S]" : "[F]"; } @Override public String update(Department dept) { - return defaultOgdpBean.update(dept) ? "[S]" : "[F]"; + return defaultOgdpMapper.update(dept) ? "[S]" : "[F]"; }