| | |
| | | package com.taoke.autopay; |
| | | |
| | | import com.taoke.autopay.dao.KeyOrderMapper; |
| | | import com.taoke.autopay.dto.DYOrderDto; |
| | | import com.taoke.autopay.entity.KeyOrder; |
| | | import com.taoke.autopay.entity.OrderCountTypeEnum; |
| | | import com.taoke.autopay.entity.SystemConfigKeyEnum; |
| | | import com.taoke.autopay.exception.KeyOrderException; |
| | | import com.taoke.autopay.exception.KeyVerifyException; |
| | |
| | | |
| | | |
| | | String verifyAlipayKey = systemConfigService.getValueCache(SystemConfigKeyEnum.ALIPAY_KEY_VERIFY); |
| | | if(verifyAlipayKey!=null&&verifyAlipayKey.trim().equalsIgnoreCase("1")||true) { |
| | | if (verifyAlipayKey != null && verifyAlipayKey.trim().equalsIgnoreCase("1") || true) { |
| | | try { |
| | | // 需要验证支付宝口令 |
| | | if (urllist.size() < 1) { |
| | |
| | | } |
| | | // 验证内容 |
| | | DYOrderDto dto = keyOrderService.verifyKey(tradeInfo.getGoodsTitle(), orderStatus, tradeInfo.getItemRealAmount()); |
| | | }catch(KeyVerifyException ee){ |
| | | throw ee; |
| | | } |
| | | catch(Exception e){ |
| | | } catch (KeyVerifyException ee) { |
| | | throw ee; |
| | | } catch (Exception e) { |
| | | throw new KeyVerifyException(KeyVerifyException.CODE_COMMON, e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Test |
| | | public void test1() { |
| | | SubmitKeyInfo keyInfo=new SubmitKeyInfo(); |
| | | public void test1() { |
| | | SubmitKeyInfo keyInfo = new SubmitKeyInfo(); |
| | | keyInfo.setKey("【支fu`寳】亲,复制 Q:/dYsUzQV77s5 p:/S ZH2412 2020/11/27打开支付宝就可以帮我🏮付款啦💪https://ur.alipay.com/_Ig4toHTlLHbBqiJqb3dpC"); |
| | | try { |
| | | addKey(keyInfo, 1L); |
| | |
| | | |
| | | @Test |
| | | public void testRePay() throws InterruptedException { |
| | | for(int i=0;i<10;i++) { |
| | | for (int i = 0; i < 10; i++) { |
| | | orderPayFailProcessor.processPayFail("2c9d0dd55cd845819c8e6010fe10def4", "读取支付宝粘贴板超时"); |
| | | Thread.sleep(2000); |
| | | orderPayFailProcessor.processFromQueue(); |
| | | } |
| | | } |
| | | |
| | | @Test |
| | | public void statisticAgentId() { |
| | | KeyOrderMapper.DaoQuery query=new KeyOrderMapper.DaoQuery(); |
| | | query.hasAgentId=true; |
| | | query.hasPayTime = true; |
| | | query.state =2; |
| | | query.count = 100; |
| | | |
| | | List<Long> list = keyOrderService.listAgentId(query); |
| | | System.out.println(list); |
| | | } |
| | | |
| | | @Test |
| | | public void repaire(){ |
| | | KeyOrderMapper.DaoQuery query=new KeyOrderMapper.DaoQuery(); |
| | | query.state=3; |
| | | query.minCreateTime=new Date(TimeUtil.convertToTimeTemp("2024-08-02","yyyy-MM-dd")); |
| | | query.stateDesc="订单已支付"; |
| | | query.count = 1000; |
| | | List<KeyOrder> list = keyOrderService.list(query); |
| | | for(KeyOrder o:list){ |
| | | KeyOrder update=new KeyOrder(); |
| | | update.setId(o.getId()); |
| | | update.setState(KeyOrder.STATE_PAY); |
| | | update.setPayTime(o.getExcutePayTime()); |
| | | keyOrderService.update(update); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |