代码调整
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.njcn.access.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.access.pojo.po.CsGatewayDevice;
|
||||
import com.njcn.access.pojo.vo.CsGatewayVo;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentAlarmPO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网关装置关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-07
|
||||
*/
|
||||
public interface CsGatewayDeviceMapper extends BaseMapper<CsGatewayDevice> {
|
||||
|
||||
List<CsEquipmentDeliveryPO> getList(String id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.access.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.access.pojo.po.CsGateway;
|
||||
import com.njcn.access.pojo.vo.CsGatewayVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网关表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-06
|
||||
*/
|
||||
public interface CsGatewayMapper extends BaseMapper<CsGateway> {
|
||||
|
||||
List<CsGatewayVo> getWgList(@Param("userId") String userId);
|
||||
|
||||
CsGatewayVo findById(@Param("id") String id);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.access.mapper.CsGatewayDeviceMapper">
|
||||
|
||||
<select id="getList" resultType="com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO">
|
||||
select
|
||||
t1.name
|
||||
from
|
||||
cs_gateway_device t0
|
||||
left join cs_equipment_delivery t1 on t0.dev_id = t1.id
|
||||
where t0.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.access.mapper.CsGatewayMapper">
|
||||
<select id="getWgList" resultType="com.njcn.access.pojo.vo.CsGatewayVo">
|
||||
select
|
||||
t0.id,
|
||||
t1.name devName,
|
||||
t2.name proName,
|
||||
t0.area
|
||||
from
|
||||
cs_gateway t0
|
||||
left join cs_equipment_delivery t1 on t0.id = t1.id
|
||||
left join cs_project t2 on t0.pid = t2.id
|
||||
where t0.create_by = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="findById" resultType="com.njcn.access.pojo.vo.CsGatewayVo">
|
||||
select
|
||||
t0.id,
|
||||
t1.name wgName,
|
||||
t2.name proName,
|
||||
t1.dev_model devModel,
|
||||
t3.version_no programVersion,
|
||||
t4.file_path filePath
|
||||
from
|
||||
cs_gateway t0
|
||||
left join cs_equipment_delivery t1 on t0.id = t1.id
|
||||
left join cs_project t2 on t0.pid = t2.id
|
||||
left join cs_ed_data t3 on t1.program_version = t3.id
|
||||
left join cs_topology_diagram t4 on t0.tid = t4.id
|
||||
where t0.id = #{id} and t0.status = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user