Commit 69e22f27 by zhiwj

增加提示

parent cc6575ef
...@@ -17,7 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -17,7 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -51,6 +50,7 @@ public class BillingAccountServiceImpl implements BillingAccountService{ ...@@ -51,6 +50,7 @@ public class BillingAccountServiceImpl implements BillingAccountService{
} }
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int updateAccountAfterRechargeOrRefund(double totalFee, Integer enterpriseId) { public int updateAccountAfterRechargeOrRefund(double totalFee, Integer enterpriseId) {
RedissonClient redisClient = RedisUtil.getRedisClient(); RedissonClient redisClient = RedisUtil.getRedisClient();
...@@ -58,7 +58,8 @@ public class BillingAccountServiceImpl implements BillingAccountService{ ...@@ -58,7 +58,8 @@ public class BillingAccountServiceImpl implements BillingAccountService{
account.addAndGet(totalFee); account.addAndGet(totalFee);
TabBillingAccount tabBillingAccount = tabBillingAccountMapper.selectByEnterpriseId(enterpriseId); TabBillingAccount tabBillingAccount = tabBillingAccountMapper.selectByEnterpriseId(enterpriseId);
double newTotal = new BigDecimal(tabBillingAccount.getAccountBalance().toString()).add(new BigDecimal(totalFee + "")).doubleValue(); // double newTotal = new BigDecimal(tabBillingAccount.getAccountBalance().toString()).add(new BigDecimal(totalFee + "")).doubleValue();
double newTotal = tabBillingAccount.getAccountBalance() + totalFee;
logger.info("商户:{}, 充值/退款前余额:{}, 充值/退款金额:{}, 充值/退款后余额:{}", enterpriseId, tabBillingAccount.getAccountBalance(), totalFee, newTotal); logger.info("商户:{}, 充值/退款前余额:{}, 充值/退款金额:{}, 充值/退款后余额:{}", enterpriseId, tabBillingAccount.getAccountBalance(), totalFee, newTotal);
UserDTO user = userApiService.getUserByEnterpriseId(enterpriseId).getResult(); UserDTO user = userApiService.getUserByEnterpriseId(enterpriseId).getResult();
todoItemService.finishTodoItem(enterpriseId, user.getUserId(), Constants.PRODUCT, config.getHost() + Constants.TODO_ITEM_ACCOUNT_BALANCE_URL); todoItemService.finishTodoItem(enterpriseId, user.getUserId(), Constants.PRODUCT, config.getHost() + Constants.TODO_ITEM_ACCOUNT_BALANCE_URL);
......
...@@ -51,7 +51,7 @@ public interface PayStrategy { ...@@ -51,7 +51,7 @@ public interface PayStrategy {
* @Title: callBack * @Title: callBack
* @Description: * @Description:
* @author taogs * @author taogs
* @param resData * @param resData
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void> * @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws * @throws
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment