积分记录
This commit is contained in:
@@ -3,9 +3,11 @@ package com.czg.controller.user;
|
|||||||
import com.czg.account.dto.shopuser.ShopUserAddDTO;
|
import com.czg.account.dto.shopuser.ShopUserAddDTO;
|
||||||
import com.czg.account.dto.shopuser.ShopUserDetailDTO;
|
import com.czg.account.dto.shopuser.ShopUserDetailDTO;
|
||||||
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
|
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
|
||||||
|
import com.czg.account.entity.MemberPointsLog;
|
||||||
import com.czg.account.entity.PointsExchangeRecord;
|
import com.czg.account.entity.PointsExchangeRecord;
|
||||||
import com.czg.account.entity.ShopUser;
|
import com.czg.account.entity.ShopUser;
|
||||||
import com.czg.account.entity.ShopUserFlow;
|
import com.czg.account.entity.ShopUserFlow;
|
||||||
|
import com.czg.account.service.MemberPointsLogService;
|
||||||
import com.czg.account.service.PointsExchangeRecordService;
|
import com.czg.account.service.PointsExchangeRecordService;
|
||||||
import com.czg.account.service.ShopUserFlowService;
|
import com.czg.account.service.ShopUserFlowService;
|
||||||
import com.czg.account.service.ShopUserService;
|
import com.czg.account.service.ShopUserService;
|
||||||
@@ -38,6 +40,8 @@ public class UShopUserController {
|
|||||||
private ShopUserFlowService shopUserFlowService;
|
private ShopUserFlowService shopUserFlowService;
|
||||||
@Resource
|
@Resource
|
||||||
private PointsExchangeRecordService pointsExchangeRecordService;
|
private PointsExchangeRecordService pointsExchangeRecordService;
|
||||||
|
@Resource
|
||||||
|
private MemberPointsLogService memberPointsLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前店铺会员信息
|
* 获取当前店铺会员信息
|
||||||
@@ -108,10 +112,10 @@ public class UShopUserController {
|
|||||||
* @return 分页数据
|
* @return 分页数据
|
||||||
*/
|
*/
|
||||||
@GetMapping("/pointsRecord")
|
@GetMapping("/pointsRecord")
|
||||||
public CzgResult<Page<PointsExchangeRecord>> getPointsRecord() {
|
public CzgResult<Page<MemberPointsLog>> getPointsRecord() {
|
||||||
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getShopId, StpKit.USER.getShopId()).eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()));
|
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getShopId, StpKit.USER.getShopId()).eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()));
|
||||||
return CzgResult.success(pointsExchangeRecordService.page(PageUtil.buildPage(), new QueryWrapper().eq(PointsExchangeRecord::getShopId, StpKit.USER.getShopId())
|
return CzgResult.success(memberPointsLogService.page(PageUtil.buildPage(), new QueryWrapper().eq(MemberPointsLog::getShopId, StpKit.USER.getShopId())
|
||||||
.eq(PointsExchangeRecord::getShopUserId, shopUser.getId()).orderBy(PointsExchangeRecord::getId, false)));
|
.eq(MemberPointsLog::getShopUserId, shopUser.getId()).orderBy(MemberPointsLog::getId, false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,10 +124,10 @@ public class UShopUserController {
|
|||||||
* @return 明细数据
|
* @return 明细数据
|
||||||
*/
|
*/
|
||||||
@GetMapping("/pointsRecord/detail")
|
@GetMapping("/pointsRecord/detail")
|
||||||
public CzgResult<PointsExchangeRecord> getPointsRecordDetail(@RequestParam Long id) {
|
public CzgResult<MemberPointsLog> getPointsRecordDetail(@RequestParam Long id) {
|
||||||
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getShopId, StpKit.USER.getShopId()).eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()));
|
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getShopId, StpKit.USER.getShopId()).eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()));
|
||||||
return CzgResult.success(pointsExchangeRecordService.getOne(new QueryWrapper().eq(PointsExchangeRecord::getShopId, StpKit.USER.getShopId())
|
return CzgResult.success(memberPointsLogService.getOne(new QueryWrapper().eq(MemberPointsLog::getShopId, StpKit.USER.getShopId())
|
||||||
.eq(PointsExchangeRecord::getShopUserId, shopUser.getId()).eq(PointsExchangeRecord::getId, id)));
|
.eq(MemberPointsLog::getShopUserId, shopUser.getId()).eq(MemberPointsLog::getId, id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user