コード例 #1
0
ファイル: SystemMailTAction.java プロジェクト: qqai/jshoper3x
 public void ProcessSystemMailTlist(List<SystemMailT> list) {
   rows.clear();
   for (Iterator it = list.iterator(); it.hasNext(); ) {
     SystemMailT sm = (SystemMailT) it.next();
     if (StaticString.ONE.equals(sm.getIsssl())) {
       sm.setIsssl(StaticString.SUPPORT);
     } else {
       sm.setIsssl(StaticString.UNSUPPORT);
     }
     if (StaticString.ONE.equals(sm.getIsdefault())) {
       sm.setIsdefault(StaticString.YES);
     } else {
       sm.setIsdefault(StaticString.NO);
     }
     if (StaticString.ONE.equals(sm.getState())) {
       sm.setState(StaticString.USEING);
     } else {
       sm.setState(StaticString.UNUSING);
     }
     Map cellMap = new HashMap();
     cellMap.put("id", sm.getId());
     cellMap.put(
         "cell",
         new Object[] {
           sm.getEmail(),
           sm.getSmtp(),
           sm.getPort(),
           sm.getIsssl(),
           sm.getIsdefault(),
           sm.getState(),
           sm.getCreatorid(),
           BaseTools.formateDbDate(sm.getCreatetime()),
           "<a id='editemail' name='editemail' href='email.jsp?operate=edit&folder=setting&id="
               + sm.getId()
               + "'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
コード例 #2
0
ファイル: SystemMailTAction.java プロジェクト: qqai/jshoper3x
 /**
  * 更新系统邮件地址
  *
  * @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";
 }
コード例 #3
0
ファイル: SystemMailTAction.java プロジェクト: qqai/jshoper3x
 /**
  * 增加邮件地址
  *
  * @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";
 }