Commit 6cfc0ea3 by 谢海旭

v5.7.0版本 飞行督导-小程序端:专项任务、学习中心

1 parent 7c59288f
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
<packaging>war</packaging> <packaging>war</packaging>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-supervisor-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx</groupId> <groupId>cn.com.glsx</groupId>
<artifactId>rpc-dj-mindworkplate-api</artifactId> <artifactId>rpc-dj-mindworkplate-api</artifactId>
<version>5.6.0-SNAPSHOT</version> <version>5.6.0-SNAPSHOT</version>
......
...@@ -16,6 +16,9 @@ import cn.com.glsx.dj.riskmanage.remote.learningcenter.PadLearningCenterRemote; ...@@ -16,6 +16,9 @@ import cn.com.glsx.dj.riskmanage.remote.learningcenter.PadLearningCenterRemote;
import cn.com.glsx.dj.smartcarlife.dto.study.StaffStudyDTO; import cn.com.glsx.dj.smartcarlife.dto.study.StaffStudyDTO;
import cn.com.glsx.dj.smartcarlife.enums.study.StaffPunishStatusEnum; import cn.com.glsx.dj.smartcarlife.enums.study.StaffPunishStatusEnum;
import cn.com.glsx.dj.smartcarlife.remote.ContentManagerTaskRemote; import cn.com.glsx.dj.smartcarlife.remote.ContentManagerTaskRemote;
import cn.com.glsx.dj.supervisor.dto.MyselfCourseRecommendDTO;
import cn.com.glsx.dj.supervisor.remote.PersonCourseRecommendationRemote;
import cn.com.glsx.dj.supervisor.remote.SupervisorLearningCenterRemote;
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;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum; import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
...@@ -55,6 +58,7 @@ public class LearningCenterController { ...@@ -55,6 +58,7 @@ public class LearningCenterController {
private final LearningCenterConvert learningCenterConvert; private final LearningCenterConvert learningCenterConvert;
private final PadLearningCenterRemote padLearningCenterRemote; private final PadLearningCenterRemote padLearningCenterRemote;
private final ContentManagerTaskRemote contentManagerTaskRemote; private final ContentManagerTaskRemote contentManagerTaskRemote;
private final PersonCourseRecommendationRemote personCourseRecommendationRemote;
@ApiOperation("学习中心-开始测评弹窗") @ApiOperation("学习中心-开始测评弹窗")
@ServiceMethod(method = "dj.api.pad.learning.center.level.exam", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "dj.api.pad.learning.center.level.exam", needInSession = NeedInSessionType.YES)
...@@ -111,6 +115,33 @@ public class LearningCenterController { ...@@ -111,6 +115,33 @@ public class LearningCenterController {
} }
} }
@ApiOperation("学习中心-我的课程-推荐学习")
@ServiceMethod(method = "dj.api.pad.learning.center.myself.course.recommend", needInSession = NeedInSessionType.YES)
public RopResponse<RpcPagination<LearningCenterMyselfCourseResponse>> learningCenterMyselfCourseRecommend(LearningCenterMyselfCourseRequest request) {
try {
String phone = Optional.ofNullable(CommonUtil.getLoginUserInfo()).map(LoginUserInfoResponse::getPhone)
.orElseThrow(() -> new RpcServiceException(RopErrorEnum.SCL_WORKWECHAT_GET_LOGIN_EXPIRE));
RpcPagination<MyselfCourseRecommendDTO> rpcPagination = CommonUtil.getRpcPagination(MyselfCourseRecommendDTO.class);
MyselfCourseRecommendDTO learningCenterMyselfCourseDTO = BeanUtil.copyProperties(request, MyselfCourseRecommendDTO.class);
learningCenterMyselfCourseDTO.setPhone(phone);
rpcPagination.setCondition(learningCenterMyselfCourseDTO);
RpcResponse<RpcPagination<MyselfCourseRecommendDTO>> response = personCourseRecommendationRemote.getPersonCourseRecommendPage(rpcPagination);
RpcPagination<MyselfCourseRecommendDTO> result = response.getResult();
if (response.isFailed()) {
throw new RpcServiceException(response.getError(), response.getMessage());
}
return RopResponse.success(learningCenterConvert.myselfCourseRecommendDTOPage2ResponsePage(result));
} catch (RpcServiceException e) {
log.info("dj.api.pad.learning.center.myself.course.recommend!", e);
return RopResponse.error(e);
} catch (Exception e) {
log.info("dj.api.pad.learning.center.myself.course.recommend!", e);
return RopResponse.result(DefaultErrorEnum.SERVICE_ERROR);
}
}
@ApiOperation("学习中心-我的课程-查询各页签数据量") @ApiOperation("学习中心-我的课程-查询各页签数据量")
@ServiceMethod(method = "dj.api.pad.learning.center.myself.course.count", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "dj.api.pad.learning.center.myself.course.count", needInSession = NeedInSessionType.YES)
public RopResponse<LearningCenterMyselfCourseCountResponse> learningCenterMyselfCourseCount(AbstractRopRequest request) { public RopResponse<LearningCenterMyselfCourseCountResponse> learningCenterMyselfCourseCount(AbstractRopRequest request) {
......
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.pad.convert; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.pad.convert;
import cn.com.glsx.dj.pad.response.learningcenter.LearningCenterMyselfCourseResponse; import cn.com.glsx.dj.pad.response.learningcenter.LearningCenterMyselfCourseResponse;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterMyselfCourseDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterMyselfCourseDTO;
import cn.com.glsx.dj.supervisor.dto.MyselfCourseRecommendDTO;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
...@@ -16,4 +17,6 @@ public interface LearningCenterConvert { ...@@ -16,4 +17,6 @@ public interface LearningCenterConvert {
RpcPagination<LearningCenterMyselfCourseResponse> myselfCourseDTOPage2ResponsePage(RpcPagination<LearningCenterMyselfCourseDTO> page); RpcPagination<LearningCenterMyselfCourseResponse> myselfCourseDTOPage2ResponsePage(RpcPagination<LearningCenterMyselfCourseDTO> page);
RpcPagination<LearningCenterMyselfCourseResponse> myselfCourseRecommendDTOPage2ResponsePage(RpcPagination<MyselfCourseRecommendDTO> page);
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!