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) @Excel(name = "项目名称", width = 15)
@ApiModelProperty(value = "项目名称") @ApiModelProperty(value = "项目名称")
private String projectName; private String projectName;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")
private String institutionalId;
/**创建时间戳,单位秒*/ /**创建时间戳,单位秒*/
@ApiModelProperty(value = "创建时间戳,单位秒") @ApiModelProperty(value = "创建时间戳,单位秒")
private String createTime; 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"> <!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"> <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, select id,
project_id as projectId, project_id as projectId,
project_name as projectName, project_name as projectName,
institutional_id as institutionalId,
create_time as createTime, create_time as createTime,
device_num as deviceNum, device_num as deviceNum,
message_num as messageNum, message_num as messageNum,
@ -24,10 +26,12 @@
where project_id = #{projectId} where project_id = #{projectId}
</select> </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, select id,
project_id as projectId, project_id as projectId,
project_name as projectName, project_name as projectName,
institutional_id as institutionalId,
create_time as createTime, create_time as createTime,
device_num as deviceNum, device_num as deviceNum,
message_num as messageNum, message_num as messageNum,
@ -51,10 +55,12 @@
</where> </where>
</select> </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, select id,
project_id as projectId, project_id as projectId,
project_name as projectName, project_name as projectName,
institutional_id as institutionalId,
create_time as createTime, create_time as createTime,
DATE_FORMAT(FROM_UNIXTIME(create_time),'%Y-%m-%d %H:%i:%s') as createTimeStr, DATE_FORMAT(FROM_UNIXTIME(create_time),'%Y-%m-%d %H:%i:%s') as createTimeStr,
device_num as deviceNum, device_num as deviceNum,
@ -77,9 +83,9 @@
</select> </select>
<insert id="add"> <insert id="add">
insert into nu_iot_tplink_project( insert into nu_iot_tplink_project(project_id,
project_id,
project_name, project_name,
institutional_id,
create_time, create_time,
device_num, device_num,
message_num, message_num,
@ -95,11 +101,10 @@
offline_nbs_dev_num, offline_nbs_dev_num,
running_time, running_time,
status, status,
iz_leaf iz_leaf)
) values (#{projectId},
values(
#{projectId},
#{projectName}, #{projectName},
#{institutionalId},
#{createTime}, #{createTime},
#{deviceNum}, #{deviceNum},
#{messageNum}, #{messageNum},
@ -115,15 +120,14 @@
#{offlineNbsDevNum}, #{offlineNbsDevNum},
#{runningTime}, #{runningTime},
#{status}, #{status},
1 1)
)
</insert> </insert>
<update id="updateById"> <update id="updateById">
update nu_iot_tplink_project update nu_iot_tplink_project
set set project_id = #{projectId},
project_id = #{projectId},
project_name = #{projectName}, project_name = #{projectName},
institutional_id = #{institutionalId},
create_time = #{createTime}, create_time = #{createTime},
device_num = #{deviceNum}, device_num = #{deviceNum},
message_num = #{messageNum}, message_num = #{messageNum},
@ -142,7 +146,9 @@
</update> </update>
<update id="deleteByProjectId"> <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>
<update id="updateLeafByPId"> <update id="updateLeafByPId">
@ -151,10 +157,12 @@
where project_id = #{projectId} where project_id = #{projectId}
</update> </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, select id,
project_id as projectId, project_id as projectId,
project_name as projectName, project_name as projectName,
institutional_id as institutionalId,
create_time as createTime, create_time as createTime,
device_num as deviceNum, device_num as deviceNum,
message_num as messageNum, message_num as messageNum,