青羊经侦大队-数据平台
11
baizonghao
2023-05-25 7ea5eece501c98a91555a5358931367e78e9d23b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.jz.dao.CommonQuestionDao">
 
    <resultMap type="com.example.jz.modle.entity.CommonQuestion" id="CommonQuestionMap">
        <result property="questionTitle" column="question_title" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="INTEGER"/>
        <result property="matchQuestion" column="match_question" jdbcType="VARCHAR"/>
        <result property="answer" column="answer" jdbcType="VARCHAR"/>
        <result property="creator" column="creator" jdbcType="INTEGER"/>
        <result property="releaseTime" column="release_time" jdbcType="TIMESTAMP"/>
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="ctime" column="ctime" jdbcType="TIMESTAMP"/>
    </resultMap>
 
    <resultMap type="com.example.jz.modle.dto.CommonQuestionDto" id="CommonQuestionDtoMap">
        <result property="questionTitle" column="question_title" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="INTEGER"/>
        <result property="matchQuestion" column="match_question" jdbcType="VARCHAR"/>
        <result property="answer" column="answer" jdbcType="VARCHAR"/>
        <result property="creator" column="creator" jdbcType="INTEGER"/>
        <result property="releaseTime" column="release_time" jdbcType="TIMESTAMP"/>
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="ctime" column="ctime" jdbcType="TIMESTAMP"/>
    </resultMap>
 
 
    <select id="findByPage" resultType="com.example.jz.modle.dto.CommonQuestionDto">
        select c.question_title,c.status,c.match_question,c.answer,u.real_name creator,c.release_time,c.id,c.ctime
        from common_question c
        join user u on c.creator = u.id
        ${qw.customSqlSegment}
    </select>
 
 
 
</mapper>