|
|
|
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
@@ -42,8 +43,8 @@ public class DaliyAmountSchedule { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 1 * * ?") // 每天凌晨1点盘点前一天的数据 |
|
|
|
//@Scheduled(cron = "*/30 * * * * ?") // 测试10秒中一次 |
|
|
|
//@Scheduled(cron = "0 0 1 * * ?") // 每天凌晨1点盘点前一天的数据 |
|
|
|
@Scheduled(cron = "*/30 * * * * ?") // 测试10秒中一次 |
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void daliyAmountSchedule() { |
|
|
|
|
|
|
|
@@ -125,13 +126,13 @@ public class DaliyAmountSchedule { |
|
|
|
wxDateAmountRecordService.saveAmount(dateAmountRecord); |
|
|
|
|
|
|
|
Map microPayMap = wxOrderMapper.dayMicroPayAmountList(dateMap); |
|
|
|
int countMic = (int) microPayMap.get("count"); |
|
|
|
int totalPriceMic = (int) microPayMap.get("totalPrice"); |
|
|
|
Long countMic = (Long) microPayMap.get("count"); |
|
|
|
BigDecimal totalPriceMic = (BigDecimal) microPayMap.get("total_price"); |
|
|
|
logger.info("find " + countMic + " order " + "\n" + |
|
|
|
"from " + startDate + " to " + new Date() + "\n" + |
|
|
|
"TOTAL Payment=" + totalPriceMic); |
|
|
|
|
|
|
|
dateAmountRecord.setPayPrice(totalPriceMic); |
|
|
|
dateAmountRecord.setPayPrice(totalPriceMic.intValue()); |
|
|
|
dateAmountRecord.setType(EnumDateAmtType.MICROPAY_RECORD.getCode()); |
|
|
|
wxDateAmountRecordService.saveAmount(dateAmountRecord); |
|
|
|
|
|
|
|
|