Search in sources :

Example 6 with ISysService

use of com.netsteadfast.greenstep.service.ISysService in project bamboobsc by billchen198318.

the class ApplicationSiteUtils method getHost.

@SuppressWarnings("unchecked")
public static String getHost(String sysId) {
    String host = "";
    ISysService<SysVO, TbSys, String> sysService = (ISysService<SysVO, TbSys, String>) AppContext.getBean("core.service.SysService");
    SysVO sys = new SysVO();
    sys.setSysId(sysId);
    try {
        DefaultResult<SysVO> result = sysService.findByUK(sys);
        if (result.getValue() == null) {
            return "";
        }
        sys = result.getValue();
        host = sys.getHost();
    } catch (ServiceException e) {
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
    }
    return host;
}
Also used : TbSys(com.netsteadfast.greenstep.po.hbm.TbSys) ISysService(com.netsteadfast.greenstep.service.ISysService) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysVO(com.netsteadfast.greenstep.vo.SysVO) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) JsonMappingException(com.fasterxml.jackson.databind.JsonMappingException) JsonParseException(com.fasterxml.jackson.core.JsonParseException)

Aggregations

JsonParseException (com.fasterxml.jackson.core.JsonParseException)6 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)6 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)6 TbSys (com.netsteadfast.greenstep.po.hbm.TbSys)6 ISysService (com.netsteadfast.greenstep.service.ISysService)6 SysVO (com.netsteadfast.greenstep.vo.SysVO)6