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 b59f0236569190a8647806d3840dcd81015753da..6720ca2fc351a89fd7e3225cd4c23f4230ebb119 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 0000000000000000000000000000000000000000..a23c92f72fdc564e24f2192313f602c6af5dfd12 --- /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 96ad6c40e3e4d6d3e3b7414e80c9ff80e8c21bf4..616a5ca0322892fc258d401d65f90cbf3b709787 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 617341ce8e80e6176ccfdf32a9152d8129ddd426..e0a5f7d09e439b4082ffeb8f30eb494fce821c44 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 0000000000000000000000000000000000000000..92ce23444f1428d6902479bf4af3c2b5a80f8bcf --- /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 0000000000000000000000000000000000000000..539714568cfb7f8c10e3ba0e1e71ece6335c654d --- /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 1e30895edb6291b44be1d82cd9496dee3fd0482c..9059f6fac2caf7ff46814d037dfcc8f6d717164a 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 0000000000000000000000000000000000000000..308f19864e1040000ffb66c13eeda955be529c57 --- /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 0000000000000000000000000000000000000000..4d743a8a3a3889ef0877064dab4b5f5390471452 --- /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 0000000000000000000000000000000000000000..35de32fee04504961c5d3fc4cec5737edd977b09 --- /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 0000000000000000000000000000000000000000..94a4763109afce8cbb19488c0917bbf1b2d5d9f1 --- /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 9d86153d3930897611ea045c5685bb183fc199c3..51384f31e12910ef014bc65a53f4cbef180a31ad 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 cb79ced38a76616f10ceccd84f2637417b56cd0e..5a8f68c620a0e5eb6ce7c35f160aafd9c1884d8a 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 80a2a7668c0fcabcd76d886c225a73d78fe11d26..628c867bcb1eeca93f9d5be5df409684a953c3b3 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 2dac72993c2c10697bc8b8cfafffc86770936163..9d5ef053753a0d367bed243777dcb5de941cee76 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 0000000000000000000000000000000000000000..754a2c35aa36081145266a4bfbe513b840cb8b86 --- /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 0000000000000000000000000000000000000000..358c80a7dae3393c47c87351c7de0103f1c49fb6 --- /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 04ca9efca7bc4aac9c4d7e8a4655f8f7d528ad01..f4bea41b329704fcbcbf38c8e11155875da73948 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 0000000000000000000000000000000000000000..6d30e4f9d2277c20af2e27dcf6c3bf90a4ec541b --- /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 63df0d8d333538a4271bb9c2c1c48fae676bf16b..1a4a590dc87dde1a67ebd317ec3155f1ff2da613 100644 --- a/propertyManagement-ui/src/views/business/comment/index.vue +++ b/propertyManagement-ui/src/views/business/comment/index.vue @@ -92,35 +92,40 @@ - - + + - + - + - + + + + - + - - + + +