报警配置字段更新

detached
王宇航 2024-01-08 10:42:48 +08:00
parent 59271cef2f
commit 5c87c1b827
11 changed files with 199 additions and 199 deletions

View File

@ -40,6 +40,9 @@ public class SysPoliceController extends BaseController
@Autowired @Autowired
private SysPoliceService sysPoliceService; private SysPoliceService sysPoliceService;
@Autowired
private ISysRadarService radarService;
@GetMapping() @GetMapping()
public String identifier() public String identifier()
{ {
@ -48,11 +51,12 @@ public class SysPoliceController extends BaseController
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(SysPolice sysPolice) public TableDataInfo list(SysRadar sysRadar)
{ {
startPage(); startPage();
List<SysPolice> list = sysPoliceService.selectSysPoliceList(sysPolice); // List<SysPolice> list = sysPoliceService.selectSysPoliceList(sysPolice);
return getDataTable(list); List<SysRadar> sysRadars = radarService.selectRadarList(sysRadar);
return getDataTable(sysRadars);
} }
/** /**
@ -82,7 +86,8 @@ public class SysPoliceController extends BaseController
@GetMapping("/edit/{id}") @GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap) public String edit(@PathVariable("id") Long id, ModelMap mmap)
{ {
mmap.put("police", sysPoliceService.selectSysPoliceById(id)); // mmap.put("police", sysPoliceService.selectSysPoliceById(id));
mmap.put("police", radarService.selectRadarById(id));
return prefix + "/edit"; return prefix + "/edit";
} }
@ -92,10 +97,17 @@ public class SysPoliceController extends BaseController
// @RequiresPermissions("system:user:edit") // @RequiresPermissions("system:user:edit")
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(@Validated SysPolice sysPolice) public AjaxResult editSave(@Validated SysRadar sysPolice)
{ {
sysPolice.setUpdateBy(getLoginName()); return toAjax(radarService.updateRadarValue(sysPolice));
return toAjax(sysPoliceService.updatePolice(sysPolice)); }
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(SysRadar radar)
{
return toAjax(radarService.changeStatus(radar));
} }
} }

View File

@ -12,7 +12,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">工位:</label> <label class="col-sm-4 control-label is-required">工位:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<option name="station" placeholder="请输入工位" class="form-control" type="text" maxlength="30" required> <input name="station" placeholder="请输入工位" class="form-control" type="text" maxlength="30" required>
</div> </div>
</div> </div>
</div> </div>
@ -39,7 +39,7 @@
</div> </div>
</form> </form>
</div> </div>
<!-- <div class="row">--> <!-- <div class="row">-->
<!-- <div class="col-sm-offset-5 col-sm-10">--> <!-- <div class="col-sm-offset-5 col-sm-10">-->
<!-- <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;--> <!-- <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;-->
@ -72,18 +72,6 @@
//刷新父页面 //刷新父页面
parent.location.reload(); parent.location.reload();
} }
fetch(ctx +'/system/radar/list') // 替换为你的后端接口地址
.then(response => response.json())
.then(data => {
const select = document.querySelector('select[name="station"]');
data.forEach(station => {
const option = document.createElement('option');
option.value = station.id;
option.textContent = station.name;
select.appendChild(option);
});
});
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,19 +1,29 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('修改常温标识器')" /> <th:block th:include="include :: header('修改报警配置')" />
<th:block th:include="include :: select2-css" /> <th:block th:include="include :: select2-css" />
</head> </head>
<body> <body>
<div class="main-content"> <div class="main-content">
<form class="form-horizontal" id="form-user-edit" th:object="${police}"> <form class="form-horizontal" id="form-user-edit" th:object="${police}">
<input name="id" type="hidden" th:field="*{id}" /> <input name="id" type="hidden" th:field="*{id}" />
<!-- <div class="row">-->
<!-- <div class="col-sm-6">-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-4 control-label is-required">工位:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="station" placeholder="请输入工位" class="form-control" type="text" maxlength="30" th:field="*{radar}" required>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">工位:</label> <label class="col-sm-4 control-label is-required">报警值A</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="station" placeholder="请输入工位" class="form-control" type="text" maxlength="30" th:field="*{station}" required> <input name="alarmValue1" placeholder="请输入报警值A" class="form-control" type="text" maxlength="30" th:field="*{alarmValue1}" required>
</div> </div>
</div> </div>
</div> </div>
@ -21,9 +31,9 @@
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">报警值:</label> <label class="col-sm-4 control-label is-required">报警值B</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="alarmValue" placeholder="请输入报警值" class="form-control" type="text" maxlength="30" th:field="*{alarmValue}" required> <input name="alarmValue2" placeholder="请输入报警值B" class="form-control" type="text" maxlength="30" th:field="*{alarmValue2}"required>
</div> </div>
</div> </div>
</div> </div>
@ -31,9 +41,19 @@
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">预设报警值:</label> <label class="col-sm-4 control-label is-required">报警值C</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="presetValue" placeholder="请输入预设报警值" class="form-control" type="text" maxlength="30" th:field="*{presetValue}"required> <input name="alarmValue3" placeholder="请输入报警值C" class="form-control" type="text" maxlength="30" th:field="*{alarmValue3}"required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">报警值D</label>
<div class="col-sm-8">
<input name="alarmValue4" placeholder="请输入报警值D" class="form-control" type="text" maxlength="30" th:field="*{alarmValue4}"required>
</div> </div>
</div> </div>
</div> </div>

View File

@ -9,15 +9,6 @@
<div class="ui-layout-center"> <div class="ui-layout-center">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse">
<form id="user-form">
<input type="hidden" id="deptId" name="deptId">
<input type="hidden" id="parentId" name="parentId">
<div class="select-list">
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" > <a class="btn btn-success" onclick="$.operate.add()" >
@ -78,21 +69,36 @@
checkbox: true checkbox: true
}, },
{ {
field: 'station', field: 'radarLocation',
title: '工位' title: '工位'
}, },
{ {
field: 'alarmValue1', field: 'alarmValue1',
title: '报警值', title: '报警值A',
sortable: true sortable: true
}, },
{ {
field: 'presetValue', field: 'alarmValue2',
title: '预设报警值' title: '报警值B',
sortable: true
},
{
field: 'alarmValue3',
title: '报警值C',
sortable: true
},
{
field: 'alarmValue4',
title: '报警值D',
sortable: true
}, },
{ {
field: 'status',
title: '状态', title: '状态',
visible: editFlag == 'hidden' ? false : true,
align: 'center',
formatter: function (value, row, index) {
return statusTools(row);
}
}, },
{ {
title: '操作', title: '操作',
@ -101,7 +107,7 @@
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i>编辑</a> '); // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i>删除</a> '); // actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i>删除</a> ');
// var more = []; // var more = [];
// more.push("<a class='btn btn-default btn-xs " + resetPwdFlag + "' href='javascript:void(0)' onclick='resetPwd(" + row.userId + ")'><i class='fa fa-key'></i>重置密码</a> "); // more.push("<a class='btn btn-default btn-xs " + resetPwdFlag + "' href='javascript:void(0)' onclick='resetPwd(" + row.userId + ")'><i class='fa fa-key'></i>重置密码</a> ");
@ -114,6 +120,24 @@
}; };
$.table.init(options); $.table.init(options);
} }
function statusTools(row) {
if (row.status == 1) {
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id + '\')"></i> ';
} else {
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
}
}
function disable(id) {
$.modal.confirm("确认要禁用吗?", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
})
}
function enable(id) {
$.modal.confirm("确认要启用吗?", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
})
}
</script> </script>
</body> </body>
<!-- 导入区域 --> <!-- 导入区域 -->

View File

@ -37,6 +37,13 @@ public class SysRadar extends BaseEntity
private Integer sort; private Integer sort;
private Integer alarmValue1;
private Integer alarmValue2;
private Integer alarmValue3;
private Integer alarmValue4;
private Integer status;
/** 删除标志0代表存在 2代表删除 */ /** 删除标志0代表存在 2代表删除 */
private String delFlag; private String delFlag;
@ -93,6 +100,46 @@ public class SysRadar extends BaseEntity
} }
public Integer getAlarmValue1() {
return alarmValue1;
}
public void setAlarmValue1(Integer alarmValue1) {
this.alarmValue1 = alarmValue1;
}
public Integer getAlarmValue2() {
return alarmValue2;
}
public void setAlarmValue2(Integer alarmValue2) {
this.alarmValue2 = alarmValue2;
}
public Integer getAlarmValue3() {
return alarmValue3;
}
public void setAlarmValue3(Integer alarmValue3) {
this.alarmValue3 = alarmValue3;
}
public Integer getAlarmValue4() {
return alarmValue4;
}
public void setAlarmValue4(Integer alarmValue4) {
this.alarmValue4 = alarmValue4;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -101,6 +148,11 @@ public class SysRadar extends BaseEntity
.append("radarLocation", getRadarLocation()) .append("radarLocation", getRadarLocation())
.append("stationCode", getStationCode()) .append("stationCode", getStationCode())
.append("sort", getSort()) .append("sort", getSort())
.append("alarmValue1", getAlarmValue1())
.append("alarmValue2", getAlarmValue2())
.append("alarmValue3", getAlarmValue3())
.append("alarmValue4", getAlarmValue4())
.append("status", getStatus())
.append("delFlag", getDelFlag()) .append("delFlag", getDelFlag())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

View File

@ -6,7 +6,7 @@
<artifactId>ruoyi</artifactId> <artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>4.7.8</version> <version>4.7.8</version>
</parent> </parent><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>8</source><target>8</target></configuration></plugin></plugins></build>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>ruoyi-system</artifactId> <artifactId>ruoyi-system</artifactId>

View File

@ -38,4 +38,7 @@ public interface SysRadarMapper
*/ */
public int updateRadar(SysRadar radar); public int updateRadar(SysRadar radar);
public int updateRadarValue(SysRadar radar);
public int updateStatus(SysRadar radar);
} }

View File

@ -28,4 +28,8 @@ public interface ISysRadarService
public SysRadar selectRadarById(Long id); public SysRadar selectRadarById(Long id);
public int updateUser(SysRadar radar); public int updateUser(SysRadar radar);
public int updateRadarValue(SysRadar radar);
int changeStatus(SysRadar radar);
} }

View File

@ -4,14 +4,11 @@ import com.ruoyi.common.core.domain.entity.SysIdentifier;
import com.ruoyi.common.core.domain.entity.SysPolice; import com.ruoyi.common.core.domain.entity.SysPolice;
import com.ruoyi.system.mapper.SysIdentifierMapper; import com.ruoyi.system.mapper.SysIdentifierMapper;
import com.ruoyi.system.mapper.SysPoliceMapper; import com.ruoyi.system.mapper.SysPoliceMapper;
import com.ruoyi.system.service.ISysIdentifierService;
import com.ruoyi.system.service.IdentifierStatusService; import com.ruoyi.system.service.IdentifierStatusService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.validation.Validator;
import java.util.List; import java.util.List;
/** /**

View File

@ -89,4 +89,18 @@ public class SysRadarServiceImpl implements ISysRadarService
public int updateUser(SysRadar radar) { public int updateUser(SysRadar radar) {
return radarMapper.updateRadar(radar); return radarMapper.updateRadar(radar);
} }
@Override
public int updateRadarValue(SysRadar radar) {
return radarMapper.updateRadarValue(radar);
}
@Override
public int changeStatus(SysRadar radar) {
return radarMapper.updateStatus(radar);
}
} }

View File

@ -10,6 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="radarLocation" column="radar_location" /> <result property="radarLocation" column="radar_location" />
<result property="stationCode" column="station_code" /> <result property="stationCode" column="station_code" />
<result property="sort" column="sort"/> <result property="sort" column="sort"/>
<result property="alarmValue1" column="alarm_value1"/>
<result property="alarmValue2" column="alarm_value2"/>
<result property="alarmValue3" column="alarm_value3"/>
<result property="alarmValue4" column="alarm_value4"/>
<result property="status" column="status" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
@ -17,19 +22,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag" />
</resultMap> </resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_by, u.create_time, u.update_by, u.update_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
</sql>
<select id="selectRadarList" parameterType="com.ruoyi.common.core.domain.entity.SysRadar" resultMap="SysRadarResult"> <select id="selectRadarList" parameterType="com.ruoyi.common.core.domain.entity.SysRadar" resultMap="SysRadarResult">
select r.id,r.radar_ip,r.radar_location,r.station_code,r.sort,r.create_by,r.create_time,r.update_by,r.update_time,r.remark from sys_radar r select r.id,r.radar_ip,r.radar_location,r.station_code,r.sort,r.alarm_value1,r.alarm_value2,r.alarm_value3,r.alarm_value4,r.status,r.create_by,r.create_time,r.update_by,r.update_time,r.remark from sys_radar r
where r.del_flag = '0' where r.del_flag = '0'
<if test="radarLocation != null and radarLocation != ''"> <if test="radarLocation != null and radarLocation != ''">
AND r.radar_location like concat('%',#{radarLocation}, '%') AND r.radar_location like concat('%',#{radarLocation}, '%')
@ -49,6 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sort != null and sort != ''">sort,</if> <if test="sort != null and sort != ''">sort,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
alarm_value1,
alarm_value2,
alarm_value3,
alarm_value4,
status,
create_time create_time
)values( )values(
<if test="id != null and id != 0">#{id},</if> <if test="id != null and id != 0">#{id},</if>
@ -58,12 +59,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sort != null and sort != ''">#{sort},</if> <if test="sort != null and sort != ''">#{sort},</if>
<if test="createBy != null and createBy != ''">#{createBy},#,</if> <if test="createBy != null and createBy != ''">#{createBy},#,</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
0,
0,
0,
0,
0,
sysdate() sysdate()
) )
</insert> </insert>
<select id="selectRadarById" parameterType="Long" resultMap="SysRadarResult"> <select id="selectRadarById" parameterType="Long" resultMap="SysRadarResult">
select r.id,r.radar_ip,r.radar_location,r.station_code,r.sort,r.create_by,r.create_time,r.update_by,r.update_time,r.remark from sys_radar r select r.id,r.radar_ip,r.radar_location,r.station_code,r.alarm_value1,r.alarm_value2,r.alarm_value3,r.alarm_value4,r.status,r.sort,r.create_by,r.create_time,r.update_by,r.update_time,r.remark from sys_radar r
where r.id = #{id} where r.id = #{id}
</select> </select>
@ -82,144 +88,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<!-- <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">--> <update id="updateStatus">
<!-- select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time--> update sys_radar
<!-- from sys_user u--> <set>
<!-- left join sys_dept d on u.dept_id = d.dept_id--> <if test="status != null">status = #{status},</if>
<!-- left join sys_user_role ur on u.user_id = ur.user_id--> update_time = sysdate()
<!-- left join sys_role r on r.role_id = ur.role_id--> </set>
<!-- where u.del_flag = '0' and r.role_id = #{roleId}--> where id = #{id}
<!-- <if test="loginName != null and loginName != ''">--> </update>
<!-- AND u.login_name like concat('%', #{loginName}, '%')-->
<!-- </if>--> <update id="updateRadarValue">
<!-- <if test="phonenumber != null and phonenumber != ''">--> update sys_radar
<!-- AND u.phonenumber like concat('%', #{phonenumber}, '%')--> <set>
<!-- </if>--> <if test="alarmValue1 != null and alarmValue1 != ''">alarm_value1 = #{alarmValue1},</if>
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;--> <if test="alarmValue2 != null and alarmValue2 != ''">alarm_value2 = #{alarmValue2},</if>
<!-- ${params.dataScope}--> <if test="alarmValue3 != null and alarmValue3 != ''">alarm_value3 = #{alarmValue3},</if>
<!-- </select>--> <if test="alarmValue4 != null and alarmValue4 != ''">alarm_value4 = #{alarmValue4},</if>
<!-- --> update_time = sysdate()
<!-- <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">--> </set>
<!-- select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time--> where id = #{id}
<!-- from sys_user u--> </update>
<!-- left join sys_dept d on u.dept_id = d.dept_id-->
<!-- left join sys_user_role ur on u.user_id = ur.user_id-->
<!-- left join sys_role r on r.role_id = ur.role_id-->
<!-- where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)-->
<!-- and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})-->
<!-- <if test="loginName != null and loginName != ''">-->
<!-- AND u.login_name like concat('%', #{loginName}, '%')-->
<!-- </if>-->
<!-- <if test="phonenumber != null and phonenumber != ''">-->
<!-- AND u.phonenumber like concat('%', #{phonenumber}, '%')-->
<!-- </if>-->
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- ${params.dataScope}-->
<!-- </select>-->
<!-- -->
<!-- <select id="selectUserByLoginName" parameterType="String" resultMap="SysUserResult">-->
<!-- <include refid="selectUserVo"/>-->
<!-- where u.login_name = #{userName} and u.del_flag = '0'-->
<!-- </select>-->
<!-- -->
<!-- <select id="selectUserByPhoneNumber" parameterType="String" resultMap="SysUserResult">-->
<!-- <include refid="selectUserVo"/>-->
<!-- where u.phonenumber = #{phonenumber} and u.del_flag = '0'-->
<!-- </select>-->
<!-- -->
<!-- <select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">-->
<!-- <include refid="selectUserVo"/>-->
<!-- where u.email = #{email} and u.del_flag = '0'-->
<!-- </select>-->
<!-- -->
<!-- <select id="checkLoginNameUnique" parameterType="String" resultMap="SysUserResult">-->
<!-- select user_id, login_name from sys_user where login_name=#{loginName} and del_flag = '0' limit 1-->
<!-- </select>-->
<!-- -->
<!-- <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">-->
<!-- select user_id, phonenumber from sys_user where phonenumber=#{phonenumber} and del_flag = '0' limit 1-->
<!-- </select>-->
<!-- -->
<!-- <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">-->
<!-- select user_id, email from sys_user where email=#{email} and del_flag = '0' limit 1-->
<!-- </select>-->
<!-- -->
<!-- <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">-->
<!-- <include refid="selectUserVo"/>-->
<!-- where u.user_id = #{userId}-->
<!-- </select>-->
<!-- -->
<!-- <delete id="deleteUserById" parameterType="Long">-->
<!-- update sys_user set del_flag = '2' where user_id = #{userId}-->
<!-- </delete>-->
<!-- -->
<!-- <delete id="deleteUserByIds" parameterType="Long">-->
<!-- update sys_user set del_flag = '2' where user_id in-->
<!-- <foreach collection="array" item="userId" open="(" separator="," close=")">-->
<!-- #{userId}-->
<!-- </foreach> -->
<!-- </delete>-->
<!-- -->
<!-- <update id="updateUser" parameterType="SysUser">-->
<!-- update sys_user-->
<!-- <set>-->
<!-- <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>-->
<!-- <if test="loginName != null and loginName != ''">login_name = #{loginName},</if>-->
<!-- <if test="userName != null and userName != ''">user_name = #{userName},</if>-->
<!-- <if test="userType != null and userType != ''">user_type = #{userType},</if>-->
<!-- <if test="email != null and email != ''">email = #{email},</if>-->
<!-- <if test="phonenumber != null and phonenumber != ''">phonenumber = #{phonenumber},</if>-->
<!-- <if test="sex != null and sex != ''">sex = #{sex},</if>-->
<!-- <if test="avatar != null and avatar != ''">avatar = #{avatar},</if>-->
<!-- <if test="password != null and password != ''">password = #{password},</if>-->
<!-- <if test="salt != null and salt != ''">salt = #{salt},</if>-->
<!-- <if test="status != null and status != ''">status = #{status},</if>-->
<!-- <if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>-->
<!-- <if test="loginDate != null">login_date = #{loginDate},</if>-->
<!-- <if test="pwdUpdateDate != null">pwd_update_date = #{pwdUpdateDate},</if>-->
<!-- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>-->
<!-- <if test="remark != null">remark = #{remark},</if>-->
<!-- update_time = sysdate()-->
<!-- </set>-->
<!-- where user_id = #{userId}-->
<!-- </update>-->
<!-- -->
<!-- <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">-->
<!-- insert into sys_user(-->
<!-- <if test="userId != null and userId != 0">user_id,</if>-->
<!-- <if test="deptId != null and deptId != 0">dept_id,</if>-->
<!-- <if test="loginName != null and loginName != ''">login_name,</if>-->
<!-- <if test="userName != null and userName != ''">user_name,</if>-->
<!-- <if test="userType != null and userType != ''">user_type,</if>-->
<!-- <if test="email != null and email != ''">email,</if>-->
<!-- <if test="avatar != null and avatar != ''">avatar,</if>-->
<!-- <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>-->
<!-- <if test="sex != null and sex != ''">sex,</if>-->
<!-- <if test="password != null and password != ''">password,</if>-->
<!-- <if test="salt != null and salt != ''">salt,</if>-->
<!-- <if test="status != null and status != ''">status,</if>-->
<!-- <if test="pwdUpdateDate != null">pwd_update_date,</if>-->
<!-- <if test="createBy != null and createBy != ''">create_by,</if>-->
<!-- <if test="remark != null and remark != ''">remark,</if>-->
<!-- create_time-->
<!-- )values(-->
<!-- <if test="userId != null and userId != ''">#{userId},</if>-->
<!-- <if test="deptId != null and deptId != ''">#{deptId},</if>-->
<!-- <if test="loginName != null and loginName != ''">#{loginName},</if>-->
<!-- <if test="userName != null and userName != ''">#{userName},</if>-->
<!-- <if test="userType != null and userType != ''">#{userType},</if>-->
<!-- <if test="email != null and email != ''">#{email},</if>-->
<!-- <if test="avatar != null and avatar != ''">#{avatar},</if>-->
<!-- <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>-->
<!-- <if test="sex != null and sex != ''">#{sex},</if>-->
<!-- <if test="password != null and password != ''">#{password},</if>-->
<!-- <if test="salt != null and salt != ''">#{salt},</if>-->
<!-- <if test="status != null and status != ''">#{status},</if>-->
<!-- <if test="pwdUpdateDate != null">#{pwdUpdateDate},</if>-->
<!-- <if test="createBy != null and createBy != ''">#{createBy},</if>-->
<!-- <if test="remark != null and remark != ''">#{remark},</if>-->
<!-- sysdate()-->
<!-- )-->
<!-- </insert>-->
</mapper> </mapper>