充值送积分
This commit is contained in:
@@ -197,6 +197,20 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
if("point".equals(subject)){
|
||||
// 插入花生币 变动记录
|
||||
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(Integer.valueOf(body));
|
||||
//充值送积分
|
||||
if (bookBuyConfigEntity != null && !"0".equals(bookBuyConfigEntity.getGivejf())) {
|
||||
MyUserEntity userEntity = userService.getById(order.getUserId());
|
||||
userEntity.setJf(userEntity.getJf().add(new BigDecimal(bookBuyConfigEntity.getGivejf())));
|
||||
userService.updateById(userEntity);
|
||||
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();
|
||||
jfTransactionDetails.setUserId(userEntity.getId());
|
||||
jfTransactionDetails.setChangeAmount(new BigDecimal(bookBuyConfigEntity.getGivejf()));
|
||||
jfTransactionDetails.setActType(0);
|
||||
jfTransactionDetails.setUserBalance(userEntity.getJf());
|
||||
jfTransactionDetails.setRelationId(order.getOrderId());
|
||||
jfTransactionDetails.setRemark("充币送积分:"+bookBuyConfigEntity.getDescription()+",订单号:"+order.getOrderSn());
|
||||
jfTransactionDetailsDao.insert(jfTransactionDetails);
|
||||
}
|
||||
String realMoney = bookBuyConfigEntity.getRealMoney();
|
||||
Integer money = Integer.valueOf(realMoney);
|
||||
userService.rechargeHSPoint(Integer.valueOf(customerid),money);
|
||||
|
||||
@@ -267,6 +267,20 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
PayWechatOrderEntity buy_order_id = payWechatOrderService.getBaseMapper().selectOne(new QueryWrapper<PayWechatOrderEntity>().eq("order_sn", order.getOrderSn()));
|
||||
Integer buyorder = buy_order_id.getBuyOrderId();
|
||||
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(buyorder);
|
||||
//充值送积分
|
||||
if (bookBuyConfigEntity != null && !"0".equals(bookBuyConfigEntity.getGivejf())) {
|
||||
MyUserEntity userEntity = userService.getById(order.getUserId());
|
||||
userEntity.setJf(userEntity.getJf().add(new BigDecimal(bookBuyConfigEntity.getGivejf())));
|
||||
userService.updateById(userEntity);
|
||||
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();
|
||||
jfTransactionDetails.setUserId(userEntity.getId());
|
||||
jfTransactionDetails.setChangeAmount(new BigDecimal(bookBuyConfigEntity.getGivejf()));
|
||||
jfTransactionDetails.setActType(0);
|
||||
jfTransactionDetails.setUserBalance(userEntity.getJf());
|
||||
jfTransactionDetails.setRelationId(order.getOrderId());
|
||||
jfTransactionDetails.setRemark("充币送积分:"+bookBuyConfigEntity.getDescription()+",订单号:"+order.getOrderSn());
|
||||
jfTransactionDetailsDao.insert(jfTransactionDetails);
|
||||
}
|
||||
String realMoney = bookBuyConfigEntity.getRealMoney();
|
||||
int money = Integer.parseInt(realMoney);
|
||||
userService.rechargeHSPoint(order.getUserId(), money);
|
||||
|
||||
Reference in New Issue
Block a user