Commit 80469f94 authored by 赵啸非's avatar 赵啸非

修改同步抓取脚本

parent 1b20c114
package com.mortals.xhx.busiz.web;
import cn.hutool.http.HttpUtil;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.model.vo.MatterInfo;
import com.mortals.xhx.module.matter.service.MatterService;
import lombok.extern.apachecommons.CommonsLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
import static com.mortals.framework.ap.SysConstains.MESSAGE_INFO;
import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
/**
* 测试接口
*
* @author:
* @date: 2022/12/14 9:18
*/
@RestController
@CommonsLog
@RequestMapping("test")
public class DemoWebApiController {
@Autowired
private MatterService matterService;
@PostMapping(value = "testGov")
@UnAuth
public Rest<String> testGov(@RequestBody MatterQuery query) {
String resp = HttpUtil.get(query.getUrl());
return Rest.ok(resp);
}
}
......@@ -66,6 +66,7 @@ public class MicroWebApiController extends BaseJsonBodyController {
}
protected PageInfo buildPageInfo(MatterQuery query) {
PageInfo pageInfo = new PageInfo();
if (!ObjectUtils.isEmpty(query) && !ObjectUtils.isEmpty(query.getPage())) {
......
......@@ -423,7 +423,7 @@ public class MatterDetailHtmlParseUtil {
for (int k = 0; k < evaluateList.size(); k++) {
map.put(evaluateList.get(k).firstElementChild().text(), evaluateList.get(k).lastElementChild().text().trim());
}
map.put("sort", j);
//map.put("sort", j);
resultListMap.add(map);
}
} catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment