|  | @ -4,9 +4,11 @@ import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.iot.dao.company.IotCompanyDao;
 | 
	
		
			
				|  |  | import com.yihu.iot.dao.dict.IotSystemDictDao;
 | 
	
		
			
				|  |  | import com.yihu.iot.dao.platform.IotShareInterfaceDao;
 | 
	
		
			
				|  |  | import com.yihu.iot.service.useragent.UserAgent;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.iot.company.IotCompanyAppDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.iot.company.IotCompanyDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.iot.dict.IotSystemDictDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.iot.platform.IotInterfaceAuditDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.iot.platform.IotShareInterfaceDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.iot.company.IotCompanyAppVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.MixEnvelop;
 | 
	
	
		
			
				|  | @ -46,6 +48,8 @@ public class IotShareInterfaceService extends BaseJpaService<IotShareInterfaceDO
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private IotSystemDictDao iotSystemDictDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private UserAgent userAgent;
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 增加接口
 | 
	
		
			
				|  |  |      * @param jsonData
 | 
	
	
		
			
				|  | @ -196,4 +200,25 @@ public class IotShareInterfaceService extends BaseJpaService<IotShareInterfaceDO
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 查询企业下的共享接口
 | 
	
		
			
				|  |  |      * @param page
 | 
	
		
			
				|  |  |      * @param size
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public MixEnvelop<IotShareInterfaceDO, IotShareInterfaceDO> findCompanyShareInterface(Integer page, Integer size) {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         IotCompanyDO account = iotCompanyDao.findByEhrUserId(userAgent.getUID());
 | 
	
		
			
				|  |  |         StringBuffer sql = new StringBuffer("SELECT DISTINCT * from iot_company_app_interface ");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         sql.append("WHERE company_id = '").append(account.getId()).append("'");
 | 
	
		
			
				|  |  |         sql.append(" order by update_time desc  limit ").append((page-1)*size).append(",").append(size);
 | 
	
		
			
				|  |  |         List<IotInterfaceAuditDO> list = jdbcTemplate.query(sql.toString(),new BeanPropertyRowMapper(IotInterfaceAuditDO.class));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //获取总数
 | 
	
		
			
				|  |  |         long count = list.size();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Platform.message_success_find,list,page, size,count);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |