package com.ruoyi.satisfaction.controller; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.satisfaction.domain.vo.SatisfactionExceptConfigQuestionReqVO; import com.ruoyi.satisfaction.service.SatisfactionSubtaskService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Map; /** * 满意度异常配置题目 Controller(已迁入 ruoyi-satisfaction 模块)。 *
* ⚠️ URL 与出入参一字未改:该端点原本挂在 * {@code com.ruoyi.web.controller.smartor.ServiceSubtaskDetailTraceController} * (类级 {@code @RequestMapping("/smartor/trace")})下,迁移后 * 类级路径与原方法路径都保持原样,最终对外地址仍是 * {@code POST /smartor/trace/getSatisfactionExceptConfigQuestion},前端无需任何改动。 *
* 为什么类级路径要沿用 {@code /smartor/trace}: * 该端点的业务是"随访任务异常跟踪页面里选择满意度异常题目", * 但它的数据来源与筛选逻辑(满意度分类 + 模板题目)完全属于满意度域, * 按模块化要求必须搬入本模块。为了做到"URL 不变",这里刻意沿用原类级前缀, * 而不是改到 {@code /smartor/satisfaction} 下。 *
* 开关:本 Controller 始终注册(不随 {@code satisfaction.enabled} 消失)。 * 模块被关闭时由 {@code SatisfactionAvailabilityInterceptor} * (见 {@code config/SatisfactionWebConfig})在进入方法前抛出 {@code ServiceException}, * 调用方会拿到明确的错误提示(而不是 404)。 * 注意:同一前缀 {@code /smartor/trace} 下的异常跟踪端点不受影响 * —— 拦截器只挂在本类的这 1 个路径上。 */ @Slf4j @Api(description = "满意度异常配置题目") @RestController @RequestMapping("/smartor/trace") public class SatisfactionExceptConfigController extends BaseController { @Autowired private SatisfactionSubtaskService satisfactionSubtaskService; /** * 获取满意度异常配置题目 *
* 迁移说明:入参、返回结构、日志格式与被迁移的实现完全一致;
* 原实现里的查询逻辑整段搬到了
* {@link SatisfactionSubtaskService#getSatisfactionExceptConfigQuestion}。
*/
@ApiOperation("获取满意度异常配置题目")
@PostMapping("/getSatisfactionExceptConfigQuestion")
public Map