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