101captain
2021-09-09 bf4d67474ff023a7e3ec6fb29b906a698a84f0c5
物业报警相关提交
12个文件已添加
16个文件已修改
965 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/CommonPage.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyAlarmDetailVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyAlarmSettingVO.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyAlarmVO.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyEquipmentVO.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/property/PropertyService.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyAlarmApi.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyAlarmSettingApi.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyEquipmentApi.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyAlarmApi.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyAlarmSettingApi.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyEquipmentApi.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyAlarmDao.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyAlarmSettingDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyEquipmentDao.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyAlarm.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyAlarmSetting.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyEquipment.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/netty/NettyServerHandler.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmSettingService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyEquipmentService.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmSettingServiceImpl.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyEquipmentServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmMapper.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmSettingMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyEquipmentMapper.xml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/CommonPage.java
@@ -24,10 +24,10 @@
    private String phone;
    @ApiModelProperty("地址参数")
    private String address;
    @ApiModelProperty("开始时间")
    @ApiModelProperty("创建开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date beginTime;
    @ApiModelProperty("结束时间")
    @ApiModelProperty("创建结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
    @ApiModelProperty("系统用户姓名")
@@ -36,4 +36,14 @@
    private Long userId;
    @ApiModelProperty("参数id")
    private Long paramId;
    @ApiModelProperty("类型")
    private Integer type;
    @ApiModelProperty("状态开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date statusBeginTime;
    @ApiModelProperty("状态结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date statusEndTime;
    @ApiModelProperty("编号")
    private String serialNo;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyAlarmDetailVO.java
New file
@@ -0,0 +1,10 @@
package com.panzhihua.common.model.vos.property;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel("详情")
public class ComPropertyAlarmDetailVO {
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyAlarmSettingVO.java
New file
@@ -0,0 +1,31 @@
package com.panzhihua.common.model.vos.property;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel
public class ComPropertyAlarmSettingVO {
    private Integer id;
    /**
     * 触发间隔
     */
    @ApiModelProperty(value = "触发间隔")
    private Integer triggerTime;
    /**
     * 社区id
     */
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyAlarmVO.java
@@ -28,7 +28,57 @@
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 位置信息
     */
    @ApiModelProperty(value = "位置信息")
    private String position;
    /**
     * 手机号
     */
    @ApiModelProperty("手机号")
    private String phone;
    /**
     *居民姓名
     */
    @ApiModelProperty("居民姓名")
    private String name;
    /**
     * 报警处理状态 0待处理 1已办结
     */
    @ApiModelProperty("处理状态")
    private Integer status;
    /**
     * 处理人
     */
    @ApiModelProperty("处理人")
    private String solveName;
    /**
     * 处理时间
     */
    @ApiModelProperty(value = "处理时间")
    private Date solveTime;
    /**
     * 处理内容
     */
    @ApiModelProperty(value = "处理内容")
    private String solveContent;
    /**
     * 处理人id
     */
    @ApiModelProperty("处理人id")
    private Long solveId;
    /**
     * 社区id
     */
    @ApiModelProperty("社区id")
    private Long communityId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyEquipmentVO.java
New file
@@ -0,0 +1,67 @@
package com.panzhihua.common.model.vos.property;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel("设备实体")
public class ComPropertyEquipmentVO {
    private Integer id;
    /**
     * 设备编号
     */
    @ApiModelProperty(value = "设备编号")
    private String serialNo;
    /**
     * 报警位置
     */
    @ApiModelProperty(value = "报警位置")
    private String position;
    /**
     * 社区id
     */
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String longitude;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String latitude;
    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称")
    private String name;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 居民名称
     */
    @ApiModelProperty(value = "居民名称")
    private String username;
    /**
     * 设备类型
     */
    @ApiModelProperty(value = "设备类型 1红外报警 2一键报警 ")
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/property/PropertyService.java
@@ -2,6 +2,9 @@
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO;
import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO;
import com.panzhihua.common.model.vos.property.ComPropertyRepairVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
@@ -53,4 +56,110 @@
     */
    @GetMapping("/comPropertyRepair/del")
    R comPropertyRepairDelete(@RequestParam("id") Long id);
    /**
     * 查询报警列表
     * @param commonPage
     * @return
     */
    @PostMapping("/comPropertyAlarm/queryAll")
    R comPropertyAlarmSelectAll(@RequestBody CommonPage commonPage);
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/comPropertyAlarm/{id}")
    R comPropertyAlarmSelectOne(@PathVariable("id") Integer id);
    /**
     * 新增数据
     *
     * @param comPropertyAlarm 实体对象
     * @return 新增结果
     */
    @PostMapping("/comPropertyAlarm")
    R comPropertyAlarmInsert(@RequestBody ComPropertyAlarmVO comPropertyAlarm);
    /**
     * 修改数据
     *
     * @param comPropertyAlarm 实体对象
     * @return 修改结果
     */
    @PostMapping("/comPropertyAlarm/update")
    R comPropertyAlarmUpdate(@RequestBody ComPropertyAlarmVO comPropertyAlarm);
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("/comPropertyAlarm/del")
    R comPropertyAlarmDelete(@RequestParam("id") Long id);
    /**
     * 分页查询所有数据
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("/comPropertyEquipment/queryAll")
    R comPropertyEquipmentSelectAll(@RequestBody CommonPage commonPage);
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/comPropertyEquipment/{id}")
    R comPropertyEquipmentSelectOne(@PathVariable("id") Integer id);
    /**
     * 新增数据
     *
     * @param comPropertyEquipment 实体对象
     * @return 新增结果
     */
    @PostMapping("/comPropertyEquipment")
    R comPropertyEquipmentInsert(@RequestBody ComPropertyEquipmentVO comPropertyEquipment);
    /**
     * 修改数据
     *
     * @param comPropertyEquipment 实体对象
     * @return 修改结果
     */
    @PostMapping("/comPropertyEquipment/update")
    R comPropertyEquipmentUpdate(@RequestBody ComPropertyEquipmentVO comPropertyEquipment);
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("/comPropertyEquipment/del")
    R comPropertyEquipmentDelete(@RequestParam("id") Long id);
    /**
     * 新增数据
     *
     * @param comPropertyAlarmSettingVO 实体对象
     * @return 新增结果
     */
    @PostMapping("/comPropertyAlarmSetting")
    R comPropertyAlarmSettingInsert(@RequestBody ComPropertyAlarmSettingVO comPropertyAlarmSettingVO);
    /**
     * 通过主键查询单条数据
     *
     * @param communityId 主键
     * @return 单条数据
     */
    @GetMapping("/comPropertyAlarmSetting")
    R comPropertyAlarmSettingSelectOne(@RequestParam("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyAlarmApi.java
New file
@@ -0,0 +1,87 @@
package com.panzhihua.community_backstage.api;
import cn.hutool.core.date.DateUtil;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO;
import com.panzhihua.common.service.property.PropertyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("comPropertyAlarm")
@Api(tags = "物业报警api")
public class ComPropertyAlarmApi extends BaseController {
    @Resource
    private PropertyService propertyService;
    /**
     * 分页查询所有数据
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询",response = ComPropertyAlarmVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setParamId(this.getCommunityId());
        return propertyService.comPropertyAlarmSelectAll(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "详情",response = ComPropertyAlarmVO.class)
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Integer id) {
        return propertyService.comPropertyAlarmSelectOne(id);
    }
    /**
     * 新增数据
     *
     * @param comPropertyAlarmVO 实体对象
     * @return 新增结果
     */
    @ApiOperation(value = "新增")
    @PostMapping
    public R insert(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) {
        comPropertyAlarmVO.setCommunityId(this.getCommunityId());
        return propertyService.comPropertyAlarmInsert(comPropertyAlarmVO);
    }
    /**
     * 修改数据
     *
     * @param comPropertyAlarmVO 实体对象
     * @return 修改结果
     */
    @ApiOperation(value = "修改")
    @PostMapping("/update")
    public R update(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) {
        comPropertyAlarmVO.setSolveId(this.getUserId());
        comPropertyAlarmVO.setSolveTime(DateUtil.date());
        return propertyService.comPropertyAlarmUpdate(comPropertyAlarmVO);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation(value = "删除")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return propertyService.comPropertyAlarmDelete(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyAlarmSettingApi.java
New file
@@ -0,0 +1,48 @@
package com.panzhihua.community_backstage.api;
import cn.hutool.core.date.DateUtil;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO;
import com.panzhihua.common.service.property.PropertyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("comPropertyAlarmSetting")
@Api(tags = "物业报警设置api")
public class ComPropertyAlarmSettingApi extends BaseController {
    @Resource
    private PropertyService propertyService;
    /**
     *
     * @return 单条数据
     */
    @ApiOperation("查询设置")
    @GetMapping
    public R selectOne() {
        return this.propertyService.comPropertyAlarmSettingSelectOne(this.getCommunityId());
    }
    /**
     * 新增数据
     *
     * @param comPropertyAlarmSettingVO 实体对象
     * @return 新增结果
     */
    @ApiOperation("新增或修改设置")
    @PostMapping
    public R insert(@RequestBody ComPropertyAlarmSettingVO comPropertyAlarmSettingVO) {
        comPropertyAlarmSettingVO.setCommunityId(this.getCommunityId());
        return this.propertyService.comPropertyAlarmSettingInsert(comPropertyAlarmSettingVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyEquipmentApi.java
New file
@@ -0,0 +1,86 @@
package com.panzhihua.community_backstage.api;
import cn.hutool.core.date.DateUtil;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO;
import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO;
import com.panzhihua.common.service.property.PropertyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("comPropertyEquipment")
@Api(tags = "物业设备api")
public class ComPropertyEquipmentApi extends BaseController {
    @Resource
    private PropertyService propertyService;
    /**
     * 分页查询所有数据
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询",response = ComPropertyEquipmentVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setParamId(this.getCommunityId());
        return propertyService.comPropertyEquipmentSelectAll(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "详情",response = ComPropertyEquipmentVO.class)
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Integer id) {
        return propertyService.comPropertyEquipmentSelectOne(id);
    }
    /**
     * 新增数据
     *
     * @param comPropertyEquipmentVO 实体对象
     * @return 新增结果
     */
    @ApiOperation(value = "新增")
    @PostMapping
    public R insert(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) {
        comPropertyEquipmentVO.setCommunityId(this.getCommunityId());
        comPropertyEquipmentVO.setCreateTime(DateUtil.date());
        return propertyService.comPropertyEquipmentInsert(comPropertyEquipmentVO);
    }
    /**
     * 修改数据
     *
     * @param comPropertyEquipmentVO 实体对象
     * @return 修改结果
     */
    @ApiOperation(value = "修改")
    @PostMapping("/update")
    public R update(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) {
        return propertyService.comPropertyEquipmentUpdate(comPropertyEquipmentVO);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation(value = "删除")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return propertyService.comPropertyEquipmentDelete(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyAlarmApi.java
@@ -1,13 +1,16 @@
package com.panzhihua.service_property.api;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO;
import com.panzhihua.service_property.entity.ComPropertyAlarm;
import com.panzhihua.service_property.service.ComPropertyAlarmService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -34,8 +37,8 @@
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @GetMapping("queryAll")
    public R selectAll(CommonPage commonPage) {
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.comPropertyAlarmService.pageList(commonPage);
    }
@@ -47,28 +50,33 @@
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Integer id) {
        return R.ok(this.comPropertyAlarmService.getById(id));
        return this.comPropertyAlarmService.selectDetail(id);
    }
    /**
     * 新增数据
     *
     * @param comPropertyAlarm 实体对象
     * @param comPropertyAlarmVO 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody ComPropertyAlarm comPropertyAlarm) {
    public R insert(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) {
        ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm();
        BeanUtils.copyProperties(comPropertyAlarmVO,comPropertyAlarm);
        comPropertyAlarm.setCreateTime(DateUtil.date());
        return R.ok(this.comPropertyAlarmService.save(comPropertyAlarm));
    }
    /**
     * 修改数据
     *
     * @param comPropertyAlarm 实体对象
     * @param comPropertyAlarmVO 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody ComPropertyAlarm comPropertyAlarm) {
    public R update(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) {
        ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm();
        BeanUtils.copyProperties(comPropertyAlarmVO,comPropertyAlarm);
        return R.ok(this.comPropertyAlarmService.updateById(comPropertyAlarm));
    }
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyAlarmSettingApi.java
New file
@@ -0,0 +1,59 @@
package com.panzhihua.service_property.api;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO;
import com.panzhihua.service_property.entity.ComPropertyAlarmSetting;
import com.panzhihua.service_property.service.ComPropertyAlarmSettingService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * (ComPropertyAlarmSetting)表控制层
 *
 * @author makejava
 * @since 2021-09-09 09:46:51
 */
@RestController
@RequestMapping("comPropertyAlarmSetting")
public class ComPropertyAlarmSettingApi {
    /**
     * 服务对象
     */
    @Resource
    private ComPropertyAlarmSettingService comPropertyAlarmSettingService;
    /**
     * 通过主键查询单条数据
     *
     * @param communityId 主键
     * @return 单条数据
     */
    @GetMapping
    public R selectOne(@RequestParam("communityId") Long communityId) {
        return this.comPropertyAlarmSettingService.getByCommunityId(communityId);
    }
    /**
     * 新增数据
     *
     * @param comPropertyAlarmSettingVO 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody ComPropertyAlarmSettingVO comPropertyAlarmSettingVO) {
        ComPropertyAlarmSetting comPropertyAlarmSetting=new ComPropertyAlarmSetting();
        BeanUtils.copyProperties(comPropertyAlarmSettingVO,comPropertyAlarmSetting);
        comPropertyAlarmSetting.setCreateTime(DateUtil.date());
        return R.ok(this.comPropertyAlarmSettingService.saveOrUpdate(comPropertyAlarmSetting));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyEquipmentApi.java
@@ -3,10 +3,13 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO;
import com.panzhihua.service_property.entity.ComPropertyEquipment;
import com.panzhihua.service_property.service.ComPropertyEquipmentService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -30,14 +33,12 @@
    /**
     * 分页查询所有数据
     *
     * @param page                 分页对象
     * @param comPropertyEquipment 查询实体
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @GetMapping("queryAll")
    public R selectAll(Page<ComPropertyEquipment> page, ComPropertyEquipment comPropertyEquipment) {
        return R.ok(this.comPropertyEquipmentService.page(page, new QueryWrapper<>(comPropertyEquipment)));
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.comPropertyEquipmentService.pageList(commonPage);
    }
    /**
@@ -54,22 +55,26 @@
    /**
     * 新增数据
     *
     * @param comPropertyEquipment 实体对象
     * @param comPropertyEquipmentVO 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody ComPropertyEquipment comPropertyEquipment) {
        return R.ok(this.comPropertyEquipmentService.save(comPropertyEquipment));
    public R insert(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) {
        ComPropertyEquipment comPropertyEquipment=new ComPropertyEquipment();
        BeanUtils.copyProperties(comPropertyEquipmentVO,comPropertyEquipment);
        return this.comPropertyEquipmentService.insert(comPropertyEquipment);
    }
    /**
     * 修改数据
     *
     * @param comPropertyEquipment 实体对象
     * @param comPropertyEquipmentVO 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody ComPropertyEquipment comPropertyEquipment) {
    public R update(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) {
        ComPropertyEquipment comPropertyEquipment=new ComPropertyEquipment();
        BeanUtils.copyProperties(comPropertyEquipmentVO,comPropertyEquipment);
        return R.ok(this.comPropertyEquipmentService.updateById(comPropertyEquipment));
    }
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyAlarmDao.java
@@ -18,4 +18,5 @@
@Mapper
public interface ComPropertyAlarmDao extends BaseMapper<ComPropertyAlarm> {
    IPage<ComPropertyAlarmVO> selectList(Page page, @Param("commonPage") CommonPage commonPage);
    ComPropertyAlarmVO selectById(Integer id);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyAlarmSettingDao.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.service_property.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_property.entity.ComPropertyAlarmSetting;
/**
 * (ComPropertyAlarmSetting)表数据库访问层
 *
 * @author makejava
 * @since 2021-09-09 09:46:50
 */
@Mapper
public interface ComPropertyAlarmSettingDao extends BaseMapper<ComPropertyAlarmSetting> {
    ComPropertyAlarmSetting getByCommunityId(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyEquipmentDao.java
@@ -1,8 +1,12 @@
package com.panzhihua.service_property.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.property.CommonPage;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_property.entity.ComPropertyEquipment;
import org.apache.ibatis.annotations.Param;
/**
 * (ComPropertyEquipment)表数据库访问层
@@ -12,5 +16,5 @@
 */
@Mapper
public interface ComPropertyEquipmentDao extends BaseMapper<ComPropertyEquipment> {
    IPage<ComPropertyEquipment> pageList(Page page, @Param("commonPage") CommonPage commonPage);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyAlarm.java
@@ -51,6 +51,48 @@
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 手机号
     */
    @ApiModelProperty("手机号")
    private String phone;
    /**
     *居民姓名
     */
    @ApiModelProperty("居民姓名")
    private String name;
    /**
     * 报警处理状态 0待处理 1已办结
     */
    @ApiModelProperty("处理状态")
    private Integer status;
    /**
     * 处理人id
     */
    @ApiModelProperty("处理人id")
    private Long solveId;
    /**
     * 处理时间
     */
    @ApiModelProperty(value = "处理时间")
    private Date solveTime;
    /**
     * 处理内容
     */
    @ApiModelProperty(value = "处理内容")
    private String solveContent;
    /**
     * 社区id
     */
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    public interface  type{
        int one=1;
        int time=2;
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyAlarmSetting.java
New file
@@ -0,0 +1,54 @@
package com.panzhihua.service_property.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * (ComPropertyAlarmSetting)表实体类
 *
 * @author makejava
 * @since 2021-09-09 09:46:49
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("")
public class ComPropertyAlarmSetting implements Serializable {
    private static final long serialVersionUID = 793830057265779177L;
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 触发间隔
     */
    @ApiModelProperty(value = "触发间隔")
    private Integer triggerTime;
    /**
     * 社区id
     */
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyEquipment.java
@@ -44,9 +44,44 @@
    private String position;
    /**
     * 物业id
     * 社区id
     */
    @ApiModelProperty(value = "物业id")
    private Integer propertyId;
    @ApiModelProperty(value = "社区id")
    private Integer communityId;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String longitude;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String latitude;
    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称")
    private String name;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 居民名称
     */
    @ApiModelProperty(value = "居民名称")
    private String username;
    /**
     * 设备类型 设备类型 1红外报警 2一键报警
     */
    @ApiModelProperty("设备类型 设备类型 1红外报警 2一键报警")
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/netty/NettyServerHandler.java
@@ -10,6 +10,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Date;
@@ -18,6 +19,8 @@
public class NettyServerHandler extends ChannelInboundHandlerAdapter {
    @Resource
    private ComPropertyAlarmDao comPropertyAlarmDao;
    private static NettyServerHandler nettyServerHandler;
    /**
     * 客户端连接会触发
     */
@@ -40,13 +43,13 @@
            myTools.writeToClient("404A01"+ DateUtils.getDateFormatString(new Date(),"HHmmss")+"23",ctx,"心跳包");
        }
        if(msg.toString().startsWith("4A1803")){
            String serial=msg.toString().substring(12,22);
            String serial=msg.toString().substring(14,24);
            myTools.writeToClient("404A03"+msg.toString().substring(msg.toString().length()-2)+"23",ctx,"事件包");
            ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm();
            comPropertyAlarm.setCreateTime(DateUtil.date());
            comPropertyAlarm.setSerialNo(serial);
            comPropertyAlarm.setType(ComPropertyAlarm.type.one);
            comPropertyAlarmDao.insert(comPropertyAlarm);
            nettyServerHandler.comPropertyAlarmDao.insert(comPropertyAlarm);
        }
        ctx.flush();
    }
@@ -59,4 +62,10 @@
        cause.printStackTrace();
        ctx.close();
    }
    @PostConstruct
    public void init() {
        nettyServerHandler=this;
        nettyServerHandler.comPropertyAlarmDao=this.comPropertyAlarmDao;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmService.java
@@ -18,4 +18,9 @@
     * @return
     */
    R pageList(CommonPage commonPage);
    /**
     * 查询报警详情
     */
    R selectDetail(Integer id);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmSettingService.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.service_property.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_property.entity.ComPropertyAlarmSetting;
/**
 * (ComPropertyAlarmSetting)表服务接口
 *
 * @author makejava
 * @since 2021-09-09 09:46:50
 */
public interface ComPropertyAlarmSettingService extends IService<ComPropertyAlarmSetting> {
    R pageList(CommonPage commonPage);
    R getByCommunityId(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyEquipmentService.java
@@ -1,6 +1,8 @@
package com.panzhihua.service_property.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_property.entity.ComPropertyEquipment;
/**
@@ -10,5 +12,6 @@
 * @since 2021-09-07 13:29:32
 */
public interface ComPropertyEquipmentService extends IService<ComPropertyEquipment> {
    R pageList(CommonPage commonPage);
    R insert(ComPropertyEquipment comPropertyEquipment);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmServiceImpl.java
@@ -30,4 +30,9 @@
        IPage<ComPropertyAlarmVO> page=comPropertyAlarmDao.selectList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage);
        return R.ok(page);
    }
    @Override
    public R selectDetail(Integer id) {
        return R.ok(comPropertyAlarmDao.selectById(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmSettingServiceImpl.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.service_property.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_property.entity.ComPropertyAlarmSetting;
import com.panzhihua.service_property.dao.ComPropertyAlarmSettingDao;
import com.panzhihua.service_property.service.ComPropertyAlarmSettingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
 * (ComPropertyAlarmSetting)表服务实现类
 *
 * @author makejava
 * @since 2021-09-09 09:46:50
 */
@Slf4j
@Service
public class ComPropertyAlarmSettingServiceImpl extends ServiceImpl<ComPropertyAlarmSettingDao, ComPropertyAlarmSetting> implements ComPropertyAlarmSettingService {
    @Resource
    private ComPropertyAlarmSettingDao comPropertyAlarmSettingDao;
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
    }
    @Override
    public R getByCommunityId(Long communityId) {
        return R.ok(comPropertyAlarmSettingDao.getByCommunityId(communityId));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyEquipmentServiceImpl.java
@@ -1,11 +1,19 @@
package com.panzhihua.service_property.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_property.entity.ComPropertyEquipment;
import com.panzhihua.service_property.dao.ComPropertyEquipmentDao;
import com.panzhihua.service_property.service.ComPropertyEquipmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * (ComPropertyEquipment)表服务实现类
@@ -16,5 +24,23 @@
@Slf4j
@Service
public class ComPropertyEquipmentServiceImpl extends ServiceImpl<ComPropertyEquipmentDao, ComPropertyEquipment> implements ComPropertyEquipmentService {
    @Resource
    private ComPropertyEquipmentDao comPropertyEquipmentDao;
    @Override
    public R pageList(CommonPage commonPage) {
        IPage<ComPropertyEquipment> page=comPropertyEquipmentDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage);
        return R.ok(page);
    }
    @Override
    public R insert(ComPropertyEquipment comPropertyEquipment) {
        if(comPropertyEquipment!=null){
            List<ComPropertyEquipment> comPropertyEquipmentList=comPropertyEquipmentDao.selectList(new QueryWrapper<ComPropertyEquipment>().eq("serial_no",comPropertyEquipment.getSerialNo()));
            if(comPropertyEquipmentList.isEmpty()){
                return R.ok(this.save(comPropertyEquipment));
            }
            return R.fail("设备编号不能重复");
        }
        return R.fail();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmMapper.xml
@@ -7,20 +7,59 @@
        <result property="serialNo" column="serial_no"/>
        <result property="type" column="type"/>
        <result property="createTime" column="create_time"/>
        <result property="phone" column="phone"/>
        <result property="name" column="name"/>
        <result property="status" column="status"/>
        <result property="solveId" column="solve_id"/>
        <result property="solveTime" column="solve_time"/>
        <result property="solveContent" column="solve_content"/>
        <result property="communityId" column="community_id"/>
    </resultMap>
    <select id="selectList" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO">
        select t.*,t1.positon  from com_property_Alarm t left join com_property_equipment t1 on t.serial_no = t1.serial_no
        select t.*,t1.position,t2.name as solveName from com_property_Alarm t
        left join com_property_equipment t1 on t.serial_no = t1.serial_no
        left join sys_user t2 on t.solve_id = user_id
        <where>
            1=1
            <if test="commonPage.paramId !=null">
                and t.property_id =#{commonPage.paramId}
                and t.community_id =#{commonPage.paramId}
            </if>
            <if test="commonPage.type !=null">
                and t.type =#{commonPage.type}
            </if>
            <if test="commonPage.status !=null">
                and t.status =#{commonPage.status}
            </if>
            <if test="commonPage.address !=null and commonPage.address !=''">
                and t1.position like concat(#{commonPage.address},'%')
            </if>
            <if test="commonPage.username !=null and commonPage.username !=''">
                and t.name like concat(#{commonPage.username},'%')
            </if>
            <if test="commonPage.beginTime !=null">
                and t.create_time >=#{commonPage.beginTime}
            </if>
            <if test="commonPage.statusBeginTime !=null">
                and t.solve_time >=#{commonPage.statusBeginTime}
            </if>
            <if test="commonPage.endTime !=null">
                and #{commonPage.endTime} >=t.create_time
            </if>
            <if test="commonPage.statusEndTime !=null">
                and #{commonPage.statusEndTime} >=t.solve_time
            </if>
        </where>
        order by create_time desc
        order by t.create_time desc
    </select>
    <select id="selectById" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO">
        select t.*, t1.position, t2.name as solveName
        from com_property_Alarm t
                 left join com_property_equipment t1 on t.serial_no = t1.serial_no
                 left join sys_user t2 on t.solve_id = user_id
        where t.id=#{id}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmSettingMapper.xml
New file
@@ -0,0 +1,17 @@
<?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.panzhihua.service_property.dao.ComPropertyAlarmSettingDao">
    <resultMap type="com.panzhihua.service_property.entity.ComPropertyAlarmSetting"
               id="ComPropertyAlarmSettingBaseResultMap">
        <result property="id" column="id"/>
        <result property="triggerTime" column="trigger_time"/>
        <result property="communityId" column="community_id"/>
        <result property="createTime" column="create_time"/>
    </resultMap>
    <select id="getByCommunityId" resultMap="ComPropertyAlarmSettingBaseResultMap">
        select * from com_property_alarm_setting where community_id =#{community_id} order by create_time desc limit 1
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyEquipmentMapper.xml
@@ -6,7 +6,31 @@
        <result property="id" column="id"/>
        <result property="serialNo" column="serial_no"/>
        <result property="position" column="position"/>
        <result property="propertyId" column="property_id"/>
        <result property="communityId" column="community_id"/>
        <result property="longitude" column="longitude"/>
        <result property="latitude" column="latitude"/>
        <result property="name" column="name"/>
        <result property="createTime" column="create_time"/>
        <result property="type" column="type"/>
        <result property="username" column="username"/>
    </resultMap>
    <select id="pageList" resultMap="ComPropertyEquipmentBaseResultMap">
        select * from com_property_equipment
        <where>
            1=1
            <if test="commonPage.type!=null">
                and type =#{commonPage.type}
            </if>
            <if test="commonPage.name!=null and commonPage.name!=''">
                and name like concat(#{commonPage.name},'%')
            </if>
            <if test="commonPage.serialNo!=null and commonPage.serialNo!=''">
                and serial_no like concat(#{commonPage.serialNo},'%')
            </if>
            <if test="commonPage.address!=null and commonPage.address!=''">
                and position like concat(#{commonPage.address},'%')
            </if>
        </where>
    </select>
</mapper>