mysql ifnull

        SELECT *
        FROM customer_linkman
        WHERE customer_id = #{customerLinkman.customerId}
            and id != #{customerLinkman.id} and is_deleted = 0
            and ifnull(linkman,'') = ifnull(#{customerLinkman.linkman},'')
            and ifnull(gender,'') = ifnull(#{customerLinkman.gender},'')
            and ifnull(dept,'') = ifnull(#{customerLinkman.dept},'')
            and ifnull(position,'') = ifnull(#{customerLinkman.position},'')
            and ifnull(mobile_phone,'') = ifnull(#{customerLinkman.mobilePhone},'')
            and ifnull(phone,'') = ifnull(#{customerLinkman.phone},'')
            and ifnull(email,'') = ifnull(#{customerLinkman.email},'')
            and ifnull(address,'') = ifnull(#{customerLinkman.address},'')
            and ifnull(wechat,'') = ifnull(#{customerLinkman.wechat},'')
        order by id
        limit 0,1

 

posted @ 2023-02-08 13:11  江境纣州  阅读(2)  评论(0编辑  收藏  举报