lyhzzz 2 anni fa
parent
commit
097f233e94
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/main/resources/mapper/manage_jp/CameraMapper.xml

+ 3 - 1
src/main/resources/mapper/manage_jp/CameraMapper.xml

@@ -6,12 +6,14 @@
         select  * from t_camera c
             left join t_camera_detail d on c.id = d.camera_id
             left join t_goods g on d.goods_id = g.id
-            left join t_user u on d.user_id = u.id
+            left join t_company com on d.company_id = com.id
+            left join t_user u on com.manager_id = u.id
         where  c.rec_status = 'A'
         <if test="param.searchKey!=null and param.searchKey !=''">
             and ( c.child_name like concat ('%',#{param.searchKey},'%')
             or c.sn_code like concat ('%',#{param.searchKey},'%')
             or u.user_name like concat ('%',#{param.searchKey},'%') )
         </if>
+        order by c.create_time desc
     </select>
 </mapper>