<?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>
|