Commit a5b3ad84 authored by 赵啸非's avatar 赵啸非

添加新闻来源

parent 44089f4e
Pipeline #2388 canceled with stages
......@@ -35,10 +35,7 @@ import com.mortals.xhx.module.matter.service.MatterDatumService;
import com.mortals.xhx.module.matter.service.MatterService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
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 org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.stream.Collectors;
......@@ -163,16 +160,12 @@ public class HomeController extends BaseJsonBodyController {
int code = VALUE_RESULT_SUCCESS;
try {
Map<String, String> params = new HashMap<>();
// HttpUtil.d
params.put("siteid",queryPdu.getSiteId().toString());
params.put("type",queryPdu.getType().toString());
params.put("page",queryPdu.getPage().toString());
params.put("size",queryPdu.getSize().toString());
UrlBuilder urlBuilder = domain.addPath("news").addPath("newsList");
String response = HttpUtil.doGet(urlBuilder.toString(), params);
//todo 实现新闻列表
this.recordSysLog(this.request, busiDesc + " 【成功】");
return response;
} catch (Exception e) {
......@@ -185,7 +178,7 @@ public class HomeController extends BaseJsonBodyController {
}
@PostMapping({"notice/info"})
@GetMapping({"notice/info"})
public String noteInfo(Long id) {
String url = GlobalSysInfo.getParamValue(Constant.PARAMS_NOTICE_URL, "http://192.168.0.98:8090/api/");
......@@ -196,13 +189,9 @@ public class HomeController extends BaseJsonBodyController {
int code = VALUE_RESULT_SUCCESS;
try {
Map<String, String> params = new HashMap<>();
// HttpUtil.d
params.put("id",id.toString());
UrlBuilder urlBuilder = domain.addPath("news").addPath("newInfo");
String response = HttpUtil.doGet(urlBuilder.toString(), params);
//todo 实现新闻列表
this.recordSysLog(this.request, busiDesc + " 【成功】");
return response;
} catch (Exception e) {
......
......@@ -4,8 +4,8 @@ POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin"
"loginName": "admin",
"password": "admin"
}
> {%
......@@ -27,7 +27,26 @@ Content-Type: application/json
POST {{baseUrl}}/home/info
Content-Type: application/json
{"siteId": 3}
{
"siteId": 3
}
###通知列表
POST {{baseUrl}}/home/notice/list
Content-Type: application/json
{
"siteId": 3,
"page": 1,
"size": 10,
"type": 1
}
###通知详细
POST {{baseUrl}}/home/notice/info?id=14
Content-Type: application/json
......
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