📄 ajaxmyaccountdetailaction.java
字号:
package cn.com.sdcncsi.lunch.balance.action;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.interceptor.SessionAware;
import cn.com.sdcncsi.lunch.balance.service.AccountDetailService;
import cn.com.sdcncsi.lunch.balance.service.CheckDetailService;
import cn.com.sdcncsi.lunch.domain.User;
import cn.com.sdcncsi.lunch.utils.Constants;
//import cn.com.sdcncsi.lunch.balance.service.CheckOutService;
import com.opensymphony.xwork2.ActionSupport;
public class AjaxMyAccountDetailAction extends ActionSupport implements SessionAware {
private AccountDetailService accountDetailService = null;
private static Log logger = LogFactory.getLog(AjaxMyAccountDetailAction.class.getName());
/* (non-Javadoc)
* @see com.opensymphony.xwork2.ActionSupport#execute()
*/
@Override
public String execute() {
// TODO Auto-generated method stub
try{
User user = new User();
user.setId(userId);
setJsonModel(accountDetailService.getAccountDetailsByUser(user));
logger.debug("json:"+getJsonModel());
}catch(Exception e){
e.printStackTrace();
}
return SUCCESS;
}
public void setAccountDetailService(AccountDetailService accountDetailService){
this.accountDetailService = accountDetailService;
}
private Object jsonModel;
private Map session;
private Integer userId;
/**
* @return the jsonModel
*/
public Object getJsonModel() {
return jsonModel;
}
/**
* @param jsonModel the jsonModel to set
*/
public void setJsonModel(Object jsonModel) {
this.jsonModel = jsonModel;
}
public void setSession(Map session) {
// TODO Auto-generated method stub
this.session = session;
}
/**
* @return the userId
*/
public Integer getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(Integer userId) {
this.userId = userId;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -