fxkh-txl-service/src/main/resources/mapper/VersionsMapper.xml

27 lines
991 B
XML

<?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.whdc.mapper.VersionsMapper">
<select id="page" resultType="com.whdc.model.entity.Versions">
SELECT V.*, A.NAME, A.PHONE FROM FXKH_TXL.AB_INFO V
LEFT JOIN FXKH_TXL.USERS U ON V.CREATE_ID = U.ID
LEFT JOIN FXKH_TXL.ADDRESS_BOOK A ON U.AB_ID = A.ID
<where>
<if test="dto.name != null and dto.name != '' ">
AND A.NAME LIKE CONCAT('%', #{dto.name}, '%')
</if>
<if test="dto.phone != null and dto.phone != '' ">
AND A.PHONE LIKE CONCAT('%', #{dto.phone}, '%')
</if>
<if test="dto.type != null and dto.type != '' ">
AND A.TYPE = #{dto.type}
</if>
</where>
</select>
<select id="find" resultType="com.whdc.model.entity.Versions">
</select>
</mapper>