| 
					
				 | 
			
			
				@ -1,83 +0,0 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.jw.dict.service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.dao.BaseExceptionDictDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.dao.BaseExceptionLogDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.dao.BaseExceptionServerDictDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.dict.BaseExceptionServerDictDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.utils.hibernate.HibenateUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.stereotype.Component; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Map; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@Component 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				public class BaseExceptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseExceptionDictDao baseExceptionDictDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseExceptionLogDao baseExceptionLogDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseExceptionServerDictDao baseExceptionServerDictDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private HibenateUtils hibenateUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String findServiceByPath(String path){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        BaseExceptionServerDictDO baseExceptionServerDictDO = baseExceptionServerDictDao.findServiceByPath(path); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String id =""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (baseExceptionServerDictDO !=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            id = baseExceptionServerDictDO.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> findExceptionDict(String id,String code,String exceptionType,String isDel){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "select t.id as \"id\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.code as \"code\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.exception_message as \"exceptionMessage\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.create_time as \"createTime\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.is_del \"isDel\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.model_name as \"modelName\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.exception_type as \"exceptionType\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.exception_type_name as \"exceptionTypeName\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.remind_content as \"remindContent\"" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " from base_exception_dict t where 1=1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(id)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.id ='"+id+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(code)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.code ='"+code+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(exceptionType)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.exception_type ='"+exceptionType+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(isDel)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.is_del ='"+isDel+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return list; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> findExceptionService(String id,String name,String isDel,String pathUrl){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "select t.id as \"id\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.name as \"name\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.create_time as \"createTime\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.update_time as \"updateTime\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.is_del as \"isDel\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " t.path_url as \"pathUrl\"" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " from base_exception_server_dict t where 1=1 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(id)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.id ='"+id+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(name)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.name ='"+name+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(isDel)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.is_del ='"+isDel+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(pathUrl)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and t.path_url ='"+pathUrl+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return  list; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |