<?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.tofly.feesapi.wxgl.wechatofficalacctmgt.mapper.WxWdMapper">
    <select id="SelectChargeMaxCode" resultType="int">
        select nvl(max(ID), 0) id from wx_wd
    </select>
    <select id="SelectWxWdPage" resultType="com.tofly.feesapi.wxgl.wechatofficalacctmgt.entity.WxWd">
        select ID id,WD_NAME wdName,WD_ADDRESS wdAddress,WD_LXDH wdPhone,WD_WORKTIME wdWorktime,
        WD_SY wdSy,WD_SX wdSx,WD_CBRQ wdReadDate,WD_SFRQ wdChargeDate,SHOWNUM shownum
        from WX_WD where 1=1
        <!--模糊查询 -->
        <if test="searchText != null and searchText != ''">
            and ( WD_NAME like '%${searchText}%' or WD_ADDRESS like '%${searchText}%' or WD_PHONE like '%${searchText}%'
            )
        </if>
        <if test="wdName!=null and wdName!=''">
            and WD_NAME=#{wdName}
        </if>
    </select>
</mapper>
