| | |
| | | //import com.ruoyi.chargingPile.api.model.Site; |
| | | //import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | //import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | //import com.ruoyi.common.core.domain.R; |
| | | //import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | //import com.ruoyi.common.core.web.page.PageInfo; |
| | | //import com.ruoyi.common.redis.service.RedisService; |
| | |
| | | //import com.ruoyi.payment.api.feignClient.AliPaymentClient; |
| | | //import com.ruoyi.payment.api.feignClient.WxPaymentClient; |
| | | //import org.junit.jupiter.api.Test; |
| | | //import org.redisson.api.RLock; |
| | | //import org.redisson.api.RedissonClient; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.boot.test.context.SpringBootTest; |
| | | // |
| | | //import javax.annotation.Resource; |
| | | //import java.io.PrintWriter; |
| | | //import java.math.BigDecimal; |
| | | //import java.util.*; |
| | | //import java.util.concurrent.TimeUnit; |
| | | // |
| | | //@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = RuoYiOrderApplication.class) |
| | | //public class RuoYiOrderApplicationTests { |
| | | // |
| | | // @Resource |
| | | // private TChargingOrderService chargingOrderService; |
| | | // |
| | | // @Resource |
| | | // private ChargingGunClient chargingGunClient; |
| | | // @Resource |
| | | // private TSettlementConfirmMapper tSettlementConfirmMapper; |
| | | // |
| | | // @Resource |
| | | // private SiteClient siteClient; |
| | | // |
| | | // @Resource |
| | | // private AppUserCarClient appUserCarClient; |
| | | // @Resource |
| | | // private AppUserClient appUserClient; |
| | | // |
| | | // @Resource |
| | | // private ChargingPileClient chargingPileClient; |
| | | // |
| | | // @Resource |
| | | // private TChargingOrderAccountingStrategyService chargingOrderAccountingStrategyService; |
| | | // |
| | | // @Resource |
| | | // private TokenService tokenService; |
| | | // |
| | | // @Resource |
| | | // private WxPaymentClient wxPaymentClient; |
| | | // |
| | | // @Resource |
| | | // private AliPaymentClient aliPaymentClient; |
| | | // |
| | | // @Resource |
| | | // private AppCouponClient appCouponClient; |
| | | // |
| | | // @Resource |
| | | // private AppUserVipDetailClient appUserVipDetailClient; |
| | | // |
| | | // @Resource |
| | | // private RedisService redisService; |
| | | // |
| | | // @Resource |
| | | // private UploadRealTimeMonitoringDataClient uploadRealTimeMonitoringDataClient; |
| | | // |
| | | // @Resource |
| | | // private ChargingHandshakeClient chargingHandshakeClient; |
| | | // |
| | | // @Resource |
| | | // private SendMessageClient sendMessageClient; |
| | | // |
| | | // @Resource |
| | | // private TOrderEvaluateService orderEvaluateService; |
| | | // |
| | | // @Resource |
| | | // private AccountingStrategyDetailClient accountingStrategyDetailClient; |
| | | // |
| | | // @Resource |
| | | // private AccountingStrategyDetailOrderClient accountingStrategyDetailOrderClient; |
| | | // |
| | | // @Resource |
| | | // private AccountingStrategyClient accountingStrategyClient; |
| | | // |
| | | // @Resource |
| | | // private PlatformStartChargingReplyClient platformStartChargingReplyClient; |
| | | // |
| | | // @Resource |
| | | // private TChargingOrderRefundService chargingOrderRefundService; |
| | | // |
| | | // @Resource |
| | | // private PlatformStopChargingReplyClient platformStopChargingReplyClient; |
| | | // |
| | | // @Resource |
| | | // private AccountingStrategyOrderService accountingStrategyOrderService; |
| | | // |
| | | // @Resource |
| | | // private AccountingStrategyDetailOrderService accountingStrategyDetailOrderService; |
| | | // |
| | | // @Resource |
| | | // private InviteUserClient inviteUserClient; |
| | | // |
| | | // @Resource |
| | | // private AppUserIntegralChangeClient appUserIntegralChangeClient; |
| | | // |
| | | // @Resource |
| | | // private IntegralRuleClient integralRuleClient; |
| | | // |
| | | // @Resource |
| | | // private VipClient vipClient; |
| | | // |
| | | // @Resource |
| | | // private UserTagClient userTagClient; |
| | | // |
| | | // @Resource |
| | | // private AppUserTagClient appUserTagClient; |
| | | // |
| | | // @Resource |
| | | // private SecurityDetectionClient securityDetectionClient; |
| | | // @Autowired |
| | | // private RedissonClient redissonClient; |
| | | // |
| | | // |
| | | // @Test |
| | | // public void test(){ |
| | | // PayOrderQueryDto payOrderQueryDto = new PayOrderQueryDto(); |
| | | // payOrderQueryDto.setPageCurr(1); |
| | | // payOrderQueryDto.setPageSize(10000999); |
| | | // PageInfo<PayOrderDto> data = chargingOrderService.payOrderQuery(payOrderQueryDto).getData(); |
| | | // RLock lock = redissonClient.getLock("endOrder:1234565"); |
| | | // boolean tryLock = false; |
| | | // try { |
| | | // tryLock = lock.tryLock(100, TimeUnit.SECONDS); |
| | | // } catch (InterruptedException e) { |
| | | // e.printStackTrace(); |
| | | // lock.unlock(); |
| | | // } |
| | | // if(!tryLock){ |
| | | // System.out.println("获取锁失败"); |
| | | // } |
| | | // System.out.println("获取锁成功"); |
| | | // } |
| | | //} |