feat(Property): 小程序热门活动接口

This commit is contained in:
2025-09-11 21:40:54 +08:00
parent 0389aa9d7b
commit 1421189257
4 changed files with 67 additions and 4 deletions

View File

@@ -0,0 +1,61 @@
package org.dromara.property.controller.xcx;
import cn.dev33.satoken.annotation.SaCheckPermission;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController;
import org.dromara.property.domain.bo.CustomerActivityBo;
import org.dromara.property.domain.vo.CustomerActivityVo;
import org.dromara.property.service.ICustomerActivityService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 客户服务-活动
* 前端访问路由地址为:/property/activity
*
* @author lsm
* @since 2025-09-11
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/xcx/activity")
public class XCustomerActivityController extends BaseController {
private final ICustomerActivityService customerActivityService;
/**
* 查询客户服务-活动列表
*/
@GetMapping("/list")
@SaCheckPermission("xcx:activity:list")
public TableDataInfo<CustomerActivityVo> list(CustomerActivityBo bo, PageQuery pageQuery) {
return customerActivityService.queryPageList(bo, pageQuery);
}
/**
* 获取客户服务-活动详细信息
*
* @param id 主键
*/
@SaCheckPermission("xcx:activity:query")
@GetMapping("/{id}")
public R<CustomerActivityVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return R.ok(customerActivityService.queryById(id));
}
}

View File

@@ -3,13 +3,15 @@ package org.dromara.property.mapper;
import org.dromara.property.domain.CustomerActivity;
import org.dromara.property.domain.vo.CustomerActivityVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.mapstruct.Mapper;
/**
* 客户服务-活动Mapper接口
*
* @author yuyongle
* @date 2025-09-08
* @since 2025-09-08
*/
@Mapper
public interface CustomerActivityMapper extends BaseMapperPlus<CustomerActivity, CustomerActivityVo> {
}

View File

@@ -1,8 +1,6 @@
package org.dromara.property.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
@@ -32,7 +30,7 @@ import java.util.Collection;
* 客户服务-活动Service业务层处理
*
* @author yuyongle
* @date 2025-09-08
* @since 2025-09-08
*/
@Slf4j
@RequiredArgsConstructor

View File

@@ -202,6 +202,8 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
}
}
// 密码修改走单独接口
update.setPassword(null);
boolean flag = baseMapper.updateById(update) > 0;
Assert.isTrue(flag, "修改入驻员工失败!");
return flag;