10 changed files with 486 additions and 0 deletions
-
53src/main/java/com/gaotao/modules/sys/controller/SysDepartmentController.java
-
44src/main/java/com/gaotao/modules/sys/controller/SysSceneDynamicControlModelController.java
-
20src/main/java/com/gaotao/modules/sys/mapper/SysDepartmentMapper.java
-
23src/main/java/com/gaotao/modules/sys/mapper/SysSceneDynamicControlModelMapper.java
-
12src/main/java/com/gaotao/modules/sys/service/SysDepartmentService.java
-
13src/main/java/com/gaotao/modules/sys/service/SysSceneDynamicControlModelService.java
-
67src/main/java/com/gaotao/modules/sys/service/impl/SysDepartmentServiceImpl.java
-
113src/main/java/com/gaotao/modules/sys/service/impl/SysSceneDynamicControlModelServiceImpl.java
-
54src/main/resources/mapper/sys/SysDepartmentMapper.xml
-
87src/main/resources/mapper/sys/SysSceneDynamicControlModelMapper.xml
@ -0,0 +1,53 @@ |
|||||
|
package com.gaotao.modules.sys.controller; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.common.utils.R; |
||||
|
import com.gaotao.modules.sys.entity.SysDepartmentEntity; |
||||
|
import com.gaotao.modules.sys.service.SysDepartmentService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @description: 部门管理 |
||||
|
* @author: fengyuan_yang |
||||
|
* @date: 2023/6/30 13:34 |
||||
|
* @param: |
||||
|
* @return: |
||||
|
**/ |
||||
|
@RestController |
||||
|
@RequestMapping("/sys/department") |
||||
|
public class SysDepartmentController { |
||||
|
@Autowired |
||||
|
private SysDepartmentService sysDepartmentService; |
||||
|
|
||||
|
/** |
||||
|
* 查询部门 |
||||
|
**/ |
||||
|
@PostMapping("departmentSearch") |
||||
|
public R departmentSearch(@RequestBody SysDepartmentEntity data){ |
||||
|
PageUtils page = sysDepartmentService.departmentSearch(data); |
||||
|
return R.ok().put("page", page); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增部门 |
||||
|
**/ |
||||
|
@PostMapping(value="/departmentSave") |
||||
|
public R departmentSave(@RequestBody SysDepartmentEntity data){ |
||||
|
sysDepartmentService.departmentSave(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除部门 |
||||
|
**/ |
||||
|
@PostMapping(value="/departmentDelete") |
||||
|
public R departmentDelete(@RequestBody SysDepartmentEntity data){ |
||||
|
sysDepartmentService.departmentDelete(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.gaotao.modules.sys.controller; |
||||
|
|
||||
|
import com.gaotao.common.utils.R; |
||||
|
import com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity; |
||||
|
import com.gaotao.modules.sys.service.SysSceneDynamicControlModelService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@RequestMapping("sysSceneDynamicControlModel") |
||||
|
@RestController |
||||
|
public class SysSceneDynamicControlModelController { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysSceneDynamicControlModelService sysSceneDynamicControlModelService; |
||||
|
|
||||
|
@PostMapping("/sysControlModelSearch") |
||||
|
public R sysControlModelSearch(@RequestBody SysSceneDynamicControlModelEntity data){ |
||||
|
List<SysSceneDynamicControlModelEntity> list = sysSceneDynamicControlModelService.sysControlModelSearch(data); |
||||
|
return R.ok().put("rows", list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 控制 |
||||
|
**/ |
||||
|
@PostMapping("/controlData") |
||||
|
public R controlData(@RequestBody SysSceneDynamicControlModelEntity data){ |
||||
|
sysSceneDynamicControlModelService.controlData(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
**/ |
||||
|
@PostMapping("/sysControlModelUpdate") |
||||
|
public R sysControlModelUpdate(@RequestBody SysSceneDynamicControlModelEntity data){ |
||||
|
sysSceneDynamicControlModelService.sysControlModelUpdate(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.gaotao.modules.sys.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.gaotao.modules.sys.entity.SysDepartmentEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface SysDepartmentMapper { |
||||
|
IPage<SysDepartmentEntity> departmentSearch(Page<SysDepartmentEntity> sysDepartmentEntityPage, @Param("query") SysDepartmentEntity data); |
||||
|
|
||||
|
void departmentSave(SysDepartmentEntity data); |
||||
|
|
||||
|
void departmentDelete(SysDepartmentEntity data); |
||||
|
|
||||
|
List<SysDepartmentEntity> checkSysDepartment(SysDepartmentEntity data); |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package com.gaotao.modules.sys.mapper; |
||||
|
|
||||
|
import com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity; |
||||
|
import com.gaotao.modules.sys.entity.SysSceneDynamicControlParameterEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface SysSceneDynamicControlModelMapper { |
||||
|
void controlData(SysSceneDynamicControlModelEntity data); |
||||
|
|
||||
|
List<SysSceneDynamicControlModelEntity> sysControlModelSearch(SysSceneDynamicControlModelEntity data); |
||||
|
|
||||
|
void sysControlModelUpdate(SysSceneDynamicControlModelEntity data); |
||||
|
|
||||
|
void saveParameterValue(ArrayList<SysSceneDynamicControlParameterEntity> thirdTypeList); |
||||
|
|
||||
|
List<String> queryParameterValue(String site, String controlNo, String type); |
||||
|
|
||||
|
void deleteParameterValue(SysSceneDynamicControlModelEntity data); |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
package com.gaotao.modules.sys.service; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.modules.sys.entity.SysDepartmentEntity; |
||||
|
|
||||
|
public interface SysDepartmentService { |
||||
|
PageUtils departmentSearch(SysDepartmentEntity data); |
||||
|
|
||||
|
void departmentSave(SysDepartmentEntity data); |
||||
|
|
||||
|
void departmentDelete(SysDepartmentEntity data); |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
package com.gaotao.modules.sys.service; |
||||
|
|
||||
|
import com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface SysSceneDynamicControlModelService { |
||||
|
void controlData(SysSceneDynamicControlModelEntity data); |
||||
|
|
||||
|
List<SysSceneDynamicControlModelEntity> sysControlModelSearch(SysSceneDynamicControlModelEntity data); |
||||
|
|
||||
|
void sysControlModelUpdate(SysSceneDynamicControlModelEntity data); |
||||
|
} |
||||
@ -0,0 +1,67 @@ |
|||||
|
package com.gaotao.modules.sys.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.modules.sys.entity.SysDepartmentEntity; |
||||
|
import com.gaotao.modules.sys.mapper.SysDepartmentMapper; |
||||
|
import com.gaotao.modules.sys.service.SysDepartmentService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class SysDepartmentServiceImpl implements SysDepartmentService { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysDepartmentMapper sysDepartmentMapper; |
||||
|
|
||||
|
/** |
||||
|
* @description: 查询部门 |
||||
|
* @author: fengyuan_yang |
||||
|
* @date: 2023/6/30 13:53 |
||||
|
* @param: [data] |
||||
|
* @return: com.gaotao.common.utils.PageUtils |
||||
|
**/ |
||||
|
@Override |
||||
|
public PageUtils departmentSearch(SysDepartmentEntity data) { |
||||
|
IPage<SysDepartmentEntity> resultList = this.sysDepartmentMapper.departmentSearch(new Page<SysDepartmentEntity>(data.getPage(), data.getLimit()), data); |
||||
|
return new PageUtils(resultList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 新增部门 |
||||
|
* @author: fengyuan_yang |
||||
|
* @date: 2023/6/30 13:53 |
||||
|
* @param: [data] |
||||
|
* @return: void |
||||
|
**/ |
||||
|
@Override |
||||
|
public void departmentSave(SysDepartmentEntity data) { |
||||
|
// 获得 site 和 bu |
||||
|
if (data.getBu().split("_").length >= 2 ) { |
||||
|
data.setSite(data.getBu().split("_")[0]); |
||||
|
data.setBuNo(data.getBu().split("_")[1]); |
||||
|
} else { |
||||
|
throw new RuntimeException("工厂和部门有误!"); |
||||
|
} |
||||
|
List<SysDepartmentEntity> checkSysDepartment = sysDepartmentMapper.checkSysDepartment(data); |
||||
|
if (!checkSysDepartment.isEmpty()) { |
||||
|
throw new RuntimeException("该部门已存在!"); |
||||
|
} |
||||
|
sysDepartmentMapper.departmentSave(data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 删除部门 |
||||
|
* @author: fengyuan_yang |
||||
|
* @date: 2023/6/30 13:54 |
||||
|
* @param: [data] |
||||
|
* @return: void |
||||
|
**/ |
||||
|
@Override |
||||
|
public void departmentDelete(SysDepartmentEntity data) { |
||||
|
sysDepartmentMapper.departmentDelete(data); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,113 @@ |
|||||
|
package com.gaotao.modules.sys.service.impl; |
||||
|
|
||||
|
import com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity; |
||||
|
import com.gaotao.modules.sys.entity.SysSceneDynamicControlParameterEntity; |
||||
|
import com.gaotao.modules.sys.mapper.SysSceneDynamicControlModelMapper; |
||||
|
import com.gaotao.modules.sys.service.SysSceneDynamicControlModelService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class SysSceneDynamicControlModelServiceImpl implements SysSceneDynamicControlModelService { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysSceneDynamicControlModelMapper sysSceneDynamicControlModelMapper; |
||||
|
|
||||
|
/** |
||||
|
* 控制 |
||||
|
**/ |
||||
|
@Override |
||||
|
public void controlData(SysSceneDynamicControlModelEntity data) { |
||||
|
if (data.getBaseData().equals("未控制")){ |
||||
|
data.setBaseData("控制"); |
||||
|
sysSceneDynamicControlModelMapper.controlData(data); |
||||
|
} else if (data.getBaseData().equals("控制")) { |
||||
|
data.setBaseData("未控制"); |
||||
|
sysSceneDynamicControlModelMapper.controlData(data); |
||||
|
} else { |
||||
|
throw new RuntimeException("控制字段空值或不存在"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 列表查询 |
||||
|
**/ |
||||
|
@Override |
||||
|
public List<SysSceneDynamicControlModelEntity> sysControlModelSearch(SysSceneDynamicControlModelEntity data) { |
||||
|
List<SysSceneDynamicControlModelEntity> list = sysSceneDynamicControlModelMapper.sysControlModelSearch(data); |
||||
|
for (SysSceneDynamicControlModelEntity model : list) { |
||||
|
if ("Y".equals(model.getParameterTable())) { |
||||
|
List<String> thirdValueList = sysSceneDynamicControlModelMapper.queryParameterValue(model.getSite(), model.getControlNo(), "third_type"); |
||||
|
List<String> secondValueList = sysSceneDynamicControlModelMapper.queryParameterValue(model.getSite(), model.getControlNo(), "second_type"); |
||||
|
String thirdType = ""; |
||||
|
String secondType = ""; |
||||
|
for (String str : thirdValueList) { |
||||
|
if (thirdType.equals("")){ |
||||
|
thirdType = str; |
||||
|
}else { |
||||
|
thirdType = thirdType + ";" + str; |
||||
|
} |
||||
|
} |
||||
|
for (String str : secondValueList) { |
||||
|
if (secondType.equals("")){ |
||||
|
secondType = str; |
||||
|
}else { |
||||
|
secondType = secondType + ";" + str; |
||||
|
} |
||||
|
} |
||||
|
model.setThirdType(thirdType); |
||||
|
model.setSecondType(secondType); |
||||
|
} |
||||
|
} |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
**/ |
||||
|
@Override |
||||
|
@Transactional |
||||
|
public void sysControlModelUpdate(SysSceneDynamicControlModelEntity data) { |
||||
|
// 如果参数值要存到参数表 |
||||
|
if ("Y".equals(data.getParameterTable())) { |
||||
|
// 先删除参数表数据 |
||||
|
sysSceneDynamicControlModelMapper.deleteParameterValue(data); |
||||
|
// 如果参数一不为空 |
||||
|
if (StringUtils.isNotBlank(data.getThirdType())) { |
||||
|
ArrayList<SysSceneDynamicControlParameterEntity> thirdTypeList = new ArrayList<>(); |
||||
|
String[] parameterArr = data.getThirdType().split(";"); |
||||
|
for (String para : parameterArr) { |
||||
|
SysSceneDynamicControlParameterEntity parameterEntity = new SysSceneDynamicControlParameterEntity(); |
||||
|
parameterEntity.setSite(data.getSite()); |
||||
|
parameterEntity.setControlNo(data.getControlNo()); |
||||
|
parameterEntity.setParameter("third_type"); |
||||
|
parameterEntity.setParameterValue(para); |
||||
|
thirdTypeList.add(parameterEntity); |
||||
|
} |
||||
|
sysSceneDynamicControlModelMapper.saveParameterValue(thirdTypeList); |
||||
|
data.setThirdType(""); |
||||
|
} |
||||
|
// 如果参数二不为空 |
||||
|
if (StringUtils.isNotBlank(data.getSecondType())) { |
||||
|
ArrayList<SysSceneDynamicControlParameterEntity> secondTypeList = new ArrayList<>(); |
||||
|
String[] parameterArr = data.getSecondType().split(";"); |
||||
|
for (String para : parameterArr) { |
||||
|
SysSceneDynamicControlParameterEntity parameterEntity = new SysSceneDynamicControlParameterEntity(); |
||||
|
parameterEntity.setSite(data.getSite()); |
||||
|
parameterEntity.setControlNo(data.getControlNo()); |
||||
|
parameterEntity.setParameter("second_type"); |
||||
|
parameterEntity.setParameterValue(para); |
||||
|
secondTypeList.add(parameterEntity); |
||||
|
} |
||||
|
sysSceneDynamicControlModelMapper.saveParameterValue(secondTypeList); |
||||
|
data.setSecondType(""); |
||||
|
} |
||||
|
} |
||||
|
sysSceneDynamicControlModelMapper.sysControlModelUpdate(data); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
<?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.gaotao.modules.sys.mapper.SysDepartmentMapper"> |
||||
|
|
||||
|
<!-- 查询部门 --> |
||||
|
<select id="departmentSearch" parameterType="com.gaotao.modules.sys.entity.SysDepartmentEntity" resultType="com.gaotao.modules.sys.entity.SysDepartmentEntity"> |
||||
|
SELECT |
||||
|
site, |
||||
|
bu_no, |
||||
|
dbo.get_bu_desc(Site, bu_no) as buDesc, |
||||
|
department_id, |
||||
|
department_name, |
||||
|
create_date, |
||||
|
create_by, |
||||
|
update_date, |
||||
|
update_by |
||||
|
FROM sys_department |
||||
|
<where> |
||||
|
site in (select site from eam_access_site where username = #{query.username}) |
||||
|
and bu_no in (select bu_no from AccessBu where username = #{query.username}) |
||||
|
<if test="query.departmentId != null and query.departmentId != ''"> |
||||
|
AND department_id like '%' + #{query.departmentId} + '%' |
||||
|
</if> |
||||
|
<if test="query.departmentName != null and query.departmentName != ''"> |
||||
|
AND department_name like '%' + #{query.departmentName} + '%' |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询部门是否已存在 --> |
||||
|
<select id="checkSysDepartment" resultType="com.gaotao.modules.sys.entity.SysDepartmentEntity" parameterType="com.gaotao.modules.sys.entity.SysDepartmentEntity"> |
||||
|
SELECT |
||||
|
site, |
||||
|
bu_no, |
||||
|
department_id, |
||||
|
department_name |
||||
|
FROM sys_department |
||||
|
WHERE site = #{site} and bu_no = #{buNo} AND department_id = #{departmentId} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 新增部门 --> |
||||
|
<insert id="departmentSave" parameterType="com.gaotao.modules.sys.entity.SysDepartmentEntity"> |
||||
|
insert into sys_department (site, bu_no, department_id, department_name, create_date, create_by, update_date, update_by) |
||||
|
values (#{site}, #{buNo}, #{departmentId}, #{departmentName}, getDate(), #{createBy}, getDate(), #{updateBy}) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 删除部门 --> |
||||
|
<delete id="departmentDelete" parameterType="com.gaotao.modules.sys.entity.SysDepartmentEntity"> |
||||
|
delete from sys_department |
||||
|
where site = #{site} and bu_no = #{buNo} and department_id = #{departmentId} |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,87 @@ |
|||||
|
<?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.gaotao.modules.sys.mapper.SysSceneDynamicControlModelMapper"> |
||||
|
|
||||
|
<!-- 修改该计划状态 --> |
||||
|
<update id="controlData" parameterType="com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity"> |
||||
|
UPDATE sys_scene_dynamic_control_model |
||||
|
SET base_data = #{baseData} |
||||
|
WHERE control_no = #{controlNo} |
||||
|
AND site = #{site} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 列表查询 --> |
||||
|
<select id="sysControlModelSearch" resultType="com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity" parameterType="com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity"> |
||||
|
SELECT |
||||
|
control_no, |
||||
|
site, |
||||
|
type, |
||||
|
base_data, |
||||
|
base_desc, |
||||
|
status, |
||||
|
remark, |
||||
|
third_type, |
||||
|
second_type, |
||||
|
page_control, |
||||
|
control_style, |
||||
|
create_date, |
||||
|
create_by, |
||||
|
update_date, |
||||
|
update_by, |
||||
|
parameter_table |
||||
|
FROM sys_scene_dynamic_control_model |
||||
|
<where> |
||||
|
site = #{site} |
||||
|
AND page_control = 'Y' |
||||
|
<if test = "baseDesc != null and baseDesc != ''"> |
||||
|
AND base_desc LIKE '%' + #{baseDesc} + '%' |
||||
|
</if> |
||||
|
<if test = "baseData != null and baseData != ''"> |
||||
|
AND base_data = #{baseData} |
||||
|
</if> |
||||
|
<if test = "controlStyle != null and controlStyle != ''"> |
||||
|
AND control_style = #{controlStyle} |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<!-- 编辑 --> |
||||
|
<update id="sysControlModelUpdate" parameterType="com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity"> |
||||
|
UPDATE sys_scene_dynamic_control_model |
||||
|
SET control_style = #{controlStyle}, |
||||
|
third_type = #{thirdType}, |
||||
|
second_type = #{secondType}, |
||||
|
remark = #{remark}, |
||||
|
update_date = getDate(), |
||||
|
update_by = #{updateBy} |
||||
|
WHERE control_no = #{controlNo} |
||||
|
AND site = #{site} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 新增参数值 --> |
||||
|
<insert id="saveParameterValue"> |
||||
|
INSERT INTO sys_scene_dynamic_control_parameter |
||||
|
(site, control_no, parameter, parameter_value) |
||||
|
VALUES |
||||
|
<foreach collection="list" item="item" separator=","> |
||||
|
(#{item.site}, #{item.controlNo}, #{item.parameter}, #{item.parameterValue}) |
||||
|
</foreach> |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 查询参数值 --> |
||||
|
<select id="queryParameterValue" resultType="string"> |
||||
|
SELECT parameter_value |
||||
|
FROM sys_scene_dynamic_control_parameter |
||||
|
WHERE site = #{site} |
||||
|
AND control_no = #{controlNo} |
||||
|
AND parameter = #{type} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 删除参数表数据--> |
||||
|
<delete id="deleteParameterValue" parameterType="com.gaotao.modules.sys.entity.SysSceneDynamicControlModelEntity"> |
||||
|
DELETE FROM sys_scene_dynamic_control_parameter |
||||
|
WHERE site = #{site} and control_no = #{controlNo} |
||||
|
</delete> |
||||
|
</mapper> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue