工具类
积分余额明细增加shopName
This commit is contained in:
@@ -3,18 +3,20 @@ package com.czg.controller.user;
|
||||
import com.czg.account.dto.shopuser.ShopUserAddDTO;
|
||||
import com.czg.account.dto.shopuser.ShopUserDetailDTO;
|
||||
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
|
||||
import com.czg.account.entity.MemberPointsLog;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.account.entity.ShopUserFlow;
|
||||
import com.czg.account.entity.*;
|
||||
import com.czg.account.service.MemberPointsLogService;
|
||||
import com.czg.account.service.ShopUserFlowService;
|
||||
import com.czg.account.service.UShopUserService;
|
||||
import com.czg.account.vo.MemberPointsLogVO;
|
||||
import com.czg.account.vo.PointsShopListVO;
|
||||
import com.czg.account.vo.ShopUserFlowInfoVO;
|
||||
import com.czg.annotation.Debounce;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.utils.MyQueryWrapper;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryCondition;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -85,9 +87,12 @@ public class UShopUserController {
|
||||
* @return 分页数据
|
||||
*/
|
||||
@GetMapping("/moneyRecord")
|
||||
public CzgResult<Page<ShopUserFlow>> getMoneyRecord(@RequestParam Long shopId) {
|
||||
return CzgResult.success(shopUserFlowService.page(PageUtil.buildPage(), new QueryWrapper().eq(ShopUserFlow::getShopId, shopId)
|
||||
.eq(ShopUserFlow::getUserId, StpKit.USER.getLoginIdAsLong()).orderBy(ShopUserFlow::getId, false)));
|
||||
public CzgResult<Page<ShopUserFlowInfoVO>> getMoneyRecord(@RequestParam Long shopId) {
|
||||
return CzgResult.success(shopUserFlowService.pageAs(PageUtil.buildPage(), new QueryWrapper().eq(ShopUserFlow::getShopId, shopId)
|
||||
.eq(ShopUserFlow::getUserId, StpKit.USER.getLoginIdAsLong()).leftJoin(ShopInfo.class).on(ShopUserFlow::getShopId, ShopInfo::getId)
|
||||
.select(ShopInfo::getShopName)
|
||||
.select(ShopUserFlow::getUserId, ShopUserFlow::getAmount, ShopUserFlow::getBizCode, ShopUserFlow::getRemark)
|
||||
.orderBy(ShopUserFlow::getId, false), ShopUserFlowInfoVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,10 +119,14 @@ public class UShopUserController {
|
||||
* @return 分页数据
|
||||
*/
|
||||
@GetMapping("/pointsRecord")
|
||||
public CzgResult<Page<MemberPointsLog>> getPointsRecord(@RequestParam Long shopId) {
|
||||
public CzgResult<Page<MemberPointsLogVO>> getPointsRecord(@RequestParam Long shopId) {
|
||||
ShopUser shopUser = shopUserService.getShopUserInfo(shopId, StpKit.USER.getLoginIdAsLong());
|
||||
return CzgResult.success(memberPointsLogService.page(PageUtil.buildPage(), new QueryWrapper().eq(MemberPointsLog::getShopId, shopId)
|
||||
.eq(MemberPointsLog::getShopUserId, shopUser.getId()).orderBy(MemberPointsLog::getId, false)));
|
||||
return CzgResult.success(memberPointsLogService.pageAs(PageUtil.buildPage(), new MyQueryWrapper().eq(MemberPointsLog::getShopId, shopId)
|
||||
.eq(MemberPointsLog::getShopUserId, shopUser.getId())
|
||||
.selectAll(MemberPointsLog.class)
|
||||
.select(ShopInfo::getShopName)
|
||||
.leftJoin(ShopInfo.class).on(MemberPointsLog::getShopId, ShopInfo::getId)
|
||||
.orderBy(MemberPointsLog::getId, false), MemberPointsLogVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user