package ;
import ;
import ;
import ;
import ;
import ;
import ;
@Service("userService")
public class UserService extends BaseService {
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
private ScoreService scoreService;
public void logon(String userName) {
("before method...");
updateLastLogonTime(userName);
("after method...");
Thread myThread = new MyThread(this.scoreService, userName, 20);
();
}
public void updateLastLogonTime(String userName) {
String sql = "UPDATE t_user u SET u.last_logon_time = ? WHERE user_name =?";
(sql, (), userName);
}
private class MyThread extends Thread {
private ScoreService scoreService;
private String userName;
private int toAdd;
private MyThread(ScoreService scoreService, String userName, int toAdd) {
this.scoreService = scoreService;
this.userName = userName;
this.toAdd = toAdd;
}
public void run() {
try {
(2000);
} catch (InterruptedException e) {
();
}
("before method...");
(userName, toAdd);
("after method...");
}
}
}