瀏覽代碼

服务端管理

zhaops 6 年之前
父節點
當前提交
7843f59495
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      diagbotman-service/src/main/resources/mapper/ServiceInfoMapper.xml

+ 6 - 2
diagbotman-service/src/main/resources/mapper/ServiceInfoMapper.xml

@@ -13,19 +13,23 @@
         <result column="name" property="name" />
         <result column="description" property="description" />
         <result column="user_id" property="userId" />
+        <result column="type" property="type" />
     </resultMap>
 
+    <!-- 通过名称查询 -->
     <select id="findByName" resultMap="BaseResultMap" parameterType="java.lang.String">
         select * from diag_service_info
         where name = #{name} and is_deleted = 'N'
     </select>
 
+    <!-- 通过用户id查询服务列表 -->
     <select id="getListByUserId" resultMap="BaseResultMap" parameterType="java.lang.Long">
         select * from diag_service_info
-        where user_id = #{userId} and is_deleted = 'N'
+        where user_id = #{userId} and is_deleted = 'N' and type=1;
     </select>
 
+    <!-- 通过用户id查询服务分页列表 -->
     <select id="selectServiceListPage" resultMap="BaseResultMap">
-        select * from diag_service_info where user_id=#{serviceInfo.userId} and is_deleted='N';
+        select * from diag_service_info where user_id=#{serviceInfo.userId} and is_deleted='N' and type=1;
     </select>
 </mapper>