package com.easyproject.client.controller.operate;

import com.easyproject.clientbus.domain.dto.SelectPageDto;
import com.easyproject.clientbus.service.operate.IQuestionsService;
import com.easyproject.common.annotation.Log;
import com.easyproject.common.core.domain.AjaxClientResult;
import com.easyproject.common.enums.BusinessType;
import com.easyproject.common.enums.OperatorType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 方法说明: 问题相关
 *
 * @param
 * @author java-101
 * @return
 * @date 2025-03-23 16:37:42
 */
@Slf4j
@RestController
@RequestMapping("/v1/questions")
public class QuestionsController {

    @Resource
    private IQuestionsService questionsService;

    /**
     * 方法说明: 常见问题
     *
     * @param
     * @return
     * @author java-101
     * @date 2025-03-23 16:41:15
     */
    @Log(title = "常见问题查询", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE)
    @GetMapping("/selCommonQuestions")
    public AjaxClientResult selCommonQuestions(SelectPageDto dto) {
        return questionsService.selCommonQuestions(dto);
    }

    /**
     * 方法说明: 常见问题-随机查询
     *
     * @param
     * @return
     * @author java-101
     * @date 2025-03-23 16:41:15
     */
    @Log(title = "常见问题随机查询", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE)
    @GetMapping("/selCommonQuestionsRandom")
    public AjaxClientResult selCommonQuestionsRandom(SelectPageDto dto) {
        return questionsService.selCommonQuestionsRandom(dto);
    }

    /**
     * 方法说明: 猜你所想
     *
     * @param
     * @return
     * @author java-101
     * @date 2025-03-23 16:51:39
     */
    @GetMapping("/guessWhatYouWant")
    public AjaxClientResult guessWhatYouWant(SelectPageDto dto) {
        return questionsService.guessWhatYouWant(dto);
    }

    /**
     * 方法说明: 热门问题
     *
     * @param
     * @return
     * @author java-101
     * @date 2025-03-23 16:52:19
     */
    @GetMapping("/hotQuestions")
    public AjaxClientResult hotQuestions(SelectPageDto dto) {
        return questionsService.hotQuestions(dto);
    }
}
