Commit 432c29b0 by 崔彦峰

提交部门列表接口

1 parent 2a2a06bf
package cn.com.glsx.dj.riskmanage.remote; package cn.com.glsx.dj.riskmanage.remote;
import cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListResponseDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailResponseDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailResponseDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPageListRequestDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPageListRequestDTO;
...@@ -12,6 +13,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcPagination; ...@@ -12,6 +13,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List;
@ApiService(value = "学习中心,等级考试", owner = "cuiyf") @ApiService(value = "学习中心,等级考试", owner = "cuiyf")
public interface LearningCenterLevelExamRemote { public interface LearningCenterLevelExamRemote {
...@@ -33,4 +35,9 @@ public interface LearningCenterLevelExamRemote { ...@@ -33,4 +35,9 @@ public interface LearningCenterLevelExamRemote {
@ApiMethod("等级考试-失效|生效") @ApiMethod("等级考试-失效|生效")
@ApiParam(name = "dto", notes = "等级考试信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true) @ApiParam(name = "dto", notes = "等级考试信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
RpcResponse<String> levelExamStatusToggle(@NotNull LevelExamDetailDTO request); RpcResponse<String> levelExamStatusToggle(@NotNull LevelExamDetailDTO request);
@ApiMethod("部门列表查询")
@ApiParam(name = "pagination", notes = "部门列表查询", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("部门列表查询")
RpcResponse<List<OrganizationListResponseDTO>> list();
} }
...@@ -15,13 +15,13 @@ import java.util.List; ...@@ -15,13 +15,13 @@ import java.util.List;
public class BeiSenOrganizationRemoteImpl implements BeiSenOrganizationRemote { public class BeiSenOrganizationRemoteImpl implements BeiSenOrganizationRemote {
@Autowired @Autowired
private BeiSenOrganizationService learningCenterLevelExamService; private BeiSenOrganizationService beiSenOrganizationService;
@Override @Override
public RpcResponse<List<OrganizationListResponseDTO>> list() { public RpcResponse<List<OrganizationListResponseDTO>> list() {
try { try {
OrganizationListRequestDTO requestDTO = new OrganizationListRequestDTO(); OrganizationListRequestDTO requestDTO = new OrganizationListRequestDTO();
requestDTO.setStatus((byte)1); requestDTO.setStatus((byte)1);
return RpcResponse.success(learningCenterLevelExamService.getOrganizationList(requestDTO)); return RpcResponse.success(beiSenOrganizationService.getOrganizationList(requestDTO));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
return RpcResponse.error(e); return RpcResponse.error(e);
......
package cn.com.glsx.dj.riskmanage.remote.learningcenter; package cn.com.glsx.dj.riskmanage.remote.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListRequestDTO;
import cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListResponseDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailResponseDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamDetailResponseDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPageListRequestDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPageListRequestDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPageListResponseDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPageListResponseDTO;
import cn.com.glsx.dj.riskmanage.remote.LearningCenterLevelExamRemote; import cn.com.glsx.dj.riskmanage.remote.LearningCenterLevelExamRemote;
import cn.com.glsx.dj.riskmanage.service.beisen.BeiSenOrganizationService;
import cn.com.glsx.dj.riskmanage.service.learningcenter.LearningCenterLevelExamService; import cn.com.glsx.dj.riskmanage.service.learningcenter.LearningCenterLevelExamService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
...@@ -12,12 +15,18 @@ import cn.com.glsx.framework.core.exception.RpcServiceException; ...@@ -12,12 +15,18 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService; import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@Slf4j @Slf4j
@DubboService(retries = 0, timeout = 30000) @DubboService(retries = 0, timeout = 30000)
public class LearningCenterLevelExamRemoteImpl implements LearningCenterLevelExamRemote { public class LearningCenterLevelExamRemoteImpl implements LearningCenterLevelExamRemote {
@Autowired @Autowired
private LearningCenterLevelExamService learningCenterLevelExamService; private LearningCenterLevelExamService learningCenterLevelExamService;
@Autowired
private BeiSenOrganizationService beiSenOrganizationService;
@Override @Override
public RpcResponse<RpcPagination<LevelExamPageListResponseDTO>> levelExamListPage(RpcPagination<LevelExamPageListRequestDTO> pagination) { public RpcResponse<RpcPagination<LevelExamPageListResponseDTO>> levelExamListPage(RpcPagination<LevelExamPageListRequestDTO> pagination) {
try { try {
...@@ -66,4 +75,16 @@ public class LearningCenterLevelExamRemoteImpl implements LearningCenterLevelExa ...@@ -66,4 +75,16 @@ public class LearningCenterLevelExamRemoteImpl implements LearningCenterLevelExa
return RpcResponse.error(e); return RpcResponse.error(e);
} }
} }
@Override
public RpcResponse<List<OrganizationListResponseDTO>> list() {
try {
OrganizationListRequestDTO requestDTO = new OrganizationListRequestDTO();
requestDTO.setStatus((byte)1);
return RpcResponse.success(beiSenOrganizationService.getOrganizationList(requestDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!