Commit 7f26ff4e by 林永健

feat(pe-analysis): 新增门店留言及关注管理功能

- 新增StoreCommentController实现门店留言的新增、撤回及查询接口
- 新增StoreFollowController实现门店关注/取消关注及关注列表查询接口
- 新增门店跟进记录综合查询请求及门店留言、关注请求响应定义
- 在PeAnalysisDubboConfig中添加MerchantBiFollowRemote和MerchantBiCommentRemote的Dubbo客户端配置
- BusinessSceneAnalysisController中请求参数增加登录用户信息填充
- PermissionController新增获取广联数科有效员工列表的接口
- pom.xml依赖版本属性化,统一管理依赖版本号
- 新增MerchantBiDailyPushJob,实现每日BI动态汇总推送任务
- 各功能接口均实现登录用户校验和异常处理,保证系统安全与稳定性
1 parent 4252fbf9
......@@ -11,11 +11,17 @@
<name>rop-dj-pe-analysis</name>
<packaging>war</packaging>
<properties>
<platform-merchants.api.version>5.5.1-SNAPSHOT</platform-merchants.api.version>
<smartcarlife.api.version>5.6.4-SNAPSHOT</smartcarlife.api.version>
<pe-analysis.api.version>5.7.0-SNAPSHOT</pe-analysis.api.version>
</properties>
<dependencies>
<dependency>
<groupId>cn.com.glsx.merchants</groupId>
<artifactId>platform-merchants-api</artifactId>
<version>5.5.1-SNAPSHOT</version>
<version>${platform-merchants.api.version}</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.scrm</groupId>
......@@ -25,7 +31,7 @@
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-smartcarlife-api</artifactId>
<version>4.54.0-SNAPSHOT</version>
<version>${smartcarlife.api.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
......@@ -41,7 +47,7 @@
<dependency>
<groupId>cn.com.glsx.dj.peanalysis</groupId>
<artifactId>rpc-dj-pe-analysis-api</artifactId>
<version>5.6.4-SNAPSHOT</version>
<version>${pe-analysis.api.version}</version>
</dependency>
</dependencies>
......
package cn.com.glsx.dj.config.dubbo;
import cn.com.glsx.dj.peanalysis.remote.BiAnalyseBackgroundRemote;
import cn.com.glsx.dj.peanalysis.remote.BusinessSceneAnalysisRemote;
import cn.com.glsx.dj.peanalysis.remote.GetListDataRespRemote;
import cn.com.glsx.dj.peanalysis.remote.*;
import lombok.RequiredArgsConstructor;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.context.annotation.Bean;
......@@ -50,4 +48,26 @@ public class PeAnalysisDubboConfig {
.timeout(30000)
.build();
}
@Bean
public MerchantBiFollowRemote merchantBiFollowRemote(){
return factory
.builder(MerchantBiFollowRemote.class)
.check(false)
// .url("dubbo://localhost:8870")
.version("1.0.0")
.timeout(30000)
.build();
}
@Bean
public MerchantBiCommentRemote merchantBiCommentRemote(){
return factory
.builder(MerchantBiCommentRemote.class)
.check(false)
// .url("dubbo://localhost:8870")
.version("1.0.0")
.timeout(30000)
.build();
}
}
......@@ -7,6 +7,7 @@ import cn.com.glsx.dj.peanalysis.remote.BusinessSceneAnalysisRemote;
import cn.com.glsx.dj.request.MerchantIdPermissionRequest;
import cn.com.glsx.dj.request.common.MerchantRequest;
import cn.com.glsx.dj.request.output.SceneBaseRequest;
import cn.com.glsx.dj.response.LoginUserInfoResponse;
import cn.com.glsx.dj.service.LoginService;
import cn.com.glsx.dj.smartcarlife.remote.ServiceMerchantRemote;
import cn.com.glsx.dj.util.CommonUtil;
......@@ -327,6 +328,15 @@ public class BusinessSceneAnalysisController {
try {
SceneBaseReq req = CommonUtil.convertRequest(SceneBaseReq.class);
req.setMerchantIds(getMerchantIds(req, request.getMerchantFilter()));
// 设置当前登录用户信息
LoginUserInfoResponse loginUserInfo = CommonUtil.getLoginUserInfo();
if (loginUserInfo != null) {
req.setLoginUserUuid(loginUserInfo.getUuid());
req.setLoginUserName(loginUserInfo.getName());
req.setLoginUserPhone(loginUserInfo.getPhone());
}
RpcResponse<List<StoreListResponse>> response = businessSceneAnalysisRemote.storeList(req);
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
......
......@@ -13,6 +13,7 @@ import cn.com.glsx.dj.smartcarlife.model.ShopMerchantDirectorConfig;
import cn.com.glsx.dj.smartcarlife.remote.ServiceMerchantConfigurationRemote;
import cn.com.glsx.dj.smartcarlife.remote.ShopMerchantDirectorConfigRemote;
import cn.com.glsx.dj.util.CommonUtil;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.model.request.MerchantStaffRequest;
import cn.com.glsx.merchants.model.request.merchant.MerchantBasicInfoRequest;
......@@ -20,6 +21,7 @@ import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.model.response.merchant.MerchantBrandAndProvinceResponse;
import cn.com.glsx.merchants.remote.MerchantRemote;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
......@@ -154,6 +156,23 @@ public class PermissionController {
return RopResponse.success(null);
}
@ApiOperation("获取广联数科有效员工列表")
@ServiceMethod(method="dj.api.pe.analysis.glsk.staff", needInSession= NeedInSessionType.YES)
public RopResponse<List<MerchantStaffResponse>> getActiveStaffList(AbstractRopRequest request) {
try {
MerchantStaffRequest condition = new MerchantStaffRequest();
Integer glskMerchantId = env.getProperty("glsk.merchantId", Integer.class, 44205577);
condition.setMerchantNo(glskMerchantId);
condition.setStatus(0);
// condition.setDelFlag((byte) 0);
RpcResponse<List<MerchantStaffResponse>> response = merchantStaffRemote.findMerchantStaffListRemote(condition);
return CommonUtil.convertRopResponse(response);
} catch (Exception e) {
log.error("获取有效员工列表异常", e);
return RopResponse.error(e.getMessage());
}
}
//isServiceDirector true 是服务商负责人 false 业务负责人
private List<StaffBaseInfoResponse> getStaffList(PermissionRequest request,boolean isServiceDirector){
MerchantIdPermissionRequest q = MerchantIdPermissionRequest.builder()
......
package cn.com.glsx.dj.controller;
import cn.com.glsx.dj.peanalysis.dto.analysis.MerchantBiCommentReq;
import cn.com.glsx.dj.peanalysis.dto.analysis.StrategyRecordDTO;
import cn.com.glsx.dj.peanalysis.dto.analysis.StrategyRecordQryDTO;
import cn.com.glsx.dj.peanalysis.remote.MerchantBiCommentRemote;
import cn.com.glsx.dj.request.biAnalyse.StoreCombinedRecordRequest;
import cn.com.glsx.dj.request.biAnalyse.StoreCommentRequest;
import cn.com.glsx.dj.response.LoginUserInfoResponse;
import cn.com.glsx.dj.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.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 javax.annotation.Resource;
/**
* BI-门店留言管理
*
* @author lyj
* @version 1.0
* @since 2026/03/12
*/
@Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("门店留言管理")
public class StoreCommentController {
@Resource
private MerchantBiCommentRemote commentRemote;
@ApiOperation("新增门店留言")
@ServiceMethod(method = "dj.api.pe.analysis.store.comment.add", needInSession = NeedInSessionType.YES)
public RopResponse<Boolean> addComment(StoreCommentRequest request) {
try {
LoginUserInfoResponse loginUserInfo = CommonUtil.getLoginUserInfo();
MerchantBiCommentReq req = CommonUtil.convertRequest(MerchantBiCommentReq.class);
req.setStaffUuid(loginUserInfo.getUuid());
req.setStaffName(loginUserInfo.getName());
req.setStaffPhone(loginUserInfo.getPhone());
RpcResponse<Boolean> response = commentRemote.addComment(req);
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("新增门店留言异常", e);
return RopResponse.error(e.getMessage());
}
}
@ApiOperation("撤回门店留言")
@ServiceMethod(method = "dj.api.pe.analysis.store.comment.withdraw", needInSession = NeedInSessionType.YES)
public RopResponse<Boolean> withdrawComment(StoreCommentRequest request) {
try {
LoginUserInfoResponse loginUserInfo = CommonUtil.getLoginUserInfo();
RpcResponse<Boolean> response = commentRemote.withdrawComment(request.getId(), loginUserInfo.getUuid());
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("撤回门店留言异常", e);
return RopResponse.error(e.getMessage());
}
}
@ApiOperation("查询门店跟进记录列表 (留言+策略)")
@ServiceMethod(method = "dj.api.pe.analysis.store.combined.record.list", needInSession = NeedInSessionType.YES)
public RopResponse<RpcPagination<StrategyRecordDTO>> listCombinedRecords(StoreCombinedRecordRequest request) {
try {
LoginUserInfoResponse loginUserInfo = CommonUtil.getLoginUserInfo();
RpcPagination<StrategyRecordQryDTO> pagination = new RpcPagination<>();
pagination.setPageNum(request.getPageNum());
pagination.setPageSize(request.getPageSize());
StrategyRecordQryDTO qry = CommonUtil.convertRequest(StrategyRecordQryDTO.class);
pagination.setCondition(qry);
RpcResponse<RpcPagination<StrategyRecordDTO>> response = commentRemote.findCombinedRecords(pagination, loginUserInfo.getUuid());
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("查询门店跟进记录异常", e);
return RopResponse.error(e.getMessage());
}
}
}
package cn.com.glsx.dj.controller;
import cn.com.glsx.dj.peanalysis.dto.analysis.MerchantBiFollowReq;
import cn.com.glsx.dj.peanalysis.dto.req.output.SceneBaseReq;
import cn.com.glsx.dj.peanalysis.dto.res.output.MyFollowResponse;
import cn.com.glsx.dj.peanalysis.remote.MerchantBiFollowRemote;
import cn.com.glsx.dj.request.biAnalyse.StoreFollowListRequest;
import cn.com.glsx.dj.request.biAnalyse.StoreFollowRequest;
import cn.com.glsx.dj.response.LoginUserInfoResponse;
import cn.com.glsx.dj.util.CommonUtil;
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 javax.annotation.Resource;
import java.util.List;
/**
* BI-门店关注管理
*
* @author lyj
* @version 1.0
* @since 2026/03/12
*/
@Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("门店关注管理")
public class StoreFollowController {
@Resource
private MerchantBiFollowRemote followRemote;
@ApiOperation("门店关注/取消关注")
@ServiceMethod(method = "dj.api.pe.analysis.store.follow", needInSession = NeedInSessionType.YES)
public RopResponse<Boolean> followMerchant(StoreFollowRequest request) {
try {
MerchantBiFollowReq req = CommonUtil.convertRequest(MerchantBiFollowReq.class);
LoginUserInfoResponse loginUserInfo = CommonUtil.getLoginUserInfo();
req.setStaffUuid(loginUserInfo.getUuid());
req.setStaffName(loginUserInfo.getName());
req.setStaffPhone(loginUserInfo.getPhone());
RpcResponse<Boolean> response = followRemote.followMerchant(req);
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("门店关注异常", e);
return RopResponse.error(e.getMessage());
}
}
@ApiOperation("我的关注列表")
@ServiceMethod(method = "dj.api.pe.analysis.my.follow.list", needInSession = NeedInSessionType.YES)
public RopResponse<List<MyFollowResponse>> myFollowList(StoreFollowListRequest request) {
try {
SceneBaseReq req = CommonUtil.convertRequest(SceneBaseReq.class);
LoginUserInfoResponse loginUserInfo = CommonUtil.getLoginUserInfo();
req.setLoginUserUuid(loginUserInfo.getUuid());
RpcResponse<List<MyFollowResponse>> response = followRemote.myFollowList(req);
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("查询我的关注列表异常", e);
return RopResponse.error(e.getMessage());
}
}
@ApiOperation("他人关注列表")
@ServiceMethod(method = "dj.api.pe.analysis.others.follow.list", needInSession = NeedInSessionType.YES)
public RopResponse<List<MyFollowResponse>> othersFollowList(StoreFollowListRequest request) {
try {
SceneBaseReq req = CommonUtil.convertRequest(SceneBaseReq.class);
LoginUserInfoResponse loginUserInfo = CommonUtil.getLoginUserInfo();
req.setLoginUserUuid(loginUserInfo.getUuid());
RpcResponse<List<MyFollowResponse>> response = followRemote.othersFollowList(req);
if (response.isSuccess()) {
return RopResponse.success(response.getResult());
}
return RopResponse.error(response.getMessage());
} catch (Exception e) {
log.error("查询他人关注列表异常", e);
return RopResponse.error(e.getMessage());
}
}
}
package cn.com.glsx.dj.request.biAnalyse;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* 门店跟进记录(留言+策略)查询请求
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "门店跟进记录查询请求")
public class StoreCombinedRecordRequest extends AbstractRopRequest implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "门店ID")
private Integer merchantId;
@ApiModelProperty(notes = "业务类型")
private Byte businessType;
@ApiModelProperty(notes = "当前页(默认1)")
private Integer pageNum = 1;
@ApiModelProperty(notes = "每页大小(默认10)")
private Integer pageSize = 10;
@ApiModelProperty(notes = "开始日期 (yyyy-MM-dd)")
private String startDate;
@ApiModelProperty(notes = "结束日期 (yyyy-MM-dd)")
private String endDate;
}
package cn.com.glsx.dj.request.biAnalyse;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
/**
* 门店留言请求
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class StoreCommentRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "主键id (修改/删除时使用)")
private Integer id;
@ApiModelProperty(notes = "门店号")
@NotNull(message = "门店号不能为空")
private Integer merchantId;
@ApiModelProperty(notes = "门店名称")
private String merchantName;
@ApiModelProperty(notes = "业务场景 (1:延保; 2:轻改; 3:权益; 4:二手车)")
@NotNull(message = "业务类型不能为空")
private Byte businessType;
@ApiModelProperty(notes = "留言内容")
private String content;
@ApiModelProperty(notes = "处理人编号")
private String handlerStaffUuid;
@ApiModelProperty(notes = "处理人姓名")
private String handlerStaffName;
@ApiModelProperty(notes = "页码")
private Integer pageNum = 1;
@ApiModelProperty(notes = "每页条数")
private Integer pageSize = 10;
}
package cn.com.glsx.dj.request.biAnalyse;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* 门店关注列表查询请求
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "门店关注列表查询请求")
public class StoreFollowListRequest extends AbstractRopRequest implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "业务类型 (1:延保; 2:轻改; 3:权益; 4:二手车)")
private Integer businessType;
@ApiModelProperty(notes = "品牌筛选 (选择一级主营品牌)")
private Integer brandId;
@ApiModelProperty(notes = "省份筛选")
private Integer provinceId;
@ApiModelProperty(notes = "周期类型 (1:按天; 2:按周; 3:按月; 4:自定义; 5:按年)")
private Integer cycleType;
@ApiModelProperty(notes = "开始时间 (yyyy-MM-dd)")
private String startTime;
@ApiModelProperty(notes = "结束时间 (yyyy-MM-dd)")
private String endTime;
@ApiModelProperty(notes = "门店名称 (模糊搜索)")
private String merchantName;
@ApiModelProperty(notes = "排序字段名")
private String orderBy;
@ApiModelProperty(notes = "排序方式 (1:Desc; 2:Asc)")
private Integer orderType;
}
package cn.com.glsx.dj.request.biAnalyse;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
/**
* 门店关注请求
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class StoreFollowRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "门店号")
@NotNull(message = "门店号不能为空")
private Integer merchantId;
@ApiModelProperty(notes = "门店名称")
private String merchantName;
@ApiModelProperty(notes = "业务类型(1.延保 2.轻改 3.权益 4.二手车)")
@NotNull(message = "业务类型不能为空")
private Byte businessType;
@ApiModelProperty(notes = "操作类型 (1:关注; 0:取消关注)")
@NotNull(message = "操作类型不能为空")
private Integer operateType;
}
package cn.com.glsx.dj.response.bianalysis;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 门店留言响应对象
*/
@Data
public class StoreCommentResponse implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "主键id")
private Integer id;
@ApiModelProperty(notes = "门店号")
private Integer merchantId;
@ApiModelProperty(notes = "门店名称")
private String merchantName;
@ApiModelProperty(notes = "业务场景")
private Byte businessType;
@ApiModelProperty(notes = "员工编号 (留言人)")
private String staffUuid;
@ApiModelProperty(notes = "员工姓名 (留言人)")
private String staffName;
@ApiModelProperty(notes = "处理人编号")
private String handlerStaffUuid;
@ApiModelProperty(notes = "处理人姓名")
private String handlerStaffName;
@ApiModelProperty(notes = "留言内容")
private String content;
@ApiModelProperty(notes = "创建时间")
private Date createdDate;
}
  • @wangxw1
    commented
    Master

    你好,我是负责本次代码审查的工程师。你提交的代码主要涉及 BI 分析相关的门店留言、关注功能及相关 Dubbo 配置的更新。整体结构清晰,ROP 框架的使用符合现有规范,但在配置管理、代码整洁度和异常处理方面存在改进空间。

    以下是本次审查的详细反馈:

    一、关键问题与优化建议(Top 3)

    1. 可维护性与配置管理:存在硬编码(Magic Number)与配置不一致风险

    • 问题描述:
      1. 在 PermissionController.java 中,获取 glsk.merchantId 时使用了硬编码默认值 44205577。
      2. 在 PeAnalysisDubboConfig.java 中,Dubbo 服务的版本号硬编码为 "1.0.0",未引用 pom.xml 或配置文件中的属性。
    • 影响分析:
      • 硬编码的商户 ID (44205577) 极具风险。如果生产环境配置缺失,系统将静默使用该 ID,可能导致数据泄露(查询了错误的商户员工)或业务逻辑错误,且难以排查。
      • Dubbo 版本号硬编码导致配置与 Maven 依赖版本分离。未来升级接口版本时,容易遗漏修改此处,导致服务调用失败(No provider available)。
    • 优化建议:
      • 禁止在代码中使用具体的业务 ID 作为默认值。如果配置不存在,应抛出异常阻断启动或请求,而不是使用“可能正确”的默认值。
      • 将 Dubbo 版本号抽取到 application.properties 或常量类中管理。
    // PermissionController.java 建议修改
    // 移除默认值,强制要求配置存在
    Integer glskMerchantId = env.getProperty("glsk.merchantId", Integer.class);
    if (glskMerchantId == null) {
        throw new SystemException("缺少配置项: glsk.merchantId");
    }
    
    // PeAnalysisDubboConfig.java 建议修改
    @Value("${dubbo.consumer.version:1.0.0}")
    private String dubboVersion;
    
    // 在 builder 中使用
    .version(dubboVersion)
    

    2. 代码整洁度:存在废弃的注释代码(Dead Code)

    • 问题描述:
      • PeAnalysisDubboConfig.java 中保留了注释掉的 .url("dubbo://localhost:8870")。
      • PermissionController.java 中保留了 // condition.setDelFlag((byte) 0);。
    • 影响分析:
      • 提交注释掉的代码是工程大忌。这会干扰阅读,增加后续维护者的困惑(是逻辑错误暂时注释?还是调试代码遗留?),由于 git 已有版本控制能力,无需保留无用代码。
    • 优化建议:
      • 直接删除所有被注释掉的无用代码。

    3. 安全性与健壮性:异常处理机制过于粗糙

    • 问题描述:
      • 在 StoreCommentController、PermissionController 等多处,捕获通用 Exception 后直接返回 RopResponse.error(e.getMessage())。
    • 影响分析:
      • 安全风险:直接将 e.getMessage() 暴露给前端/客户端,可能会泄露底层堆栈信息、SQL 结构或内部逻辑细节(例如空指针异常通常没有 message,前端会收到 "null")。
      • 用户体验:用户看到的错误提示可能是 "For input string: 'xx'" 等非人类可读的各种技术报错。
    • 优化建议:
      • 区分业务异常(BusinessException)和系统异常。
      • 业务异常返回具体 message,未知系统异常应记录日志并返回统一的模糊提示(如“系统繁忙,请稍后重试”)。
    // 建议优化示例
    try {
        // 业务逻辑...
    } catch (RpcException e) {
        log.error("RPC调用失败", e);
        return RopResponse.error("远程服务调用失败");
    } catch (Exception e) {
        log.error("新增门店留言异常", e);
        // 生产环境通常不直接透传 e.getMessage(),除非确信该 message 是经过处理的
        return RopResponse.error("系统处理异常,请联系管理员");
    }
    

    二、评分明细

    评分维度 得分 理由
    功能实现的正确性与健壮性 35/40 逻辑实现基本完整,参数传递正确。扣分点在于 Controller 层对 RPC 结果的判断较为简单,且 BusinessSceneAnalysisController 中 loginUserInfo 若为空可能导致后续逻辑数据缺失,未做防御性处理。
    安全性与潜在风险 24/30 存在硬编码特定商户 ID 的风险;异常信息直接透传存在泄露风险;withdrawComment 依赖远程服务做越权校验(IDOR),虽然 Controller 传了 UUID,但需确保服务端必须校验归属权。
    最佳实践与可维护性 14/20 提交了多处注释掉的废弃代码;Dubbo 版本号与 Maven 版本未统一管理;配置项使用了具有业务含义的魔术数字作为默认值。
    性能与资源利用 5/5 未发现明显的性能瓶颈,分页逻辑处理正常。
    提交信息质量 4/5 Commit Message 格式规范,描述清晰。但描述中提到的 MerchantBiDailyPushJob 在本次 Diff 文件中未出现,存在描述与实际提交文件不一致的情况。

    总分:82分

Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!