瀏覽代碼

LY tag排序

ly 2 年之前
父節點
當前提交
233a1d9834
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      master/src/main/resources/mybatis/invoice/TInvoiceTagMapper.xml

+ 2 - 2
master/src/main/resources/mybatis/invoice/TInvoiceTagMapper.xml

@@ -27,13 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTInvoiceTagList" parameterType="TInvoiceTag" resultMap="TInvoiceTagResult">
         <include refid="selectTInvoiceTagVo"/>
         <where>
-            <if test="tag != null  and tag != ''"> and tag = #{tag}</if>
+            <if test="tag != null and tag != ''"> and tag like concat(concat('%', #{tag}), '%')</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
-        order by d.sort desc
+        order by d.sort desc ,d.tag
     </select>
 
     <select id="selectTInvoiceTagById" parameterType="Long" resultMap="TInvoiceTagResult">