青羊经侦大队-数据平台
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
<?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.PublicityDao">
 
    <resultMap type="com.example.jz.modle.entity.Publicity" id="PublicityMap">
        <result property="publicityTitle" column="publicity_title" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="INTEGER"/>
        <result property="text" column="text" jdbcType="VARCHAR"/>
        <result property="creator" column="creator" jdbcType="VARCHAR"/>
        <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.PublicityDto" id="PublicityDtoMap">
        <result property="publicityTitle" column="publicity_title" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="INTEGER"/>
        <result property="text" column="text" jdbcType="VARCHAR"/>
        <result property="creator" column="creator" jdbcType="VARCHAR"/>
        <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.PublicityDto">
        select p.publicity_title,p.status,p.text,u.real_name creator,p.release_time,p.id,p.ctime
        from publicity p
        join user u on p.creator = u.id
        ${qw.customSqlSegment}
    </select>
 
 
</mapper>