From a656c28de35fd7027511cfd960d1c85c9a0b56a9 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 28 Nov 2023 18:10:30 +0800
Subject: [PATCH] 便民热线
---
src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java | 6
src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml | 49 +
src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml | 46 +
src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java | 12
src/main/java/org/springblade/modules/convenienceHotline/dto/ConvenienceHotlineDTO.java | 34 +
src/main/java/org/springblade/modules/convenienceHotline/service/IConvenienceHotlineService.java | 43 ++
src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java | 14
src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java | 2
src/main/java/org/springblade/modules/article/entity/ArticleCommentEntity.java | 6
src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java | 9
src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java | 68 +++
src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.xml | 15
src/main/java/org/springblade/modules/discuss/controller/TopicsController.java | 15
src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java | 8
src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java | 4
src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml | 6
src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java | 2
src/main/java/sql/conveniencehotline.menu.sql | 10
src/main/java/org/springblade/modules/convenienceHotline/controller/ConvenienceHotlineController.java | 126 +++++++
src/main/java/org/springblade/modules/convenienceHotline/vo/ConvenienceHotlineVO.java | 35 +
src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java | 5
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml | 97 ++++
src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java | 1
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml | 2
src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java | 6
src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java | 171 +++------
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java | 2
src/main/java/org/springblade/modules/convenienceHotline/wrapper/ConvenienceHotlineWrapper.java | 50 ++
src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java | 2
src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java | 4
src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java | 6
src/main/java/org/springblade/modules/convenienceHotline/entity/ConvenienceHotlineEntity.java | 70 +++
src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java | 31 +
src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.java | 43 ++
src/main/java/org/springblade/modules/convenienceHotline/service/impl/ConvenienceHotlineServiceImpl.java | 43 ++
35 files changed, 853 insertions(+), 190 deletions(-)
diff --git a/src/main/java/org/springblade/modules/article/entity/ArticleCommentEntity.java b/src/main/java/org/springblade/modules/article/entity/ArticleCommentEntity.java
index bb3b1bc..f84f402 100644
--- a/src/main/java/org/springblade/modules/article/entity/ArticleCommentEntity.java
+++ b/src/main/java/org/springblade/modules/article/entity/ArticleCommentEntity.java
@@ -16,10 +16,7 @@
*/
package org.springblade.modules.article.entity;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@@ -129,6 +126,7 @@
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("创建时间")
+ @TableField(value = "create_time", fill = FieldFill.INSERT)
private Date createTime;
diff --git a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
index f7c1104..fa4fa6b 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -139,6 +139,8 @@
AND CONCAT(title,source_name)
LIKE CONCAT ('%', #{article.keyword},'%')
</if>
+
+ and is_deleted = 0
order by id desc
</select>
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/controller/ConvenienceHotlineController.java b/src/main/java/org/springblade/modules/convenienceHotline/controller/ConvenienceHotlineController.java
new file mode 100644
index 0000000..bb57e75
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/controller/ConvenienceHotlineController.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
+import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
+import org.springblade.modules.convenienceHotline.wrapper.ConvenienceHotlineWrapper;
+import org.springblade.modules.convenienceHotline.service.IConvenienceHotlineService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 热线表 控制器
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-convenienceHotline/convenienceHotline")
+@Api(value = "热线表", tags = "热线表接口")
+public class ConvenienceHotlineController extends BladeController {
+
+ private final IConvenienceHotlineService convenienceHotlineService;
+
+ /**
+ * 热线表 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入convenienceHotline")
+ public R<ConvenienceHotlineVO> detail(ConvenienceHotlineEntity convenienceHotline) {
+ ConvenienceHotlineEntity detail = convenienceHotlineService.getOne(Condition.getQueryWrapper(convenienceHotline));
+ return R.data(ConvenienceHotlineWrapper.build().entityVO(detail));
+ }
+ /**
+ * 热线表 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入convenienceHotline")
+ public R<IPage<ConvenienceHotlineVO>> list(ConvenienceHotlineEntity convenienceHotline, Query query) {
+ IPage<ConvenienceHotlineEntity> pages = convenienceHotlineService.page(Condition.getPage(query), Condition.getQueryWrapper(convenienceHotline));
+ return R.data(ConvenienceHotlineWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 热线表 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入convenienceHotline")
+ public R<IPage<ConvenienceHotlineVO>> page(ConvenienceHotlineVO convenienceHotline, Query query) {
+ IPage<ConvenienceHotlineVO> pages = convenienceHotlineService.selectConvenienceHotlinePage(Condition.getPage(query), convenienceHotline);
+ return R.data(pages);
+ }
+
+ /**
+ * 热线表 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入convenienceHotline")
+ public R save(@Valid @RequestBody ConvenienceHotlineEntity convenienceHotline) {
+ return R.status(convenienceHotlineService.save(convenienceHotline));
+ }
+
+ /**
+ * 热线表 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入convenienceHotline")
+ public R update(@Valid @RequestBody ConvenienceHotlineEntity convenienceHotline) {
+ return R.status(convenienceHotlineService.updateById(convenienceHotline));
+ }
+
+ /**
+ * 热线表 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入convenienceHotline")
+ public R submit(@Valid @RequestBody ConvenienceHotlineEntity convenienceHotline) {
+ return R.status(convenienceHotlineService.saveOrUpdate(convenienceHotline));
+ }
+
+ /**
+ * 热线表 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(convenienceHotlineService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/dto/ConvenienceHotlineDTO.java b/src/main/java/org/springblade/modules/convenienceHotline/dto/ConvenienceHotlineDTO.java
new file mode 100644
index 0000000..a7e6d93
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/dto/ConvenienceHotlineDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.dto;
+
+import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 热线表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ConvenienceHotlineDTO extends ConvenienceHotlineEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/entity/ConvenienceHotlineEntity.java b/src/main/java/org/springblade/modules/convenienceHotline/entity/ConvenienceHotlineEntity.java
new file mode 100644
index 0000000..0103f33
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/entity/ConvenienceHotlineEntity.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 热线表 实体类
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+@Data
+@TableName("jczz_convenience_hotline")
+@ApiModel(value = "ConvenienceHotline对象", description = "热线表")
+public class ConvenienceHotlineEntity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+ /**
+ * 主键
+ */
+ @ApiModelProperty(value = "主键ID", example = "")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 名称
+ */
+ @ApiModelProperty(value = "名称", example = "")
+ @TableField("name")
+ private String name;
+
+ /**
+ * 电话号码
+ */
+ @ApiModelProperty(value = "电话号码", example = "")
+ @TableField("telephone")
+ private String telephone;
+
+ /**
+ * 备注
+ */
+ @ApiModelProperty(value = "备注", example = "")
+ @TableField("remark")
+ private String remark;
+}
+
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.java b/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.java
new file mode 100644
index 0000000..d21c58d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.mapper;
+
+import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
+import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 热线表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+public interface ConvenienceHotlineMapper extends BaseMapper<ConvenienceHotlineEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param convenienceHotline
+ * @return
+ */
+ List<ConvenienceHotlineVO> selectConvenienceHotlinePage(IPage page, ConvenienceHotlineVO convenienceHotline);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.xml b/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.xml
new file mode 100644
index 0000000..904b724
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/mapper/ConvenienceHotlineMapper.xml
@@ -0,0 +1,15 @@
+<?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="org.springblade.modules.convenienceHotline.mapper.ConvenienceHotlineMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="convenienceHotlineResultMap" type="org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity">
+ </resultMap>
+
+
+ <select id="selectConvenienceHotlinePage" resultMap="convenienceHotlineResultMap">
+ select * from jczz_convenience_hotline
+ </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/service/IConvenienceHotlineService.java b/src/main/java/org/springblade/modules/convenienceHotline/service/IConvenienceHotlineService.java
new file mode 100644
index 0000000..5c263f2
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/service/IConvenienceHotlineService.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
+import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 热线表 服务类
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+public interface IConvenienceHotlineService extends IService<ConvenienceHotlineEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param convenienceHotline
+ * @return
+ */
+ IPage<ConvenienceHotlineVO> selectConvenienceHotlinePage(IPage<ConvenienceHotlineVO> page, ConvenienceHotlineVO convenienceHotline);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/service/impl/ConvenienceHotlineServiceImpl.java b/src/main/java/org/springblade/modules/convenienceHotline/service/impl/ConvenienceHotlineServiceImpl.java
new file mode 100644
index 0000000..973d8f8
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/service/impl/ConvenienceHotlineServiceImpl.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
+import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
+import org.springblade.modules.convenienceHotline.mapper.ConvenienceHotlineMapper;
+import org.springblade.modules.convenienceHotline.service.IConvenienceHotlineService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 热线表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+@Service
+public class ConvenienceHotlineServiceImpl extends ServiceImpl<ConvenienceHotlineMapper, ConvenienceHotlineEntity> implements IConvenienceHotlineService {
+
+ @Override
+ public IPage<ConvenienceHotlineVO> selectConvenienceHotlinePage(IPage<ConvenienceHotlineVO> page, ConvenienceHotlineVO convenienceHotline) {
+ return page.setRecords(baseMapper.selectConvenienceHotlinePage(page, convenienceHotline));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/vo/ConvenienceHotlineVO.java b/src/main/java/org/springblade/modules/convenienceHotline/vo/ConvenienceHotlineVO.java
new file mode 100644
index 0000000..786b8fe
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/vo/ConvenienceHotlineVO.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.vo;
+
+import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 热线表 视图实体类
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ConvenienceHotlineVO extends ConvenienceHotlineEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/convenienceHotline/wrapper/ConvenienceHotlineWrapper.java b/src/main/java/org/springblade/modules/convenienceHotline/wrapper/ConvenienceHotlineWrapper.java
new file mode 100644
index 0000000..f69e1d1
--- /dev/null
+++ b/src/main/java/org/springblade/modules/convenienceHotline/wrapper/ConvenienceHotlineWrapper.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.convenienceHotline.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.convenienceHotline.entity.ConvenienceHotlineEntity;
+import org.springblade.modules.convenienceHotline.vo.ConvenienceHotlineVO;
+import java.util.Objects;
+
+/**
+ * 热线表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-11-27
+ */
+public class ConvenienceHotlineWrapper extends BaseEntityWrapper<ConvenienceHotlineEntity, ConvenienceHotlineVO> {
+
+ public static ConvenienceHotlineWrapper build() {
+ return new ConvenienceHotlineWrapper();
+ }
+
+ @Override
+ public ConvenienceHotlineVO entityVO(ConvenienceHotlineEntity convenienceHotline) {
+ ConvenienceHotlineVO convenienceHotlineVO = Objects.requireNonNull(BeanUtil.copy(convenienceHotline, ConvenienceHotlineVO.class));
+
+ //User createUser = UserCache.getUser(convenienceHotline.getCreateUser());
+ //User updateUser = UserCache.getUser(convenienceHotline.getUpdateUser());
+ //convenienceHotlineVO.setCreateUserName(createUser.getName());
+ //convenienceHotlineVO.setUpdateUserName(updateUser.getName());
+
+ return convenienceHotlineVO;
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java b/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
index e28d3f3..aa48157 100644
--- a/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
+++ b/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
@@ -25,16 +25,19 @@
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
import org.springblade.modules.discuss.dto.TopicsDTO;
import org.springblade.modules.discuss.entity.TopicsEntity;
+import org.springblade.modules.discuss.entity.UserTopicsEntity;
import org.springblade.modules.discuss.service.ITopicsService;
+import org.springblade.modules.discuss.service.IUserTopicsService;
import org.springblade.modules.discuss.vo.TopicsVO;
import org.springblade.modules.discuss.wrapper.TopicsWrapper;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -115,16 +118,6 @@
return R.status(topicsService.updateById(topics));
}
-
- /**
- * 议题表 修改
- */
- @PostMapping("/updateBath")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "批量更新", notes = "传入topics")
- public R updateBath(@Valid @RequestBody List<TopicsEntity> topics) {
- return R.status(topicsService.updateBatchById(topics));
- }
/**
* 议题表 新增或修改
diff --git a/src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java b/src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java
index 11162c2..9088243 100644
--- a/src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java
+++ b/src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java
@@ -16,25 +16,27 @@
*/
package org.springblade.modules.discuss.controller;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.discuss.entity.TopicsEntity;
import org.springblade.modules.discuss.entity.UserTopicsEntity;
+import org.springblade.modules.discuss.service.ITopicsService;
+import org.springblade.modules.discuss.service.IUserTopicsService;
import org.springblade.modules.discuss.vo.UserTopicsVO;
import org.springblade.modules.discuss.wrapper.UserTopicsWrapper;
-import org.springblade.modules.discuss.service.IUserTopicsService;
-import org.springblade.core.boot.ctrl.BladeController;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
/**
* 用户议题报表 控制器
@@ -122,5 +124,18 @@
return R.status(userTopicsService.removeByIds(Func.toLongList(ids)));
}
+ /**
+ * 议题表 修改
+ */
+ @PostMapping("/updateBath")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "批量更新", notes = "传入topics")
+ public R updateBath(@Valid @RequestBody List<TopicsEntity> topics) {
+
+ Boolean result = userTopicsService.batchSave(topics);
+
+ return R.status(result);
+ }
+
}
diff --git a/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java b/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
index c192639..4f7e164 100644
--- a/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
+++ b/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
@@ -35,4 +35,6 @@
private List<TopicsDTO> children;
+ private Long UserId;
+
}
diff --git a/src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java b/src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java
index 15c613f..21fd3fa 100644
--- a/src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java
+++ b/src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java
@@ -87,5 +87,9 @@
@TableField("public_discuss_id")
private Integer publicDiscussId;
+ @ApiModelProperty(value = "选项内容", example = "")
+ @TableField("selected")
+ private String selected;
+
}
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml
index c49a80e..23e43a5 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml
+++ b/src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml
@@ -63,9 +63,9 @@
appoint_user,
user_ids,
event_type,
- (SELECT count(1) FROM jczz_user_public_enroll where public_discuss_id = id) enrollCount,
- (SELECT count(1) FROM jczz_user_topics where public_discuss_id = id) topsCount
- from jczz_public_discuss
+ (SELECT count(1) FROM jczz_user_public_enroll where public_discuss_id = jpd.id) enrollCount,
+ (SELECT count(1) from (SELECT * FROM jczz_user_topics WHERE public_discuss_id = jpd.id GROUP BY user_id ) a) topsCount
+ from jczz_public_discuss jpd
<where>
<if test="publicDiscuss.id != null "> and id = #{publicDiscuss.id}</if>
<if test="publicDiscuss.title != null and publicDiscuss.title != ''"> and title = #{publicDiscuss.title}</if>
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
index d6a9c95..c95330c 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
+++ b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
@@ -73,22 +73,38 @@
</select>
<select id="selectTopicsList" parameterType="org.springblade.modules.discuss.dto.TopicsDTO" resultMap="TopicsDTOResult">
- <include refid="selectTopics"/>
+ SELECT
+ jt.id,
+ jt.discuss_content,
+ jt.option_range,
+ jt.sort,
+ jt.option_content,
+ jt.option_detail,
+ jt.number,
+ jt.create_time,
+ jt.update_time,
+ jt.delete_flag,
+ jt.public_discuss_id,
+ jt.parent_id,
+ jt.LEVEL,
+ ( SELECT jut.selected FROM jczz_user_topics jut WHERE jut.topics_id = jt.id AND jut.user_id = #{userId} ) selected
+ FROM
+ jczz_topics jt
<where>
- <if test="id != null "> and id = #{id}</if>
- <if test="discussContent != null and discussContent != ''"> and discuss_content = #{discussContent}</if>
- <if test="optionRange != null "> and option_range = #{optionRange}</if>
- <if test="sort != null "> and sort = #{sort}</if>
- <if test="optionContent != null and optionContent != ''"> and option_content = #{optionContent}</if>
- <if test="optionDetail != null and optionDetail != ''"> and option_detail = #{optionDetail}</if>
- <if test="number != null "> and number = #{number}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
- <if test="publicDiscussId != null "> and public_discuss_id = #{publicDiscussId}</if>
- <if test="parentId != null "> and parent_id = #{parentId}</if>
- <if test="level != null "> and level = #{level}</if>
- and delete_flag = 0
+ <if test="id != null "> and jt.id = #{id}</if>
+ <if test="discussContent != null and discussContent != ''"> and jt.discuss_content = #{discussContent}</if>
+ <if test="optionRange != null "> and jt.option_range = #{optionRange}</if>
+ <if test="sort != null "> and jt.sort = #{sort}</if>
+ <if test="optionContent != null and optionContent != ''"> and jt.option_content = #{optionContent}</if>
+ <if test="optionDetail != null and optionDetail != ''"> and jt.option_detail = #{optionDetail}</if>
+ <if test="number != null "> and jt.number = #{number}</if>
+ <if test="createTime != null "> and jt.create_time = #{createTime}</if>
+ <if test="updateTime != null "> and jt.update_time = #{updateTime}</if>
+ <if test="deleteFlag != null "> and jt.delete_flag = #{deleteFlag}</if>
+ <if test="publicDiscussId != null "> and jt.public_discuss_id = #{publicDiscussId}</if>
+ <if test="parentId != null "> and jt.parent_id = #{parentId}</if>
+ <if test="level != null "> and jt.level = #{level}</if>
+ and jt.delete_flag = 0
</where>
</select>
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
index 298221b..dbaeb36 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
+++ b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
@@ -3,14 +3,15 @@
<mapper namespace="org.springblade.modules.discuss.mapper.UserTopicsMapper">
<!-- 通用查询映射结果 -->
- <resultMap id="userTopicsResultMap" type="org.springblade.modules.discuss.entity.UserTopicsEntity">
- <result property="id" column="id" />
- <result property="userId" column="user_id" />
- <result property="topicsId" column="topics_id" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="deleteFlag" column="delete_flag" />
- <result property="publicDiscussId" column="public_discuss_id" />
+ <resultMap id="userTopicsResultMap" type="org.springblade.modules.discuss.vo.UserTopicsVO">
+ <result property="id" column="id"/>
+ <result property="userId" column="user_id"/>
+ <result property="topicsId" column="topics_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="deleteFlag" column="delete_flag"/>
+ <result property="publicDiscussId" column="public_discuss_id"/>
+ <result property="selected" column="selected"/>
</resultMap>
<sql id="selectUserTopics">
@@ -21,6 +22,7 @@
create_time,
update_time,
delete_flag,
+ selected,
public_discuss_id
from
jczz_user_topics
@@ -28,15 +30,30 @@
<select id="selectUserTopicsPage" resultMap="userTopicsResultMap">
- select * from jczz_user_topics
+ SELECT
+ jut.id,
+ jut.topics_id,
+ jut.public_discuss_id,
+ bu.avatar,
+ bu.`name`,
+ bu.phone,
+ jda.address_name,
+ jda.aoi_name
+ FROM
+ jczz_user_topics jut
+ LEFT JOIN blade_user bu ON jut.user_id = bu.id
+ LEFT JOIN jczz_household jh ON jh.associated_user_id = jut.user_id
+ LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
<where>
- <if test="userTopics.id != null "> and id = #{userTopics.id}</if>
- <if test="userTopics.userId != null "> and user_id = #{userTopics.userId}</if>
- <if test="userTopics.topicsId != null "> and topics_id = #{userTopics.topicsId}</if>
- <if test="userTopics.createTime != null "> and create_time = #{userTopics.createTime}</if>
- <if test="userTopics.updateTime != null "> and update_time = #{userTopics.updateTime}</if>
- <if test="userTopics.deleteFlag != null "> and delete_flag = #{userTopics.deleteFlag}</if>
- <if test="userTopics.publicDiscussId != null "> and public_discuss_id = #{userTopics.publicDiscussId}</if>
+ <if test="userTopics.id != null ">and jut.id = #{userTopics.id}</if>
+ <if test="userTopics.userId != null ">and jut.user_id = #{userTopics.userId}</if>
+ <if test="userTopics.topicsId != null ">and jut.topics_id = #{userTopics.topicsId}</if>
+ <if test="userTopics.createTime != null ">and jut.create_time = #{userTopics.createTime}</if>
+ <if test="userTopics.updateTime != null ">and jut.update_time = #{userTopics.updateTime}</if>
+ <if test="userTopics.deleteFlag != null ">and jut.delete_flag = #{userTopics.deleteFlag}</if>
+ <if test="userTopics.publicDiscussId != null ">and jut.public_discuss_id = #{userTopics.publicDiscussId}
+ GROUP BY jut.public_discuss_id
+ </if>
</where>
</select>
diff --git a/src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java b/src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java
index 1e01bf6..fb310f7 100644
--- a/src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java
+++ b/src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java
@@ -39,4 +39,5 @@
IPage<UserPublicEnrollVO> selectUserPublicEnrollPage(IPage<UserPublicEnrollVO> page, UserPublicEnrollVO userPublicEnroll);
+ Long getCount(Integer id);
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java b/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
index 57a26d9..b89c70f 100644
--- a/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
+++ b/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
@@ -18,8 +18,11 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.discuss.entity.TopicsEntity;
import org.springblade.modules.discuss.entity.UserTopicsEntity;
import org.springblade.modules.discuss.vo.UserTopicsVO;
+
+import java.util.List;
/**
* 用户议题报表 服务类
@@ -39,4 +42,7 @@
IPage<UserTopicsVO> selectUserTopicsPage(IPage<UserTopicsVO> page, UserTopicsVO userTopics);
+ Boolean batchSave(List<TopicsEntity> topics);
+
+ Long getCount(Integer id);
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
index 71dcf2c..1d646d9 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
@@ -21,8 +21,13 @@
import org.springblade.modules.discuss.entity.PublicDiscussEntity;
import org.springblade.modules.discuss.mapper.PublicDiscussMapper;
import org.springblade.modules.discuss.service.IPublicDiscussService;
+import org.springblade.modules.discuss.service.IUserPublicEnrollService;
+import org.springblade.modules.discuss.service.IUserTopicsService;
import org.springblade.modules.discuss.vo.PublicDiscussVO;
import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
/**
* 公益报名与议事 服务实现类
@@ -35,7 +40,8 @@
@Override
public IPage<PublicDiscussVO> selectPublicDiscussPage(IPage<PublicDiscussVO> page, PublicDiscussVO publicDiscuss) {
- return page.setRecords(baseMapper.selectPublicDiscussPage(page, publicDiscuss));
+ List<PublicDiscussVO> publicDiscussVOS = baseMapper.selectPublicDiscussPage(page, publicDiscuss);
+ return page.setRecords(publicDiscussVOS);
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
index aedc276..7129005 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
@@ -18,6 +18,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.discuss.dto.TopicsDTO;
import org.springblade.modules.discuss.entity.TopicsEntity;
import org.springblade.modules.discuss.mapper.TopicsMapper;
@@ -43,6 +44,7 @@
@Override
public List<TopicsDTO> selectTopicsList(TopicsDTO topicsDTO) {
+ topicsDTO.setUserId(AuthUtil.getUserId());
return baseMapper.selectTopicsList( topicsDTO);
}
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java
index ab9006a..52ad14c 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java
@@ -17,6 +17,7 @@
package org.springblade.modules.discuss.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
import org.springblade.modules.discuss.mapper.UserPublicEnrollMapper;
@@ -38,5 +39,8 @@
return page.setRecords(baseMapper.selectUserPublicEnrollPage(page, userPublicEnroll));
}
-
+ @Override
+ public Long getCount(Integer id) {
+ return baseMapper.selectCount(Wrappers.<UserPublicEnrollEntity>lambdaQuery().eq(UserPublicEnrollEntity::getPublicDiscussId, id));
+ }
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
index 354bea1..185b5cd 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
@@ -16,13 +16,27 @@
*/
package org.springblade.modules.discuss.service.impl;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.apache.commons.lang3.StringUtils;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.modules.discuss.entity.TopicsEntity;
+import org.springblade.modules.discuss.entity.UserPublicEnrollEntity;
import org.springblade.modules.discuss.entity.UserTopicsEntity;
import org.springblade.modules.discuss.mapper.UserTopicsMapper;
+import org.springblade.modules.discuss.service.ITopicsService;
import org.springblade.modules.discuss.service.IUserTopicsService;
import org.springblade.modules.discuss.vo.UserTopicsVO;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
/**
* 用户议题报表 服务实现类
@@ -32,6 +46,8 @@
*/
@Service
public class UserTopicsServiceImpl extends ServiceImpl<UserTopicsMapper, UserTopicsEntity> implements IUserTopicsService {
+ @Resource
+ private ITopicsService topicsService;
@Override
public IPage<UserTopicsVO> selectUserTopicsPage(IPage<UserTopicsVO> page, UserTopicsVO userTopics) {
@@ -39,4 +55,56 @@
}
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Boolean batchSave(List<TopicsEntity> topics) {
+ List<UserTopicsEntity> objects = new ArrayList<>();
+ for (TopicsEntity topic : topics) {
+ UserTopicsEntity userTopicsEntity = new UserTopicsEntity();
+ userTopicsEntity.setUserId(AuthUtil.getUserId());
+ userTopicsEntity.setSelected(topic.getSelected());
+ userTopicsEntity.setTopicsId(topic.getId());
+ userTopicsEntity.setPublicDiscussId(topic.getPublicDiscussId());
+ objects.add(userTopicsEntity);
+ if (topic.getOptionRange().equals(0)) {
+ if (StringUtils.isBlank(topic.getSelected())) {
+ break;
+ }
+ UserTopicsEntity userTopics = new UserTopicsEntity();
+ userTopics.setTopicsId(Integer.valueOf(topic.getSelected()));
+ userTopics.setUserId(AuthUtil.getUserId());
+ userTopics.setPublicDiscussId(topic.getPublicDiscussId());
+ UpdateWrapper<TopicsEntity> objectUpdateWrapper = new UpdateWrapper<>();
+ objectUpdateWrapper.setSql("number = number + 1");
+ objectUpdateWrapper.eq("id", topic.getSelected());
+ topicsService.update(null, objectUpdateWrapper);
+ baseMapper.insert(userTopics);
+ } else {
+ if (StringUtils.isBlank(topic.getSelected())) {
+ break;
+ }
+ JSONArray objects1 = JSON.parseArray(topic.getSelected());
+ List<UserTopicsEntity> objectsTwo = new ArrayList<>();
+ for (Object o : objects1) {
+ UserTopicsEntity userTopics = new UserTopicsEntity();
+ userTopics.setTopicsId((Integer) o);
+ userTopics.setUserId(AuthUtil.getUserId());
+ userTopics.setPublicDiscussId(topic.getPublicDiscussId());
+ UpdateWrapper<TopicsEntity> objectUpdateWrapper = new UpdateWrapper<>();
+ objectUpdateWrapper.setSql("number = number + 1");
+ objectUpdateWrapper.eq("id", o);
+ objectsTwo.add(userTopics);
+ topicsService.update(null, objectUpdateWrapper);
+ }
+ saveOrUpdateBatch(objectsTwo);
+ }
+ }
+ return saveOrUpdateBatch(objects);
+ }
+
+
+ @Override
+ public Long getCount(Integer id) {
+ return baseMapper.selectCount(Wrappers.<UserTopicsEntity>lambdaQuery().eq(UserTopicsEntity::getPublicDiscussId, id).groupBy(UserTopicsEntity::getUserId));
+ }
}
diff --git a/src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java b/src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java
index 29a6c5e..3c2fbb8 100644
--- a/src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java
+++ b/src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java
@@ -16,10 +16,13 @@
*/
package org.springblade.modules.discuss.vo;
+import org.springblade.modules.discuss.dto.TopicsDTO;
import org.springblade.modules.discuss.entity.TopicsEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
+
+import java.util.List;
/**
* 议题表 视图实体类
@@ -30,6 +33,9 @@
@Data
@EqualsAndHashCode(callSuper = true)
public class TopicsVO extends TopicsEntity {
+
private static final long serialVersionUID = 1L;
+ private List<TopicsVO> children;
+
}
diff --git a/src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java b/src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java
index 3aab930..32a52b2 100644
--- a/src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java
+++ b/src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java
@@ -32,4 +32,13 @@
public class UserTopicsVO extends UserTopicsEntity {
private static final long serialVersionUID = 1L;
+ private String avatar;
+
+ private String name;
+
+ private String phone;
+
+ private String addressName;
+
+ private String aoiName;
}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java
index c58bb50..9fadb6a 100644
--- a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java
+++ b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java
@@ -28,6 +28,9 @@
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
+import org.springblade.modules.property.vo.PropertyCompanyDistrictVO;
+import org.springblade.modules.property.wrapper.PropertyCompanyDistrictWrapper;
import org.springblade.modules.system.service.IDeptService;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -150,5 +153,16 @@
return R.data(propertyCompanyService.getUserByPropertyCompany(propertyCompany));
}
+ /**
+ * 物业派驻小区表 详情
+ */
+ @GetMapping("/getUserCompayDistrict")
+ @ApiOperationSupport()
+ @ApiOperation(value = "获取用户小区物业信息", notes = "")
+ public R<PropertyCompanyVO> getUserCompayDistrict(@RequestParam("houseCode") String houseCode) {
+ PropertyCompanyVO detail = propertyCompanyService.getUserCompayDistrict(houseCode);
+ return R.data(detail);
+ }
+
}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java
index bfb6695..bfb6e32 100644
--- a/src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java
+++ b/src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java
@@ -45,132 +45,73 @@
public class PropertyCapitalApplyEntity implements Serializable {
private static final long serialVersionUID = 1L;
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("主键id")
+
+
+ /** 主键 */
+ @ApiModelProperty(value = "主键ID", example = "")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
- /**
- * 物业公司id
- */
- @ApiModelProperty(value = "物业公司id")
- private Integer propertyCompanyId;
- /**
- * 小区id
- */
- @ApiModelProperty(value = "小区id")
- private String districtId;
- /**
- * 资金申请项目名称
- */
- @ApiModelProperty(value = "资金申请项目名称")
- private String name;
- /**
- * 联系人姓名
- */
- @ApiModelProperty(value = "联系人姓名")
- private String linkman;
- /**
- * 联系人电话
- */
- @ApiModelProperty(value = "联系人电话")
- private String linkPhone;
- /**
- * 分摊方式
- */
- @ApiModelProperty(value = "分摊方式")
- private String allocationWay;
- /**
- * 预算总金额
- */
- @ApiModelProperty(value = "预算总金额")
- private BigDecimal budgetAmount;
- /**
- * 实际总金额
- */
- @ApiModelProperty(value = "实际总金额")
- private BigDecimal actualAmount;
- /**
- * 自筹金额
- */
- @ApiModelProperty(value = "自筹金额")
- private BigDecimal selfAmount;
- /**
- * 预算应拨付金额
- */
- @ApiModelProperty(value = "预算应拨付金额")
- private BigDecimal budgetAppropriateAmount;
- /**
- * 预计开工时间
- */
- @ApiModelProperty(value = "预计开工时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date runTime;
- /**
- * 预计竣工时间
- */
- @ApiModelProperty(value = "预计竣工时间")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd")
- private Date completedTime;
- /**
- * 项目摘要
- */
- @ApiModelProperty(value = "项目摘要")
- private String projectDigest;
- /**
- * 项目描述
- */
- @ApiModelProperty(value = "项目描述")
- private String projectDescribe;
- /**
- * 施工方案附件urls
- */
- @ApiModelProperty(value = "施工方案附件urls")
- private String constructionSchemeUrls;
- /**
- * 创建人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("创建人")
- @TableField(fill = FieldFill.INSERT)
+ /** 物业公司名称 */
+ @ApiModelProperty(value = "物业公司名称", example = "")
+ @TableField("name")
+ private String name;
+
+ /** 地址 */
+ @ApiModelProperty(value = "地址", example = "")
+ @TableField("address")
+ private String address;
+
+ /** 社会信用代码 */
+ @ApiModelProperty(value = "社会信用代码", example = "")
+ @TableField("social_credit_code")
+ private String socialCreditCode;
+
+ /** 省编号 */
+ @ApiModelProperty(value = "省编号", example = "")
+ @TableField("province_code")
+ private String provinceCode;
+
+ /** 市编号 */
+ @ApiModelProperty(value = "市编号", example = "")
+ @TableField("city_code")
+ private String cityCode;
+
+ /** 区县编号 */
+ @ApiModelProperty(value = "区县编号", example = "")
+ @TableField("county_code")
+ private String countyCode;
+
+ /** 简介 */
+ @ApiModelProperty(value = "简介", example = "")
+ @TableField("remark")
+ private String remark;
+
+ /** 创建人 */
+ @ApiModelProperty(value = "创建人", example = "")
+ @TableField("create_user")
private String createUser;
- /**
- * 创建时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @TableField(fill = FieldFill.INSERT)
- @ApiModelProperty("创建时间")
+ /** 创建时间 */
+ @ApiModelProperty(value = "创建时间", example = "")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @TableField("create_time")
private Date createTime;
- /**
- * 更新人
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @ApiModelProperty("更新人")
- @TableField(fill = FieldFill.INSERT_UPDATE)
+ /** 更新人 */
+ @ApiModelProperty(value = "更新人", example = "")
+ @TableField("update_user")
private String updateUser;
- /**
- * 更新时间
- */
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- @ApiModelProperty("更新时间")
+ /** 更新时间 */
+ @ApiModelProperty(value = "更新时间", example = "")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @TableField("update_time")
private Date updateTime;
- /**
- * 是否删除
- */
- @TableLogic
- @ApiModelProperty("是否已删除 0:否 1:是")
+ /** 是否删除 0:否 1:是 */
+ @ApiModelProperty(value = "是否删除 0:否 1:是", example = "")
+ @TableField("is_deleted")
private Integer isDeleted;
}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java
index ef1a87a..fff6c83 100644
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.java
@@ -62,4 +62,6 @@
* @return
*/
List<Long> getDeptListByCompanyId(@Param("list") List<Integer> toIntList);
+
+ PropertyCompanyVO getUserCompayDistrict(String houseCode);
}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
index 911bcc2..a94c5d9 100644
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
@@ -3,21 +3,42 @@
<mapper namespace="org.springblade.modules.property.mapper.PropertyCompanyMapper">
<!-- 通用查询映射结果 -->
- <resultMap id="propertyCompanyResultMap" type="org.springblade.modules.property.entity.PropertyCompanyEntity">
- <result column="id" property="id"/>
- <result column="name" property="name"/>
- <result column="address" property="address"/>
- <result column="social_credit_code" property="socialCreditCode"/>
- <result column="province" property="province"/>
- <result column="city" property="city"/>
- <result column="area" property="area"/>
- <result column="remark" property="remark"/>
- <result column="create_user" property="createUser"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user" property="updateUser"/>
- <result column="update_time" property="updateTime"/>
- <result column="is_deleted" property="isDeleted"/>
+ <resultMap id="propertyCompanyResultMap" type="org.springblade.modules.property.vo.PropertyCapitalApplyVO">
+ <result property="id" column="id" />
+ <result property="name" column="name" />
+ <result property="address" column="address" />
+ <result property="socialCreditCode" column="social_credit_code" />
+ <result property="provinceCode" column="province_code" />
+ <result property="cityCode" column="city_code" />
+ <result property="countyCode" column="county_code" />
+ <result property="remark" column="remark" />
+ <result property="createUser" column="create_user" />
+ <result property="createTime" column="create_time" />
+ <result property="updateUser" column="update_user" />
+ <result property="updateTime" column="update_time" />
+ <result property="isDeleted" column="is_deleted" />
</resultMap>
+
+
+ <sql id="selectPropertyCompany">
+ select
+ id,
+ name,
+ address,
+ social_credit_code,
+ province_code,
+ city_code,
+ county_code,
+ remark,
+ create_user,
+ create_time,
+ update_user,
+ update_time,
+ is_deleted
+ from
+ jczz_property_company
+ </sql>
+
<!--自定义分页查询-->
<select id="selectPropertyCompanyPage" resultType="org.springblade.modules.property.vo.PropertyCompanyVO">
@@ -64,4 +85,52 @@
</select>
+
+ <select id="getUserCompayDistrict" resultType="org.springblade.modules.property.vo.PropertyCompanyVO">
+
+ select
+ jpc.id,
+ jpc.name,
+ jpc.address,
+ jpc.social_credit_code,
+ jpc.province_code,
+ jpc.city_code,
+ jpc.county_code,
+ jpc.remark,
+ jpc.create_user,
+ jpc.create_time,
+ jpc.update_user,
+ jpc.update_time,
+ jpc.is_deleted,
+ jpcd.principal_phone,
+ jpcd.principal
+ from
+ jczz_property_company jpc LEFT JOIN jczz_property_company_district jpcd on jpc.id=jpcd.property_company_id
+ LEFT JOIN jczz_doorplate_address jda on jpcd.district_id=jda.aoi_code
+ where jda.address_code=#{houseCode}
+<!-- <where>-->
+<!-- <if test="id != null "> and id = #{id}</if>-->
+<!-- <if test="name != null and name != ''"> and name = #{name}</if>-->
+<!-- <if test="address != null and address != ''"> and address = #{address}</if>-->
+<!-- <if test="socialCreditCode != null and socialCreditCode != ''"> and social_credit_code = #{socialCreditCode}</if>-->
+<!-- <if test="provinceCode != null and provinceCode != ''"> and province_code = #{provinceCode}</if>-->
+<!-- <if test="cityCode != null and cityCode != ''"> and city_code = #{cityCode}</if>-->
+<!-- <if test="countyCode != null and countyCode != ''"> and county_code = #{countyCode}</if>-->
+<!-- <if test="remark != null and remark != ''"> and remark = #{remark}</if>-->
+<!-- <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if>-->
+<!-- <if test="createTime != null "> and create_time = #{createTime}</if>-->
+<!-- <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if>-->
+<!-- <if test="updateTime != null "> and update_time = #{updateTime}</if>-->
+<!-- <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>-->
+<!-- </where>-->
+
+
+
+
+
+
+
+ </select>
+
+
</mapper>
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java
index 36f9aeb..938abd6 100644
--- a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java
+++ b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java
@@ -63,4 +63,6 @@
* 物业公司 删除
*/
boolean deleteByIds(List<Integer> toIntList);
+
+ PropertyCompanyVO getUserCompayDistrict(String houseCode);
}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java
index 3a08b29..968c621 100644
--- a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java
+++ b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java
@@ -121,4 +121,9 @@
// 删除机构,删除物业公司
return removeByIds(toIntList) && deptService.removeByIds(deptIds);
}
+
+ @Override
+ public PropertyCompanyVO getUserCompayDistrict(String houseCode) {
+ return baseMapper.getUserCompayDistrict(houseCode);
+ }
}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java
index 7628d33..b66531f 100644
--- a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java
+++ b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java
@@ -16,6 +16,7 @@
*/
package org.springblade.modules.property.vo;
+import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.property.entity.PropertyCompanyEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
@@ -32,4 +33,15 @@
public class PropertyCompanyVO extends PropertyCompanyEntity {
private static final long serialVersionUID = 1L;
+ /**
+ * 负责人姓名
+ */
+ @ApiModelProperty(value = "负责人姓名")
+ private String principal;
+ /**
+ * 负责人电话
+ */
+ @ApiModelProperty(value = "负责人电话")
+ private String principalPhone;
+
}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java
index 6c0d3bf..ba1e0fa 100644
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java
@@ -60,8 +60,8 @@
@Override
public IPage<TaskReportForRepairsVO> selectTaskReportForRepairsPage(IPage<TaskReportForRepairsVO> page, TaskReportForRepairsVO taskReportForRepairs) {
List<String> list = new ArrayList<>();
- if (null!=taskReportForRepairs.getRoleName() && !taskReportForRepairs.getRoleName().equals("")){
- if (taskReportForRepairs.getRoleName().equals("网格员")){
+ if (null != taskReportForRepairs.getRoleName() && !taskReportForRepairs.getRoleName().equals("")) {
+ if (taskReportForRepairs.getRoleName().equals("网格员")) {
// 查询对应的房屋地址code
list = gridService.getAddressCodeListByUserId(AuthUtil.getUserId());
}
diff --git a/src/main/java/sql/conveniencehotline.menu.sql b/src/main/java/sql/conveniencehotline.menu.sql
new file mode 100644
index 0000000..e86c113
--- /dev/null
+++ b/src/main/java/sql/conveniencehotline.menu.sql
@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1728983132062883841', 1123598815738675201, 'convenienceHotline', '热线表', 'menu', '/convenienceHotline/convenienceHotline', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1728983132062883842', '1728983132062883841', 'convenienceHotline_add', '新增', 'add', '/convenienceHotline/convenienceHotline/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1728983132062883843', '1728983132062883841', 'convenienceHotline_edit', '修改', 'edit', '/convenienceHotline/convenienceHotline/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1728983132062883844', '1728983132062883841', 'convenienceHotline_delete', '删除', 'delete', '/api/blade-convenienceHotline/convenienceHotline/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1728983132062883845', '1728983132062883841', 'convenienceHotline_view', '查看', 'view', '/convenienceHotline/convenienceHotline/view', 'file-text', 4, 2, 2, 1, NULL, 0);
--
Gitblit v1.9.3