|
|
|
@ -10,12 +10,15 @@ import com.example.demo.mapper.coin.MarketMapper; |
|
|
|
import com.example.demo.service.cash.CashCollectionService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.ZoneOffset; |
|
|
|
import java.util.List; |
|
|
|
import java.util.UUID; |
|
|
|
|
|
|
|
@ -28,6 +31,7 @@ import java.util.UUID; |
|
|
|
* @Version 1.0 |
|
|
|
**/ |
|
|
|
@Service |
|
|
|
@Slf4j |
|
|
|
public class CashCollectionServiceImpl implements CashCollectionService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@ -276,9 +280,21 @@ public class CashCollectionServiceImpl implements CashCollectionService { |
|
|
|
} |
|
|
|
} |
|
|
|
cashRecord.setGoodsName("Link充值金币"); |
|
|
|
cashRecord.setGoodNum(0); |
|
|
|
cashRecord.setPermanentGold(gOrder.getCount()); |
|
|
|
cashRecord.setPayTime(java.time.LocalDateTime.ofInstant(java.time.Instant.ofEpochMilli(gOrder.getSuccessTime()), java.time.ZoneId.systemDefault())); |
|
|
|
// cashCollectionMapper. |
|
|
|
cashRecord.setFreeGold(0); |
|
|
|
cashRecord.setPaymentCurrency(""); |
|
|
|
cashRecord.setPaymentAmount(BigDecimal.valueOf(0)); |
|
|
|
cashRecord.setPayTime(LocalDateTime.ofEpochSecond(gOrder.getSuccessTime(), 0, ZoneOffset.UTC)); |
|
|
|
cashRecord.setStatus(3); |
|
|
|
cashRecord.setSubmitterId(99999); |
|
|
|
cashRecord.setRemark("Link充值金币"); |
|
|
|
//存入现金库 |
|
|
|
cashCollectionMapper.add(cashRecord); |
|
|
|
cashCollectionMapper.markSynced(gOrder.getId()); |
|
|
|
}log.info("同步完成一批,数量 {}", gOrders.size()); |
|
|
|
if (gOrders.size() < 100) { |
|
|
|
break; // 最后一批 |
|
|
|
} |
|
|
|
}return "同步成功"; |
|
|
|
}return "同步完毕"; |
|
|
|
}} |