📄 account.java
字号:
package net.togogo.crmdemo.account;
import com.anyfolife.util.anyfoaction.AnyFoAction;
import com.anyfolife.util.data.json4ext.message.JSonMessage;
public class Account extends AnyFoAction {
private String accountId;
private String accountName;
private String accountPassword;
private String accountRole;
private AccountService accountService;
public AccountService getAccountService() {
return accountService;
}
public void setAccountService(AccountService accountService) {
this.accountService = accountService;
}
public String addAccount() throws Exception {
// 接收页面请求
JSonMessage jsm = new JSonMessage();
try {
// 将任务交给逻辑层
this.accountService.addAccount( this );
jsm.addProperty( JSonMessage.RESULT_FLAG, true );
} catch ( Exception e ) {
jsm.addProperty( JSonMessage.RESULT_FLAG, false );
jsm.addProperty( "msg", e.getMessage() );
} finally {
// 创造执行结果数据,交给表现层
String msg = jsm.toJSonString();
this.getResponse().getWriter().print( msg );
}
return null;
}
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getAccountPassword() {
return accountPassword;
}
public void setAccountPassword(String accountPassword) {
this.accountPassword = accountPassword;
}
public String getAccountRole() {
return accountRole;
}
public void setAccountRole(String accountRole) {
this.accountRole = accountRole;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -