Commit 493fd309 by 谢海旭

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

1 parent 46698815
package cn.com.glsx.dj.pad.controller.messagebox;
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.ActivityMessageRespDTO;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.NewPadMessageBoxDTO;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.*;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO;
import cn.com.glsx.dj.mindworkplate.dto.script.*;
import cn.com.glsx.dj.mindworkplate.model.WarningNotification;
......@@ -57,35 +55,60 @@ public class NewPadMessageBoxController {
@Autowired
private PadMessageBoxRemote padMessageBoxRemote;
@ServiceMethod(method = "dj.pad.api.new.pad.message.box.page", needInSession = NeedInSessionType.YES)
@ApiOperation("查询消息盒子消息分页列表")
public RopResponse<RpcPagination<NewPadMessageBoxDTO>> page(NewPadMessageBoxPageRequest request) {
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
NewPadMessageBoxDTO dto = CommonUtil.convertRequest(NewPadMessageBoxDTO.class);
dto.setPhone(userInfo.getPhone());
// RpcResponse<RpcPagination<ScriptRecordPadPushDTO>> response = padMessageBoxRemote.getStaffStudyBoxMessagePage(dto);
// if (response.hasError()) {
// return RopResponse.error(response.getError(), response.getMessage());
// } else {
// return RopResponse.success(response.getResult());
// }
return null;
try {
RpcPagination<NewPadMessageBoxDTO> pagination = CommonUtil.getRpcPagination(NewPadMessageBoxDTO.class);
NewPadMessageBoxDTO condition = pagination.getCondition();
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
condition.setPhone(userInfo.getPhone());
RpcResponse<RpcPagination<NewPadMessageBoxDTO>> response = padMessageBoxRemote.pagePadMessageBox(pagination);
if (response.hasError()) {
return RopResponse.error(response.getError(), response.getMessage());
} else {
return RopResponse.success(response.getResult());
}
} 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("查询消息盒子消息详情")
@ServiceMethod(method = "dj.pad.api.new.pad.message.box.detail", needInSession = NeedInSessionType.YES)
public RopResponse<NewPadMessageBoxDTO> detail(CommonIdRequest request) {
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
NewPadMessageBoxDTO dto = CommonUtil.convertRequest(NewPadMessageBoxDTO.class);
dto.setPhone(userInfo.getPhone());
// RpcResponse<RpcPagination<ScriptRecordPadPushDTO>> response = padMessageBoxRemote.getStaffStudyBoxMessagePage(dto);
// if (response.hasError()) {
// return RopResponse.error(response.getError(), response.getMessage());
// } else {
// return RopResponse.success(response.getResult());
// }
return null;
try {
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
if (userInfo == null || userInfo.getPhone() == null) {
return RopResponse.error("用户未登录或手机号信息缺失");
}
String phone = userInfo.getPhone();
NewPadMessageBoxDTO dto = new NewPadMessageBoxDTO();
dto.setId(request.getId());
dto.setPhone(phone);
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 {
return RopResponse.result(contentManagerTaskRemote.getUnReadMessage(dto));
}
@ApiOperation("查询当前员工的消息弹窗-长课程-旧")
@ApiOperation("查询当前员工的消息弹窗-长课程(新-只用于展业助手)")
@ServiceMethod(method = "dj.pad.api.staff.long.course.message.notify")
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")
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("确认消息弹窗")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!