视频设备、单位管理接口
This commit is contained in:
parent
4f302cef20
commit
8ff1569a0b
|
|
@ -44,6 +44,12 @@ public class DevController extends BaseController {
|
|||
return service.addDev(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "设备详情")
|
||||
@PostMapping("detailDev")
|
||||
public AjaxResult detailDev(@RequestBody DeviceVo vo) {
|
||||
return service.detailDev(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改设备")
|
||||
// @PreventRepeatSubmit
|
||||
// @RequiresPermissions("basic:dev:edit")
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ public class UnitController extends BaseController {
|
|||
return service.addUnit(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单位详情")
|
||||
@PostMapping("detailUnit")
|
||||
public AjaxResult detailUnit(@RequestBody UnitVo vo) {
|
||||
return service.detailUnit(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改单位")
|
||||
// @PreventRepeatSubmit
|
||||
// @RequiresPermissions("basic:unit:edit")
|
||||
|
|
|
|||
|
|
@ -59,4 +59,13 @@ public interface IDevMapper {
|
|||
* @date 2025/4/10 16:12
|
||||
*/
|
||||
int queryValueIsExist2(@Param("params") DeviceVo vo, @Param("value") String value, @Param("columnName") String columnName);
|
||||
|
||||
/**
|
||||
* 设备详情
|
||||
* @param vo
|
||||
* @return DeviceVo
|
||||
* @author cwchen
|
||||
* @date 2025/4/10 17:54
|
||||
*/
|
||||
DeviceVo detailDev(DeviceVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,4 +45,13 @@ public interface IUnitMapper {
|
|||
* @date 2025/4/10 13:53
|
||||
*/
|
||||
void addOrUpdateUnit(@Param("params") UnitVo vo, @Param("type") int type);
|
||||
|
||||
/**
|
||||
* 单位详情
|
||||
* @param vo
|
||||
* @return UnitVo
|
||||
* @author cwchen
|
||||
* @date 2025/4/10 17:52
|
||||
*/
|
||||
UnitVo detailUnit(UnitVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,4 +46,13 @@ public interface IDevService {
|
|||
* @date 2025/4/10 15:54
|
||||
*/
|
||||
AjaxResult delDev(DeviceVo vo);
|
||||
|
||||
/**
|
||||
* 设备详情
|
||||
* @param vo
|
||||
* @return AjaxResult
|
||||
* @author cwchen
|
||||
* @date 2025/4/10 17:53
|
||||
*/
|
||||
AjaxResult detailDev(DeviceVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,13 @@ public interface IUnitService {
|
|||
* @date 2025/4/10 14:01
|
||||
*/
|
||||
AjaxResult delUnit(UnitVo vo);
|
||||
|
||||
/**
|
||||
* 单位详情
|
||||
* @param vo
|
||||
* @return AjaxResult
|
||||
* @author cwchen
|
||||
* @date 2025/4/10 17:50
|
||||
*/
|
||||
AjaxResult detailUnit(UnitVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,4 +121,15 @@ public class DevServiceImpl implements IDevService {
|
|||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult detailDev(DeviceVo vo) {
|
||||
try {
|
||||
DeviceVo deviceVo = Optional.ofNullable(mapper.detailDev(vo)).orElseGet(DeviceVo::new);
|
||||
return AjaxResult.success(deviceVo);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,4 +111,15 @@ public class UnitServiceImpl implements IUnitService {
|
|||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult detailUnit(UnitVo vo) {
|
||||
try {
|
||||
UnitVo unitVo = Optional.ofNullable(mapper.detailUnit(vo)).orElseGet(UnitVo::new);
|
||||
return AjaxResult.success(unitVo);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,4 +115,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
) AND is_active = '1'
|
||||
</if>
|
||||
</select>
|
||||
<!--设备详情-->
|
||||
<select id="detailDev" resultType="com.bonus.base.basic.domain.vo.DeviceVo">
|
||||
SELECT td.id,
|
||||
td.dev_name AS unitName,
|
||||
td.mac_id AS macId,
|
||||
td.dev_type_code AS devTypeCode,
|
||||
td.puid AS puid,
|
||||
td.gb_code AS gbCode,
|
||||
td.play_idx AS playIdx,
|
||||
td.remark
|
||||
FROM tt_device td
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -100,4 +100,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE ${columnName} = #{value} AND id != #{params.id} AND is_active = '1'
|
||||
</if>
|
||||
</select>
|
||||
<!--单位详情-->
|
||||
<select id="detailUnit" resultType="com.bonus.base.basic.domain.vo.UnitVo">
|
||||
SELECT id,
|
||||
unit_name AS unitName,
|
||||
unit_type AS unitType,
|
||||
unit_code AS unitCode,
|
||||
unit_user AS unitUser,
|
||||
unit_phone AS unitPhone,
|
||||
suff_user AS suffUser,
|
||||
suff_phone AS suffPhone,
|
||||
address AS address,
|
||||
brief AS brief,
|
||||
create_day AS createDay,
|
||||
register AS register
|
||||
FROM tt_sys_unit
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue