101captain
2021-09-10 1548b7d4e9b18adb5c0e84d0142be20725dbfcf7
修改报警相关功能
11个文件已修改
1个文件已添加
99 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyRepairVO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyAlarmSettingApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/MybatisPlusConfig.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyRepairDao.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyRepair.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmSettingService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyRepairService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmSettingServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyRepairServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java
@@ -31,6 +31,7 @@
    @ApiOperation("小程序列表接口")
    @PostMapping("/queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setUserId(this.getUserId());
        return this.propertyService.comPropertyRepairSelectAll(commonPage);
    }
@@ -44,6 +45,7 @@
    public R insert(@RequestBody ComPropertyRepairVO comPropertyRepairVO) {
        comPropertyRepairVO.setCreateTime(DateUtil.date());
        comPropertyRepairVO.setCreateBy(this.getUserId());
        comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dcl);
        return this.propertyService.comPropertyRepairInsert(comPropertyRepairVO);
    }
@@ -59,9 +61,11 @@
        if(comPropertyRepairVO!=null&& StringUtils.isNotEmpty(comPropertyRepairVO.getFeedbackContent())){
            comPropertyRepairVO.setFeedbackBy(this.getUserId());
            comPropertyRepairVO.setFeedbackTime(DateUtil.date());
            comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dpj);
        }
        if(comPropertyRepairVO!=null&&StringUtils.isNotEmpty(comPropertyRepairVO.getReplyContent())){
            comPropertyRepairVO.setReplyTime(DateUtil.date());
            comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.yjs);
        }
        return this.propertyService.comPropertyRepairUpdate(comPropertyRepairVO);
    }
@@ -78,4 +82,16 @@
        return this.propertyService.comPropertyRepairSelectOne(id);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation("删除接口")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return this.propertyService.comPropertyRepairDelete(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyRepairVO.java
@@ -117,4 +117,13 @@
     */
    @ApiModelProperty(value = "反馈人名称")
    private String feedback;
    /**
     * 状态 0 待处理 1待评价 2已结束
     */
    public interface status{
        int dcl=0;
        int dpj=1;
        int yjs=2;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyAlarmSettingApi.java
@@ -54,6 +54,6 @@
        ComPropertyAlarmSetting comPropertyAlarmSetting=new ComPropertyAlarmSetting();
        BeanUtils.copyProperties(comPropertyAlarmSettingVO,comPropertyAlarmSetting);
        comPropertyAlarmSetting.setCreateTime(DateUtil.date());
        return R.ok(this.comPropertyAlarmSettingService.saveOrUpdate(comPropertyAlarmSetting));
        return R.ok(this.comPropertyAlarmSettingService.insert(comPropertyAlarmSetting));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java
@@ -43,7 +43,7 @@
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Integer id) {
        return R.ok(this.comPropertyRepairService.getById(id));
        return this.comPropertyRepairService.selectDetail(id);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/MybatisPlusConfig.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.service_property.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 分页
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2020-11-30 16:26
 **/
@Configuration
public class MybatisPlusConfig {
    /**
     * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除)
     */
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return configuration -> configuration.setUseDeprecatedExecutor(false);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyRepairDao.java
@@ -21,4 +21,5 @@
@Mapper
public interface ComPropertyRepairDao extends BaseMapper<ComPropertyRepair> {
    IPage<ComPropertyRepairVO> pageList(Page page, @Param("commonPage") CommonPage commonPage);
    ComPropertyRepairVO selectDetail(Integer id);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyRepair.java
@@ -97,13 +97,13 @@
     * 报修人id
     */
    @ApiModelProperty(value = "报修人id")
    private Integer createBy;
    private Long createBy;
    /**
     * 反馈人id
     */
    @ApiModelProperty(value = "反馈人id")
    private Integer feedbackBy;
    private Long feedbackBy;
    /**
     * 反馈内容
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmSettingService.java
@@ -14,4 +14,5 @@
public interface ComPropertyAlarmSettingService extends IService<ComPropertyAlarmSetting> {
    R pageList(CommonPage commonPage);
    R getByCommunityId(Long communityId);
    R insert(ComPropertyAlarmSetting comPropertyAlarmSetting);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyRepairService.java
@@ -19,4 +19,9 @@
     * @return
     */
    R pageList(CommonPage commonPage);
    /**
     * 详情查询
     */
    R selectDetail(Integer id);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmSettingServiceImpl.java
@@ -7,6 +7,7 @@
import com.panzhihua.service_property.dao.ComPropertyAlarmSettingDao;
import com.panzhihua.service_property.service.ComPropertyAlarmSettingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +23,8 @@
public class ComPropertyAlarmSettingServiceImpl extends ServiceImpl<ComPropertyAlarmSettingDao, ComPropertyAlarmSetting> implements ComPropertyAlarmSettingService {
    @Resource
    private ComPropertyAlarmSettingDao comPropertyAlarmSettingDao;
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
@@ -31,4 +34,17 @@
    public R getByCommunityId(Long communityId) {
        return R.ok(comPropertyAlarmSettingDao.getByCommunityId(communityId));
    }
    @Override
    public R insert(ComPropertyAlarmSetting comPropertyAlarmSetting) {
        boolean result=this.saveOrUpdate(comPropertyAlarmSetting);
        if(result){
            if(stringRedisTemplate.hasKey(comPropertyAlarmSetting.getCommunityId().toString())){
                stringRedisTemplate.boundValueOps(comPropertyAlarmSetting.getCommunityId().toString()).set(comPropertyAlarmSetting.getTriggerTime().toString());
            }
            return R.ok();
        }
        return R.fail();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyRepairServiceImpl.java
@@ -31,4 +31,9 @@
        IPage<ComPropertyRepairVO> list=comPropertyRepairDao.pageList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage);
        return R.ok(list);
    }
    @Override
    public R selectDetail(Integer id) {
        return R.ok(comPropertyRepairDao.selectDetail(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml
@@ -57,4 +57,8 @@
        </where>
    </select>
    <select id="selectDetail" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO">
        select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id where t.id=#{id}
    </select>
</mapper>