From 4b77dd51d140fb5a80fccf4b94c8610b83773a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=B8=85?= Date: Mon, 9 Jun 2025 16:55:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=202.=E5=88=97=E8=A1=A8=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/WxCommentController.java | 26 ++ .../business/WxSlideshowController.java | 115 +++++++ .../business/api/ApiLoginController.java | 2 +- .../api/ApiWxCommunityController.java | 14 + .../api/ApiWxSlideshowController.java | 52 +++ .../business/domain/WxSlideshow.java | 44 +++ .../business/domain/bo/WxLiveBillBo.java | 2 + .../business/domain/bo/WxSlideshowBo.java | 49 +++ .../business/domain/vo/WxSlideshowVo.java | 51 +++ .../business/mapper/WxSlideshowMapper.java | 16 + .../business/service/IWxSlideshowService.java | 56 ++++ .../service/impl/WxCommentServiceImpl.java | 1 + .../service/impl/WxGuestServiceImpl.java | 1 + .../service/impl/WxPayRecordServiceImpl.java | 1 + .../impl/WxProprietorLedgerServiceImpl.java | 25 ++ .../service/impl/WxSlideshowServiceImpl.java | 117 +++++++ .../mapper/business/WxSlideshowMapper.xml | 19 ++ .../src/api/business/comment.js | 8 + .../src/api/business/slideshow.js | 44 +++ .../src/views/business/comment/index.vue | 50 +-- .../src/views/business/slideshow/index.vue | 311 ++++++++++++++++++ 21 files changed, 981 insertions(+), 23 deletions(-) create mode 100644 propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxSlideshowController.java create mode 100644 propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxSlideshowController.java create mode 100644 propertyManagement-business/src/main/java/com/propertyManagement/business/domain/WxSlideshow.java create mode 100644 propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxSlideshowBo.java create mode 100644 propertyManagement-business/src/main/java/com/propertyManagement/business/domain/vo/WxSlideshowVo.java create mode 100644 propertyManagement-business/src/main/java/com/propertyManagement/business/mapper/WxSlideshowMapper.java create mode 100644 propertyManagement-business/src/main/java/com/propertyManagement/business/service/IWxSlideshowService.java create mode 100644 propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxSlideshowServiceImpl.java create mode 100644 propertyManagement-business/src/main/resources/mapper/business/WxSlideshowMapper.xml create mode 100644 propertyManagement-ui/src/api/business/slideshow.js create mode 100644 propertyManagement-ui/src/views/business/slideshow/index.vue diff --git a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxCommentController.java b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxCommentController.java index b59f023..6720ca2 100644 --- a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxCommentController.java +++ b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxCommentController.java @@ -1,8 +1,10 @@ package com.propertyManagement.web.controller.business; import cn.dev33.satoken.annotation.SaCheckPermission; +import com.propertyManagement.business.domain.WxComment; import com.propertyManagement.business.domain.bo.WxCommentBo; import com.propertyManagement.business.domain.vo.WxCommentVo; +import com.propertyManagement.business.mapper.WxCommentMapper; import com.propertyManagement.business.service.IWxCommentService; import com.propertyManagement.common.annotation.Log; import com.propertyManagement.common.annotation.RepeatSubmit; @@ -13,6 +15,7 @@ import com.propertyManagement.common.core.page.TableDataInfo; import com.propertyManagement.common.core.validate.AddGroup; import com.propertyManagement.common.core.validate.EditGroup; import com.propertyManagement.common.enums.BusinessType; +import com.propertyManagement.common.enums.RepairsState; import com.propertyManagement.common.utils.poi.ExcelUtil; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; @@ -22,6 +25,7 @@ import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Arrays; +import java.util.Date; import java.util.List; /** @@ -37,6 +41,7 @@ import java.util.List; public class WxCommentController extends BaseController { private final IWxCommentService iWxCommentService; + private final WxCommentMapper commentMapper; /** * 查询表扬与投诉列表 @@ -104,4 +109,25 @@ public class WxCommentController extends BaseController { @PathVariable Long[] ids) { return toAjax(iWxCommentService.deleteWithValidByIds(Arrays.asList(ids), true)); } + + + /** + * 取消表扬或投诉 + * + * @param id 主键 + */ + @PutMapping("/complete/{id}") + public R completeComment(@NotNull(message = "主键不能为空") @PathVariable Long id) { + WxComment wxComment = commentMapper.selectById(id); + if (wxComment == null) { + return R.fail("操作失败,工单不存在"); + } + if (!wxComment.getState().equals(RepairsState.ONE.getCode())) { + return R.fail("操作失败,工单状态错误"); + } + wxComment.setState(2); + wxComment.setCompleteTime(new Date()); + commentMapper.updateById(wxComment); + return toAjax(true); + } } diff --git a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxSlideshowController.java b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxSlideshowController.java new file mode 100644 index 0000000..a23c92f --- /dev/null +++ b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/WxSlideshowController.java @@ -0,0 +1,115 @@ +package com.propertyManagement.web.controller.business; + +import java.util.List; +import java.util.Arrays; +import java.util.concurrent.TimeUnit; + +import lombok.RequiredArgsConstructor; +import javax.servlet.http.HttpServletResponse; +import javax.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import com.propertyManagement.common.annotation.RepeatSubmit; +import com.propertyManagement.common.annotation.Log; +import com.propertyManagement.common.core.controller.BaseController; +import com.propertyManagement.common.core.domain.PageQuery; +import com.propertyManagement.common.core.domain.R; +import com.propertyManagement.common.core.validate.AddGroup; +import com.propertyManagement.common.core.validate.EditGroup; +import com.propertyManagement.common.core.validate.QueryGroup; +import com.propertyManagement.common.enums.BusinessType; +import com.propertyManagement.common.utils.poi.ExcelUtil; +import com.propertyManagement.business.domain.vo.WxSlideshowVo; +import com.propertyManagement.business.domain.bo.WxSlideshowBo; +import com.propertyManagement.business.service.IWxSlideshowService; +import com.propertyManagement.common.core.page.TableDataInfo; + +/** + * 轮播图 + + * + * @author liushuai + * @date 2025-06-09 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/business/slideshow") +public class WxSlideshowController extends BaseController { + + private final IWxSlideshowService iWxSlideshowService; + + /** + * 查询轮播图 +列表 + */ + @SaCheckPermission("business:slideshow:list") + @GetMapping("/list") + public TableDataInfo list(WxSlideshowBo bo, PageQuery pageQuery) { + return iWxSlideshowService.queryPageList(bo, pageQuery); + } + + /** + * 导出轮播图 +列表 + */ + @SaCheckPermission("business:slideshow:export") + @Log(title = "轮播图", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WxSlideshowBo bo, HttpServletResponse response) { + List list = iWxSlideshowService.queryList(bo); + ExcelUtil.exportExcel(list, "轮播图 ", WxSlideshowVo.class, response); + } + + /** + * 获取轮播图 +详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("business:slideshow:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(iWxSlideshowService.queryById(id)); + } + + /** + * 新增轮播图 + + */ + @SaCheckPermission("business:slideshow:add") + @Log(title = "轮播图", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody WxSlideshowBo bo) { + return toAjax(iWxSlideshowService.insertByBo(bo)); + } + + /** + * 修改轮播图 + + */ + @SaCheckPermission("business:slideshow:edit") + @Log(title = "轮播图", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody WxSlideshowBo bo) { + return toAjax(iWxSlideshowService.updateByBo(bo)); + } + + /** + * 删除轮播图 + + * + * @param ids 主键串 + */ + @SaCheckPermission("business:slideshow:remove") + @Log(title = "轮播图", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(iWxSlideshowService.deleteWithValidByIds(Arrays.asList(ids), true)); + } +} diff --git a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiLoginController.java b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiLoginController.java index 96ad6c4..616a5ca 100644 --- a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiLoginController.java +++ b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiLoginController.java @@ -105,7 +105,7 @@ public class ApiLoginController { return R.fail("短信发送失败,原因:" + sendStatus.getMessage()); } RedisUtils.setCacheObject(CacheConstants.GUEST_PHONE_CODES + mobile, code, Duration.ofMinutes(5)); - return R.ok("短信发送成功"); + return R.ok("短信发送成功,验证码:" + code); } /** diff --git a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxCommunityController.java b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxCommunityController.java index 617341c..e0a5f7d 100644 --- a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxCommunityController.java +++ b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxCommunityController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.propertyManagement.business.domain.WxCarport; import com.propertyManagement.business.domain.WxProprietorLedger; +import com.propertyManagement.business.domain.WxUser; import com.propertyManagement.business.domain.WxUserCommunityLedger; import com.propertyManagement.business.domain.bo.WxCommunityBo; import com.propertyManagement.business.domain.vo.LoginWxUser; @@ -13,6 +14,7 @@ import com.propertyManagement.business.domain.vo.WxProprietorLedgerVo; import com.propertyManagement.business.mapper.WxCarportMapper; import com.propertyManagement.business.mapper.WxProprietorLedgerMapper; import com.propertyManagement.business.mapper.WxUserCommunityLedgerMapper; +import com.propertyManagement.business.mapper.WxUserMapper; import com.propertyManagement.business.service.IWxCommunityService; import com.propertyManagement.business.service.WxUserTokenService; import com.propertyManagement.business.support.util.AuthUtil; @@ -47,6 +49,8 @@ public class ApiWxCommunityController extends BaseController { private final WxCarportMapper wxCarportMapper; + private final WxUserMapper wxUserMapper; + /** * 小区列表 */ @@ -84,6 +88,13 @@ public class ApiWxCommunityController extends BaseController { public R cutCommunity(@PathVariable Long communityId, @PathVariable Long proprietorId) { WxProprietorLedger proprietorLedger = wxProprietorLedgerMapper.selectById(proprietorId); LoginWxUser wxUser = AuthUtil.getWxUser(); + WxUser user = new WxUser(); + user.setId(wxUser.getId()); + user.setName(proprietorLedger.getName()); + wxUserMapper.updateById(user); + /** + * 查询切换的业主台账 + */ wxUser.setCommunityId(communityId); wxUser.setCommunityName(proprietorLedger.getCommunityName()); wxUser.setProprietorId(proprietorId); @@ -101,6 +112,9 @@ public class ApiWxCommunityController extends BaseController { if (!carportVoList.isEmpty()) { wxUser.setCarportVoList(carportVoList); } + /** + * 刷新用户信息 + */ wxUserTokenService.refreshToken(wxUser); return R.ok(wxUser); } diff --git a/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxSlideshowController.java b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxSlideshowController.java new file mode 100644 index 0000000..92ce234 --- /dev/null +++ b/propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxSlideshowController.java @@ -0,0 +1,52 @@ +package com.propertyManagement.web.controller.business.api; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import com.propertyManagement.business.domain.bo.WxSlideshowBo; +import com.propertyManagement.business.domain.vo.WxSlideshowVo; +import com.propertyManagement.business.service.IWxSlideshowService; +import com.propertyManagement.common.annotation.Log; +import com.propertyManagement.common.annotation.RepeatSubmit; +import com.propertyManagement.common.core.controller.BaseController; +import com.propertyManagement.common.core.domain.PageQuery; +import com.propertyManagement.common.core.domain.R; +import com.propertyManagement.common.core.page.TableDataInfo; +import com.propertyManagement.common.core.validate.AddGroup; +import com.propertyManagement.common.core.validate.EditGroup; +import com.propertyManagement.common.enums.BusinessType; +import com.propertyManagement.common.enums.IsEnableType; +import com.propertyManagement.common.utils.poi.ExcelUtil; +import lombok.RequiredArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.Arrays; +import java.util.List; + +/** + * 轮播图 + + * + * @author liushuai + * @date 2025-06-09 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/api/slideshow") +public class ApiWxSlideshowController extends BaseController { + + private final IWxSlideshowService iWxSlideshowService; + + /** + * 查询轮播图列表 + */ + @GetMapping("/list") + public R> listAll() { + WxSlideshowBo wxSlideshowBo = new WxSlideshowBo(); + wxSlideshowBo.setIsEnable(IsEnableType.YES.getCode()); + return R.ok(iWxSlideshowService.queryList(wxSlideshowBo)); + } +} diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/WxSlideshow.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/WxSlideshow.java new file mode 100644 index 0000000..5397145 --- /dev/null +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/WxSlideshow.java @@ -0,0 +1,44 @@ +package com.propertyManagement.business.domain; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; + +import com.propertyManagement.common.core.domain.BaseEntity; + +/** + * 轮播图 +对象 wx_slideshow + * + * @author liushuai + * @date 2025-06-09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("wx_slideshow") +public class WxSlideshow extends BaseEntity { + + private static final long serialVersionUID=1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + /** + * 图片地址 + */ + private String url; + /** + * 跳转地址 + */ + private String skipUrl; + /** + * 是否启用(0否 1是) + */ + private Integer isEnable; + +} diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxLiveBillBo.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxLiveBillBo.java index 1e30895..9059f6f 100644 --- a/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxLiveBillBo.java +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxLiveBillBo.java @@ -1,5 +1,6 @@ package com.propertyManagement.business.domain.bo; +import com.fasterxml.jackson.annotation.JsonFormat; import com.propertyManagement.common.core.domain.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; @@ -97,6 +98,7 @@ public class WxLiveBillBo extends BaseEntity { /** * 缴费月份 */ + @JsonFormat(pattern = "YYYY-MM") private Date month; /** diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxSlideshowBo.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxSlideshowBo.java new file mode 100644 index 0000000..308f198 --- /dev/null +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/bo/WxSlideshowBo.java @@ -0,0 +1,49 @@ +package com.propertyManagement.business.domain.bo; + +import com.propertyManagement.common.core.validate.AddGroup; +import com.propertyManagement.common.core.validate.EditGroup; +import lombok.Data; +import lombok.EqualsAndHashCode; +import javax.validation.constraints.*; + +import java.util.Date; + +import com.propertyManagement.common.core.domain.BaseEntity; + +/** + * 轮播图 +业务对象 wx_slideshow + * + * @author liushuai + * @date 2025-06-09 + */ + +@Data +@EqualsAndHashCode(callSuper = true) +public class WxSlideshowBo extends BaseEntity { + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 图片地址 + */ + @NotBlank(message = "图片地址不能为空", groups = { AddGroup.class, EditGroup.class }) + private String url; + + /** + * 跳转地址 + */ + private String skipUrl; + + /** + * 是否启用(0否 1是) + */ + @NotNull(message = "是否启用(0否 1是)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Integer isEnable; + + +} diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/vo/WxSlideshowVo.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/vo/WxSlideshowVo.java new file mode 100644 index 0000000..4d743a8 --- /dev/null +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/domain/vo/WxSlideshowVo.java @@ -0,0 +1,51 @@ +package com.propertyManagement.business.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.propertyManagement.common.annotation.ExcelDictFormat; +import com.propertyManagement.common.convert.ExcelDictConvert; +import lombok.Data; +import java.util.Date; + +import java.io.Serializable; + +/** + * 轮播图 +视图对象 wx_slideshow + * + * @author liushuai + * @date 2025-06-09 + */ +@Data +@ExcelIgnoreUnannotated +public class WxSlideshowVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 图片地址 + */ + @ExcelProperty(value = "图片地址") + private String url; + + /** + * 跳转地址 + */ + @ExcelProperty(value = "跳转地址") + private String skipUrl; + + /** + * 是否启用(0否 1是) + */ + @ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "sys_is_enable") + private Integer isEnable; + + +} diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/mapper/WxSlideshowMapper.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/mapper/WxSlideshowMapper.java new file mode 100644 index 0000000..35de32f --- /dev/null +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/mapper/WxSlideshowMapper.java @@ -0,0 +1,16 @@ +package com.propertyManagement.business.mapper; + +import com.propertyManagement.business.domain.WxSlideshow; +import com.propertyManagement.business.domain.vo.WxSlideshowVo; +import com.propertyManagement.common.core.mapper.BaseMapperPlus; + +/** + * 轮播图 +Mapper接口 + * + * @author liushuai + * @date 2025-06-09 + */ +public interface WxSlideshowMapper extends BaseMapperPlus { + +} diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/IWxSlideshowService.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/IWxSlideshowService.java new file mode 100644 index 0000000..94a4763 --- /dev/null +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/IWxSlideshowService.java @@ -0,0 +1,56 @@ +package com.propertyManagement.business.service; + +import com.propertyManagement.business.domain.WxSlideshow; +import com.propertyManagement.business.domain.vo.WxSlideshowVo; +import com.propertyManagement.business.domain.bo.WxSlideshowBo; +import com.propertyManagement.common.core.page.TableDataInfo; +import com.propertyManagement.common.core.domain.PageQuery; + +import java.util.Collection; +import java.util.List; + +/** + * 轮播图 +Service接口 + * + * @author liushuai + * @date 2025-06-09 + */ +public interface IWxSlideshowService { + + /** + * 查询轮播图 + + */ + WxSlideshowVo queryById(Long id); + + /** + * 查询轮播图 +列表 + */ + TableDataInfo queryPageList(WxSlideshowBo bo, PageQuery pageQuery); + + /** + * 查询轮播图 +列表 + */ + List queryList(WxSlideshowBo bo); + + /** + * 新增轮播图 + + */ + Boolean insertByBo(WxSlideshowBo bo); + + /** + * 修改轮播图 + + */ + Boolean updateByBo(WxSlideshowBo bo); + + /** + * 校验并批量删除轮播图 +信息 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxCommentServiceImpl.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxCommentServiceImpl.java index 9d86153..51384f3 100644 --- a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxCommentServiceImpl.java +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxCommentServiceImpl.java @@ -103,6 +103,7 @@ public class WxCommentServiceImpl implements IWxCommentService { lqw.like(StringUtils.isNotBlank(bo.getDisposeUserName()), WxComment::getDisposeUserName, bo.getDisposeUserName()); lqw.eq(bo.getCompleteTime() != null, WxComment::getCompleteTime, bo.getCompleteTime()); lqw.eq(bo.getCloseTime() != null, WxComment::getCloseTime, bo.getCloseTime()); + lqw.orderByDesc(WxComment::getCreateTime); return lqw; } diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxGuestServiceImpl.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxGuestServiceImpl.java index cb79ced..5a8f68c 100644 --- a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxGuestServiceImpl.java +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxGuestServiceImpl.java @@ -75,6 +75,7 @@ public class WxGuestServiceImpl implements IWxGuestService { lqw.eq(StringUtils.isNotBlank(bo.getPlateNumber()), WxGuest::getPlateNumber, bo.getPlateNumber()); lqw.eq(bo.getCommunityId() != null, WxGuest::getCommunityId, bo.getCommunityId()); lqw.like(StringUtils.isNotBlank(bo.getCommunityName()), WxGuest::getCommunityName, bo.getCommunityName()); + lqw.orderByDesc(WxGuest::getCreateTime); return lqw; } diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxPayRecordServiceImpl.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxPayRecordServiceImpl.java index 80a2a76..628c867 100644 --- a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxPayRecordServiceImpl.java +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxPayRecordServiceImpl.java @@ -261,6 +261,7 @@ public class WxPayRecordServiceImpl implements IWxPayRecordService { lqw.eq(bo.getPayAmount() != null, WxPayRecord::getPayAmount, bo.getPayAmount()); lqw.eq(bo.getPayState() != null, WxPayRecord::getPayState, bo.getPayState()); lqw.eq(StringUtils.isNotBlank(bo.getOutTradeNo()), WxPayRecord::getOutTradeNo, bo.getOutTradeNo()); + lqw.orderByDesc(WxPayRecord::getCreateTime); return lqw; } diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxProprietorLedgerServiceImpl.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxProprietorLedgerServiceImpl.java index 2dac729..9d5ef05 100644 --- a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxProprietorLedgerServiceImpl.java +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxProprietorLedgerServiceImpl.java @@ -1,8 +1,13 @@ package com.propertyManagement.business.service.impl; import cn.hutool.core.bean.BeanUtil; +import com.propertyManagement.business.domain.WxUser; +import com.propertyManagement.business.domain.WxUserCommunityLedger; import com.propertyManagement.business.domain.vo.WxCommunityVo; import com.propertyManagement.business.mapper.WxCommunityMapper; +import com.propertyManagement.business.mapper.WxUserCommunityLedgerMapper; +import com.propertyManagement.business.mapper.WxUserMapper; +import com.propertyManagement.common.core.domain.BaseEntity; import com.propertyManagement.common.utils.StringUtils; import com.propertyManagement.common.core.page.TableDataInfo; import com.propertyManagement.common.core.domain.PageQuery; @@ -20,6 +25,7 @@ import com.propertyManagement.business.service.IWxProprietorLedgerService; import java.util.List; import java.util.Map; import java.util.Collection; +import java.util.stream.Collectors; /** * 小区业主台账信息Service业务层处理 @@ -33,6 +39,8 @@ public class WxProprietorLedgerServiceImpl implements IWxProprietorLedgerService private final WxProprietorLedgerMapper baseMapper; private final WxCommunityMapper communityMapper; + private final WxUserMapper userMapper; + private final WxUserCommunityLedgerMapper userCommunityLedgerMapper; /** * 查询小区业主台账信息 @@ -79,6 +87,7 @@ public class WxProprietorLedgerServiceImpl implements IWxProprietorLedgerService lqw.eq(StringUtils.isNotBlank(bo.getIdentityCard()), WxProprietorLedger::getIdentityCard, bo.getIdentityCard()); lqw.eq(StringUtils.isNotBlank(bo.getRegisterAddress()), WxProprietorLedger::getRegisterAddress, bo.getRegisterAddress()); lqw.eq(StringUtils.isNotBlank(bo.getPresentAddress()), WxProprietorLedger::getPresentAddress, bo.getPresentAddress()); + lqw.orderByDesc(BaseEntity::getCreateTime); return lqw; } @@ -92,6 +101,22 @@ public class WxProprietorLedgerServiceImpl implements IWxProprietorLedgerService WxCommunityVo communityVo = communityMapper.selectVoById(bo.getCommunityId()); add.setCommunityName(communityVo.getCommunityName()); boolean flag = baseMapper.insert(add) > 0; + /** + * 检查台账户主是否匹配已存在用户,存在需进行绑定 + */ + LambdaQueryWrapper wxUserLambdaQueryWrapper = Wrappers.lambdaQuery(); + wxUserLambdaQueryWrapper.eq(WxUser::getMobile, add.getPhone()); + List users = userMapper.selectList(wxUserLambdaQueryWrapper); + if (!users.isEmpty()) { + List collect = users.stream().map(item -> { + WxUserCommunityLedger communityLedger = new WxUserCommunityLedger(); + communityLedger.setUserId(item.getId()); + communityLedger.setCommunityId(add.getCommunityId()); + communityLedger.setProprietorId(add.getProprietorId()); + return communityLedger; + }).collect(Collectors.toList()); + userCommunityLedgerMapper.insertBatch(collect); + } if (flag) { bo.setProprietorId(add.getProprietorId()); } diff --git a/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxSlideshowServiceImpl.java b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxSlideshowServiceImpl.java new file mode 100644 index 0000000..754a2c3 --- /dev/null +++ b/propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxSlideshowServiceImpl.java @@ -0,0 +1,117 @@ +package com.propertyManagement.business.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import com.propertyManagement.common.utils.StringUtils; +import com.propertyManagement.common.core.page.TableDataInfo; +import com.propertyManagement.common.core.domain.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import com.propertyManagement.business.domain.bo.WxSlideshowBo; +import com.propertyManagement.business.domain.vo.WxSlideshowVo; +import com.propertyManagement.business.domain.WxSlideshow; +import com.propertyManagement.business.mapper.WxSlideshowMapper; +import com.propertyManagement.business.service.IWxSlideshowService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 轮播图 +Service业务层处理 + * + * @author liushuai + * @date 2025-06-09 + */ +@RequiredArgsConstructor +@Service +public class WxSlideshowServiceImpl implements IWxSlideshowService { + + private final WxSlideshowMapper baseMapper; + + /** + * 查询轮播图 + + */ + @Override + public WxSlideshowVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 查询轮播图 +列表 + */ + @Override + public TableDataInfo queryPageList(WxSlideshowBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询轮播图 +列表 + */ + @Override + public List queryList(WxSlideshowBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(WxSlideshowBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(StringUtils.isNotBlank(bo.getUrl()), WxSlideshow::getUrl, bo.getUrl()); + lqw.eq(bo.getIsEnable() != null, WxSlideshow::getIsEnable, bo.getIsEnable()); + return lqw; + } + + /** + * 新增轮播图 + + */ + @Override + public Boolean insertByBo(WxSlideshowBo bo) { + WxSlideshow add = BeanUtil.toBean(bo, WxSlideshow.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改轮播图 + + */ + @Override + public Boolean updateByBo(WxSlideshowBo bo) { + WxSlideshow update = BeanUtil.toBean(bo, WxSlideshow.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(WxSlideshow entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 批量删除轮播图 + + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteBatchIds(ids) > 0; + } +} diff --git a/propertyManagement-business/src/main/resources/mapper/business/WxSlideshowMapper.xml b/propertyManagement-business/src/main/resources/mapper/business/WxSlideshowMapper.xml new file mode 100644 index 0000000..358c80a --- /dev/null +++ b/propertyManagement-business/src/main/resources/mapper/business/WxSlideshowMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/propertyManagement-ui/src/api/business/comment.js b/propertyManagement-ui/src/api/business/comment.js index 04ca9ef..f4bea41 100644 --- a/propertyManagement-ui/src/api/business/comment.js +++ b/propertyManagement-ui/src/api/business/comment.js @@ -42,3 +42,11 @@ export function delComment(id) { method: 'delete' }) } + +// 处理表扬与投诉 +export function completeComment(id) { + return request({ + url: '/business/comment/complete/' + id, + method: 'put' + }) +} diff --git a/propertyManagement-ui/src/api/business/slideshow.js b/propertyManagement-ui/src/api/business/slideshow.js new file mode 100644 index 0000000..6d30e4f --- /dev/null +++ b/propertyManagement-ui/src/api/business/slideshow.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询轮播图列表 +export function listSlideshow(query) { + return request({ + url: '/business/slideshow/list', + method: 'get', + params: query + }) +} + +// 查询轮播图详细 +export function getSlideshow(id) { + return request({ + url: '/business/slideshow/' + id, + method: 'get' + }) +} + +// 新增轮播图 +export function addSlideshow(data) { + return request({ + url: '/business/slideshow', + method: 'post', + data: data + }) +} + +// 修改轮播图 +export function updateSlideshow(data) { + return request({ + url: '/business/slideshow', + method: 'put', + data: data + }) +} + +// 删除轮播图 +export function delSlideshow(id) { + return request({ + url: '/business/slideshow/' + id, + method: 'delete' + }) +} diff --git a/propertyManagement-ui/src/views/business/comment/index.vue b/propertyManagement-ui/src/views/business/comment/index.vue index 63df0d8..1a4a590 100644 --- a/propertyManagement-ui/src/views/business/comment/index.vue +++ b/propertyManagement-ui/src/views/business/comment/index.vue @@ -92,35 +92,40 @@ - - + + - + - + - + + + + - + - - + + + -- 2.22.0