优化
This commit is contained in:
parent
70605e2fe0
commit
07345a8652
@ -5,30 +5,25 @@ import com.xkrs.straw.model.qo.AllFirePointQo;
|
|||||||
import com.xkrs.straw.service.DispatchFirePointService;
|
import com.xkrs.straw.service.DispatchFirePointService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
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.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/dispatch")
|
|
||||||
public class DispatchFirePointController {
|
public class DispatchFirePointController {
|
||||||
|
|
||||||
public static Logger log = LoggerFactory.getLogger(FirePointServiceImpl.class);
|
public static Logger log = LoggerFactory.getLogger(FirePointServiceImpl.class);
|
||||||
|
|
||||||
private final Locale locale = LocaleContextHolder.getLocale();
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DispatchFirePointService firePointService;
|
private DispatchFirePointService firePointService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 普通渠道推送火点到秸秆系统
|
* 普通渠道推送火点到秸秆系统
|
||||||
*/
|
*/
|
||||||
@PostMapping("/insertFirePointChannelOrdinary")
|
// @PostMapping("/insertFirePointChannelOrdinary")
|
||||||
|
@PostMapping("/insertFirePoint")
|
||||||
public String insertFirePointChannelOrdinary(@RequestBody AllFirePointQo firePointQo) {
|
public String insertFirePointChannelOrdinary(@RequestBody AllFirePointQo firePointQo) {
|
||||||
return firePointService.insertFirePointChannelOrdinary(firePointQo);
|
return firePointService.insertFirePointChannelOrdinary(firePointQo);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package com.xkrs.straw.controller;
|
|||||||
|
|
||||||
import com.xkrs.common.encapsulation.PromptMessageEnum;
|
import com.xkrs.common.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.dao.FirePointDao;
|
import com.xkrs.dao.FirePointDao;
|
||||||
import com.xkrs.model.qo.FirePointQo;
|
|
||||||
import com.xkrs.service.FirePointService;
|
import com.xkrs.service.FirePointService;
|
||||||
import com.xkrs.service.StreetService;
|
import com.xkrs.service.StreetService;
|
||||||
import com.xkrs.service.impl.FirePointServiceImpl;
|
import com.xkrs.service.impl.FirePointServiceImpl;
|
||||||
@ -70,20 +69,6 @@ public class FirePointController {
|
|||||||
// return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale);
|
// return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加火点数据(Complete)
|
|
||||||
*/
|
|
||||||
@PostMapping("/insertFirePoint")
|
|
||||||
public String insertFirePoint(@RequestBody FirePointQo firePointQo) {
|
|
||||||
// log.info("insertFirePoint 接收到火点信息:" + firePointQo.toString());
|
|
||||||
// boolean success = firePointService.insertFirePoint(firePointQo);
|
|
||||||
// if (success) {
|
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale);
|
|
||||||
// } else {
|
|
||||||
// return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "添加失败", locale);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (Complete)
|
* (Complete)
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user