<?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.ruoyi.system.mapper.TMerchantMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.system.model.TMerchant">
|
<id column="id" property="id" />
|
<result column="merchant_name" property="merchantName" />
|
<result column="merchant_phone" property="merchantPhone" />
|
<result column="type_id" property="typeId" />
|
<result column="merchant_logo" property="merchantLogo" />
|
<result column="address" property="address" />
|
<result column="merchant_detail" property="merchantDetail" />
|
<result column="create_time" property="createTime" />
|
<result column="update_time" property="updateTime" />
|
<result column="create_by" property="createBy" />
|
<result column="update_by" property="updateBy" />
|
<result column="disabled" property="disabled" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, merchant_name, merchant_phone, type_id, merchant_logo, address, merchant_detail, create_time, update_time, create_by, update_by, disabled
|
</sql>
|
<select id="pageList" resultType="com.ruoyi.system.vo.TMerchantVO">
|
SELECT
|
tm.id, tm.merchant_name, tm.merchant_phone, tm.type_id, tm.merchant_logo, tm.address, tm.merchant_detail,
|
tm.create_time, tm.update_time, tm.create_by, tm.update_by, tm.disabled, tmt.type_name
|
FROM t_merchant tm
|
left join t_merchant_type tmt on tm.type_id = tmt.id
|
<where>
|
<if test="query.merchantName != null and query.merchantName != ''">
|
AND tm.merchant_name LIKE CONCAT('%',#{query.merchantName},'%')
|
</if>
|
<if test="query.merchantPhone != null and query.merchantPhone != ''">
|
AND tm.merchant_phone LIKE CONCAT('%',#{query.merchantPhone},'%')
|
</if>
|
AND tm.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
|
</where>
|
ORDER BY tm.create_time DESC
|
</select>
|
|
</mapper>
|