Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangw 2025-02-27 18:28:11 +08:00
commit 9b35c78661
2 changed files with 32 additions and 0 deletions

View File

@ -2,10 +2,15 @@ package com.czg.controller.user;
import com.czg.account.dto.shopuser.ShopUserAddDTO;
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
import com.czg.account.entity.PointsExchangeRecord;
import com.czg.account.entity.ShopUser;
import com.czg.account.entity.ShopUserFlow;
import com.czg.account.service.PointsExchangeRecordService;
import com.czg.account.service.ShopUserFlowService;
import com.czg.account.service.ShopUserService;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.czg.utils.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
@ -22,6 +27,10 @@ import org.springframework.web.bind.annotation.*;
public class UShopUserController {
@Resource
private ShopUserService shopUserService;
@Resource
private ShopUserFlowService shopUserFlowService;
@Resource
private PointsExchangeRecordService pointsExchangeRecordService;
/**
* 获取当前店铺会员信息
@ -64,4 +73,26 @@ public class UShopUserController {
return CzgResult.success(shopUserService.join(StpKit.USER.getShopId(), StpKit.USER.getLoginIdAsLong(), shopUserAddDTO));
}
/**
* 获取余额余额明细
* @return 分页数据
*/
@GetMapping("/moneyRecord")
public CzgResult<Page<ShopUserFlow>> getMoneyRecord() {
return CzgResult.success(shopUserFlowService.page(PageUtil.buildPage(), new QueryWrapper().eq(ShopUserFlow::getShopId, StpKit.USER.getShopId())
.eq(ShopUserFlow::getUserId, StpKit.USER.getLoginIdAsLong()).orderBy(ShopUserFlow::getId, false)));
}
/**
* 获取积分明细
* @return 分页数据
*/
@GetMapping("/pointsRecord")
public CzgResult<Page<PointsExchangeRecord>> getPointsRecord() {
return CzgResult.success(pointsExchangeRecordService.page(PageUtil.buildPage(), new QueryWrapper().eq(PointsExchangeRecord::getShopId, StpKit.USER.getShopId())
.eq(PointsExchangeRecord::getUserId, StpKit.USER.getLoginIdAsLong()).orderBy(PointsExchangeRecord::getId, false)));
}
}

View File

@ -8,6 +8,7 @@ spring:
name: account-server
profiles:
active: dev
include: tools
logging:
config: classpath:logback.xml