moremind commented on code in PR #5604:
URL: https://github.com/apache/shenyu/pull/5604#discussion_r1719578230


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/mapper/SelectorMapper.java:
##########
@@ -199,7 +214,7 @@ public interface SelectorMapper extends ExistProvider {
     /**
      * update status.
      *
-     * @param id id
+     * @param id      id

Review Comment:
   not modify the style



##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/SelectorService.java:
##########
@@ -105,57 +105,63 @@ default int createOrUpdate(SelectorDTO selectorDTO) {
     int updateSelective(SelectorDO selectorDO);
 
     /**
-     * delete selectors.
+     * delete selectors by ids and namespaceId.
      *
-     * @param ids primary key.
+     * @param ids         primary key.
+     * @param namespaceId namespaceId.
      * @return rows int
      */
-    int delete(List<String> ids);
+    int deleteByNamespaceId(List<String> ids, String namespaceId);
 
     /**
-     * find selector by id.
+     * find selector by id and namespaceId.
      *
-     * @param id primary key.
+     * @param id          primary key.
+     * @param namespaceId namespaceId.
      * @return {@linkplain SelectorVO}
      */
-    SelectorVO findById(String id);
+    SelectorVO findByIdAndNamespaceId(String id, String namespaceId);
 
     /**
-     * find selector by name.
+     * find selector by name and namespaceId.
      *
-     * @param name the name
+     * @param name        the name
+     * @param namespaceId namespaceId.
+     *                    Therefore, it is recommended to: {@linkplain 
SelectorService#findListByNameAndNamespaceId(java.lang.String, 
java.lang.String)}
      * @return selector do
      * @deprecated sice 2.6.0  Deprecated. By querying under this condition, 
multiple data are usually obtained.
-     *              Therefore, it is recommended to: {@linkplain 
SelectorService#findListByName(java.lang.String)}
      */
     @Deprecated
-    SelectorDO findByName(String name);
+    SelectorDO findByNameAndNamespaceId(String name, String namespaceId);
 
     /**
-     * find selector list by name.
+     * find selector list by name and namespaceId.
      *
-     * @param name name
+     * @param name        name
+     * @param namespaceId namespaceId.
      * @return list
      */
-    List<SelectorDO> findListByName(String name);
+    List<SelectorDO> findListByNameAndNamespaceId(String name, String 
namespaceId);
 
     /**
-     * Find by name and plugin id selector do.
+     * Find selector do by name and pluginName and namespaceId.
      *
-     * @param name       the name
-     * @param pluginName the plugin name
+     * @param name        the name
+     * @param pluginName  the plugin name
+     * @param namespaceId the namespaceId
      * @return the selector do
      */
-    SelectorDO findByNameAndPluginName(String name, String pluginName);
+    SelectorDO findByNameAndPluginNameAndNamespaceId(String name, String 
pluginName, String namespaceId);
 
     /**
-     * findByNameAndPluginNameForUpdate.
+     * findByNameAndPluginNameAndNamespaceIdForUpdate.

Review Comment:
   use normal comment. `find selector entity by selector name, plugin name and 
namespace id`



##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/mapper/SelectorMapper.java:
##########
@@ -69,37 +78,43 @@ public interface SelectorMapper extends ExistProvider {
     List<SelectorDO> selectByQuery(SelectorQuery selectorQuery);
 
     /**
-     * Find by plugin id list.
+     * Find list by plugin id and namespaceId.
      *
-     * @param pluginId the plugin id
+     * @param pluginId    the plugin id
+     * @param namespaceId namespaceId.
      * @return the list
      */
-    List<SelectorDO> findByPluginId(String pluginId);
+    List<SelectorDO> findByPluginIdAndNamespaceId(String pluginId, String 
namespaceId);
 
     /**
-     * Find by plugin id list.
+     * Find list by plugin id and namespaceId.
      *
-     * @param pluginIds the plugin ids
+     * @param pluginIds   the plugin ids
+     * @param namespaceId namespaceId.
      * @return the list
      */
-    List<SelectorDO> findByPluginIds(List<String> pluginIds);
+    List<SelectorDO> findByPluginIdsAndNamespaceId(@Param("list") List<String> 
pluginIds, String namespaceId);
 
     /**
-     * select select by name.
+     * select list by name and namespaceId.
      *
-     * @param name the name
+     * @param name        the name
+     * @param namespaceId namespaceId.
      * @return selector do list
      */
-    List<SelectorDO> selectByName(String name);
+    List<SelectorDO> selectByNameAndNamespaceId(String name, String 
namespaceId);
 
     /**
-     * Find by name and plugin id selector do.
+     * Find selector do by name and plugin id and namespaceId.

Review Comment:
   selector entity



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to