From 6dd43b9d68a72e7c9f4d245290d5f91061073edb Mon Sep 17 00:00:00 2001 From: wangh <9483> Date: Tue, 5 Dec 2023 15:16:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IntegralDetailController.java | 12 ++- .../integral/entity/IntegralDetail.java | 12 +-- .../integral/mapper/IntegralDetailMapper.java | 2 +- .../mapper/xml/IntegralDetailMapper.xml | 40 ++------- .../service/IntegralDetailService.java | 1 + .../impl/IntegralDetailServiceImpl.java | 5 ++ .../impl/CardValueRecordServiceImpl.java | 4 + .../controller/LJUserController.java | 1 - .../src/test/java/UserSeriviceTest.java | 89 +++++++++++++++++++ .../pagesHome/PointsMall/PointsMall.vue | 4 +- .../pagesHome/PointsMing/PointsMing.vue | 40 ++++++--- 11 files changed, 155 insertions(+), 55 deletions(-) create mode 100644 fuintBackend/fuint-application/src/test/java/UserSeriviceTest.java diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralDetailController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralDetailController.java index 18e273d03..9715071ca 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralDetailController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/controller/IntegralDetailController.java @@ -19,7 +19,7 @@ import javax.annotation.Resource; * @since 2023-11-10 17:52:32 */ @RestController -@RequestMapping("integralDetail") +@RequestMapping("business/integral/integralDetail") public class IntegralDetailController extends BaseController { /** * 服务对象 @@ -42,6 +42,16 @@ public class IntegralDetailController extends BaseController { IPage< IntegralDetail> iPageList = this.integralDetailService.queryByPage(page, integralDetail); return getSuccessResult(iPageList); } + + @GetMapping("queryByPageUni") + public ResponseObject queryByPageUni(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("integralDetail") IntegralDetail integralDetail) { + Page page = new Page(pageNo, pageSize); + IPage< IntegralDetail> iPageList = this.integralDetailService.queryByPageUni(page, integralDetail); + return getSuccessResult(iPageList); + } + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java index bd846d7bb..645aa9e82 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java @@ -44,14 +44,10 @@ public class IntegralDetail extends BaseEntity { */ private Integer storeId; - - - - - - - - + /** + * 连锁店id + */ + private Integer chainStoreId; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/IntegralDetailMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/IntegralDetailMapper.java index 25cad5109..eca2bed6b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/IntegralDetailMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/IntegralDetailMapper.java @@ -30,7 +30,7 @@ public interface IntegralDetailMapper { * @param page 分页对象 * @return 对象列表 */ - IPage queryAllByLimit(@Param("page") Page page, IntegralDetail integralDetail); + IPage queryAllByLimit(@Param("page") Page page,@Param("integralDetail") IntegralDetail integralDetail); /** * 统计总行数 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml index a3ffc0dcd..2178c46f8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml @@ -31,41 +31,19 @@ id, user_id, points_change, current_points, type, change_reason, store_id, create_time, update_time, create_by, update_by,change_type from integral_detail - - and id = #{id} + + and chain_store_id = #{integralDetail.chainStoreId} - - and user_id = #{userId} - - - and points_change = #{pointsChange} - - - and current_points = #{currentPoints} - - - and type = #{type} - - - and change_reason = #{changeReason} - - - and store_id = #{storeId} - - - and create_time = #{createTime} - - - and update_time = #{updateTime} - - - and create_by = #{createBy} - - - and update_by = #{updateBy} + + and store_id = #{integralDetail.storeId} + + + order by create_time desc + +