Commit 493fd309 by 谢海旭

v5.6.0版本 策略中心:展业助手-全局提醒、优秀案例-列表、优秀案例-详情、查询任务型策略详情、更新业务策略推送消息

1 parent 46698815
package cn.com.glsx.dj.pad.controller.messagebox; package cn.com.glsx.dj.pad.controller.messagebox;
import cn.com.glsx.dj.carboutique.response.LoginUserInfoResponse; import cn.com.glsx.dj.carboutique.response.LoginUserInfoResponse;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageDTO; import cn.com.glsx.dj.mindworkplate.dto.messagebox.*;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageRespDTO;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.NewPadMessageBoxDTO;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO; import cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO;
import cn.com.glsx.dj.mindworkplate.dto.script.*; import cn.com.glsx.dj.mindworkplate.dto.script.*;
import cn.com.glsx.dj.mindworkplate.model.WarningNotification; import cn.com.glsx.dj.mindworkplate.model.WarningNotification;
...@@ -61,31 +59,56 @@ public class NewPadMessageBoxController { ...@@ -61,31 +59,56 @@ public class NewPadMessageBoxController {
@ServiceMethod(method = "dj.pad.api.new.pad.message.box.page", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "dj.pad.api.new.pad.message.box.page", needInSession = NeedInSessionType.YES)
@ApiOperation("查询消息盒子消息分页列表") @ApiOperation("查询消息盒子消息分页列表")
public RopResponse<RpcPagination<NewPadMessageBoxDTO>> page(NewPadMessageBoxPageRequest request) { public RopResponse<RpcPagination<NewPadMessageBoxDTO>> page(NewPadMessageBoxPageRequest request) {
try {
RpcPagination<NewPadMessageBoxDTO> pagination = CommonUtil.getRpcPagination(NewPadMessageBoxDTO.class);
NewPadMessageBoxDTO condition = pagination.getCondition();
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo(); LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
NewPadMessageBoxDTO dto = CommonUtil.convertRequest(NewPadMessageBoxDTO.class); condition.setPhone(userInfo.getPhone());
dto.setPhone(userInfo.getPhone());
// RpcResponse<RpcPagination<ScriptRecordPadPushDTO>> response = padMessageBoxRemote.getStaffStudyBoxMessagePage(dto); RpcResponse<RpcPagination<NewPadMessageBoxDTO>> response = padMessageBoxRemote.pagePadMessageBox(pagination);
// if (response.hasError()) { if (response.hasError()) {
// return RopResponse.error(response.getError(), response.getMessage()); return RopResponse.error(response.getError(), response.getMessage());
// } else { } else {
// return RopResponse.success(response.getResult()); return RopResponse.success(response.getResult());
// } }
return null; } catch (RpcServiceException e) {
log.error("=====dj.pad.api.new.pad.message.box.page rpcServiceException:{}", e.getMessage());
return RopResponse.error(e);
} catch (Exception e) {
log.error("查询消息盒子消息分页列表异常: {}", e.getMessage(), e);
return RopResponse.error("查询消息盒子消息分页列表异常: " + e.getMessage());
}
} }
@ApiOperation("查询消息盒子消息详情") @ApiOperation("查询消息盒子消息详情")
@ServiceMethod(method = "dj.pad.api.new.pad.message.box.detail", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "dj.pad.api.new.pad.message.box.detail", needInSession = NeedInSessionType.YES)
public RopResponse<NewPadMessageBoxDTO> detail(CommonIdRequest request) { public RopResponse<NewPadMessageBoxDTO> detail(CommonIdRequest request) {
try {
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo(); LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
NewPadMessageBoxDTO dto = CommonUtil.convertRequest(NewPadMessageBoxDTO.class); if (userInfo == null || userInfo.getPhone() == null) {
dto.setPhone(userInfo.getPhone()); return RopResponse.error("用户未登录或手机号信息缺失");
// RpcResponse<RpcPagination<ScriptRecordPadPushDTO>> response = padMessageBoxRemote.getStaffStudyBoxMessagePage(dto); }
// if (response.hasError()) {
// return RopResponse.error(response.getError(), response.getMessage()); String phone = userInfo.getPhone();
// } else { NewPadMessageBoxDTO dto = new NewPadMessageBoxDTO();
// return RopResponse.success(response.getResult()); dto.setId(request.getId());
// } dto.setPhone(phone);
return null;
RpcResponse<NewPadMessageBoxDTO> response = padMessageBoxRemote.getMessageBoxDetail(dto);
if (response.hasError()) {
log.error("查询消息盒子消息详情失败: {}", response.getMessage());
return RopResponse.error(response.getError(), response.getMessage());
}
return RopResponse.success(response.getResult());
} catch (RpcServiceException e) {
log.error("=====dj.pad.api.new.pad.message.box.detail rpcServiceException:{}", e.getMessage());
return RopResponse.error(e);
} catch (Exception e) {
log.error("查询消息盒子消息详情异常: {}", e.getMessage(), e);
return RopResponse.error("查询消息盒子消息详情异常: " + e.getMessage());
}
} }
} }
...@@ -52,16 +52,20 @@ public class StaffStudyController { ...@@ -52,16 +52,20 @@ public class StaffStudyController {
return RopResponse.result(contentManagerTaskRemote.getUnReadMessage(dto)); return RopResponse.result(contentManagerTaskRemote.getUnReadMessage(dto));
} }
@ApiOperation("查询当前员工的消息弹窗-长课程-旧") @ApiOperation("查询当前员工的消息弹窗-长课程(新-只用于展业助手)")
@ServiceMethod(method = "dj.pad.api.staff.long.course.message.notify") @ServiceMethod(method = "dj.pad.api.staff.long.course.message.notify")
public RopResponse<StaffMessageNotifyDTO> getLongCourseMessageNotify(AbstractRopRequest request){ public RopResponse<StaffMessageNotifyDTO> getLongCourseMessageNotify(AbstractRopRequest request){
return null; LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
StaffMessageNotifyDTO dto = StaffMessageNotifyDTO.builder().staffPhone(userInfo.getPhone()).build();
return RopResponse.result(contentManagerTaskRemote.getLongCourseMessageNotify(dto));
} }
@ApiOperation("查询当前员工的消息弹窗-系统提醒/企业通知-旧") @ApiOperation("查询当前员工的消息弹窗-系统提醒/企业通知(新-只用于展业助手)")
@ServiceMethod(method = "dj.pad.api.staff.enterprise.message.notify") @ServiceMethod(method = "dj.pad.api.staff.enterprise.message.notify")
public RopResponse<StaffMessageNotifyDTO> getEnterpriseMessageNotify(AbstractRopRequest request){ public RopResponse<StaffMessageNotifyDTO> getEnterpriseMessageNotify(AbstractRopRequest request){
return null; LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
StaffMessageNotifyDTO dto = StaffMessageNotifyDTO.builder().staffPhone(userInfo.getPhone()).build();
return RopResponse.result(contentManagerTaskRemote.getEnterpriseMessageNotify(dto));
} }
@ApiOperation("确认消息弹窗") @ApiOperation("确认消息弹窗")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!