Quellcode durchsuchen

服务端管理

zhaops vor 6 Jahren
Ursprung
Commit
7843f59495

+ 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>