View Javadoc
1   /**
2    * Copyright By Grandsoft Company Limited.  
3    * 2012-8-21 上午10:35:30
4    */
5   package gboat2.web.action;
6   
7   import gboat2.base.core.web.BaseActionSupport;
8   import gboat2.web.business.ISystemConfigBusiness;
9   import gboat2.web.model.SystemConfig;
10  
11  import java.util.List;
12  
13  import org.apache.struts2.convention.annotation.Result;
14  import org.apache.struts2.convention.annotation.Results;
15  import org.springframework.beans.factory.annotation.Autowired;
16  
17  /**
18   * 系统首页转发
19   * @author lysming
20   * @since jdk1.6
21   * @date 2012-8-21
22   */
23  @Results({
24  	@Result(name="gboat2",location="g-index.do",type="redirect")
25  })
26  public class ForwardAction extends BaseActionSupport {
27  
28      private static final long serialVersionUID = 1L;
29  
30      @Autowired
31  	private ISystemConfigBusiness systemService;
32  	
33  	private List<SystemConfig> systems;
34  	
35  	public String execute(){
36  		systems = systemService.getAllSysCfg();
37  		if(systems.size()>0){
38  			return "system";
39  		}else{
40  			return "gboat2";
41  		}
42  	}
43  	
44  	public List<SystemConfig> getSystems(){
45  		return this.systems;
46  	}
47  }