修复:微信端评价列表自动过滤隐藏评价
Some checks failed
Build and Push Backend / docker (push) Failing after 8s

- 在微信店员评价查询接口中强制设置hidden=0
- 确保顾客端只能看到管理员未隐藏的评价
- 优化日志配置,减少SQL日志输出
This commit is contained in:
irving
2025-10-21 22:41:32 -04:00
parent ef88ec7134
commit 7771b30366
5 changed files with 90 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ package com.starry.admin.modules.order.module.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.common.domain.BaseEntity;
import com.starry.common.enums.EvaluateHiddenState;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -74,6 +75,7 @@ public class PlayOrderEvaluateInfoEntity extends BaseEntity<PlayOrderEvaluateInf
/**
* 数据是否隐藏0:显示1:隐藏)
* @see EvaluateHiddenState
*/
private String hidden;

View File

@@ -1,5 +1,6 @@
package com.starry.admin.modules.order.module.vo;
import com.starry.common.enums.EvaluateHiddenState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
@@ -24,9 +25,10 @@ public class PlayOrderEvaluateEditStateVo {
/**
* 数据是否隐藏0:显示1:隐藏)
* @see EvaluateHiddenState
*/
@NotBlank(message = "是否隐藏不能为空")
@Pattern(regexp = "[01]", message = "是否隐藏数据错误,只能位0或者1")
@ApiModelProperty(value = "是否隐藏", required = true, example = "1", notes = "数据是否隐藏0:显示1:隐藏")
@ApiModelProperty(value = "是否隐藏", required = true, example = "1", notes = "数据是否隐藏0:显示1:隐藏。使用 EvaluateHiddenState 枚举值")
private String hidden;
}

View File

@@ -17,6 +17,7 @@ import com.starry.admin.modules.order.module.vo.PlayOrderEvaluateReturnVo;
import com.starry.admin.modules.order.service.IPlayOrderEvaluateInfoService;
import com.starry.admin.modules.personnel.service.IPlayPersonnelGroupInfoService;
import com.starry.admin.utils.SecurityUtils;
import com.starry.common.enums.EvaluateHiddenState;
import com.starry.common.utils.IdUtils;
import com.starry.common.utils.StringUtils;
import java.util.Arrays;

View File

@@ -553,6 +553,8 @@ public class WxClerkController {
@PostMapping("/user/queryEvaluateByPage")
public R queryEvaluateById(@Validated @RequestBody PlayOrderEvaluateQueryVo vo) {
clerkUserInfoService.selectById(vo.getClerkId());
// Force filter to show only visible evaluations (hidden = "0") for WeChat client
vo.setHidden(com.starry.common.enums.EvaluateHiddenState.VISIBLE.getCode());
return R.ok(playOrderEvaluateInfoService.selectByPage(vo));
}