package org.springblade.jfpt.parcel.controller; import lombok.AllArgsConstructor; import org.springblade.core.tool.api.R; import org.springblade.jfpt.animalheat.vo.AnimalHeatVo; import org.springblade.jfpt.parcel.service.ParcelService; import org.springblade.jfpt.parcel.vo.ConditionVo; 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 javax.servlet.http.HttpServletResponse; /** * @title 包裹控制层 * @author arsn * @time 2021-03-10 */ @RestController @AllArgsConstructor @RequestMapping("parcel/parcel") public class ParcelController { private final ParcelService parcelService; /** * 获取查询条件 * @param conditionVo 查询条件对象 * @param response 返回作用域 * @return */ @PostMapping("/parcelKindStatis") public R parcelKindStatis(@RequestBody ConditionVo conditionVo, HttpServletResponse response){ response.setHeader("Access-Control-Allow-Origin", "*"); response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); response.setHeader("Access-Control-Allow-Credentials","true"); return R.data(parcelService.parcelKindStatis(conditionVo)); } }