tplink项目管理新增机构ID字段

This commit is contained in:
1378012178@qq.com 2025-03-20 16:09:07 +08:00
parent d38a2a0a9f
commit 3a048b738a
2 changed files with 160 additions and 148 deletions

View File

@ -44,6 +44,10 @@ public class ProjectInfo implements Serializable {
@Excel(name = "项目名称", width = 15)
@ApiModelProperty(value = "项目名称")
private String projectName;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")
private String institutionalId;
/**创建时间戳,单位秒*/
@ApiModelProperty(value = "创建时间戳,单位秒")
private String createTime;

View File

@ -2,10 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nu.modules.tplink.project.mapper.ProjectInfoMapper">
<select id="getByProjectId" parameterType="java.util.Map" resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
<select id="getByProjectId" parameterType="java.util.Map"
resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
select id,
project_id as projectId,
project_name as projectName,
institutional_id as institutionalId,
create_time as createTime,
device_num as deviceNum,
message_num as messageNum,
@ -24,10 +26,12 @@
where project_id = #{projectId}
</select>
<select id="findList" parameterType="com.nu.modules.tplink.project.entity.ProjectInfo" resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
<select id="findList" parameterType="com.nu.modules.tplink.project.entity.ProjectInfo"
resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
select id,
project_id as projectId,
project_name as projectName,
institutional_id as institutionalId,
create_time as createTime,
device_num as deviceNum,
message_num as messageNum,
@ -51,10 +55,12 @@
</where>
</select>
<select id="findPage" parameterType="com.nu.modules.tplink.project.entity.ProjectInfo" resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
<select id="findPage" parameterType="com.nu.modules.tplink.project.entity.ProjectInfo"
resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
select id,
project_id as projectId,
project_name as projectName,
institutional_id as institutionalId,
create_time as createTime,
DATE_FORMAT(FROM_UNIXTIME(create_time),'%Y-%m-%d %H:%i:%s') as createTimeStr,
device_num as deviceNum,
@ -77,9 +83,9 @@
</select>
<insert id="add">
insert into nu_iot_tplink_project(
project_id,
insert into nu_iot_tplink_project(project_id,
project_name,
institutional_id,
create_time,
device_num,
message_num,
@ -95,11 +101,10 @@
offline_nbs_dev_num,
running_time,
status,
iz_leaf
)
values(
#{projectId},
iz_leaf)
values (#{projectId},
#{projectName},
#{institutionalId},
#{createTime},
#{deviceNum},
#{messageNum},
@ -115,15 +120,14 @@
#{offlineNbsDevNum},
#{runningTime},
#{status},
1
)
1)
</insert>
<update id="updateById">
update nu_iot_tplink_project
set
project_id = #{projectId},
set project_id = #{projectId},
project_name = #{projectName},
institutional_id = #{institutionalId},
create_time = #{createTime},
device_num = #{deviceNum},
message_num = #{messageNum},
@ -142,7 +146,9 @@
</update>
<update id="deleteByProjectId">
delete from nu_iot_tplink_project where project_id = #{projectId}
delete
from nu_iot_tplink_project
where project_id = #{projectId}
</update>
<update id="updateLeafByPId">
@ -151,10 +157,12 @@
where project_id = #{projectId}
</update>
<select id="queryTreeList" parameterType="com.nu.modules.tplink.project.entity.ProjectInfo" resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
<select id="queryTreeList" parameterType="com.nu.modules.tplink.project.entity.ProjectInfo"
resultType="com.nu.modules.tplink.project.entity.ProjectInfo">
select id,
project_id as projectId,
project_name as projectName,
institutional_id as institutionalId,
create_time as createTime,
device_num as deviceNum,
message_num as messageNum,