This commit is contained in:
2025-09-27 10:33:07 +08:00
parent 9dbd002211
commit d15f0ec207
2 changed files with 6 additions and 5 deletions

View File

@@ -33,7 +33,8 @@ public class MemberPoints implements Serializable {
/** /**
* 店铺id * 店铺id
*/ */
private Long shopId; private Long sourceShopId;
private Long mainShopId;
/** /**
* 会员名称 * 会员名称
*/ */

View File

@@ -64,7 +64,7 @@ public class MemberPointsServiceImpl extends ServiceImpl<MemberPointsMapper, Mem
if (byId.getIsEnableVipSync().equals(1)) { if (byId.getIsEnableVipSync().equals(1)) {
shopId = byId.getMainId(); shopId = byId.getMainId();
} }
queryWrapper.eq(MemberPoints::getShopId, shopId); queryWrapper.eq(MemberPoints::getSourceShopId, shopId);
queryWrapper.orderBy(MemberPoints::getShopUserId, false); queryWrapper.orderBy(MemberPoints::getShopUserId, false);
return queryWrapper; return queryWrapper;
} }
@@ -97,7 +97,7 @@ public class MemberPointsServiceImpl extends ServiceImpl<MemberPointsMapper, Mem
@Override @Override
public OrderDeductionPointsDTO getMemberUsablePoints(Long shopUserId, BigDecimal orderAmount) { public OrderDeductionPointsDTO getMemberUsablePoints(Long shopUserId, BigDecimal orderAmount) {
MemberPoints entity = initMemberPoints(shopUserId); MemberPoints entity = initMemberPoints(shopUserId);
Long shopId = entity.getShopId(); Long shopId = entity.getSourceShopId();
Integer accountPoints = entity.getAccountPoints(); Integer accountPoints = entity.getAccountPoints();
OrderDeductionPointsDTO dto = new OrderDeductionPointsDTO(); OrderDeductionPointsDTO dto = new OrderDeductionPointsDTO();
dto.setAccountPoints(accountPoints); dto.setAccountPoints(accountPoints);
@@ -206,7 +206,7 @@ public class MemberPointsServiceImpl extends ServiceImpl<MemberPointsMapper, Mem
// 记录积分变动记录 // 记录积分变动记录
MemberPointsLog log = new MemberPointsLog(); MemberPointsLog log = new MemberPointsLog();
log.setShopId(entity.getShopId()); log.setShopId(entity.getSourceShopId());
log.setShopUserId(entity.getShopUserId()); log.setShopUserId(entity.getShopUserId());
log.setContent(content); log.setContent(content);
log.setFloatType("subtract"); log.setFloatType("subtract");
@@ -231,7 +231,7 @@ public class MemberPointsServiceImpl extends ServiceImpl<MemberPointsMapper, Mem
entity.setLastFloatPoints(points); entity.setLastFloatPoints(points);
// 记录积分变动记录 // 记录积分变动记录
MemberPointsLog log = new MemberPointsLog(); MemberPointsLog log = new MemberPointsLog();
log.setShopId(entity.getShopId()); log.setShopId(entity.getSourceShopId());
log.setShopUserId(entity.getShopUserId()); log.setShopUserId(entity.getShopUserId());
log.setContent(content); log.setContent(content);
log.setFloatType("add"); log.setFloatType("add");