From c6c5a8ce0f42d46ea2fe0312c9eda67a49fd3917 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 01 二月 2021 18:58:21 +0800
Subject: [PATCH] 完善根据IP屏蔽广告,创建会员实体

---
 src/test/java/com/hxh/spring/test/ConfigTest.java |   33 ++++++++++++++++++++-------------
 1 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/src/test/java/com/hxh/spring/test/ConfigTest.java b/src/test/java/com/hxh/spring/test/ConfigTest.java
index 9c7aa56..347e945 100644
--- a/src/test/java/com/hxh/spring/test/ConfigTest.java
+++ b/src/test/java/com/hxh/spring/test/ConfigTest.java
@@ -1,25 +1,32 @@
 package com.hxh.spring.test;
 
-import com.yeshi.buwan.domain.Config;
-import com.yeshi.buwan.service.imp.ConfigService;
-import com.yeshi.buwan.util.BeanUtil;
+import com.yeshi.buwan.job.AdJob;
+import org.json.JSONObject;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.WebAppConfiguration;
 
-import java.util.List;
+import javax.annotation.Resource;
 
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = {"classpath:spring.xml"})
+@WebAppConfiguration
 public class ConfigTest {
+
+    @Resource
+    private AdJob adJob;
 
     @Test
     public void test1() {
-        ConfigService configService = BeanUtil.getBean(ConfigService.class);
-        List<Config> configList = configService.getConfig(44L, 1);
-    }
-
-    @Test
-    public void test2(){
-        String resourceName = "鐖卞鑹�";
-        if (resourceName.indexOf("鐖卞鑹�") > -1 || resourceName.indexOf("鎼滅嫄") > -1 || resourceName.indexOf("鑵捐") > -1 || resourceName.indexOf("涔愯") > -1 || resourceName.indexOf("AcFun") > -1 || resourceName.indexOf("椋庤") > -1) {
-          System.out.println(resourceName);
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("appId", "10409568");
+        jsonObject.put("detailSystemId", "44");
+        try {
+            adJob.openHWAd(jsonObject.toString());
+        } catch (Exception e) {
+            e.printStackTrace();
         }
     }
 

--
Gitblit v1.8.0