Commit f0c64e21 authored by Eduardo Macarron's avatar Eduardo Macarron

[jpetstore] use parameters named as param1, param2...

parent a0736663
......@@ -6,7 +6,7 @@ public interface AccountMapper {
Account getAccountByUsername(String username);
Account getAccountByUsernameAndPassword(Account account);
Account getAccountByUsernameAndPassword(String username, String password);
void insertAccount(Account account);
......
......@@ -17,10 +17,7 @@ public class AccountService {
}
public Account getAccount(String username, String password) {
Account account = new Account();
account.setUsername(username);
account.setPassword(password);
return accountMapper.getAccountByUsernameAndPassword(account);
return accountMapper.getAccountByUsernameAndPassword(username, password);
}
@Transactional
......
......@@ -52,8 +52,8 @@
PROFILE.BANNEROPT AS bannerOption,
BANNERDATA.BANNERNAME
FROM ACCOUNT, PROFILE, SIGNON, BANNERDATA
WHERE ACCOUNT.USERID = #{username}
AND SIGNON.PASSWORD = #{password}
WHERE ACCOUNT.USERID = #{param1}
AND SIGNON.PASSWORD = #{param2}
AND SIGNON.USERNAME = ACCOUNT.USERID
AND PROFILE.USERID = ACCOUNT.USERID
AND PROFILE.FAVCATEGORY = BANNERDATA.FAVCATEGORY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment