From 1f6b51ae20f0d2dfc1aed27ca885b680f4fb47f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Sat, 21 Sep 2024 17:16:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B09.21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FleetMemberController.java | 15 ++++++++ .../fleet/mapper/FleetMemberMapper.java | 1 + .../fleet/mapper/xml/FleetMemberMapper.xml | 34 +++++++++++++++++++ .../service/impl/FleetMemberServiceImpl.java | 3 +- .../business/fleet/vo/FleetMemberVo.java | 2 ++ 5 files changed, 54 insertions(+), 1 deletion(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java index 2377cc85a..7446847af 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java @@ -56,6 +56,21 @@ public class FleetMemberController extends BaseController { return getSuccessResult(fleetMemberService.queryPage(page,fleetMember)); } + /** + * 根据条件分页查询首页轮播图 + * @param fleetMember + * @param pageNo + * @param pageSize + * @return + */ + @GetMapping("/nameOrMobile") + public ResponseObject listsByNameOrMobile(FleetMemberVo fleetMember, + @RequestParam(value = "page",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){ + Page page =new Page(pageNo,pageSize); + return getSuccessResult(fleetMemberService.queryPage(page,fleetMember)); + } + /** * 通过主键查询单条数据 * diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/FleetMemberMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/FleetMemberMapper.java index 7e9deae0b..8e8dc939b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/FleetMemberMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/FleetMemberMapper.java @@ -9,4 +9,5 @@ import org.apache.ibatis.annotations.Param; public interface FleetMemberMapper extends BaseMapper { IPage queryPage(Page page, @Param("entity") FleetMemberVo fleetMember); + IPage queryPageByNameOrMobile(Page page, @Param("entity") FleetMemberVo fleetMember); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/xml/FleetMemberMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/xml/FleetMemberMapper.xml index 343d6306b..27ddb40c6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/xml/FleetMemberMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/mapper/xml/FleetMemberMapper.xml @@ -29,5 +29,39 @@ ORDER BY create_time DESC + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java index 2f1065f0e..a8c170b12 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java @@ -1,6 +1,7 @@ package com.fuint.business.fleet.service.impl; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -36,7 +37,7 @@ public class FleetMemberServiceImpl extends ServiceImpl queryPage(Page page, FleetMemberVo fleetMember) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); fleetMember.setStoreId(nowAccountInfo.getStoreId()); - return baseMapper.queryPage(page,fleetMember); + return baseMapper.queryPageByNameOrMobile(page,fleetMember); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/vo/FleetMemberVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/vo/FleetMemberVo.java index 0cbc51720..421d0c0d0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/vo/FleetMemberVo.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/vo/FleetMemberVo.java @@ -19,4 +19,6 @@ public class FleetMemberVo extends FleetMember { * 创建人 */ private String accountName; + + private String nameOrMobile; }