支付调试
This commit is contained in:
parent
3a6b81ec61
commit
426e6d3225
|
|
@ -9,6 +9,7 @@ import com.mdd.common.util.SpringUtils;
|
||||||
import com.mdd.common.util.StringUtils;
|
import com.mdd.common.util.StringUtils;
|
||||||
import com.mdd.common.util.TimeUtils;
|
import com.mdd.common.util.TimeUtils;
|
||||||
import com.mdd.common.util.ToolUtils;
|
import com.mdd.common.util.ToolUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -33,15 +34,17 @@ public interface LogMoneyMapper extends IBaseMapper<LogMoney> {
|
||||||
default void add(Integer userId, Integer changeType, BigDecimal changeAmount,
|
default void add(Integer userId, Integer changeType, BigDecimal changeAmount,
|
||||||
Integer sourceId, String sourceSn, String remark, String extra) {
|
Integer sourceId, String sourceSn, String remark, String extra) {
|
||||||
|
|
||||||
|
System.out.println("新增进来了~~~" + userId);
|
||||||
for (int i=0; i<=0; i++) {
|
for (int i=0; i<=0; i++) {
|
||||||
UserMapper userMapper = SpringUtils.getBean(UserMapper.class);
|
UserMapper userMapper = SpringUtils.getBean(UserMapper.class);
|
||||||
User user = userMapper.selectById(userId);
|
User user = userMapper.selectById(userId);
|
||||||
|
System.out.println(user);
|
||||||
if (StringUtils.isNull(user)) {
|
if (StringUtils.isNull(user)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
BigDecimal leftAmount = user.getMoney().add(changeAmount);
|
BigDecimal leftAmount = user.getMoney().add(changeAmount);
|
||||||
|
System.out.println("变动后金额:" + leftAmount);
|
||||||
LogMoney logMoney = new LogMoney();
|
LogMoney logMoney = new LogMoney();
|
||||||
logMoney.setSn(this.randMakeOrderSn());
|
logMoney.setSn(this.randMakeOrderSn());
|
||||||
logMoney.setUserId(userId);
|
logMoney.setUserId(userId);
|
||||||
|
|
@ -55,6 +58,7 @@ public interface LogMoneyMapper extends IBaseMapper<LogMoney> {
|
||||||
logMoney.setExtra(extra);
|
logMoney.setExtra(extra);
|
||||||
logMoney.setCreateTime(System.currentTimeMillis() / 1000);
|
logMoney.setCreateTime(System.currentTimeMillis() / 1000);
|
||||||
logMoney.setUpdateTime(System.currentTimeMillis() / 1000);
|
logMoney.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||||
|
System.out.println("呵呵呵呵");
|
||||||
this.insert(logMoney);
|
this.insert(logMoney);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,6 @@ public class PayServiceImpl implements IPayService {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.error("充值订单来了: {} : {}", rechargeOrder.getPayStatus(), PaymentEnum.OK_PAID.getCode());
|
|
||||||
if (rechargeOrder.getPayStatus().equals(PaymentEnum.OK_PAID.getCode())) {
|
if (rechargeOrder.getPayStatus().equals(PaymentEnum.OK_PAID.getCode())) {
|
||||||
log.error("充值订单已支付: {} : {}", outTradeNo, transactionId);
|
log.error("充值订单已支付: {} : {}", outTradeNo, transactionId);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue