Commit 9cd1cfd9 by 叶立庆

Merge remote-tracking branch 'origin/master' into v5.6.0

# Conflicts:
#	pom.xml
2 parents 4ec4a19d e25b7ebb
......@@ -10,6 +10,7 @@ import cn.com.glsx.dj.riskmanage.remote.ActivityRemote;
import cn.com.glsx.dj.riskmanage.remote.LearningCenterCourseCategoryRemote;
import cn.com.glsx.dj.riskmanage.remote.LearningCenterCourseRemote;
import cn.com.glsx.dj.smartcarlife.remote.*;
import cn.com.glsx.dj.strategy.remote.StrategyInfoRemote;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import com.rop.config.InterceptorHolder;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
......@@ -137,4 +138,8 @@ public class DubboConfig {
public LearningCenterCourseCategoryRemote LearningCenterCourseCategoryRemote() {
return factory.builder(LearningCenterCourseCategoryRemote.class).check(false).timeout(30000).build();
}
@Bean
public StrategyInfoRemote getStrategyInfoRemote() {
return factory.builder(StrategyInfoRemote.class).check(false).timeout(30000).version("1.0.0").build();
}
}
......@@ -38,7 +38,7 @@ public class ContentManagerTaskController {
ContentManagerTaskDTO dto = new ContentManagerTaskDTO();
dto.setPhoneNumber(userInfo.getPhone());
dto.setReadFlag(request.getReadFlag());
dto.setBusinessType(request.getBusinessType());
RpcPagination<ContentManagerTaskDTO> rpcPagination = new RpcPagination<>();
rpcPagination.setPageNum(request.getPageNum());
rpcPagination.setPageSize(request.getPageSize());
......
package cn.com.glsx.dj.pad.controller.messagebox;
import cn.com.glsx.dj.carboutique.response.LoginUserInfoResponse;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.ModuleUnreadCountDTO;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.ModuleUnreadQueryDTO;
import cn.com.glsx.dj.mindworkplate.dto.messagebox.NewPadMessageBoxDTO;
import cn.com.glsx.dj.mindworkplate.remote.PadMessageBoxRemote;
import cn.com.glsx.dj.pad.request.common.CommonIdRequest;
import cn.com.glsx.dj.pad.request.messagebox.ModuleUnreadRequest;
import cn.com.glsx.dj.pad.request.messagebox.NewPadMessageBoxPageRequest;
import cn.com.glsx.dj.pad.util.CommonUtil;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("消息盒子-新")
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) {
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) {
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());
}
}
@ApiOperation("按模块类型分组查询未读消息数量")
@ServiceMethod(method = "dj.pad.api.new.pad.message.box.unread.count.by.type", needInSession = NeedInSessionType.YES)
public RopResponse<List<ModuleUnreadCountDTO>> listUnreadMessageCountByModuleType(ModuleUnreadRequest request) {
try {
ModuleUnreadQueryDTO queryDTO = CommonUtil.convertRequest(ModuleUnreadQueryDTO.class);
// 从登录信息获取手机号
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
if (userInfo == null || userInfo.getPhone() == null) {
return RopResponse.error("用户未登录或手机号信息缺失");
}
queryDTO.setPhone(userInfo.getPhone());
RpcResponse<List<ModuleUnreadCountDTO>> response = padMessageBoxRemote.listUnreadMessageCountByModuleType(queryDTO);
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.unread.count.by.type rpcServiceException: {}", e.getMessage());
return RopResponse.error(e);
} catch (Exception e) {
log.error("按模块类型分组查询未读消息数量异常: {}", e.getMessage(), e);
return RopResponse.error("按模块类型分组查询未读消息数量异常: " + e.getMessage());
}
}
}
package cn.com.glsx.dj.pad.controller.strategy;
import cn.com.glsx.dj.pad.request.strategy.LearningRecordInsertRopRequest;
import cn.com.glsx.dj.pad.util.CommonUtil;
import cn.com.glsx.dj.strategy.model.LearningRecord;
import cn.com.glsx.dj.strategy.remote.StrategyInfoRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("录音学习记录管理")
public class StrategyInfoController {
@Autowired
private StrategyInfoRemote strategyInfoRemote;
@ApiOperation("新增录音学习记录")
@ServiceMethod(method = "dj.api.strategy.monitor.insertOrUpdateLearningRecord", needInSession = NeedInSessionType.YES)
public RopResponse<Boolean> insertOrUpdateLearningRecord(LearningRecordInsertRopRequest req) {
try {
log.info("dj.api.strategy.monitor.insertOrUpdateLearningRecord:{}", req);
LearningRecord request = CommonUtil.convertRequest(LearningRecord.class);
RpcResponse<Boolean> response = strategyInfoRemote.insertOrUpdateLearningRecord(request);
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("接口异常", e);
return RopResponse.error(e.getMessage());
}
}
}
......@@ -52,6 +52,22 @@ public class StaffStudyController {
return RopResponse.result(contentManagerTaskRemote.getUnReadMessage(dto));
}
@ApiOperation("查询当前员工的消息弹窗-长课程(新-只用于展业助手)")
@ServiceMethod(method = "dj.pad.api.staff.long.course.message.notify")
public RopResponse<StaffMessageNotifyDTO> getLongCourseMessageNotify(AbstractRopRequest request){
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
StaffMessageNotifyDTO dto = StaffMessageNotifyDTO.builder().staffPhone(userInfo.getPhone()).build();
return RopResponse.result(contentManagerTaskRemote.getLongCourseMessageNotify(dto));
}
@ApiOperation("查询当前员工的消息弹窗-系统提醒/企业通知(新-只用于展业助手)")
@ServiceMethod(method = "dj.pad.api.staff.enterprise.message.notify")
public RopResponse<StaffMessageNotifyDTO> getEnterpriseMessageNotify(AbstractRopRequest request){
LoginUserInfoResponse userInfo = CommonUtil.getLoginUserInfo();
StaffMessageNotifyDTO dto = StaffMessageNotifyDTO.builder().staffPhone(userInfo.getPhone()).build();
return RopResponse.result(contentManagerTaskRemote.getEnterpriseMessageNotify(dto));
}
@ApiOperation("确认消息弹窗")
@ServiceMethod(method = "dj.pad.api.staff.message.confirm")
public RopResponse<Integer> confirmMessage(CommonIdsRequest request){
......
......@@ -65,4 +65,7 @@ public class ContentManagerTaskPageRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "消息盒子id")
private Integer boxId;
@ApiModelProperty("业务场景:0-延保,1-精品,2-权益")
private Integer businessType;
}
package cn.com.glsx.dj.pad.request.messagebox;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* 按模块类型分组查询未读消息的查询条件DTO
*/
@Data
public class ModuleUnreadRequest extends AbstractRopRequest {
@ApiModelProperty("模块类型列表。模块分类:0-系统通知,1-优秀话术,2-话术预警,3-ai导师(短课程), 4-学习任务(长课程),6学习类策略,7优秀案例分享策略,8任务型策略")
private List<Integer> moduleTypes;
@ApiModelProperty("业务场景:0-延保,1-精品, 2-权益")
private Integer businessType;
}
\ No newline at end of file
package cn.com.glsx.dj.pad.request.messagebox;
import cn.com.glsx.dj.mindworkplate.enums.messagebox.BusinessTypeEnums;
import cn.com.glsx.dj.mindworkplate.enums.messagebox.ModuleTypeEnums;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class NewPadMessageBoxPageRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "当前页码")
private Integer pageNum = 1;
@ApiModelProperty(notes = "每页条数")
private Integer pageSize = 10;
/**
* 模块分类:0-系统通知,1-优秀话术,2-话术预警,3-ai导师(短课程), 4-学习任务(长课程),5-活动中心,6-学习类策略,7-优秀案例分享策略,8-任务型策略
* @see ModuleTypeEnums
*/
@ApiModelProperty(notes = "模块分类:0-系统通知,1-优秀话术,2-话术预警,3-ai导师(短课程), 4-学习任务(长课程),5-活动中心,6-学习类策略,7-优秀案例分享策略,8-任务型策略")
private Integer moduleType;
/**
* 业务场景:0-延保,1-精品, 2-权益
* @see BusinessTypeEnums
*/
@ApiModelProperty(notes = "业务场景:0-延保,1-精品, 2-权益")
private Integer businessType;
/**
* 消息接收人uuid
*/
@ApiModelProperty(notes = "消息接收人uuid")
private String uuid;
/**
* 消息接收人手机号
*/
@ApiModelProperty(notes = "消息接收人手机号")
private String phone;
/**
* 消息接收人姓名
*/
@ApiModelProperty(notes = "消息接收人姓名")
private String name;
/**
* 查看状态:0-待查看,1-已查看
*/
@ApiModelProperty(notes = "查看状态:0-待查看,1-已查看")
private Integer status;
/**
* 根据创建时间排序方式:0-顺序,1-倒序,默认1
*/
@ApiModelProperty(notes = "根据创建时间排序方式:0-顺序,1-倒序,默认1")
private Integer createdTimeSortType;
}
package cn.com.glsx.dj.pad.request.strategy;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import lombok.Data;
@Data
public class LearningRecordInsertRopRequest extends AbstractRopRequest{
/**
* 录音ID(
*/
@ApiModelProperty(notes = "录音批次ID")
@NotNull
private String recordingId;
/**
* 用户UUID(学习者)
*/
@ApiModelProperty(notes = "用户UUID")
@NotNull
private String userUuid;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!