11 changed files with 171 additions and 1 deletions
@ -0,0 +1,26 @@ |
|||||
|
<?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.techsor.datacenter.business.dao.ex.DeviceGroupMapperExt"> |
||||
|
|
||||
|
|
||||
|
<select id="getListPage" resultType="com.techsor.datacenter.business.vo.devicegroup.DeviceGroupPageVO"> |
||||
|
SELECT |
||||
|
dg.id deviceGroupId, |
||||
|
dg.company_id, |
||||
|
dg.`name`, |
||||
|
dg.remark |
||||
|
FROM |
||||
|
dashboard_device_group dg |
||||
|
WHERE |
||||
|
dg.flag != 1 |
||||
|
<if test="deviceGroupIdList != null"> |
||||
|
AND dg.id IN <foreach collection="deviceGroupIdList" item="item" open="(" separator="," close=")">#{item}</foreach> |
||||
|
</if> |
||||
|
<if test="name != null"> |
||||
|
AND dg.`name` LIKE CONCAT('%',#{name},'%') |
||||
|
</if> |
||||
|
order by dg.id desc |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.techsor.datacenter.business.dto.devicegroup; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.techsor.datacenter.business.dto.BaseSearchParams; |
||||
|
|
||||
|
|
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@Data |
||||
|
public class DeviceGroupSearchParams extends BaseSearchParams { |
||||
|
|
||||
|
@Schema(description = "设备组名",example = "张三李四") |
||||
|
private String name; |
||||
|
|
||||
|
@Schema(description = "设备组id,多个逗号连接",example = "1,47") |
||||
|
private String deviceGroupIds; |
||||
|
|
||||
|
@Schema(description = "设备组id", hidden = true) |
||||
|
private List<Long> deviceGroupIdList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.techsor.datacenter.business.vo.devicegroup; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class DeviceGroupPageVO { |
||||
|
|
||||
|
@Schema(description = "项目唯一标识ID,新增时无此参数",example = "2738967") |
||||
|
private Long deviceGroupId; |
||||
|
|
||||
|
@Schema(description = "楼宇ID",example = "222", hidden = true) |
||||
|
private Long buildingId; |
||||
|
|
||||
|
@Schema(description = "楼宇名称",example = "楼宇222", hidden = true) |
||||
|
private String buildingName; |
||||
|
|
||||
|
@Schema(description = "所属企业ID",example = "2738967", hidden = true) |
||||
|
private Long companyId; |
||||
|
|
||||
|
@Schema(description = "项目名称",example = "testDeviceGroup1", required = true) |
||||
|
private String name; |
||||
|
|
||||
|
@Schema(description = "remark", example = "remark") |
||||
|
private String remark; |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue