.summer 2020-10-27 15:06 采纳率: 80%
浏览 113

springboot中搜索框怎么做啊

<select id="findProductsList" resultMap="BaseResultMap">
    SELECT ID,PRODUCTID,CONTACTSNAME,PRODUCTNAME,SPECIFICATION,MEASURE,INSTALLTIME,WARRANTYTIME,QUANTITY
    FROM PRODUCTS
    <where>
      <if test="productid != null and productid != ''">
        AND productid LIKE #{productid}
      </if>
      <if test="contactsname != null and contactsname != ''">
        AND contactsname LIKE #{contactsname}
      </if>
      <if test="productname != null and productname != ''">
        AND productname LIKE #{productname}
      </if>
      <if test="specification != null and specification != ''">
        AND specification LIKE #{specification}
      </if>
      <if test="measure != null and measure != ''">
        AND measure LIKE #{measure}
      </if>
      <if test="installtime != null and installtime != ''">
        AND installtime LIKE #{contactsname}
      </if>
      <if test="warrantytime != null and warrantytime != ''">
        AND warrantytime LIKE #{warrantytime}
      </if>
      <if test="quantity != null and quantity != ''">
        OR quantity LIKE #{quantity}
      </if>
    </where>

web.controller层和html中应该怎么写

  • 写回答

1条回答 默认 最新

  • 小唐不会敲代码 2023-03-22 13:28
    关注

    你的问题比较模糊 你写的sql是多条件查询 首先就是 写一个 input 框 具体写法可以去学习一下 你写完controller了 定义名字 然后去html里面去调接口传参 功能不难

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据