✨ feat: 设备管理-添加用户-后端
This commit is contained in:
parent
8fc9d373be
commit
090a89b014
|
@ -52,6 +52,26 @@ public class OilMonitor extends BaseEntity {
|
|||
|
||||
private String fileUrl;
|
||||
|
||||
private Long userId;
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
private String userName;
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
@ -133,6 +133,21 @@ public class ThDevice extends BaseEntity {
|
|||
*/
|
||||
private BigDecimal ds;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getGangqu() {
|
||||
return gangqu;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
<result property="systemNo" column="system_no"/>
|
||||
<result property="unitNo" column="unit_no"/>
|
||||
<result property="bjyz" column="bjyz"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="userName"/>
|
||||
</resultMap>
|
||||
<resultMap type="com.ruoyi.project.oil.domain.monitor.ThDevice" id="ThDeviceList">
|
||||
<result property="id" column="id"/>
|
||||
|
@ -44,6 +46,7 @@
|
|||
<result property="num" column="num"/>
|
||||
<result property="factoryName" column="factory_name"/>
|
||||
<result property="factoryId" column="factory_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
|
||||
</resultMap>
|
||||
<resultMap type="com.ruoyi.project.oil.domain.monitor.ThAlarm" id="AlarmResult">
|
||||
|
@ -85,8 +88,11 @@
|
|||
|
||||
<select id="selectOilDeviceList" resultMap="OilDeviceResult">
|
||||
select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t.dept_id,d.dept_name,t.longitude,t.latitude,
|
||||
t.bjyz
|
||||
from th_device t left join sys_dept d on t.dept_id=d.dept_id
|
||||
t.bjyz, t.user_id, u.user_name as userName
|
||||
from th_device t
|
||||
left join sys_dept d on t.dept_id=d.dept_id
|
||||
left join sys_user u on t.user_id=u.user_id
|
||||
|
||||
<where>
|
||||
<if test="id != null and id != ''">and t.id=#{id}</if>
|
||||
<if test="monitorName != null and monitorName != ''">and t.name like concat('%', #{monitorName},'%') </if>
|
||||
|
@ -118,6 +124,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
|
|||
<if test="unitNo != null">unit_no,</if>
|
||||
<if test="systemNo != null">system_no,</if>
|
||||
<if test="bjyz != null">bjyz,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorName != null">#{monitorName},</if>
|
||||
|
@ -133,6 +140,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
|
|||
<if test="status != null">#{status},</if>
|
||||
<if test="unitNo != null">#{unitNo},</if>
|
||||
<if test="bjyz != null">#{bjyz},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -152,6 +160,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
|
|||
<if test="systemNo != null">system_no=#{systemNo},</if>
|
||||
<if test="unitNo != null">unit_no=#{unitNo},</if>
|
||||
<if test="bjyz != null">bjyz=#{bjyz},</if>
|
||||
<if test="userId != null">user_id=#{userId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
Loading…
Reference in New Issue