fire_point/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java

72 lines
2.8 KiB
Java

package com.xkrs.straw.controller;
import com.xkrs.service.impl.FirePointServiceImpl;
import com.xkrs.straw.dao.SysUserDao;
import com.xkrs.straw.model.qo.AllFirePointQo;
import com.xkrs.straw.service.DispatchFirePointService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
public class DispatchFirePointController {
public static Logger log = LoggerFactory.getLogger(FirePointServiceImpl.class);
@Resource
private SysUserDao sysUserDao;
@Resource
private DispatchFirePointService firePointService;
@GetMapping("/debug")
public String debug() {
// List<SysUserEntity> sysUserEntityList = sysUserDao.findAll();
// for (SysUserEntity sysUserEntity : sysUserEntityList) {
// String addTime = sysUserEntity.getAddTime();
// String vipTimeRangeJson = sysUserEntity.getVipTimeRangeJson();
// if (!DateTimeUtil.isValidDateTime(addTime)) {
// return sysUserEntity.getUserName();
// }
// if (!DateTimeUtil.isValidDateTime(vipTimeRangeJson)) {
// return sysUserEntity.getUserName();
// }
// VipTimeRangeBean.VipTimeRangeItemBean vipTimeRangeItemBean = new VipTimeRangeBean.VipTimeRangeItemBean();
// vipTimeRangeItemBean.setStartTime(addTime);
// vipTimeRangeItemBean.setEndTime(vipTimeRangeJson);
// List<VipTimeRangeBean.VipTimeRangeItemBean> list = new ArrayList<>();
// list.add(vipTimeRangeItemBean);
// VipTimeRangeBean vipTimeRangeBean = new VipTimeRangeBean();
// vipTimeRangeBean.setList(list);
// String serialize = JsonUtils.<VipTimeRangeBean>serialize(vipTimeRangeBean);
// System.out.println("serialize = " + serialize);
// sysUserEntity.setVipTimeRangeJson(serialize);
// sysUserDao.save(sysUserEntity);
// }
return "OKkkkkkkk";
}
/**
* 普通渠道推送火点到秸秆系统
*/
// @PostMapping("/insertFirePointChannelOrdinary")
@PostMapping("/insertFirePoint")
public String insertFirePointChannelOrdinary(@RequestBody AllFirePointQo firePointQo) {
return firePointService.insertFirePointChannelOrdinary(firePointQo);
}
/**
* 精准渠道推送火点到秸秆系统
*/
@PostMapping("/insertFirePointChannelPrecise")
public String insertFirePointChannelPrecise(@RequestBody AllFirePointQo firePointQo) {
return firePointService.insertFirePointChannelPrecise(firePointQo);
}
}