|
|
|
@ -23,6 +23,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.TimeZone;
|
|
|
|
@ -284,7 +286,18 @@ public class CustomerPointsServiceImp implements CustomerPointsService {
|
|
|
|
|
public BigDecimal checkLotteryAfterPay(String order_id) {
|
|
|
|
|
JSONObject order = transactionAnalysisMapper.getOrderClearAmount(order_id);
|
|
|
|
|
if (order.getIntValue("client_id") != 9) {
|
|
|
|
|
return BigDecimal.valueOf(0);
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
|
|
|
|
Date newDay = new Date();
|
|
|
|
|
try {
|
|
|
|
|
if (newDay.compareTo(sdf.parse("2018-09-24 00:00:00")) < 0) {
|
|
|
|
|
return BigDecimal.valueOf(0);
|
|
|
|
|
}
|
|
|
|
|
if (newDay.compareTo(sdf.parse("2018-10-15 00:00:00")) > 0) {
|
|
|
|
|
return BigDecimal.valueOf(0);
|
|
|
|
|
}
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return order.getBigDecimal("clearing_amount");
|
|
|
|
|
}
|
|
|
|
|