Commit f92b58de by 刘冲

改成maven项目,引入terminalType

1 parent a4fac223
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>FindFirstTerminal</groupId>
<artifactId>simple</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
<nexus.url>tss.qmcai.com</nexus.url>
<core.jar.version>1.4.25</core.jar.version>
</properties>
<repositories>
<repository>
<id>public</id>
<name>all public jar</name>
<url>http://${nexus.url}/nexus/content/groups/public/</url>
</repository>
<repository>
<id>public1</id>
<name>all jar</name>
<url>http://${nexus.url}/nexus/content/repositories/thirdparty/</url>
</repository>
<repository>
<id>ali-maven</id>
<name>aliYun-maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.lottery</groupId>
<artifactId>core</artifactId>
<version>${core.jar.version}</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.dabaicong.file;
import com.lottery.common.contains.lottery.TerminalType;
import java.io.*;
import java.util.*;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Created by liuchong on 2017/5/21.
......@@ -10,6 +13,7 @@ import java.util.*;
*/
public class findFirst {
public static String filePath = "/Users/liuchong/Downloads/log";
private static Set<String> allTicket = new HashSet<String>();
static{
......@@ -22,8 +26,6 @@ public class findFirst {
}
public static String filePath="/Users/liuchong/Downloads/log";
public static void main(String[] args) throws Exception{
File file = new File(filePath);
File[] files =file.listFiles();
......@@ -65,83 +67,3 @@ public class findFirst {
}
}
enum TerminalType {
// 出票商,用于出票的
DYJ(1, "大赢家"),
ZhongCaiHui(5, "中彩汇"),
Huacai(9, "华彩"),
RuiLangYangGuang(10, "睿朗阳光"),
YuXiao(13, "语笑通信"),
GuoXinCai(11, "国信彩"),
ZhongYue(12, "大奖365"),
JinNuo(14,"金诺"),
GaoDe(15,"高德"),
GaoDeDPT(16,"高德大平台"),
FYZC(17,"风云众成"),
ZCLT(18,"中彩乐投"),
GDHM(19,"高德豪门"),
gxc_two(20,"国信彩2"),
FYZC_two(21,"风云众成2"),
CQFC(22, "重庆福彩"),
HBZYZD(23,"自有终端"),
FJEX(24,"福建恩夏"),
gxc_three(25,"国信彩3"),
DYWC(26,"点易吾彩"),
BEMORE(27,"bemore出票商"),
zclt2(28,"中彩乐投2"),
// 非出票商,用于查询,抓取数据的
WubaiWan(100, "500w彩票网"),
//Okooo(101, "澳客网"),
// 虚拟出票,仅供测试
Virtual(0, "虚拟出票"),
all(-1,"默认");
public int value;
public String name;
TerminalType (int value, String name) {
this.value=value;
this.name=name;
}
public static TerminalType get(int value) {
TerminalType[] type = values();
for (TerminalType terminalType : type) {
if ( terminalType.value == value ) {
return terminalType;
}
}
return null;
}
public static List<TerminalType> get() {
return Arrays.asList(values());
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String toString(){
return "[value="+value+",name="+name+"]";
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!