天天看點

spring boot mapper層傳參數是用main的arg0(第一個參數),arg1(第二個參數)

spring boot mapper層傳參數是用main的arg0(第一個參數),arg1(第二個參數)

大于三個參數,用map傳遞

public interface FrontMapper{

//==============

//spring boot mapper 傳參

@Select("select count(1) as num from users where username=#{arg0} and password=#{arg1}")

int isUserExist(String username,String password);