积分变化
This commit is contained in:
parent
faa7a57288
commit
28acf1ff82
@ -338,6 +338,15 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
|||||||
private void countPoints(IntegralSettings integralSettings,String oilId,Double amount,Integer userId){
|
private void countPoints(IntegralSettings integralSettings,String oilId,Double amount,Integer userId){
|
||||||
LJStore store = iljStoreService.selectStoreByStoreId(integralSettings.getStoreId());
|
LJStore store = iljStoreService.selectStoreByStoreId(integralSettings.getStoreId());
|
||||||
UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId());
|
UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId());
|
||||||
|
IntegralDetail integralDetail = new IntegralDetail();
|
||||||
|
integralDetail.setStoreId(integralSettings.getStoreId());
|
||||||
|
integralDetail.setChainStoreId(integralSettings.getChainStoreId());
|
||||||
|
integralDetail.setPointsChange(Double.valueOf(integralSettings.getRefuelPoints()));
|
||||||
|
integralDetail.setCurrentPoints(balance.getPoints() + integralSettings.getRefuelPoints());
|
||||||
|
integralDetail.setChangeType("1");
|
||||||
|
integralDetail.setChangeReason("充值");
|
||||||
|
integralDetail.setUserId(balance.getMtUserId());
|
||||||
|
IntegralDetail integralDetail1 = integralDetailService.insert2(integralDetail);
|
||||||
if (ObjectUtil.isNotEmpty(balance)) {
|
if (ObjectUtil.isNotEmpty(balance)) {
|
||||||
if (integralSettings.getRefuelSceneRules()==0) {
|
if (integralSettings.getRefuelSceneRules()==0) {
|
||||||
// 通用规则
|
// 通用规则
|
||||||
@ -361,6 +370,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
userBalanceService.updateUserBalance(balance);
|
userBalanceService.updateUserBalance(balance);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user