|
|
|
@ -3,6 +3,7 @@ package com.techsor.datacenter.sender.dao; |
|
|
|
import com.techsor.datacenter.sender.entitiy.MqttConfigEntity; |
|
|
|
import com.techsor.datacenter.sender.entitiy.bastatus.BaStatusEntity; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.cache.annotation.Cacheable; |
|
|
|
import org.springframework.jdbc.core.JdbcTemplate; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
@ -23,6 +24,7 @@ public class MqttConfigDao { |
|
|
|
* @param purposeType |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Cacheable(value = "MqttConfigDao::getByDeviceId", key = "#deviceId + '::' + #purposeType") |
|
|
|
public List<MqttConfigEntity> getByDeviceId(String deviceId, int purposeType) { |
|
|
|
String sql="SELECT " |
|
|
|
+ "bmqtt.id mqttId, bmqtt.company_id, bcomp.company_name, " |
|
|
|
|