xuxiaofei před 2 roky
rodič
revize
446a6bdc25

+ 1 - 3
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpClassifyController.java

@@ -68,9 +68,7 @@ public class LabXxpClassifyController extends BaseController
     @ApiOperation(value = "查询信息牌类目列表")
     public TableDataInfo<XxpClassify> list(XxpClassify xxpClassify)
     {
-        // 排序规则获取
-        String sort=  "s".equals(xxpClassify.getRemark())?"sort":"create_time";
-        startPage(sort,"descending");
+        startPage();
         List<XxpClassify> list = xxpClassifyService.selectXxpClassifyList(xxpClassify);
         return getDataTable(list);
     }

+ 0 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpUserAuthController.java

@@ -54,8 +54,6 @@ public class LabXxpUserAuthController extends BaseController
     @ApiOperation(value = "查询列表")
     public TableDataInfo<XxpUserAuth> list(XxpUserAuth xxpUserAuth)
     {
-        List<SysDictData> dictDataList = DictUtils.getDictCache("xxp_auth_type");
-        System.out.println(dictDataList.size());
         startPage();
         List<XxpUserAuth> list = xxpUserAuthService.selectXxpUserAuthList(xxpUserAuth);
         return getDataTable(list);

+ 11 - 10
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyMapper.xml

@@ -47,22 +47,23 @@
             <if test="userId != null ">and t.user_id = #{userId}</if>
             <if test="createBy != null ">and t.create_by = #{createBy}</if>
             <if test="searchValue != null and searchValue != ''">
-                and
-                (t.classify_name like concat('%', #{classifyName}, '%') )
+                and (
+                 t.classify_name like concat('%', #{searchValue}, '%')
+                 )
             </if>
             <if test="beginTime != null ">
-                and t.create_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+                and date_format(t.create_time, '%Y-%m-%d') &gt;= date_format(#{beginTime}, '%Y-%m-%d')
             </if>
             <if test="endTime != null ">
-                and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
-            </if>
-            <if test="remark == 'time' ">
-                order by t.create_time desc
-            </if>
-            <if test="remark == 'sort' ">
-                order by t.sort
+                and date_format(t.create_time, '%Y-%m-%d') &lt;= date_format(#{endTime}, '%Y-%m-%d')
             </if>
         </where>
+        <if test="remark == 'time' ">
+            order by t.create_time desc
+        </if>
+        <if test="remark == 'sort' ">
+            order by t.sort desc
+        </if>
     </select>
 
     <select id="selectXxpClassifyById" resultMap="XxpClassifyResult">

+ 7 - 2
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpUserAuthMapper.xml

@@ -65,10 +65,15 @@
             <if test="updateBy != null  ">and t.update_by =#{updateBy}</if>
             <if test="updateTime != null  ">and t.update_time =#{updateTime}</if>
             <if test="beginTime != null ">
-                and t.create_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+                and date_format(t.create_time, '%Y-%m-%d')  &gt;= date_format(#{beginTime}, '%Y-%m-%d')
             </if>
             <if test="endTime != null ">
-                and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+                and date_format(t.create_time, '%Y-%m-%d') &lt;= date_format(#{endTime}, '%Y-%m-%d')
+            </if>
+            <if test="searchValue != null and searchValue!=''">
+                and (
+                t.user_name like concat('%',#{searchValue}, '%')
+                )
             </if>
         </where>
         order by t.create_time desc