代码调整

This commit is contained in:
2023-08-04 11:20:36 +08:00
parent 448af492d6
commit 15d8494cac
21 changed files with 238 additions and 108 deletions

View File

@@ -17,6 +17,6 @@ import java.util.List;
*/
public interface CsDataSetMapper extends BaseMapper<CsDataSet> {
List<LineTargetVO> getDataSet(@Param("modelId") String modelId);
List<LineTargetVO> getDataSet(@Param("modelId") String modelId,@Param("clDev") Integer clDev);
}

View File

@@ -2,6 +2,7 @@ package com.njcn.csdevice.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.csdevice.pojo.po.CsDevModelRelationPO;
import org.apache.ibatis.annotations.Param;
/**
*
@@ -13,4 +14,7 @@ import com.njcn.csdevice.pojo.po.CsDevModelRelationPO;
* @version V1.0.0
*/
public interface CsDevModelRelationMapper extends BaseMapper<CsDevModelRelationPO> {
String getModelByType(@Param("devId") String devId, @Param("type") Integer type);
}

View File

@@ -12,7 +12,8 @@
from
cs_data_set
where
pid = #{modelId}
pid = #{modelId} and cl_dev = #{clDev}
order by type,cl_dev
</select>
</mapper>

View File

@@ -17,4 +17,16 @@
<!--@mbg.generated-->
id, dev_id, `model id`, create_by, create_time, update_by, update_time, `status`
</sql>
<select id="getModelByType" resultType="string">
select
t1.id
from
cs_dev_model_relation t0
left join cs_dev_model t1 on
t0.model_id = t1.id
where
t0.dev_id = #{devId} and t1.`type` = #{type}
</select>
</mapper>