| | |
| | | import com.iflytek.antelope.other.client.sdk.UserInfoSdk; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.io.*; |
| | | import java.util.Scanner; |
| | | |
| | | |
| | | @Slf4j |
| | | public class LingyangUtil { |
| | |
| | | |
| | | public static void main(String[] args) { |
| | | JSONObject j = new JSONObject(); |
| | | j.put(LINGYANG_AESKEY,"vczfadepbqrdcdae"); |
| | | j.put(LINGYANG_APPKEY,"rqwryznqsl"); |
| | | j.put(LINGYANG_SECRET,"b2da06d8bb4eae0f0701649571640a203e80ccdc"); |
| | | System.out.println(j.toJSONString()); |
| | | // j.put(LINGYANG_AESKEY,"vczfadepbqrdcdae"); |
| | | // j.put(LINGYANG_APPKEY,"rqwryznqsl"); |
| | | // j.put(LINGYANG_SECRET,"b2da06d8bb4eae0f0701649571640a203e80ccdc"); |
| | | // System.out.println(j.toJSONString()); |
| | | |
| | | try { |
| | | File file = new File("D:\\doumeeplant.log"); |
| | | FileWriter out = new FileWriter(new File("D:\\out1.log")); |
| | | BufferedWriter writer = new BufferedWriter(out); |
| | | BufferedReader br = new BufferedReader(new FileReader(file)); |
| | | String line; |
| | | int lineNum = 1; |
| | | int num = 1; |
| | | int tNum = -1; |
| | | while ((line = br.readLine()) != null) { |
| | | if(line.contains("\"manager\":\"0\"") ){num++; |
| | | tNum++; |
| | | writer.write(line.replace("结果:","")); |
| | | writer.newLine(); |
| | | System.out.printf("[%d]: %s%n", lineNum, line); // 输出这一行 |
| | | } |
| | | /* if (line.contains("羚羊平台获取用户信息")) { // 如果这一行包含关键词 |
| | | System.out.printf("[%d]: %s%n", lineNum, line); // 输出这一行 |
| | | num++; |
| | | tNum++; |
| | | }else if(tNum >=0 && tNum <=2){ |
| | | System.out.printf("[%d]: %s%n", lineNum, line); // 输出这一行 |
| | | tNum ++; |
| | | } |
| | | if(tNum ==3){ |
| | | tNum=-1; |
| | | }*/ |
| | | lineNum++; |
| | | |
| | | } |
| | | out.close(); |
| | | System.out.println(num); |
| | | |
| | | |
| | | }catch (Exception e){ |
| | | e.getMessage(); |
| | | } |
| | | |
| | | } |
| | | /*public LingyangUtil(String param){ |
| | | JSONObject p = JSONObject.parseObject(param); |
| | |
| | | return null; |
| | | |
| | | } |
| | | |
| | | } |