| | |
| | | inviteUser.setSharePoint(inviteUser.getSharePoint() + ztsj_point); |
| | | inviteUser.setLavePoint(inviteUser.getLavePoint() + ztsj_point); |
| | | inviteUser.setAvailablePoint(inviteUser.getAvailablePoint() + earnPoint1); |
| | | inviteUser.setTotalAvailablePoint(inviteUser.getTotalAvailablePoint() + earnPoint1); |
| | | if(null != pointSetting && 1 == pointSetting.getSharePointGift()){ |
| | | inviteUser.setTransferablePoint(inviteUser.getTransferablePoint() + earnPoint1); |
| | | } |
| | |
| | | superiorLeader.setSharePoint(superiorLeader.getSharePoint() + zbsj_point); |
| | | superiorLeader.setLavePoint(superiorLeader.getLavePoint() + zbsj_point); |
| | | superiorLeader.setAvailablePoint(superiorLeader.getAvailablePoint() + earnPoint1); |
| | | superiorLeader.setTotalAvailablePoint(superiorLeader.getTotalAvailablePoint() + earnPoint1); |
| | | if(null != pointSetting && 1 == pointSetting.getSharePointGift()){ |
| | | superiorLeader.setTransferablePoint(superiorLeader.getTransferablePoint() + earnPoint1); |
| | | } |
| | |
| | | Shop shop = shopClient.getShopById(order.getShopId()).getData(); |
| | | AppUser shopAppUser = appUserClient.getAppUserById(shop.getAppUserId()); |
| | | if(null != shopAppUser){ |
| | | BigDecimal balance = shopAppUser.getBalance(); |
| | | BigDecimal shopBalance = shop.getBalance(); |
| | | Integer lavePoint = shopAppUser.getLavePoint(); |
| | | Integer shopLavePoint = shop.getLavePoint(); |
| | |
| | | } |
| | | shopAppUser.setLavePoint(shopAppUser.getLavePoint() + hxmd_point); |
| | | shopAppUser.setAvailablePoint(shopAppUser.getAvailablePoint() + earnPoint1); |
| | | shopAppUser.setTotalAvailablePoint(shopAppUser.getTotalAvailablePoint() + earnPoint1); |
| | | if(null != pointSetting && 1 == pointSetting.getShopPointGift()){ |
| | | shopAppUser.setTransferablePoint(shopAppUser.getTransferablePoint() + earnPoint1); |
| | | } |
| | |
| | | appUserClient.editAppUserById(shopAppUser); |
| | | shopClient.updateShop(shop); |
| | | //添加明细记录 |
| | | if(!shopAppUser.getBalance().equals(balance)){ |
| | | BalanceChangeRecord balanceChangeRecord = new BalanceChangeRecord(); |
| | | balanceChangeRecord.setAppUserId(shopAppUser.getId()); |
| | | balanceChangeRecord.setOrderId(order.getId()); |
| | | balanceChangeRecord.setChangeType(4); |
| | | balanceChangeRecord.setBeforeAmount(balance); |
| | | balanceChangeRecord.setChangeAmount(hxmd_price); |
| | | balanceChangeRecord.setAfterAmount(shopAppUser.getBalance()); |
| | | balanceChangeRecord.setDelFlag(0); |
| | | balanceChangeRecord.setCreateTime(LocalDateTime.now()); |
| | | balanceChangeRecordClient.saveBalanceChangeRecord(balanceChangeRecord); |
| | | } |
| | | |
| | | if(!shop.getBalance().equals(shopBalance)){ |
| | | ShopBalanceStatement shopBalanceStatement = new ShopBalanceStatement(); |
| | | shopBalanceStatement.setShopId(shop.getId()); |
| | |
| | | if(!shop.getLavePoint().equals(shopLavePoint)){ |
| | | ShopPoint shopPoint = new ShopPoint(); |
| | | shopPoint.setShopId(shop.getId()); |
| | | shopPoint.setType(4); |
| | | shopPoint.setType(1); |
| | | shopPoint.setHistoricalPoint(shopLavePoint); |
| | | shopPoint.setVariablePoint(hxmd_point); |
| | | shopPoint.setBalance(shop.getLavePoint()); |
| | |
| | | } |
| | | technicianAppUser.setLavePoint(technicianAppUser.getLavePoint() + js_point); |
| | | technicianAppUser.setAvailablePoint(technicianAppUser.getAvailablePoint() + earnPoint1); |
| | | technicianAppUser.setTotalAvailablePoint(technicianAppUser.getTotalAvailablePoint() + earnPoint1); |
| | | if(null != pointSetting && 1 == pointSetting.getPersonPointGift()){ |
| | | technicianAppUser.setTransferablePoint(technicianAppUser.getTransferablePoint() + earnPoint1); |
| | | } |
| | |
| | | if(null != shop1){ |
| | | AppUser bdShopAppUser = appUserClient.getAppUserById(shop1.getAppUserId()); |
| | | if(null != bdShopAppUser){ |
| | | BigDecimal balance = bdShopAppUser.getBalance(); |
| | | BigDecimal shopBalance = shop1.getBalance(); |
| | | Integer lavePoint = bdShopAppUser.getLavePoint(); |
| | | Integer shopLavePoint = shop1.getLavePoint(); |
| | |
| | | } |
| | | bdShopAppUser.setLavePoint(bdShopAppUser.getLavePoint() + bdmd_point); |
| | | bdShopAppUser.setAvailablePoint(bdShopAppUser.getAvailablePoint() + earnPoint1); |
| | | bdShopAppUser.setTotalAvailablePoint(bdShopAppUser.getTotalAvailablePoint() + earnPoint1); |
| | | if(null != pointSetting && 1 == pointSetting.getShopSharePointGift()){ |
| | | bdShopAppUser.setTransferablePoint(bdShopAppUser.getTransferablePoint() + earnPoint1); |
| | | } |
| | |
| | | appUserClient.editAppUserById(bdShopAppUser); |
| | | shopClient.updateShop(shop1); |
| | | //添加明细记录 |
| | | if(!bdShopAppUser.getBalance().equals(balance)){ |
| | | BalanceChangeRecord balanceChangeRecord = new BalanceChangeRecord(); |
| | | balanceChangeRecord.setAppUserId(bdShopAppUser.getId()); |
| | | balanceChangeRecord.setOrderId(order.getId()); |
| | | balanceChangeRecord.setChangeType(4); |
| | | balanceChangeRecord.setBeforeAmount(balance); |
| | | balanceChangeRecord.setChangeAmount(bdmd_price); |
| | | balanceChangeRecord.setAfterAmount(bdShopAppUser.getBalance()); |
| | | balanceChangeRecord.setDelFlag(0); |
| | | balanceChangeRecord.setCreateTime(LocalDateTime.now()); |
| | | balanceChangeRecordClient.saveBalanceChangeRecord(balanceChangeRecord); |
| | | } |
| | | |
| | | if(!shop1.getBalance().equals(shopBalance)){ |
| | | ShopBalanceStatement shopBalanceStatement = new ShopBalanceStatement(); |
| | | shopBalanceStatement.setShopId(shop1.getId()); |
| | | shopBalanceStatement.setType(4); |
| | | shopBalanceStatement.setType(1); |
| | | shopBalanceStatement.setHistoricalBalance(shopBalance); |
| | | shopBalanceStatement.setVariableAmount(bdmd_price); |
| | | shopBalanceStatement.setBalance(shop1.getBalance()); |
| | |
| | | if(null != shop2){ |
| | | AppUser sjShopAppUser = appUserClient.getAppUserById(shop2.getAppUserId()); |
| | | if(null != sjShopAppUser){ |
| | | BigDecimal balance = sjShopAppUser.getBalance(); |
| | | BigDecimal shopBalance = shop2.getBalance(); |
| | | Integer lavePoint = sjShopAppUser.getLavePoint(); |
| | | Integer shopLavePoint = shop2.getLavePoint(); |
| | |
| | | } |
| | | sjShopAppUser.setLavePoint(sjShopAppUser.getLavePoint() + bdmdsj_point); |
| | | sjShopAppUser.setAvailablePoint(sjShopAppUser.getAvailablePoint() + earnPoint1); |
| | | sjShopAppUser.setTotalAvailablePoint(sjShopAppUser.getTotalAvailablePoint() + earnPoint1); |
| | | if(null != pointSetting && 1 == pointSetting.getShopSharePointGift()){ |
| | | sjShopAppUser.setTransferablePoint(sjShopAppUser.getTransferablePoint() + earnPoint1); |
| | | } |
| | |
| | | appUserClient.editAppUserById(sjShopAppUser); |
| | | shopClient.updateShop(shop2); |
| | | //添加明细记录 |
| | | if(!sjShopAppUser.getBalance().equals(balance)){ |
| | | BalanceChangeRecord balanceChangeRecord = new BalanceChangeRecord(); |
| | | balanceChangeRecord.setAppUserId(sjShopAppUser.getId()); |
| | | balanceChangeRecord.setOrderId(order.getId()); |
| | | balanceChangeRecord.setChangeType(4); |
| | | balanceChangeRecord.setBeforeAmount(balance); |
| | | balanceChangeRecord.setChangeAmount(bdmdsj_price); |
| | | balanceChangeRecord.setAfterAmount(sjShopAppUser.getBalance()); |
| | | balanceChangeRecord.setDelFlag(0); |
| | | balanceChangeRecord.setCreateTime(LocalDateTime.now()); |
| | | balanceChangeRecordClient.saveBalanceChangeRecord(balanceChangeRecord); |
| | | } |
| | | |
| | | if(!shop2.getBalance().equals(shopBalance)){ |
| | | ShopBalanceStatement shopBalanceStatement = new ShopBalanceStatement(); |
| | | shopBalanceStatement.setShopId(shop2.getId()); |