package com.jojubanking.boot.module.system.dal.mysql.wqda;

import java.util.*;

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.jojubanking.boot.framework.mybatis.core.mapper.BaseMapperX;
import com.jojubanking.boot.module.system.dal.dataobject.wqda.WqdaDO;
import com.jojubanking.boot.module.system.dal.dataobject.wqda.WqdaDOx;
import org.apache.ibatis.annotations.Mapper;
import com.jojubanking.boot.module.system.controller.admin.wqda.vo.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 问卷调查答案 Mapper
 *
 * @author admin
 */
@Mapper
public interface WqdaxMapper extends BaseMapperX<WqdaDOx> {


    @Select("SELECT *, COUNT(*) as sum FROM hnwj_wqda where question_id = #{questionId} and type_id = #{typeId} and (create_time >=  #{startTime} and create_time <=  #{endTime}) GROUP BY question_answer order by id")
    List<WqdaDOx> selectSumList(@Param("questionId")String questionId, @Param("typeId")String typeId, @Param("startTime")String startTime, @Param("endTime")String endTime);

}
