You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
688 B
22 lines
688 B
|
3 months ago
|
package com.example.web.mapper;
|
||
|
|
|
||
|
|
import com.example.web.annotation.DataSource;
|
||
|
|
import com.example.web.entity.Login;
|
||
|
|
import org.apache.ibatis.annotations.Mapper;
|
||
|
|
import org.apache.ibatis.annotations.Param;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
@Mapper
|
||
|
|
@DataSource("primary")
|
||
|
|
public interface LoginMapper {
|
||
|
|
|
||
|
|
|
||
|
|
// 移除 @Select 注解,使用 XML 配置
|
||
|
|
Login findByProjectNameAndUserName(@Param("projectName") String projectName,
|
||
|
|
@Param("userName") String userName);
|
||
|
|
|
||
|
|
// 新增方法 - 支持动态查询
|
||
|
|
List<Login> findByConditions(@Param("projectName") String projectName,
|
||
|
|
@Param("userName") String userName);
|
||
|
|
}
|