<?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.muyu.cloud.mart.mapper.ShuJuMapper">
    <insert id="addPhonePlace">
        insert into phone_place
            (province,city,areacode,zip,company,tel)
        values
            (#{province},#{city},#{areacode},#{zip},#{company},#{tel})
    </insert>
    <insert id="addIpPlace">
        insert into ip_place
            (country,province,city,district,isp,ip)
        values
            (#{country},#{province},#{city},#{district},#{isp},#{ip})
    </insert>


    <select id="findShuJuList" resultType="com.muyu.domain.req.ShuJu">
        select *from shuju
        <where>
            <if test="name!=null and name!='' ">
                and name like '%${name}%'
            </if>
            <if test="phone!=null and phone!='' ">
                and phone like '%${phone}%'
            </if>
            <if test="ip!=null and ip!='' ">
                and ip like '%${ip}%'
            </if>
        </where>
    </select>
</mapper>
