From 4252aabea22574be7936c733036af88ee989de4e Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Sat, 06 Jan 2024 16:13:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationMemberServiceImpl.java | 96 +++
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java | 9
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.java | 53 +
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml | 56 +
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.java | 43 +
src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.java | 43 +
src/main/java/org/springblade/modules/property/entity/PropertyCompanyScoreEntity.java | 70 ++
src/main/java/org/springblade/modules/property/service/IPropertyCompanyCommentService.java | 47 +
src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganizationMember.java | 63 ++
src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.java | 17
src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java | 121 +++
src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.java | 43 +
src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationController.java | 93 +++
src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationMemberVO.java | 32 +
src/main/java/org/springblade/modules/property/dto/PropertyCompanyScoreDTO.java | 34 +
src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java | 5
src/main/java/org/springblade/modules/property/vo/PropertyCompanyCommentVO.java | 65 ++
src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.xml | 31 +
src/main/java/org/springblade/modules/property/entity/PropertyCompanyCommentEntity.java | 101 +++
src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java | 94 +++
src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyCommentWrapper.java | 50 +
src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.xml | 29
src/main/java/org/springblade/modules/property/dto/PropertyCompanyCommentDTO.java | 34 +
src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml | 2
src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java | 29
src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyScoreWrapper.java | 50 +
src/main/java/org/springblade/modules/property/vo/PropertyCompanyScoreVO.java | 35 +
src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationService.java | 10
src/main/java/org/springblade/modules/house/controller/HouseholdController.java | 12
src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationMemberController.java | 123 +++
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml | 92 ++
src/main/java/org/springblade/modules/property/controller/PropertyCompanyScoreController.java | 107 +++
src/main/java/org/springblade/modules/house/service/IHouseholdService.java | 2
src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationMemberService.java | 20
src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganization.java | 52 +
src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.java | 30
src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java | 14
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml | 21
38 files changed, 1,826 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml b/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml
index 7be4739..40f08e1 100644
--- a/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml
+++ b/src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml
@@ -48,7 +48,7 @@
and jda.town_street_name like concat('%',#{gridWorkLog.townName},'%')
</if>
<if test="gridWorkLog.neiName!=null and gridWorkLog.neiName!=''">
- and jda.nei_name like concat('%',#{household.neiName},'%')
+ and jda.nei_name like concat('%',#{gridWorkLog.neiName},'%')
</if>
<if test="gridWorkLog.regionCode!=null and gridWorkLog.regionCode!=''">
and jg.community_code like concat('%',#{gridWorkLog.regionCode},'%')
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseholdController.java b/src/main/java/org/springblade/modules/house/controller/HouseholdController.java
index 44d5415..de98b81 100644
--- a/src/main/java/org/springblade/modules/house/controller/HouseholdController.java
+++ b/src/main/java/org/springblade/modules/house/controller/HouseholdController.java
@@ -65,7 +65,6 @@
private final IHouseholdService householdService;
-
/**
* 住户 详情
*/
@@ -232,5 +231,16 @@
return R.data(householdService.userHandle());
}
+ /**
+ * 获取所有住户
+ * @return
+ */
+ @GetMapping("/getAllHouseHold")
+ public R getAllHouseHold(HouseholdVO household) {
+ return R.data(householdService.getAllHouseHold(household));
+ }
+
+
+
}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java
index 24de1df..7a526d1 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java
@@ -45,6 +45,13 @@
*/
List<HouseholdVO> selectHouseholdPage(IPage page,@Param("household") HouseholdVO household);
+ /**
+ * 获取全部
+ * @param household
+ * @return
+ */
+ List<HouseholdVO> getAllHouseHold(@Param("household")HouseholdVO household);
+
/**
* 查询房屋集合信息
@@ -106,4 +113,6 @@
* @return
*/
List<HouseholdEntity> getNotInsertUserHousehold();
+
+
}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
index 2dab075..0950957 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -186,6 +186,98 @@
</select>
+ <select id="getAllHouseHold" resultMap="householdPageAndLabelMap">
+ SELECT
+ jh.id,
+ jh.house_code,
+ jh.NAME,
+ jh.phone_number,
+ jh.associated_user_id,
+ jh.role_type,
+ jh.associated_user_name,
+ jh.relationship,
+ jh.is_primary_contact,
+ jh.residential_status,
+ jh.birthday,
+ jh.id_card,
+ jh.hkmt_pass,
+ jh.passport,
+ ifnull( jh.gender, CASE WHEN substring( jh.id_card, 17, 1 )% 2 = 1 THEN 1 ELSE 0 END ) AS gender,
+ jh.ethnicity,
+ jh.education,
+ jh.hukou_registration,
+ jh.work_status,
+ employer,
+ jh.marital_status,
+ jh.card_number,
+ jh.other_contact,
+ jh.current_address,
+ jh.disability_cert,
+ jh.party_ember,
+ jh.create_user,
+ jh.create_time,
+ jh.update_user,
+ jh.update_time,
+ jh.confirm_flag,
+ jh.remark,
+ jhs.district_name aoiName,
+ concat( jhs.building, " ", unit, " ", room ) AS address,
+ jda.town_street_name AS townStreetName,
+ jda.nei_name AS neiName,
+ jg.grid_name
+ FROM
+ jczz_household jh
+ LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
+ LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
+ LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code
+ LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id
+ <where>
+ <if test="household.userId!=null">
+ AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId}
+ )
+ </if>
+ <if test="household.name!=null and household.name !=''">
+ and jh.name like concat('%',#{household.name},'%')
+ </if>
+ <if test="household.houseCode!=null and household.houseCode !=''">
+ and jh.house_code = #{household.houseCode}
+ </if>
+ <if test="household.phoneNumber!=null and household.phoneNumber !=''">
+ and jh.phone_number like concat('%',#{household.phoneNumber},'%')
+ </if>
+ <if test="household.idCard!=null and household.idCard !=''">
+ and jh.id_card like concat('%',#{household.idCard},'%')
+ </if>
+ <if test="household.aoiName!=null and household.aoiName !=''">
+ and jhs.district_name like concat('%',#{household.aoiName},'%')
+ </if>
+ <if test="household.confirmFlag != null ">
+ and jh.confirm_flag = #{household.confirmFlag}
+ </if>
+ <if test="household.townStreetName!=null and household.townStreetName!=''">
+ and jda.town_street_name like concat('%',#{household.townStreetName},'%')
+ </if>
+ <if test="household.neiName!=null and household.neiName!=''">
+ and jda.nei_name like concat('%',#{household.neiName},'%')
+ </if>
+ <if test="household.housingRentalId != null ">
+ and jh.housing_rental_id = #{household.housingRentalId}
+ </if>
+ <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
+ AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
+ </if>
+ <if test="household.regionCode!=null and household.regionCode!=''">
+ and jg.community_code like concat('%',#{household.regionCode},'%')
+ </if>
+ <if test="household.id!=null and household.id!=''">
+ and jh.id = #{household.id}
+ </if>
+ and jh.is_deleted = 0
+ order by jh.create_time desc
+ </where>
+ </select>
+
+
<!--查询房屋集合信息-->
<select id="selectHouseNodeList" resultType="org.springblade.common.node.TreeStringNode" >
select jh.house_code as id,
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseholdService.java b/src/main/java/org/springblade/modules/house/service/IHouseholdService.java
index 4981ef6..d20b6a7 100644
--- a/src/main/java/org/springblade/modules/house/service/IHouseholdService.java
+++ b/src/main/java/org/springblade/modules/house/service/IHouseholdService.java
@@ -95,4 +95,6 @@
* 住户 删除
*/
boolean removeHousehold(String ids);
+
+ List<HouseholdVO> getAllHouseHold(HouseholdVO household);
}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
index b555b40..013a059 100644
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
+++ b/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
@@ -447,4 +447,9 @@
userHouseLabelService.remove(wrapper);
}
}
+
+ @Override
+ public List<HouseholdVO> getAllHouseHold(HouseholdVO household) {
+ return baseMapper.getAllHouseHold(household);
+ }
}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationController.java b/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationController.java
new file mode 100644
index 0000000..88129cc
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationController.java
@@ -0,0 +1,93 @@
+package org.springblade.modules.partyOrganization.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 lombok.AllArgsConstructor;
+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.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.service.IPartyOrganizationService;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+@RestController
+@AllArgsConstructor
+@RequestMapping("partyOrganization/partyOrganization")
+@Api(value = "业委会表", tags = "业委会表接口")
+public class PartyOrganizationController extends BladeController {
+
+ private final IPartyOrganizationService partyOrganizationService;
+
+
+ /**
+ * 党组织 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入ownersCommittee")
+ public R<PartyOrganization> detail(PartyOrganizationVO partyOrganizationVO) {
+ PartyOrganization detail = partyOrganizationService.getOne(Condition.getQueryWrapper(partyOrganizationVO));
+ return R.data(detail);
+ }
+
+ /**
+ * 党组织 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入ownersCommittee")
+ public R<IPage<PartyOrganizationVO>> page(PartyOrganizationVO PartyOrganizationVO, Query query) {
+ IPage<PartyOrganizationVO> pages = partyOrganizationService.getPage(Condition.getPage(query), PartyOrganizationVO);
+ return R.data(pages);
+ }
+
+ /**
+ * 党组织 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入ownersCommittee")
+ public R save(@Valid @RequestBody PartyOrganization partyOrganization) {
+ return R.status(partyOrganizationService.save(partyOrganization));
+ }
+
+ /**
+ * 党组织 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入ownersCommittee")
+ public R update(@Valid @RequestBody PartyOrganization partyOrganization) {
+ return R.status(partyOrganizationService.updateById(partyOrganization));
+ }
+
+ /**
+ * 党组织 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入ownersCommittee")
+ public R submit(@Valid @RequestBody PartyOrganization partyOrganization) {
+ return R.status(partyOrganizationService.saveOrUpdate(partyOrganization));
+ }
+
+ /**
+ * 党组织 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(partyOrganizationService.removeBatchByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationMemberController.java b/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationMemberController.java
new file mode 100644
index 0000000..f8833f8
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/controller/PartyOrganizationMemberController.java
@@ -0,0 +1,123 @@
+package org.springblade.modules.partyOrganization.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 lombok.AllArgsConstructor;
+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.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
+import org.springblade.modules.partyOrganization.service.IPartyOrganizationMemberService;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+@RestController
+@AllArgsConstructor
+@RequestMapping("partyOrganizationMember/partyOrganizationMember")
+@Api(value = "党成员表", tags = "党成员表接口")
+public class PartyOrganizationMemberController extends BladeController {
+
+ private final IPartyOrganizationMemberService partyOrganizationMemberService;
+
+
+ /**
+ * 党组织成员 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入PartyOrganizationMember")
+ public R<PartyOrganizationMember> detail(PartyOrganizationMemberVO partyOrganizationVO) {
+ PartyOrganizationMember detail = partyOrganizationMemberService.getOne(Condition.getQueryWrapper(partyOrganizationVO));
+ return R.data(detail);
+ }
+
+ /**
+ * 党组织成员 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入PartyOrganizationMember")
+ public R<IPage<PartyOrganizationMemberVO>> page(PartyOrganizationMemberVO PartyOrganizationMemberVO, Query query) {
+ IPage<PartyOrganizationMemberVO> pages = partyOrganizationMemberService.getPage(Condition.getPage(query), PartyOrganizationMemberVO);
+ return R.data(pages);
+ }
+
+ /**
+ * 党组织成员 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入PartyOrganizationMember")
+ public R save(@Valid @RequestBody PartyOrganizationMember PartyOrganizationMember) {
+ return R.status(partyOrganizationMemberService.save(PartyOrganizationMember));
+ }
+
+ /**
+ * 党组织成员 新增
+ */
+ @PostMapping("/add")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入PartyOrganizationMember")
+ public R add(@Valid @RequestBody PartyOrganizationMemberVO PartyOrganizationMember) {
+ return R.status(partyOrganizationMemberService.addVO(PartyOrganizationMember));
+ }
+
+ /**
+ * 党组织成员 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入PartyOrganizationMember")
+ public R update(@Valid @RequestBody PartyOrganizationMember PartyOrganizationMember) {
+ return R.status(partyOrganizationMemberService.updateById(PartyOrganizationMember));
+ }
+
+ /**
+ * 党组织成员 修改
+ */
+ @PostMapping("/edit")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入PartyOrganizationMember")
+ public R edit(@Valid @RequestBody PartyOrganizationMemberVO PartyOrganizationMember) {
+ return R.status(partyOrganizationMemberService.editVO(PartyOrganizationMember));
+ }
+
+ /**
+ * 党组织成员 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入PartyOrganizationMember")
+ public R submit(@Valid @RequestBody PartyOrganizationMember PartyOrganizationMember) {
+ return R.status(partyOrganizationMemberService.saveOrUpdate(PartyOrganizationMember));
+ }
+
+ /**
+ * 党组织成员 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(partyOrganizationMemberService.removeBatchByIds(Func.toLongList(ids)));
+ }
+
+ /**
+ * 党组织成员 删除
+ */
+ @PostMapping("/delete")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R delete(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(partyOrganizationMemberService.delete(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganization.java b/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganization.java
new file mode 100644
index 0000000..862c169
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganization.java
@@ -0,0 +1,52 @@
+package org.springblade.modules.partyOrganization.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+@TableName("jczz_party_organization")
+@EqualsAndHashCode(callSuper = true)
+public class PartyOrganization extends BaseEntity {
+
+
+ private static final long serialVersionUID = 1L;
+
+ //社区id
+ private String areaId;
+
+ //组织名称
+ private String organizationName;
+
+ //组织类型
+ private String organizationType;
+
+ //支部类型
+ private String branchType;
+
+ //负责人姓名
+ private String chargePerson;
+
+ //负责人手机号
+ private String phone;
+
+ //成立日期
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date establishmentDate;
+
+ //图片
+ private String urls;
+
+ //排序
+ private String sort;
+
+ //简介
+ private String profile;
+
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganizationMember.java b/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganizationMember.java
new file mode 100644
index 0000000..f9045a6
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/entity/PartyOrganizationMember.java
@@ -0,0 +1,63 @@
+package org.springblade.modules.partyOrganization.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+@TableName("jczz_party_organization_member")
+@EqualsAndHashCode(callSuper = true)
+public class PartyOrganizationMember extends BaseEntity {
+
+
+ private static final long serialVersionUID = 1L;
+
+ //住户id
+ private String householdId;
+
+ //党组织id
+ private String organizationId;
+
+ //党员类型
+ private String partyMemberType;
+
+ //党员职务
+ private String partyMemberPost;
+
+ //入党日期
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date joinDate;
+
+ //转入日期
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date transferDate;
+
+ //签入社区日期
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date signInDate;
+
+ //是否先锋岗(1、是;2、否)
+ private String isPioneer;
+
+ //家庭住址
+ private String address;
+
+ //图片
+ private String urls;
+
+ //排序
+ private String sort;
+
+ //简介
+ private String profile;
+
+ private String userHouseLabelId;
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.java b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.java
new file mode 100644
index 0000000..ff2f60f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.java
@@ -0,0 +1,30 @@
+package org.springblade.modules.partyOrganization.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.ibatis.annotations.Param;
+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.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
+import org.springblade.modules.ownersCommittee.vo.OwnersCommitteeVO;
+import org.springblade.modules.ownersCommittee.wrapper.OwnersCommitteeWrapper;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.validation.Valid;
+import java.util.List;
+
+public interface PartyOrganizationMapper extends BaseMapper<PartyOrganization> {
+
+
+ List<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, @Param("vo") PartyOrganizationVO partyOrganizationVO);
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.xml b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.xml
new file mode 100644
index 0000000..a76f56b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMapper.xml
@@ -0,0 +1,31 @@
+<?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.partyOrganization.mapper.PartyOrganizationMapper">
+
+
+ <select id="getPage" resultType="org.springblade.modules.partyOrganization.vo.PartyOrganizationVO">
+ SELECT
+ DISTINCT
+ jpo.*,
+ IFNULL(countTable.memberCount ,0) as memberCount
+ FROM
+ jczz_party_organization jpo
+ LEFT JOIN ( SELECT COUNT(*) memberCount, organization_id FROM jczz_party_organization_member WHERE is_deleted = 0 GROUP BY organization_id ) countTable ON countTable.organization_id = jpo.id
+ left join jczz_party_organization_member jpom ON jpom.organization_id = jpo.id
+ left join jczz_household jh ON jh.id = jpom.household_id
+ WHERE
+ jpo.is_deleted = 0
+
+ <if test="vo.organizationName != null and vo.organizationName != ''">
+ AND jpo.organization_name LIKE CONCAT('%',#{vo.organizationName},'%')
+ </if>
+ <if test="vo.areaId != null and vo.areaId !='' ">
+ AND jpo.area_id like concat('%',#{vo.areaId},'%')
+ </if>
+ <if test="vo.name != null and vo.name != ''">
+ AND(jh.name LIKE CONCAT('%',#{vo.name},'%') OR jpo.charge_person LIKE CONCAT('%',#{vo.name},'%'))
+ </if>
+ ORDER BY
+ jpo.sort ASC
+ </select>
+</mapper>
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.java b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.java
new file mode 100644
index 0000000..c6ef452
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.java
@@ -0,0 +1,17 @@
+package org.springblade.modules.partyOrganization.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
+
+import java.util.List;
+
+public interface PartyOrganizationMemberMapper extends BaseMapper<PartyOrganizationMember> {
+
+
+ List<PartyOrganizationMemberVO> getPage(IPage<PartyOrganizationMemberVO> page, @Param("vo") PartyOrganizationMemberVO partyOrganizationMemberVO);
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.xml b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.xml
new file mode 100644
index 0000000..63d8b59
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/mapper/PartyOrganizationMemberMapper.xml
@@ -0,0 +1,29 @@
+<?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.partyOrganization.mapper.PartyOrganizationMemberMapper">
+
+
+ <select id="getPage" resultType="org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO">
+ SELECT
+ jpom.*,
+ jh.name as houseHoldName,
+ jh.phone_number as phoneNumber,
+ jh.gender as gender,
+ jh.birthday as birthday,
+ jh.card_type as cardType,
+ jh.id_card as idCard
+ FROM jczz_party_organization_member jpom
+ LEFT JOIN jczz_household jh ON jpom.household_id = jh.id
+ where jpom.is_deleted = 0
+ <if test="vo.organizationId != null and vo.organizationId !='' ">
+ AND jpom.organization_id = #{vo.organizationId}
+ </if>
+ <if test="vo.phoneNumber != null and vo.phoneNumber !='' ">
+ AND jh.phone_number LIKE CONCAT('%',#{vo.phoneNumber},'%')
+ </if>
+ <if test="vo.houseHoldName != null and vo.houseHoldName !='' ">
+ AND jh.name LIKE CONCAT('%',#{vo.houseHoldName},'%')
+ </if>
+ ORDER BY jpom.sort asc
+ </select>
+</mapper>
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationMemberService.java b/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationMemberService.java
new file mode 100644
index 0000000..c258445
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationMemberService.java
@@ -0,0 +1,20 @@
+package org.springblade.modules.partyOrganization.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
+
+import java.util.List;
+
+public interface IPartyOrganizationMemberService extends BaseService<PartyOrganizationMember> {
+ IPage<PartyOrganizationMemberVO> getPage(IPage<PartyOrganizationMemberVO> page, PartyOrganizationMemberVO partyOrganizationMemberVO);
+
+ Boolean addVO(PartyOrganizationMemberVO partyOrganizationMember);
+
+ Boolean editVO(PartyOrganizationMemberVO partyOrganizationMember);
+
+ Boolean delete(List<Long> toLongList);
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationService.java b/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationService.java
new file mode 100644
index 0000000..868ca70
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/service/IPartyOrganizationService.java
@@ -0,0 +1,10 @@
+package org.springblade.modules.partyOrganization.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
+
+public interface IPartyOrganizationService extends BaseService<PartyOrganization> {
+ IPage<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, PartyOrganizationVO partyOrganizationVO);
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationMemberServiceImpl.java b/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationMemberServiceImpl.java
new file mode 100644
index 0000000..63364aa
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationMemberServiceImpl.java
@@ -0,0 +1,96 @@
+package org.springblade.modules.partyOrganization.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.tool.utils.DateUtil;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
+import org.springblade.modules.house.service.IUserHouseLabelService;
+import org.springblade.modules.label.entity.LabelEntity;
+import org.springblade.modules.label.service.ILabelService;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
+import org.springblade.modules.partyOrganization.mapper.PartyOrganizationMapper;
+import org.springblade.modules.partyOrganization.mapper.PartyOrganizationMemberMapper;
+import org.springblade.modules.partyOrganization.service.IPartyOrganizationMemberService;
+import org.springblade.modules.partyOrganization.service.IPartyOrganizationService;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class PartyOrganizationMemberServiceImpl extends BaseServiceImpl<PartyOrganizationMemberMapper, PartyOrganizationMember> implements IPartyOrganizationMemberService {
+
+ @Autowired
+ private IUserHouseLabelService userHouseLabelService;
+
+ @Autowired
+ private ILabelService labelService;
+
+ @Override
+ public IPage<PartyOrganizationMemberVO> getPage(IPage<PartyOrganizationMemberVO> page, PartyOrganizationMemberVO partyOrganizationMemberVO) {
+ return page.setRecords(baseMapper.getPage(page,partyOrganizationMemberVO));
+ }
+
+ @Override
+ public Boolean addVO(PartyOrganizationMemberVO partyOrganizationMember) {
+
+ UserHouseLabelEntity userHouseLabelEntity = new UserHouseLabelEntity();
+
+ userHouseLabelEntity.setHouseCode(partyOrganizationMember.getHouseCode());
+ userHouseLabelEntity.setLabelId(Long.parseLong(partyOrganizationMember.getPartyMemberType()));
+ userHouseLabelEntity.setColor("#30D17C");
+ userHouseLabelEntity.setLableType(1);
+ userHouseLabelEntity.setHouseholdId(Long.parseLong(partyOrganizationMember.getHouseholdId()));
+ userHouseLabelEntity.setCreateTime(DateUtil.now());
+
+ LabelEntity labelDetail = labelService.getById(partyOrganizationMember.getPartyMemberType());
+ userHouseLabelEntity.setLabelName(labelDetail.getLabelName());
+
+
+ boolean saveUserLabel = userHouseLabelService.save(userHouseLabelEntity);
+
+ partyOrganizationMember.setUserHouseLabelId(userHouseLabelEntity.getId().toString());
+ boolean saveMember = save(partyOrganizationMember);
+ return saveUserLabel&&saveMember;
+ }
+
+ @Override
+ public Boolean editVO(PartyOrganizationMemberVO partyOrganizationMember) {
+
+ UserHouseLabelEntity userHouseLabelEntity = userHouseLabelService.getById(partyOrganizationMember.getUserHouseLabelId());
+
+
+ //更新userhouselabel标签
+ LabelEntity labelDetail = labelService.getById(partyOrganizationMember.getPartyMemberType());
+ userHouseLabelEntity.setLabelName(labelDetail.getLabelName());
+ userHouseLabelEntity.setLabelId(Long.parseLong(partyOrganizationMember.getPartyMemberType()));
+ boolean updateLabel = userHouseLabelService.updateById(userHouseLabelEntity);
+
+ //更新党员信息
+ boolean updateMember = updateById(partyOrganizationMember);
+
+
+ return updateLabel&&updateMember;
+ }
+
+ @Override
+ public Boolean delete(List<Long> toLongList) {
+
+ //把userhouselabel中的数据删除
+ List<PartyOrganizationMember> partyOrganizationMembers = listByIds(toLongList);
+
+ //循环删除
+ partyOrganizationMembers.forEach(partyOrganizationMember ->{
+ userHouseLabelService.removeById(partyOrganizationMember.getUserHouseLabelId());
+ });
+
+ //删自己
+ return removeBatchByIds(toLongList);
+ }
+
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java b/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java
new file mode 100644
index 0000000..e6ec238
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java
@@ -0,0 +1,29 @@
+package org.springblade.modules.partyOrganization.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.mapper.PartyOrganizationMapper;
+import org.springblade.modules.partyOrganization.service.IPartyOrganizationService;
+import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
+import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.service.IDeptService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class PartyOrganizationServiceImpl extends BaseServiceImpl<PartyOrganizationMapper, PartyOrganization> implements IPartyOrganizationService {
+
+ @Autowired
+ private IDeptService deptService;
+ @Override
+ public IPage<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, PartyOrganizationVO partyOrganizationVO) {
+
+ Dept dept = deptService.getById(AuthUtil.getDeptId());
+ if (null!=dept){
+ partyOrganizationVO.setAreaId(dept.getRegionCode());
+ }
+ return page.setRecords(baseMapper.getPage(page,partyOrganizationVO));
+ }
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationMemberVO.java b/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationMemberVO.java
new file mode 100644
index 0000000..9d936f0
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationMemberVO.java
@@ -0,0 +1,32 @@
+package org.springblade.modules.partyOrganization.vo;
+
+import lombok.Data;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+import org.springblade.modules.partyOrganization.entity.PartyOrganizationMember;
+
+@Data
+public class PartyOrganizationMemberVO extends PartyOrganizationMember {
+
+ private String houseHoldName;
+
+ private String phoneNumber;
+
+ private String gender;
+
+ private String birthday;
+
+
+
+ private String cardType;
+
+ private String idCard;
+
+ //房屋code
+ private String houseCode;
+
+
+
+
+
+
+}
diff --git a/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java b/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java
new file mode 100644
index 0000000..835baee
--- /dev/null
+++ b/src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java
@@ -0,0 +1,14 @@
+package org.springblade.modules.partyOrganization.vo;
+
+import lombok.Data;
+import org.springblade.modules.partyOrganization.entity.PartyOrganization;
+
+@Data
+public class PartyOrganizationVO extends PartyOrganization {
+
+ //党员数
+ private Integer memberCount;
+
+ //负责人名字或者党成员名字
+ private String name;
+}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java
new file mode 100644
index 0000000..be85a7a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java
@@ -0,0 +1,121 @@
+package org.springblade.modules.property.controller;
+
+import com.qiniu.util.Auth;
+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.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.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
+import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
+import org.springblade.modules.property.wrapper.PropertyCompanyCommentWrapper;
+import org.springblade.modules.property.service.IPropertyCompanyCommentService;
+
+/**
+ * 物业公司评论表 控制器
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-propertyCompanyComment/propertyCompanyComment")
+@Api(value = "物业公司评论表", tags = "物业公司评论表接口")
+public class PropertyCompanyCommentController {
+
+ private final IPropertyCompanyCommentService propertyCompanyCommentService;
+
+ /**
+ * 物业公司评论表 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入propertyCompanyComment")
+ public R<PropertyCompanyCommentVO> detail(PropertyCompanyCommentEntity propertyCompanyComment) {
+ PropertyCompanyCommentEntity detail = propertyCompanyCommentService.getOne(Condition.getQueryWrapper(propertyCompanyComment));
+ return R.data(PropertyCompanyCommentWrapper.build().entityVO(detail));
+ }
+ /**
+ * 物业公司评论表 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入propertyCompanyComment")
+ public R<IPage<PropertyCompanyCommentVO>> list(PropertyCompanyCommentEntity propertyCompanyComment, Query query) {
+ IPage<PropertyCompanyCommentEntity> pages = propertyCompanyCommentService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyCompanyComment));
+ return R.data(PropertyCompanyCommentWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 物业公司评论表 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入propertyCompanyComment")
+ public R<IPage<PropertyCompanyCommentVO>> page(PropertyCompanyCommentVO propertyCompanyComment, Query query) {
+ IPage<PropertyCompanyCommentVO> pages = propertyCompanyCommentService.selectPropertyCompanyCommentPage(Condition.getPage(query), propertyCompanyComment);
+ return R.data(pages);
+ }
+
+ /**
+ * 物业公司评论表 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入propertyCompanyComment")
+ public R save(@Valid @RequestBody PropertyCompanyCommentEntity propertyCompanyComment) {
+ propertyCompanyComment.setCreateUser(AuthUtil.getUserId());
+ return R.status(propertyCompanyCommentService.save(propertyCompanyComment));
+ }
+
+ /**
+ * 物业公司评论表 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入propertyCompanyComment")
+ public R update(@Valid @RequestBody PropertyCompanyCommentEntity propertyCompanyComment) {
+ return R.status(propertyCompanyCommentService.updateById(propertyCompanyComment));
+ }
+
+
+ /**
+ * 物业公司评论表 自定义新增或修改
+ */
+ @PostMapping("/saveOrUpdate")
+ @ApiOperation(value = "新增", notes = "传入propertyCompanyComment")
+ public R saveOrUpdate(@Valid @RequestBody PropertyCompanyCommentVO propertyCompanyComment) {
+ propertyCompanyComment.setCreateUser(AuthUtil.getUserId());
+ return R.status(propertyCompanyCommentService.saveOrUpdatePropertyCompanyComment(propertyCompanyComment));
+ }
+
+ /**
+ * 物业公司评论表 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入propertyCompanyComment")
+ public R submit(@Valid @RequestBody PropertyCompanyCommentEntity propertyCompanyComment) {
+ return R.status(propertyCompanyCommentService.saveOrUpdate(propertyCompanyComment));
+ }
+
+ /**
+ * 物业公司评论表 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(propertyCompanyCommentService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/property/controller/PropertyCompanyScoreController.java b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyScoreController.java
new file mode 100644
index 0000000..1d79897
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/controller/PropertyCompanyScoreController.java
@@ -0,0 +1,107 @@
+package org.springblade.modules.property.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.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.property.entity.PropertyCompanyScoreEntity;
+import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
+import org.springblade.modules.property.wrapper.PropertyCompanyScoreWrapper;
+import org.springblade.modules.property.service.IPropertyCompanyScoreService;
+
+/**
+ * 物业公司评分表 控制器
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-propertyCompanyScore/propertyCompanyScore")
+@Api(value = "物业公司评分表", tags = "物业公司评分表接口")
+public class PropertyCompanyScoreController{
+
+ private final IPropertyCompanyScoreService propertyCompanyScoreService;
+
+ /**
+ * 物业公司评分表 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入propertyCompanyScore")
+ public R<PropertyCompanyScoreVO> detail(PropertyCompanyScoreEntity propertyCompanyScore) {
+ PropertyCompanyScoreEntity detail = propertyCompanyScoreService.getOne(Condition.getQueryWrapper(propertyCompanyScore));
+ return R.data(PropertyCompanyScoreWrapper.build().entityVO(detail));
+ }
+ /**
+ * 物业公司评分表 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入propertyCompanyScore")
+ public R<IPage<PropertyCompanyScoreVO>> list(PropertyCompanyScoreEntity propertyCompanyScore, Query query) {
+ IPage<PropertyCompanyScoreEntity> pages = propertyCompanyScoreService.page(Condition.getPage(query), Condition.getQueryWrapper(propertyCompanyScore));
+ return R.data(PropertyCompanyScoreWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 物业公司评分表 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入propertyCompanyScore")
+ public R<IPage<PropertyCompanyScoreVO>> page(PropertyCompanyScoreVO propertyCompanyScore, Query query) {
+ IPage<PropertyCompanyScoreVO> pages = propertyCompanyScoreService.selectPropertyCompanyScorePage(Condition.getPage(query), propertyCompanyScore);
+ return R.data(pages);
+ }
+
+ /**
+ * 物业公司评分表 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入propertyCompanyScore")
+ public R save(@Valid @RequestBody PropertyCompanyScoreEntity propertyCompanyScore) {
+ return R.status(propertyCompanyScoreService.save(propertyCompanyScore));
+ }
+
+ /**
+ * 物业公司评分表 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入propertyCompanyScore")
+ public R update(@Valid @RequestBody PropertyCompanyScoreEntity propertyCompanyScore) {
+ return R.status(propertyCompanyScoreService.updateById(propertyCompanyScore));
+ }
+
+ /**
+ * 物业公司评分表 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入propertyCompanyScore")
+ public R submit(@Valid @RequestBody PropertyCompanyScoreEntity propertyCompanyScore) {
+ return R.status(propertyCompanyScoreService.saveOrUpdate(propertyCompanyScore));
+ }
+
+ /**
+ * 物业公司评分表 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(propertyCompanyScoreService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyCommentDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyCommentDTO.java
new file mode 100644
index 0000000..ee6ccb1
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyCommentDTO.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.property.dto;
+
+import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 物业公司评论表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PropertyCompanyCommentDTO extends PropertyCompanyCommentEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/property/dto/PropertyCompanyScoreDTO.java b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyScoreDTO.java
new file mode 100644
index 0000000..a555dd0
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/dto/PropertyCompanyScoreDTO.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.property.dto;
+
+import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 物业公司评分表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PropertyCompanyScoreDTO extends PropertyCompanyScoreEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyCommentEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyCommentEntity.java
new file mode 100644
index 0000000..f891f9a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyCommentEntity.java
@@ -0,0 +1,101 @@
+package org.springblade.modules.property.entity;
+
+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;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 物业公司评论表 实体类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Data
+@TableName("jczz_property_company_comment")
+@ApiModel(value = "PropertyCompanyComment对象", description = "物业公司评论表")
+public class PropertyCompanyCommentEntity implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty("主键id")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 物业公司id
+ */
+ @ApiModelProperty(value = "物业公司id")
+ private Integer propertyCompanyId;
+ /**
+ * 父级id
+ */
+ @ApiModelProperty(value = "父级id")
+ private Long parentId;
+ /**
+ * 评论内容
+ */
+ @ApiModelProperty(value = "评论内容")
+ private String content;
+
+ /**
+ * 评论图片
+ */
+ @ApiModelProperty(value = "评论图片")
+ private String imageUrls;
+ /**
+ * 审核人
+ */
+ @ApiModelProperty(value = "审核人")
+ private Long checkUser;
+ /**
+ * 审核时间
+ */
+ @ApiModelProperty(value = "审核时间")
+ private Date checkTime;
+ /**
+ * 审核状态
+ */
+ @ApiModelProperty(value = "审核状态")
+ private Integer checkStatus;
+ /**
+ * 审核备注
+ */
+ @ApiModelProperty(value = "审核备注")
+ private String checkRemark;
+ /**
+ * 创建人
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty("创建人")
+ @TableField(fill = FieldFill.INSERT)
+ private Long createUser;
+
+ /**
+ * 创建时间
+ */
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @TableField(fill = FieldFill.INSERT)
+ @ApiModelProperty("创建时间")
+ private Date createTime;
+
+ /**
+ * 是否删除
+ */
+ @TableLogic
+ @ApiModelProperty("是否已删除 0:否 1:是")
+ private Integer isDeleted;
+
+}
diff --git a/src/main/java/org/springblade/modules/property/entity/PropertyCompanyScoreEntity.java b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyScoreEntity.java
new file mode 100644
index 0000000..eb168c4
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/entity/PropertyCompanyScoreEntity.java
@@ -0,0 +1,70 @@
+package org.springblade.modules.property.entity;
+
+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;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 物业公司评分表 实体类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Data
+@TableName("jczz_property_company_score")
+@ApiModel(value = "PropertyCompanyScore对象", description = "物业公司评分表")
+public class PropertyCompanyScoreEntity implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty("主键id")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 物业公司id
+ */
+ @ApiModelProperty(value = "物业公司id")
+ private Integer propertyCompanyId;
+ /**
+ * 评分
+ */
+ @ApiModelProperty(value = "评分")
+ private Integer score;
+ /**
+ * 创建人
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty("创建人")
+ @TableField(fill = FieldFill.INSERT)
+ private Long createUser;
+
+ /**
+ * 创建时间
+ */
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @TableField(fill = FieldFill.INSERT)
+ @ApiModelProperty("创建时间")
+ private Date createTime;
+
+ /**
+ * 是否删除
+ */
+ @TableLogic
+ @ApiModelProperty("是否已删除 0:否 1:是")
+ private Integer isDeleted;
+
+}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.java
new file mode 100644
index 0000000..12e6640
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.java
@@ -0,0 +1,53 @@
+/*
+ * 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.property.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
+import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 物业公司评论表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+public interface PropertyCompanyCommentMapper extends BaseMapper<PropertyCompanyCommentEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param propertyCompanyComment
+ * @return
+ */
+ List<PropertyCompanyCommentVO> selectPropertyCompanyCommentPage(IPage page,
+ @Param("propertyCompanyComment") PropertyCompanyCommentVO propertyCompanyComment);
+
+
+ /**
+ * 递归分页查询
+ * @param page
+ * @param propertyCompanyComment
+ * @return
+ */
+ List<PropertyCompanyCommentVO> selectPropertyCompanyCommentPageRec(IPage<PropertyCompanyCommentVO> page,
+ @Param("propertyCompanyComment") PropertyCompanyCommentVO propertyCompanyComment);
+}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml
new file mode 100644
index 0000000..f8ef51e
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml
@@ -0,0 +1,56 @@
+<?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.property.mapper.PropertyCompanyCommentMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="propertyCompanyCommentResultMap" type="org.springblade.modules.property.vo.PropertyCompanyCommentVO" autoMapping="true">
+ <id property="id" column="id"/>
+ <collection property="children" column="id" javaType="java.util.List"
+ ofType="org.springblade.modules.property.vo.PropertyCompanyCommentVO"
+ autoMapping="true"
+ select="selectPropertyCompanyCommentByParentId">
+ </collection>
+ </resultMap>
+
+ <!--自定义分页查询-->
+ <select id="selectPropertyCompanyCommentPage" resultType="org.springblade.modules.property.vo.PropertyCompanyCommentVO">
+ select
+ jpcc.*,
+ bu.real_name as realName,bu.avatar
+ from jczz_property_company_comment jpcc
+ left join blade_user bu on bu.id = jpcc.create_user
+ where jpcc.is_deleted = 0
+ and jpcc.parent_id = 0
+ <if test="propertyCompanyComment.propertyCompanyId!=null">
+ and jpcc.property_company_id = #{propertyCompanyComment.propertyCompanyId}
+ </if>
+ </select>
+
+ <!--自定义分页查询(递归)-->
+ <select id="selectPropertyCompanyCommentPageRec" parameterType="long"
+ resultMap="propertyCompanyCommentResultMap">
+ select
+ jpcc.*,
+ bu.real_name as realName,bu.avatar
+ from jczz_property_company_comment jpcc
+ left join blade_user bu on bu.id = jpcc.create_user
+ where jpcc.is_deleted = 0
+ and jpcc.parent_id = 0
+ <if test="propertyCompanyComment.propertyCompanyId!=null">
+ and jpcc.property_company_id = #{propertyCompanyComment.propertyCompanyId}
+ </if>
+ </select>
+
+ <!--递归查询-->
+ <select id="selectPropertyCompanyCommentByParentId"
+ resultType="org.springblade.modules.property.vo.PropertyCompanyCommentVO">
+ select
+ jpcc.*,
+ bu.real_name as realName,bu.avatar
+ from jczz_property_company_comment jpcc
+ left join blade_user bu on bu.id = jpcc.create_user
+ where jpcc.is_deleted = 0
+ and jpcc.parent_id = #{id}
+ </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.java b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.java
new file mode 100644
index 0000000..c71fc40
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.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.property.mapper;
+
+import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
+import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 物业公司评分表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+public interface PropertyCompanyScoreMapper extends BaseMapper<PropertyCompanyScoreEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param propertyCompanyScore
+ * @return
+ */
+ List<PropertyCompanyScoreVO> selectPropertyCompanyScorePage(IPage page, PropertyCompanyScoreVO propertyCompanyScore);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml
new file mode 100644
index 0000000..c60c98d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml
@@ -0,0 +1,21 @@
+<?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.property.mapper.PropertyCompanyScoreMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="propertyCompanyScoreResultMap" type="org.springblade.modules.property.entity.PropertyCompanyScoreEntity">
+ <result column="id" property="id"/>
+ <result column="property_company_id" property="propertyCompanyId"/>
+ <result column="score" property="score"/>
+ <result column="create_user" property="createUser"/>
+ <result column="create_time" property="createTime"/>
+ <result column="is_deleted" property="isDeleted"/>
+ </resultMap>
+
+
+ <select id="selectPropertyCompanyScorePage" resultMap="propertyCompanyScoreResultMap">
+ select * from jczz_property_company_score where is_deleted = 0
+ </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyCommentService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyCommentService.java
new file mode 100644
index 0000000..60e745c
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyCommentService.java
@@ -0,0 +1,47 @@
+/*
+ * 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.property.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
+import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 物业公司评论表 服务类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+public interface IPropertyCompanyCommentService extends IService<PropertyCompanyCommentEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param propertyCompanyComment
+ * @return
+ */
+ IPage<PropertyCompanyCommentVO> selectPropertyCompanyCommentPage(IPage<PropertyCompanyCommentVO> page, PropertyCompanyCommentVO propertyCompanyComment);
+
+
+ /**
+ * 物业公司评论表 自定义新增或修改
+ */
+ boolean saveOrUpdatePropertyCompanyComment(PropertyCompanyCommentVO propertyCompanyComment);
+}
diff --git a/src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.java b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.java
new file mode 100644
index 0000000..77b6541
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.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.property.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
+import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 物业公司评分表 服务类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+public interface IPropertyCompanyScoreService extends IService<PropertyCompanyScoreEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param propertyCompanyScore
+ * @return
+ */
+ IPage<PropertyCompanyScoreVO> selectPropertyCompanyScorePage(IPage<PropertyCompanyScoreVO> page, PropertyCompanyScoreVO propertyCompanyScore);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java
new file mode 100644
index 0000000..43e140b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java
@@ -0,0 +1,94 @@
+/*
+ * 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.property.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.apache.logging.log4j.util.Strings;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
+import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
+import org.springblade.modules.property.service.IPropertyCompanyScoreService;
+import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
+import org.springblade.modules.property.mapper.PropertyCompanyCommentMapper;
+import org.springblade.modules.property.service.IPropertyCompanyCommentService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 物业公司评论表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Service
+public class PropertyCompanyCommentServiceImpl extends ServiceImpl<PropertyCompanyCommentMapper, PropertyCompanyCommentEntity> implements IPropertyCompanyCommentService {
+
+ @Autowired
+ private IPropertyCompanyScoreService propertyCompanyScoreService;
+
+ @Override
+ public IPage<PropertyCompanyCommentVO> selectPropertyCompanyCommentPage(IPage<PropertyCompanyCommentVO> page, PropertyCompanyCommentVO propertyCompanyComment) {
+ if (null!=propertyCompanyComment.getIsRec()){
+ // 递归查询
+ return page.setRecords(baseMapper.selectPropertyCompanyCommentPageRec(page, propertyCompanyComment));
+ }
+ return page.setRecords(baseMapper.selectPropertyCompanyCommentPage(page, propertyCompanyComment));
+ }
+
+ /**
+ * 物业公司评论表 自定义新增或修改
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public boolean saveOrUpdatePropertyCompanyComment(PropertyCompanyCommentVO propertyCompanyComment) {
+ boolean save = save(propertyCompanyComment);
+ // 更新评分
+ updatePropertyCompanyScore(propertyCompanyComment);
+ // 返回
+ return save;
+ }
+
+ /**
+ * 更新评分
+ * @param propertyCompanyComment
+ */
+ public void updatePropertyCompanyScore(PropertyCompanyCommentVO propertyCompanyComment) {
+ // 查询当前的物业公司,当前人是否已经评分,如果已经评分,则更新,否则新增
+ if (null!=propertyCompanyComment.getScore()){
+ QueryWrapper<PropertyCompanyScoreEntity> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("is_deleted",0).eq("create_user", AuthUtil.getUserId())
+ .eq("property_company_id",propertyCompanyComment.getPropertyCompanyId());
+ PropertyCompanyScoreEntity one = propertyCompanyScoreService.getOne(queryWrapper);
+ if (null!=one){
+ one.setScore(propertyCompanyComment.getScore());
+ // 更新
+ propertyCompanyScoreService.updateById(one);
+ }else {
+ PropertyCompanyScoreEntity propertyCompanyScoreEntity = new PropertyCompanyScoreEntity();
+ propertyCompanyScoreEntity.setScore(propertyCompanyComment.getScore());
+ propertyCompanyScoreEntity.setPropertyCompanyId(propertyCompanyComment.getPropertyCompanyId());
+ propertyCompanyScoreEntity.setCreateUser(AuthUtil.getUserId());
+ // 新增
+ propertyCompanyScoreService.save(propertyCompanyScoreEntity);
+ }
+ }
+ }
+}
diff --git a/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.java b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.java
new file mode 100644
index 0000000..0e371e4
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.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.property.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
+import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
+import org.springblade.modules.property.mapper.PropertyCompanyScoreMapper;
+import org.springblade.modules.property.service.IPropertyCompanyScoreService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 物业公司评分表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Service
+public class PropertyCompanyScoreServiceImpl extends ServiceImpl<PropertyCompanyScoreMapper, PropertyCompanyScoreEntity> implements IPropertyCompanyScoreService {
+
+ @Override
+ public IPage<PropertyCompanyScoreVO> selectPropertyCompanyScorePage(IPage<PropertyCompanyScoreVO> page, PropertyCompanyScoreVO propertyCompanyScore) {
+ return page.setRecords(baseMapper.selectPropertyCompanyScorePage(page, propertyCompanyScore));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyCommentVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyCommentVO.java
new file mode 100644
index 0000000..7ec28e5
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyCommentVO.java
@@ -0,0 +1,65 @@
+/*
+ * 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.property.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.modules.circle.vo.CircleCommentVO;
+import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * 物业公司评论表 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PropertyCompanyCommentVO extends PropertyCompanyCommentEntity {
+ private static final long serialVersionUID = 1L;
+
+ private List<CircleCommentVO> children;
+
+ /**
+ * 姓名
+ */
+ @ApiModelProperty("姓名")
+ private String realName;
+
+ /**
+ * 头像
+ */
+ @ApiModelProperty("头像")
+ private String avatar;
+
+ /**
+ * 是否递归查询 1:是 2:否
+ */
+ @ApiModelProperty("是否递归查询 1:是 2:否")
+ private Integer isRec;
+
+ /**
+ * 评分
+ */
+ @ApiModelProperty("评分")
+ private Integer score;
+
+}
diff --git a/src/main/java/org/springblade/modules/property/vo/PropertyCompanyScoreVO.java b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyScoreVO.java
new file mode 100644
index 0000000..0cf54a2
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/vo/PropertyCompanyScoreVO.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.property.vo;
+
+import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 物业公司评分表 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PropertyCompanyScoreVO extends PropertyCompanyScoreEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyCommentWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyCommentWrapper.java
new file mode 100644
index 0000000..2803458
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyCommentWrapper.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.property.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.property.entity.PropertyCompanyCommentEntity;
+import org.springblade.modules.property.vo.PropertyCompanyCommentVO;
+import java.util.Objects;
+
+/**
+ * 物业公司评论表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+public class PropertyCompanyCommentWrapper extends BaseEntityWrapper<PropertyCompanyCommentEntity, PropertyCompanyCommentVO> {
+
+ public static PropertyCompanyCommentWrapper build() {
+ return new PropertyCompanyCommentWrapper();
+ }
+
+ @Override
+ public PropertyCompanyCommentVO entityVO(PropertyCompanyCommentEntity propertyCompanyComment) {
+ PropertyCompanyCommentVO propertyCompanyCommentVO = Objects.requireNonNull(BeanUtil.copy(propertyCompanyComment, PropertyCompanyCommentVO.class));
+
+ //User createUser = UserCache.getUser(propertyCompanyComment.getCreateUser());
+ //User updateUser = UserCache.getUser(propertyCompanyComment.getUpdateUser());
+ //propertyCompanyCommentVO.setCreateUserName(createUser.getName());
+ //propertyCompanyCommentVO.setUpdateUserName(updateUser.getName());
+
+ return propertyCompanyCommentVO;
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyScoreWrapper.java b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyScoreWrapper.java
new file mode 100644
index 0000000..fe582c5
--- /dev/null
+++ b/src/main/java/org/springblade/modules/property/wrapper/PropertyCompanyScoreWrapper.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.property.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.property.entity.PropertyCompanyScoreEntity;
+import org.springblade.modules.property.vo.PropertyCompanyScoreVO;
+import java.util.Objects;
+
+/**
+ * 物业公司评分表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-01-05
+ */
+public class PropertyCompanyScoreWrapper extends BaseEntityWrapper<PropertyCompanyScoreEntity, PropertyCompanyScoreVO> {
+
+ public static PropertyCompanyScoreWrapper build() {
+ return new PropertyCompanyScoreWrapper();
+ }
+
+ @Override
+ public PropertyCompanyScoreVO entityVO(PropertyCompanyScoreEntity propertyCompanyScore) {
+ PropertyCompanyScoreVO propertyCompanyScoreVO = Objects.requireNonNull(BeanUtil.copy(propertyCompanyScore, PropertyCompanyScoreVO.class));
+
+ //User createUser = UserCache.getUser(propertyCompanyScore.getCreateUser());
+ //User updateUser = UserCache.getUser(propertyCompanyScore.getUpdateUser());
+ //propertyCompanyScoreVO.setCreateUserName(createUser.getName());
+ //propertyCompanyScoreVO.setUpdateUserName(updateUser.getName());
+
+ return propertyCompanyScoreVO;
+ }
+
+
+}
--
Gitblit v1.9.3