示例#1
0
 /**
  * 更新系统邮件地址
  *
  * @return
  */
 @Action(
     value = "updateSystemMail",
     results = {@Result(name = "json", type = "json")})
 public String updateSystemMail() {
   SystemMailT sm = new SystemMailT();
   sm = this.getSystemMailTService().findSysmailByid(this.getId());
   sm.setEmail(this.getEmail());
   sm.setSmtp(this.getSmtp());
   sm.setPort(this.getPort());
   sm.setPwd(this.getPwd());
   sm.setState(this.getState());
   sm.setIsdefault(this.getIsdefault());
   sm.setIsssl(this.getIsssl());
   sm.setUpdatetime(BaseTools.systemtime());
   this.getSystemMailTService().updateSystemMail(sm);
   this.setSucflag(true);
   return "json";
 }
示例#2
0
 /**
  * 增加邮件地址
  *
  * @return
  */
 @Action(
     value = "addSystemMail",
     results = {@Result(name = "json", type = "json")})
 public String addSystemMail() {
   SystemMailT sm = new SystemMailT();
   sm.setId(this.getSerial().Serialid(Serial.SYSTEMMAILM));
   sm.setEmail(this.getEmail());
   sm.setSmtp(this.getSmtp());
   sm.setPort(this.getPort());
   sm.setPwd(this.getPwd());
   sm.setState(this.getState());
   sm.setIsdefault(this.getIsdefault());
   sm.setIsssl(this.getIsssl());
   sm.setCreatorid(BaseTools.adminCreateId());
   sm.setCreatorname(BaseTools.adminCreatename());
   sm.setCreatetime(BaseTools.systemtime());
   sm.setUpdatetime(BaseTools.systemtime());
   if (this.getSystemMailTService().addSystemMail(sm) > 0) {
     this.setSucflag(true);
     return "json";
   }
   return "json";
 }